:root {
  color-scheme: light;
  --bg: #f4f3ef;
  --sidebar: #ffffff;
  --card: #ffffff;
  --text: #161513;
  --muted: #6f6b64;
  --line: #e7e4dc;
  --line-strong: #d8d4ca;
  --ink: #111111;
  --accent: #ff5c1a;
  --accent-soft: #fff1ea;
  --ok: #0f8a5f;
  --ok-soft: #e7f6ef;
  --danger: #c9372c;
  --danger-soft: #fdecea;
  --shadow: 0 1px 2px rgba(22, 21, 19, 0.04), 0 8px 24px rgba(22, 21, 19, 0.04);
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --radius: 14px;
  --sidebar-w: 232px;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text); font-family: var(--sans); }
a { color: inherit; text-decoration: none; }
button, .btn { font-family: inherit; }
.app { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--sidebar);
  border-right: 1px solid var(--line);
  padding: 20px 14px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  font-weight: 700;
  letter-spacing: -0.03em;
}
.brand-mark {
  width: 28px; height: 28px; border-radius: 8px;
  background: var(--accent); color: #fff;
  display: grid; place-items: center; font-size: 14px; font-weight: 800;
}
.brand small { display: block; font-weight: 500; color: var(--muted); font-size: 11px; letter-spacing: 0.04em; text-transform: uppercase; }
.side-nav { display: flex; flex-direction: column; gap: 4px; }
.side-nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: 10px; color: var(--muted); font-size: 14px; font-weight: 550;
}
.side-nav a:hover { background: var(--bg); color: var(--text); }
.side-nav a.active { background: var(--accent-soft); color: var(--accent); }
.side-nav svg { width: 16px; height: 16px; }
.sidebar-foot { margin-top: auto; padding: 10px; border-top: 1px solid var(--line); }
.sidebar-foot .who { font-size: 13px; font-weight: 600; word-break: break-all; }
.sidebar-foot .meta { color: var(--muted); font-size: 12px; margin-top: 2px; }
.main { flex: 1; min-width: 0; }
.topbar {
  padding: 28px 36px 0;
}
.page { padding: 8px 36px 48px; max-width: 1080px; }
.page.wide { max-width: 1200px; }
.page h1 { font-size: 28px; letter-spacing: -0.04em; margin: 0 0 6px; }
.lede { color: var(--muted); margin: 0 0 24px; font-size: 14px; }
.grid-2 { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; }
.pack-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
  box-shadow: var(--shadow);
}
.card h2, .section-title {
  font-size: 16px; letter-spacing: -0.02em; margin: 28px 0 12px;
}
.label { color: var(--muted); font-size: 12px; font-weight: 650; text-transform: uppercase; letter-spacing: 0.06em; }
.stat { font-size: 40px; font-weight: 720; letter-spacing: -0.05em; margin: 8px 0 12px; }
.meter { height: 8px; background: var(--bg); border-radius: 99px; overflow: hidden; }
.meter > span { display: block; height: 100%; background: var(--accent); border-radius: inherit; }
.hint-list { margin: 12px 0 0; padding: 0; list-style: none; color: var(--muted); font-size: 14px; }
.hint-list li { margin: 8px 0; padding-left: 18px; position: relative; }
.hint-list li::before { content: ""; position: absolute; left: 0; top: 7px; width: 7px; height: 7px; border-radius: 99px; background: #2bb3a0; }
.pack {
  display: flex; flex-direction: column; gap: 8px; position: relative;
}
.pack.popular { border-color: var(--accent); }
.badge {
  position: absolute; top: 14px; right: 14px;
  background: var(--accent-soft); color: var(--accent);
  font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 99px;
}
.pack .topup-amount { font-size: 28px; font-weight: 700; letter-spacing: -0.04em; }
.pack .price { font-size: 18px; font-weight: 650; }
.btn, button {
  appearance: none; border: 0; cursor: pointer;
  background: var(--ink); color: #fff;
  border-radius: 10px; padding: 10px 14px; font-size: 13px; font-weight: 650;
}
.btn.block, button.block { width: 100%; margin-top: auto; }
.btn.secondary, button.secondary { background: #fff; color: var(--text); border: 1px solid var(--line-strong); }
.btn.danger, button.danger { background: var(--danger-soft); color: var(--danger); }
.btn.google {
  display: inline-flex; align-items: center; gap: 10px;
  background: #fff; color: var(--text); border: 1px solid var(--line-strong);
  padding: 11px 16px; border-radius: 12px;
}
.btn.google:hover { background: var(--bg); }
input {
  background: #fff; border: 1px solid var(--line-strong); border-radius: 10px;
  padding: 10px 12px; font-size: 14px; width: min(280px, 100%);
}
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 650; text-transform: uppercase; letter-spacing: 0.04em; padding: 10px 8px; border-bottom: 1px solid var(--line); }
td { padding: 12px 8px; border-bottom: 1px solid var(--line); font-size: 14px; vertical-align: middle; }
.pill { display: inline-block; padding: 2px 8px; border-radius: 99px; font-size: 12px; font-weight: 650; }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.warn { background: var(--accent-soft); color: var(--accent); }
.pill.muted { background: var(--bg); color: var(--muted); }
code, pre { font-family: var(--mono); font-size: 12.5px; }
pre { background: #1c1b19; color: #f4f1ea; padding: 16px; border-radius: 12px; overflow: auto; }
.token { background: #1c1b19; color: #f4f1ea; padding: 14px; border-radius: 12px; word-break: break-all; font-family: var(--mono); font-size: 12.5px; }
.flash { background: var(--ok-soft); color: var(--ok); padding: 10px 12px; border-radius: 10px; font-size: 13px; margin-bottom: 10px; }
.empty { color: var(--muted); padding: 20px 8px; font-size: 14px; }
[hidden] { display: none !important; }
.login {
  min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 26px; padding: 48px 24px; position: relative; isolation: isolate;
  background:
    radial-gradient(ellipse at 12% 18%, #c9dcff 0%, transparent 48%),
    radial-gradient(ellipse at 85% 24%, #d8ccf5 0%, transparent 44%),
    radial-gradient(ellipse at 72% 95%, #e8d9fa 0%, transparent 46%),
    radial-gradient(ellipse at 6% 90%, #d3eaf7 0%, transparent 40%),
    #f4f4fc;
}
.login::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(ellipse at 50% 46%, #ffffff80 0%, #ffffff00 65%);
}
.login-card {
  width: min(448px, 100%); padding: 48px 40px 34px; text-align: center;
  background: #fff; border-radius: 32px;
  box-shadow: 0 24px 90px #4547760d;
  color: #232b39;
}
.login-brand {
  display: inline-flex; gap: 11px; align-items: center; text-align: left;
  color: #1d211f; font-size: 32px; font-weight: 750; letter-spacing: -1.5px;
}
.login-brand-mark {
  display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px;
  background: #232638; color: white; font-size: 30px; letter-spacing: -2px;
}
.login-brand small { display: block; font-size: 9px; font-weight: 600; letter-spacing: 2.6px; margin: 0 0 0 2px; }
.login-card h1 { font-size: 32px; font-weight: 650; letter-spacing: -1.1px; margin: 38px 0 10px; }
.login-subtitle { margin: 0; font-size: 16px; line-height: 1.6; color: #475366; }
.login-description { margin: 20px 0 30px; font-size: 14px; line-height: 1.7; color: #68717d; }
.login-card .btn.google {
  position: relative; display: flex; justify-content: center; width: 100%; min-height: 56px;
  border: 1px solid #d4d7db; border-radius: 999px; padding: 14px 36px;
  font-size: 15px; font-weight: 500; color: #222824; background: #fff;
  transition: background .15s, border-color .15s, box-shadow .15s;
}
.login-card .btn.google svg { position: absolute; left: 20px; flex-shrink: 0; }
.login-card .btn.google:hover { background: #f7f7fc; border-color: #b5b5d0; box-shadow: 0 3px 10px #45477608; }
.login a:focus-visible { outline: 3px solid #7772bb; outline-offset: 5px; }
.login-note { color: #727b85; font-size: 12px; line-height: 1.7; margin: 18px 0 32px; }
.login-footer { border-top: 1px solid #edf0ed; padding-top: 24px; color: #78817e; font-size: 11px; line-height: 1.6; }
.login-footer span { display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: #a19bc8; margin-right: 5px; vertical-align: middle; }
.login-docs { font-size: 12px; color: #606584; text-underline-offset: 4px; }
.login-docs:hover { text-decoration: underline; }
.login-docs span { margin-left: 5px; }
@media (max-width: 480px) {
  .login { padding: 32px 20px; gap: 24px; }
  .login-card { padding: 36px 24px 28px; border-radius: 28px; }
  .login-card h1 { margin-top: 30px; }
  .login-brand { font-size: 29px; }
  .login-note { max-width: 240px; margin-left: auto; margin-right: auto; }
}
@media (prefers-reduced-motion: reduce) { .login-card .btn.google { transition: none; } }
.chips { display: flex; gap: 10px; margin: 16px 0 20px; }
.chip { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; flex: 1; }
.chip b { display: block; font-size: 18px; letter-spacing: -0.03em; }
.play-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.field { display: flex; flex-direction: column; gap: 6px; margin: 12px 0; }
.field input, .field select { width: 100%; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tabs button { background: #fff; color: var(--text); border: 1px solid var(--line-strong); }
.tabs button.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.pg-meta { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.pg-json { min-height: 280px; max-height: 640px; }
.docs-toc { display: flex; flex-wrap: wrap; gap: 8px 14px; margin: 0 0 20px; font-size: 13px; }
.docs-toc a { color: var(--accent); font-weight: 650; }
.docs h2 { font-size: 18px; letter-spacing: -0.03em; margin: 0 0 10px; }
.docs h3 { font-size: 15px; margin: 18px 0 8px; }
.docs p { font-size: 14px; line-height: 1.55; color: var(--text); margin: 0 0 10px; }
.docs .muted { color: var(--muted); }
.docs .card + .card { margin-top: 16px; }
.docs table td code { font-size: 12px; }
.docs dt { font-weight: 650; margin-top: 10px; }
.docs dd { margin: 4px 0 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
@media (max-width: 900px) {
  .app { flex-direction: column; }
  .sidebar { width: 100%; border-right: 0; border-bottom: 1px solid var(--line); }
  .side-nav { flex-direction: row; overflow: auto; }
  .grid-2, .pack-grid, .play-grid { grid-template-columns: 1fr; }
  .page, .topbar { padding-left: 18px; padding-right: 18px; }
}

/* Shared console shell. Login retains its independent visual treatment. */
.app { --bg: #fafaf8; --card: #fff; --text: #232631; --muted: #7b8291; --line: #e9eaf0; --line-strong: #dcdfe7; --accent: #6272d4; --accent-soft: #eef0fc; --ink: #292b36; background: var(--bg); color: var(--text); gap: 0; }
.app .sidebar { width: 244px; height: calc(100vh - 32px); position: sticky; top: 16px; margin: 16px 0 16px 16px; padding: 30px 20px 18px; border: 1px solid #f0f0ee; border-radius: 22px; background: #f5f5f1; gap: 26px; }
.app .brand { justify-content: center; font-size: 27px; padding: 4px 0 22px; }
.app .brand-mark { width: 38px; height: 38px; font-size: 26px; background: #252735; border-radius: 11px; }
.app .brand small { font-size: 8px; letter-spacing: .2em; margin-top: 1px; }
.workspace-label { display: flex; gap: 10px; align-items: center; border: 1px solid #dedff0; border-radius: 13px; background: #eeeff8; padding: 12px 10px; color: #5662a7; font-size: 12px; font-weight: 600; }
.workspace-avatar { display: grid; place-items: center; width: 28px; height: 28px; background: #fff; border-radius: 9px; font-size: 16px; }
.workspace-label small { display: block; color: #858ba0; font-size: 10px; margin-top: 3px; font-weight: 400; }
.app .side-nav { gap: 7px; }
.app .side-nav a { padding: 12px 10px; font-size: 13px; font-weight: 550; gap: 13px; border-radius: 11px; }
.app .side-nav svg { width: 18px; height: 18px; flex-shrink: 0; }
.app .side-nav a.active { background: #fff; color: #354176; box-shadow: 0 2px 8px #21254705; }
.app .side-nav a.active svg { color: #6376cf; }
.app .side-nav a:hover { background: #ebecf2; }
.app .sidebar-foot { padding-top: 18px; }
.app .sidebar-foot .who { font-size: 11px; line-height: 1.5; }
.app .sidebar-foot .meta { margin-top: 5px; font-size: 11px; }
.app .main { padding: 0 40px; }
.app .topbar { padding: 30px 0 22px; max-width: 1100px; margin: auto; }
.breadcrumb { display: flex; gap: 10px; color: #9498a4; font-size: 11px; margin-bottom: 10px; }
.breadcrumb span:last-child { color: #596071; }
.app .topbar h1 { font-size: 29px; letter-spacing: -.045em; font-weight: 650; margin: 0 0 10px; }
.app .lede { color: #8a8e9a; font-size: 12px; line-height: 1.7; margin-bottom: 0; }
.app .page { padding: 12px 0 50px; max-width: 1100px; margin: auto; }
.app .page.wide { max-width: 1100px; }
.app .card { border: 1px solid #eeeeef; padding: 26px; border-radius: 20px; box-shadow: 0 3px 14px #292d4203; }
.app .muted { color: var(--muted); font-size: 12px; line-height: 1.7; }
.app .btn, .app button { border-radius: 999px; font-size: 12px; padding: 11px 17px; font-weight: 500; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.app button:disabled { opacity: .6; cursor: wait; }
.app a:focus-visible, .app button:focus-visible, .app input:focus-visible, .app select:focus-visible, .table-scroll:focus-visible { outline: 3px solid #b3baf0; outline-offset: 3px; }
.app input, .app select { border-radius: 11px; border: 1px solid var(--line-strong); padding: 11px 13px; background: white; color: var(--text); font: inherit; font-size: 13px; }
.app .stat { font-size: 38px; font-weight: 600; margin: 14px 0 12px; }
.app .label { font-size: 10px; color: #747b8b; letter-spacing: .07em; font-weight: 550; }
.app .meter { height: 7px; background: #d8dce88f; }
.app .meter > span { background: #8390cf; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.eyebrow { font-size: 10px; letter-spacing: .12em; font-weight: 600; color: #707891; }
.console-notice { display: flex; align-items: center; gap: 10px; padding: 14px 18px; background: #efeff4; border-radius: 10px; font-size: 11px; margin-bottom: 20px; line-height: 1.6; }
.console-notice > span:last-child { margin-left: auto; }
.notice-dot { width: 6px; height: 6px; background: #8c93b5; border-radius: 50%; flex-shrink: 0; }
.account-hero { padding: 30px; border-radius: 22px; background: radial-gradient(ellipse at 95% 100%, #d4ddf7, transparent 65%), radial-gradient(ellipse at 20% 100%, #dbe9ea, transparent 65%), #efedf4; margin-bottom: 24px; border: 1px solid #e8e7ed; }
.account-hero .eyebrow { background: #fff7; padding: 7px 10px; border-radius: 8px; }
.account-hero h2 { font-size: clamp(24px, 2.6vw, 36px); font-weight: 550; letter-spacing: -.045em; margin: 25px 0 8px; }
.hero-description { font-size: 12px; color: #767e90; margin: 0; line-height: 1.6; }
.hero-stats { display: grid; grid-template-columns: 1.5fr 1fr; gap: 24px; margin: 32px 0 18px; }
.hero-stats > div + div { border-left: 1px solid #ffffffb0; padding-left: 28px; }
.usage-caption { display: flex; justify-content: space-between; gap: 12px; font-size: 11px; color: #687187; margin-bottom: 10px; line-height: 1.6; }
.usage-caption b { font-weight: 600; color: #353f54; margin-left: 5px; }
.app .section-head h2 { margin: 0 0 6px; font-size: 18px; font-weight: 600; }
.section-head p { margin: 0; }
.overview-keys .table-scroll { margin-top: 20px; }
.table-scroll { overflow-x: auto; max-width: 100%; }
.app th { font-size: 9px; letter-spacing: .08em; padding: 14px 12px; font-weight: 600; white-space: nowrap; }
.app td { font-size: 12px; padding: 18px 12px; }
.app td code { font-size: 11px; background: #f4f5f9; border: 1px solid #e9ebf1; border-radius: 7px; padding: 6px 10px; white-space: nowrap; }
.app tr:last-child td { border-bottom: 0; }
.app .pill { font-size: 10px; padding: 4px 8px; }
.app .empty { padding: 30px 12px; }
.text-link { color: #5968b0; font-size: 12px; font-weight: 500; }
.text-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.getting-started { display: grid; grid-template-columns: 1fr 1.4fr; gap: 20px; margin-top: 24px; }
.app .getting-started h2 { font-size: 18px; line-height: 1.4; font-weight: 550; margin: 14px 0 10px; }
.getting-started .btn { margin-top: 14px; }
.app pre { background: #f4f5f9; color: #535f7a; font-size: 11px; line-height: 1.8; border: 1px solid #e9ebf3; }
.app .pack { gap: 12px; }
.app .pack .block { margin-top: 12px; }
.app .section-title { font-size: 18px; font-weight: 550; margin: 30px 0 16px; }
@media (max-width: 1100px) { .app .main { padding: 0 26px; } .app .sidebar { width: 216px; padding-left: 14px; padding-right: 14px; } }
@media (max-width: 900px) {
  .app { flex-direction: column; }
  .app .sidebar { width: auto; height: auto; position: static; margin: 12px; padding: 14px 16px; gap: 15px; }
  .app .brand { justify-content: flex-start; padding: 0; font-size: 23px; }
  .app .brand-mark { height: 32px; width: 32px; font-size: 23px; }
  .workspace-label { display: none; }
  .app .side-nav { flex-direction: row; overflow-x: auto; gap: 4px; }
  .app .side-nav a { white-space: nowrap; padding: 10px; font-size: 12px; gap: 7px; }
  .app .main { padding: 0 24px; }
  .app .topbar { padding-top: 14px; }
}
@media (max-width: 600px) {
  .app .main { padding: 0 16px; }
  .app .card, .account-hero { padding: 20px; border-radius: 18px; }
  .app .topbar h1 { font-size: 27px; }
  .console-notice .muted { display: none; }
  .hero-stats { gap: 12px; }
  .hero-stats > div + div { padding-left: 18px; }
  .hero-stats .stat { font-size: 32px; }
  .usage-caption { flex-direction: column; gap: 3px; }
  .getting-started { grid-template-columns: 1fr; gap: 16px; }
  .section-head { flex-wrap: wrap; }
  .app .btn, .app button { font-size: 11px; }
  .account-hero .section-head { gap: 10px; }
}
.app .getting-started > *, .app .grid-2 > *, .app .pack-grid > *, .app .play-grid > * { min-width: 0; }

/* Account controls stay available on desktop and mobile. */
.account-row { display: flex; align-items: center; gap: 10px; }
.account-avatar { width: 36px; height: 36px; flex: 0 0 36px; display: grid; place-items: center; border-radius: 50%; background: linear-gradient(135deg, #dbeafe, #e7ddfb); color: #45446d; font-size: 15px; font-weight: 650; }
.account-details { flex: 1; min-width: 0; }
.app .sidebar-foot .who { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app .logout-button { display: grid; place-items: center; flex: 0 0 36px; width: 36px; height: 36px; padding: 0; border: 1px solid #dfe2ec; border-radius: 50%; background: transparent; color: #353746; cursor: pointer; transition: background .15s, border-color .15s; }
.logout-button svg { width: 21px; height: 21px; }
.app .logout-button:hover { background: #eeedf7; border-color: #c6c3dc; }
.app .logout-button:focus-visible { outline: 2px solid #7772b9; outline-offset: 3px; }
.app .logout-button:disabled { opacity: .5; cursor: wait; }
.account-avatar[hidden], .app .logout-button[hidden] { display: none; }
.logout-error { color: #a43434; font-size: 11px; line-height: 1.5; }
.logout-error:not(:empty) { margin-top: 10px; }

.account-avatar img { display: block; width: 100%; height: 100%; border-radius: inherit; object-fit: cover; }
