:root {
  --ink: #0f172a;
  --ink-2: #1e293b;
  --muted: #64748b;
  --muted-2: #94a3b8;
  --line: #e2e8f0;
  --bg: #f4f5f7;
  --card: #ffffff;
  --brand: #ea580c;
  --brand-dark: #c2410c;
  --brand-soft: #fff1e8;
  --green: #15803d;
  --green-soft: #e9f7ef;
  --amber: #b45309;
  --amber-soft: #fef3c7;
  --red: #b91c1c;
  --red-soft: #fee2e2;
  --blue: #1d4ed8;
  --blue-soft: #e8efff;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.05), 0 8px 24px -12px rgba(15, 23, 42, 0.18);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

.app-shell { min-height: 100vh; display: flex; flex-direction: column; }

/* ---------------- 顶栏 ---------------- */
.topbar {
  background: linear-gradient(120deg, #0b1220 0%, #182235 60%, #1f2937 100%);
  color: #e2e8f0;
  padding: 0 20px;
  position: sticky;
  top: 0;
  z-index: 40;
  box-shadow: 0 6px 18px -12px rgba(0, 0, 0, 0.6);
}
.topbar-inner {
  max-width: 1240px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 18px;
  height: 60px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px; color: #fff; white-space: nowrap; }
.brand-mark {
  width: 30px; height: 30px; border-radius: 9px;
  background: linear-gradient(140deg, #fb923c, #ea580c);
  display: grid; place-items: center; color: #fff; font-size: 15px; font-weight: 800;
  box-shadow: 0 4px 12px -4px #ea580c;
}
.brand small { display: block; font-weight: 400; font-size: 10px; color: #94a3b8; letter-spacing: .04em; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 多赛事切换器 */
.comp-picker { flex: 0 1 260px; min-width: 150px; }
.comp-switch {
  width: 100%; height: 30px; border-radius: 8px; padding: 0 26px 0 9px;
  border: 1px solid #334155; background: #0f172a; color: #e2e8f0; font-size: 12px;
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, #94a3b8 50%), linear-gradient(135deg, #94a3b8 50%, transparent 50%);
  background-position: calc(100% - 13px) 12px, calc(100% - 9px) 12px;
  background-size: 4px 4px, 4px 4px;
  background-repeat: no-repeat;
}
.comp-switch:focus { outline: 2px solid #fb923c55; border-color: #fb923c; }
.check-list { display: flex; flex-direction: column; gap: 6px; max-height: 320px; overflow: auto; padding: 4px; }
.check-row { display: flex; align-items: center; gap: 8px; padding: 7px 8px; border-radius: 8px; background: var(--surface-2, #f1f5f9); cursor: pointer; font-size: 13px; }
.check-row:hover { background: #e2e8f0; }
.check-row input { width: 16px; height: 16px; }

.nav { display: flex; gap: 4px; flex: 1; padding: 4px 0; min-width: 0; overflow: visible; }
.nav a {
  padding: 5px 8px; border-radius: 8px; font-size: 12px; color: #cbd5e1; white-space: nowrap;
  transition: background .15s, color .15s;
}
.nav a:hover { background: rgba(255,255,255,.08); color: #fff; }
.nav a.active { background: rgba(251,146,60,.16); color: #fdba74; font-weight: 600; }

.nav-more { position: relative; flex: 0 0 auto; display: flex; align-items: center; }
.nav-more summary {
  list-style: none; cursor: pointer; padding: 5px 8px; border-radius: 8px;
  font-size: 12px; color: #cbd5e1; white-space: nowrap;
}
.nav-more summary::-webkit-details-marker { display: none; }
.nav-more[open] summary, .nav-more summary.active { background: rgba(251,146,60,.16); color: #fdba74; font-weight: 600; }
.nav-more-menu {
  position: absolute; top: calc(100% + 8px); right: 0; min-width: 150px; z-index: 80;
  display: flex; flex-direction: column; gap: 2px; padding: 6px;
  background: #0f172a; border: 1px solid #273449; border-radius: 10px;
  box-shadow: 0 16px 34px rgba(0,0,0,.5);
}
.nav-more-menu a { padding: 8px 10px; border-radius: 7px; color: #cbd5e1; font-size: 13px; white-space: nowrap; }
.nav-more-menu a:hover { background: rgba(255,255,255,.08); color: #fff; }
.nav-more-menu a.active { color: #fdba74; background: rgba(251,146,60,.12); }

.user-chip { display: flex; align-items: center; gap: 8px; font-size: 12px; color: #cbd5e1; white-space: nowrap; }
.user-chip .avatar {
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  background: #334155; color: #fff; font-weight: 600; font-size: 12px;
}
.user-chip .role { color: #94a3b8; font-size: 11px; }
.user-chip button { background: none; border: 0; color: #94a3b8; cursor: pointer; font-size: 12px; padding: 4px; }
.user-chip button:hover { color: #fff; }

/* ---------------- 布局 ---------------- */
.main { flex: 1; width: 100%; max-width: 1240px; margin: 0 auto; padding: 22px 20px 64px; }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head h1 { font-size: 21px; margin: 0 0 4px; letter-spacing: -.2px; }
.page-head p { margin: 0; color: var(--muted); font-size: 13px; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
}
.card + .card { margin-top: 16px; }
.card-head {
  padding: 14px 18px; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
.card-head h2 { font-size: 15px; margin: 0; }
.card-head .sub { color: var(--muted); font-size: 12px; }
.card-body { padding: 16px 18px; }
.card-body.tight { padding: 10px 12px; }
.card-body.flush { padding: 0; }

.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.grow { flex: 1; }
.mt8 { margin-top: 8px; } .mt12 { margin-top: 12px; } .mt16 { margin-top: 16px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.mono { font-family: var(--mono); }
.nowrap { white-space: nowrap; }

/* ---------------- 统计卡 ---------------- */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.stat {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px; box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.stat::after { content: ""; position: absolute; right: -20px; top: -20px; width: 70px; height: 70px; border-radius: 50%; background: radial-gradient(circle, rgba(234,88,12,.08), transparent 70%); }
.stat .label { color: var(--muted); font-size: 12px; }
.stat .value { font-size: 26px; font-weight: 700; letter-spacing: -.5px; margin-top: 2px; font-variant-numeric: tabular-nums; }
.stat .value small { font-size: 13px; font-weight: 500; color: var(--muted); margin-left: 3px; }
.stat.alert .value { color: var(--brand); }

/* ---------------- 按钮 ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 14px; border-radius: 9px; border: 1px solid var(--line);
  background: #fff; color: var(--ink); font-size: 13px; font-weight: 500; font-family: inherit;
  cursor: pointer; transition: background .15s, border-color .15s, transform .05s; white-space: nowrap;
}
.btn:hover { background: #f8fafc; border-color: #cbd5e1; }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
.btn.dark { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn.dark:hover { background: #1e293b; }
.btn.danger { background: var(--red-soft); border-color: #fecaca; color: var(--red); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { background: #f1f5f9; color: var(--ink); }
.btn.sm { padding: 5px 10px; font-size: 12px; border-radius: 7px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-icon { border: 0; background: none; cursor: pointer; color: var(--muted); padding: 4px 6px; border-radius: 6px; }
.btn-icon:hover { background: #f1f5f9; color: var(--ink); }

/* ---------------- 表单 ---------------- */
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field > label { font-size: 12px; color: var(--muted); font-weight: 500; }
input[type="text"], input[type="number"], input[type="date"], input[type="password"], input[type="datetime-local"], select, textarea {
  width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px;
  font-family: inherit; font-size: 13px; color: var(--ink); background: #fff; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { border-color: #fdba74; box-shadow: 0 0 0 3px rgba(251,146,60,.15); }
textarea { resize: vertical; min-height: 80px; line-height: 1.5; }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='3'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; padding-right: 30px; }
input[type="checkbox"] { width: 15px; height: 15px; accent-color: var(--brand); cursor: pointer; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.form-grid .span2 { grid-column: span 2; }
.hint { color: var(--muted); font-size: 12px; }
.error-text { color: var(--red); font-size: 12px; }

/* ---------------- 表格 ---------------- */
.table-wrap { overflow-x: auto; }
table.grid { width: 100%; border-collapse: collapse; font-size: 13px; }
table.grid th {
  text-align: left; font-weight: 600; font-size: 12px; color: var(--muted);
  background: #f8fafc; padding: 9px 12px; border-bottom: 1px solid var(--line); white-space: nowrap;
  position: sticky; top: 0;
}
table.grid td { padding: 9px 12px; border-bottom: 1px solid #f1f5f9; vertical-align: middle; }
table.grid tbody tr:hover { background: #fafbfc; }
table.grid tbody tr:last-child td { border-bottom: 0; }
table.grid td.num, table.grid th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.grid td.mid, table.grid th.mid { text-align: center; }
table.grid tr.selected { background: var(--brand-soft); }
table.grid tr.selected:hover { background: #ffe8d8; }
.rank-1 td:first-child { color: #b45309; font-weight: 700; }

.empty { padding: 34px 16px; text-align: center; color: var(--muted-2); font-size: 13px; }

/* ---------------- 徽标 ---------------- */
.badge {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px;
  font-size: 11px; font-weight: 600; line-height: 1.6; white-space: nowrap;
}
.badge.gray { background: #f1f5f9; color: #475569; }
.badge.orange { background: var(--brand-soft); color: var(--brand-dark); }
.badge.green { background: var(--green-soft); color: var(--green); }
.badge.amber { background: var(--amber-soft); color: var(--amber); }
.badge.red { background: var(--red-soft); color: var(--red); }
.badge.blue { background: var(--blue-soft); color: var(--blue); }
.badge.dark { background: var(--ink); color: #fff; }

/* ---------------- 标签页 ---------------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; }
.tabs button {
  background: none; border: 0; border-bottom: 2px solid transparent; padding: 9px 14px;
  font-family: inherit; font-size: 13px; color: var(--muted); cursor: pointer; white-space: nowrap;
}
.tabs button.active { color: var(--brand); border-bottom-color: var(--brand); font-weight: 600; }

/* ---------------- 提示 ---------------- */
.notice {
  border: 1px solid #fed7aa; background: #fff7ed; color: #9a3412;
  padding: 10px 14px; border-radius: 10px; font-size: 13px;
}
.notice.info { border-color: #bfdbfe; background: #eff6ff; color: #1e40af; }
.notice.error { border-color: #fecaca; background: #fef2f2; color: #991b1b; }
.notice.success { border-color: #bbf7d0; background: #f0fdf4; color: #166534; }
.notice.warning { border-color: #fde68a; background: #fffbeb; color: #92400e; }

/* ---------------- 弹窗 ---------------- */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(15, 23, 42, .45); backdrop-filter: blur(2px);
  display: grid; place-items: center; z-index: 100; padding: 18px; animation: fade .15s ease;
}
.modal {
  background: #fff; border-radius: 16px; width: min(560px, 100%); max-height: 88vh; display: flex; flex-direction: column;
  box-shadow: 0 24px 60px -20px rgba(15,23,42,.5); animation: pop .18s ease;
}
.modal.wide { width: min(880px, 100%); }
.modal-head { padding: 16px 20px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; }
.modal-head h3 { margin: 0; font-size: 16px; }
.modal-body { padding: 18px 20px; overflow: auto; }
.modal-foot { padding: 14px 20px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 8px; }
@keyframes fade { from { opacity: 0 } }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98) } }

/* ---------------- Toast ---------------- */
.toast-root { position: fixed; top: 74px; right: 18px; z-index: 200; display: flex; flex-direction: column; gap: 8px; }
.toast {
  background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 10px; font-size: 13px;
  box-shadow: 0 12px 30px -12px rgba(0,0,0,.5); max-width: 360px; animation: slide .2s ease;
  display: flex; gap: 8px; align-items: flex-start;
}
.toast.success { background: #14532d; }
.toast.error { background: #7f1d1d; }
.toast.info { background: #1e3a8a; }
@keyframes slide { from { opacity: 0; transform: translateX(12px) } }

/* ---------------- 登录 ---------------- */
.login-page {
  min-height: 100vh; display: grid; grid-template-columns: 1.1fr .9fr; background: #0b1220;
}
.login-hero {
  padding: 54px 48px; color: #e2e8f0; display: flex; flex-direction: column; justify-content: center;
  background:
    radial-gradient(900px 420px at 15% 20%, rgba(234,88,12,.28), transparent 60%),
    radial-gradient(700px 400px at 80% 90%, rgba(56,189,248,.14), transparent 60%),
    linear-gradient(160deg, #0b1220, #111a2c 60%, #0b1220);
  position: relative; overflow: hidden;
}
.login-hero h1 { font-size: 34px; line-height: 1.2; margin: 18px 0 10px; letter-spacing: -1px; color: #fff; }
.login-hero p { color: #94a3b8; max-width: 460px; font-size: 14px; }
.login-features { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 26px; max-width: 470px; }
.login-feature { background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08); border-radius: 10px; padding: 10px 12px; font-size: 12.5px; color: #cbd5e1; }
.login-feature b { display: block; color: #fff; font-size: 13px; margin-bottom: 2px; }
.login-panel { background: #fff; padding: 48px 44px; display: flex; flex-direction: column; justify-content: center; overflow-y: auto; }
.login-panel h2 { margin: 0 0 4px; font-size: 22px; }
.login-panel .sub { color: var(--muted); font-size: 13px; margin-bottom: 22px; }
.demo-accounts { margin-top: 22px; border-top: 1px dashed var(--line); padding-top: 16px; }
.demo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.demo-btn {
  text-align: left; border: 1px solid var(--line); background: #fafafa; border-radius: 9px;
  padding: 8px 10px; cursor: pointer; font-family: inherit;
}
.demo-btn:hover { border-color: #fdba74; background: #fff7ed; }
.demo-btn b { display: block; font-size: 12.5px; }
.demo-btn span { font-size: 11px; color: var(--muted); }

/* ---------------- 成绩大屏 ---------------- */
.board-page {
  min-height: 100vh; background: #070b14; color: #e2e8f0; padding: 26px 30px;
  background-image: radial-gradient(900px 400px at 80% -10%, rgba(234,88,12,.22), transparent 60%),
                    radial-gradient(700px 500px at 0% 100%, rgba(29,78,216,.18), transparent 60%);
}
.board-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid rgba(255,255,255,.1); padding-bottom: 16px; margin-bottom: 22px; }
.board-title { font-size: 26px; font-weight: 700; letter-spacing: -.5px; }
.board-title small { display: block; font-size: 12px; color: #94a3b8; font-weight: 400; letter-spacing: .12em; margin-top: 2px; }
.board-clock { font-family: var(--mono); font-size: 26px; color: #fdba74; font-variant-numeric: tabular-nums; }
.board-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 16px; }
.board-card { background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.09); border-radius: 14px; overflow: hidden; }
.board-card h3 { margin: 0; padding: 12px 16px; font-size: 15px; background: rgba(255,255,255,.04); border-bottom: 1px solid rgba(255,255,255,.07); display: flex; justify-content: space-between; }
.board-card h3 span { font-size: 11px; color: #94a3b8; font-weight: 400; }
.board-row { display: grid; grid-template-columns: 34px 1fr auto; gap: 10px; padding: 9px 16px; border-bottom: 1px solid rgba(255,255,255,.05); align-items: center; font-size: 14px; }
.board-row:last-child { border-bottom: 0; }
.board-row .pos { font-family: var(--mono); font-weight: 700; color: #94a3b8; }
.board-row .pos.g1 { color: #fbbf24; } .board-row .pos.g2 { color: #cbd5e1; } .board-row .pos.g3 { color: #d97706; }
.board-row .who b { font-weight: 600; } .board-row .who span { color: #94a3b8; font-size: 12px; margin-left: 6px; }
.board-row .mark { font-family: var(--mono); color: #fdba74; font-weight: 600; }
.board-foot { margin-top: 26px; color: #64748b; font-size: 12px; display: flex; justify-content: space-between; }

/* ---------------- 号码布打印 ---------------- */
@media print {
  body { background: #fff; }
  .topbar, .nav, .page-actions, .btn, .tabs { display: none !important; }
  .card { box-shadow: none; border: 0; }
  .main { padding: 0; max-width: none; }
}

/* ---------------- 响应式 ---------------- */
@media (max-width: 900px) {
  .login-page { grid-template-columns: 1fr; }
  .login-hero { display: none; }
  .login-panel { padding: 36px 22px; }
  .topbar { padding: 0 12px; }
  .topbar-inner { height: auto; padding: 10px 0; flex-wrap: wrap; gap: 8px; }
  .brand { flex: 1; }
  .comp-picker { order: 2; flex: 1 1 100%; }
  .nav { order: 3; width: 100%; flex: 1 0 100%; }
  .main { padding: 16px 12px 56px; }
  .page-head h1 { font-size: 19px; }
  .stat .value { font-size: 22px; }
  .modal-backdrop { padding: 0; align-items: end; }
  .modal { width: 100%; max-height: 92vh; border-radius: 16px 16px 0 0; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .span2 { grid-column: span 1; }
  .toast-root { left: 12px; right: 12px; top: 12px; }
  .toast { max-width: none; }
  .board-page { padding: 16px; }
  .board-title { font-size: 19px; }
  .board-clock { font-size: 19px; }
}

.bell { position: relative; display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: #94a3b8; padding: 6px 8px; border-radius: 8px; }
.bell:hover { background: rgba(255,255,255,.08); color: #fff; }
.bell-dot { background: #ea580c; color: #fff; font-size: 10px; line-height: 1; padding: 3px 5px; border-radius: 999px; align-items: center; }

.bib-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.bib-card { border: 1px dashed #cbd5e1; border-radius: 10px; padding: 10px; text-align: center; break-inside: avoid; background: #fff; }
.bib-no { font-size: 32px; font-weight: 800; letter-spacing: 1px; font-family: var(--mono); }
.bib-name { font-size: 14px; font-weight: 600; }
.bib-sub { font-size: 11px; color: var(--muted); margin-top: 2px; }
.bib-events { font-size: 10px; line-height: 1.35; margin-top: 3px; text-align: center; color: var(--ink-2, #334155); }
.bib-event { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: center; }
.bib-qr { width: 84px; height: 84px; margin: 6px auto 0; }
.bib-qr svg { width: 100%; height: 100%; }
.bib-hint { font-size: 10px; color: var(--muted-2); }
@media print { .topbar, .page-actions { display: none !important; } .main { padding: 0; } }

/* ---------------- PWA / 手机端 ---------------- */
.install-btn { display: none; color: #fdba74 !important; font-size: 12px; }
.qr-box { width: 118px; height: 118px; flex: 0 0 auto; }
.qr-box svg { width: 100%; height: 100%; display: block; }
.tabbar { display: none; }

@media (max-width: 760px) {
  .topbar .nav { display: none; }
  .topbar-inner { height: 56px; padding: 0; flex-wrap: nowrap; gap: 4px; }
  .brand { flex: 0 0 auto; }
  .brand small { display: none; }
  .user-chip { margin-left: 0; gap: 2px; flex: 0 0 auto; }
  .user-chip > div:not(.avatar) { display: none; }
  .user-chip .btn-icon { display: none; }
  .user-chip button { padding: 4px; font-size: 12px; }
  .bell { margin-left: auto; font-size: 11px; padding: 4px 6px; }
  [data-install] { display: none !important; }
  .main { padding-top: 14px; padding-bottom: calc(82px + env(safe-area-inset-bottom)); }
  .table-wrap table.grid { min-width: 560px; }
  .tabbar {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--line);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
    box-shadow: 0 -6px 20px -16px rgba(15, 23, 42, 0.5);
  }
  .tabbar a {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    font-size: 10.5px;
    color: var(--muted);
    padding: 2px 0;
  }
  .tabbar a.active { color: var(--brand); font-weight: 600; }
  .tabbar .tab-ico { width: 21px; height: 21px; display: block; }
  .tabbar .tab-ico svg { width: 21px; height: 21px; }
  .app-install-card { display: none; }
  .user-chip .role { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .bell { padding: 4px 6px; }
}

@media (display-mode: standalone) {
  .topbar { padding-top: env(safe-area-inset-top); }
}
