/* 升级 / 续费记录（pay_upgrade_records.html）
 *
 * 形态：按【批次】组织的清单 —— 与自助开通页「我的记录」同一套心智（客户记得的是「那天办的那一批」）。
 *   · 批次是一张卡：卡头一行说清这一批的全貌（多少个号、各在哪一格、一条比例条），默认可收起；
 *   · 行里只放扫一眼就要知道的：状态（用字说，不用点）、账号、档位、那一个关键时间、金额、
 *     一个主动作。完整时间线与单号、服务费进右侧抽屉 —— 在行内展开会把后面几十行一起顶下去；
 *   · 零装饰图标：状态靠【颜色 + 字】认，一行几个图标乘上几百行就是几百个干扰点。
 */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
[hidden] { display: none !important; }

:root {
  --brand: #1677ff;
  --brand-active: #0958d9;
  --brand-bg: #eff6ff;
  --brand-border: #bedaff;

  --ink: #1d2129;
  --ink-2: #4e5969;
  --muted: #86909c;
  --faint: #c9cdd4;
  --line: #e5e6eb;
  --line-2: #f2f3f5;
  --bg: #f7f8fa;
  --card: #fff;

  --pay: #d25f00;       /* 待付款：要客户动手 */
  --pay-bg: #fff7e8;
  --pay-bd: #ffd8a8;
  --wait: #1677ff;      /* 等待续费：什么都不用做 */
  --wait-bg: #eff6ff;
  --wait-bd: #bedaff;
  --issue: #d9363e;     /* 异常：要人看一眼 */
  --issue-bg: #fff1f0;
  --issue-bd: #ffccc7;
  --done: #009a29;      /* 已完成 */
  --done-bg: #eafff0;
  --done-bd: #b7ebc6;
  --violet: #6926c4;

  --r-sm: 6px;
  --r-md: 10px;
  --shadow: 0 1px 3px rgba(0, 0, 0, .04);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
  line-height: 1.5;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}
b, strong { font-weight: 650; }
code { font-family: ui-monospace, Menlo, Consolas, monospace; }
.mono { font-family: ui-monospace, Menlo, Consolas, monospace; }

/* ── 顶栏 ── */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  padding-top: env(safe-area-inset-top, 0px);
}
.topbar-in {
  max-width: 1120px; margin: 0 auto;
  padding: 10px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.brand { display: flex; align-items: center; gap: 9px; text-decoration: none; color: inherit; }
.logo {
  width: 26px; height: 26px; border-radius: 7px;
  background: linear-gradient(135deg, #1677ff, #0958d9);
  color: #fff; display: grid; place-items: center;
  font-weight: 800; font-size: 14px; flex: none;
}
.brand-t { font-size: 15px; font-weight: 700; letter-spacing: -.2px; white-space: nowrap; }
.brand:hover .brand-t { color: var(--brand-active); }
.user-meta { display: flex; align-items: center; gap: 6px; }
.key-chip {
  display: inline-flex; align-items: baseline; gap: 8px;
  background: var(--bg); border: 1px solid var(--line);
  padding: 4px 11px; border-radius: 99px;
  font-size: 12px; color: var(--ink-2); white-space: nowrap;
  max-width: 260px; overflow: hidden;
}
.k-bal { color: var(--ink); font-variant-numeric: tabular-nums; }
.mini-btn {
  border: 1px solid var(--line); background: #fff; color: var(--ink-2);
  border-radius: 99px; padding: 5px 12px;
  font: 600 12px/1 inherit; font-family: inherit;
  white-space: nowrap; cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center; transition: all .14s;
}
.mini-btn:hover { border-color: var(--brand-border); background: var(--brand-bg); color: var(--brand-active); }
.mini-btn.mini-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.mini-btn.mini-primary:hover { background: var(--brand-active); border-color: var(--brand-active); color: #fff; }

/* ── 容器 ── */
.wrap { max-width: 1120px; margin: 0 auto; padding: 18px 20px 56px; }

/* ── 登录 ── */
.auth-box { display: flex; justify-content: center; padding-top: 48px; }
.auth-card {
  width: 100%; max-width: 400px;
  background: var(--card); border: 1px solid var(--line);
  border-radius: 14px; box-shadow: 0 6px 24px rgba(0, 0, 0, .05);
  padding: 28px 26px 22px;
}
.auth-title { font-size: 19px; font-weight: 700; letter-spacing: -.3px; }
.auth-desc { font-size: 13px; color: var(--muted); margin: 6px 0 20px; }
.auth-label { display: block; font-size: 12px; font-weight: 650; color: var(--ink-2); margin-bottom: 7px; }
.field { display: flex; flex-direction: column; gap: 10px; }
.field input { height: 44px; font-size: 15px; }
.chk { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; font-size: 12px; color: var(--muted); cursor: pointer; }
.err { color: var(--issue); font-size: 13px; margin-top: 10px; }
.cs-card { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line-2); }
.cs-title { font-size: 12px; font-weight: 650; color: var(--ink-2); margin-bottom: 8px; }
.cs-row { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.cs-k { flex: none; width: 32px; font-size: 12px; color: var(--muted); }
.cs-v { flex: 1; min-width: 0; font-size: 13px; font-weight: 650; word-break: break-all; }

input[type=text], input[type=search], #searchInput {
  width: 100%; height: 34px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: var(--r-sm);
  font-size: 13px; font-family: inherit; color: var(--ink);
  background: #fff; outline: none; transition: border-color .14s, box-shadow .14s;
}
input[type=text]:focus, input[type=search]:focus, #searchInput:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(22, 119, 255, .1); }
#searchInput {
  display: block; height: auto; min-height: 34px; max-height: 140px;
  padding: 7px 12px; line-height: 1.45; resize: none; field-sizing: content;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 34px; padding: 0 14px;
  border: 1px solid var(--line); border-radius: var(--r-sm);
  background: #fff; color: var(--ink);
  font: 600 13px/1 inherit; font-family: inherit;
  cursor: pointer; text-decoration: none; white-space: nowrap; transition: all .14s;
}
.btn:hover:not(:disabled) { border-color: var(--brand-border); color: var(--brand-active); background: var(--brand-bg); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-sm { height: 28px; padding: 0 10px; font-size: 12px; }
.btn-primary { border: none; background: var(--brand); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--brand-active); color: #fff; }
/* 付款是这一页唯一的「钱」动作：实心色，其余一律描边 */
.btn-pay { border: none; background: var(--pay); color: #fff; }
.btn-pay:hover:not(:disabled) { background: #b34700; color: #fff; }

/* ── 需要动手的事 ── */
.attn { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.attn-line {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 9px 13px; border-radius: var(--r-md); font-size: 13px;
  border: 1px solid var(--pay-bd); background: var(--pay-bg); color: #8a4400;
}
.attn-line.is-soon { border-color: var(--wait-bd); background: var(--wait-bg); color: #0b4aa8; }
.attn-line.is-issue { border-color: var(--issue-bd); background: var(--issue-bg); color: #a8161e; }
.attn-line b { font-variant-numeric: tabular-nums; }
.attn-go {
  margin-left: auto; border: none; background: none; font: 650 12.5px/1 inherit; font-family: inherit;
  color: inherit; text-decoration: underline; cursor: pointer; white-space: nowrap;
}

/* ── 筛选 ── */
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-flex; align-items: center; gap: 5px;
  border: 1px solid var(--line); background: #fff; color: var(--ink-2);
  border-radius: 99px; padding: 5px 12px;
  font: 600 12.5px/1 inherit; font-family: inherit; cursor: pointer; transition: all .14s;
}
.chip:hover { border-color: var(--faint); }
.chip-n { font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.chip-n:empty { display: none; }
.chip.is-zero:not(.on) { opacity: .45; }
.chip.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip.on .chip-n { color: rgba(255, 255, 255, .7); }
.chip.c-pay.on { background: var(--pay); border-color: var(--pay); }
.chip.c-wait.on { background: var(--wait); border-color: var(--wait); }
.chip.c-issue.on { background: var(--issue); border-color: var(--issue); }
.chip.c-done.on { background: var(--done); border-color: var(--done); }
.chips { align-items: center; }
.chips-label { font-size: 12px; color: var(--muted); margin-right: 2px; }
.search-wrap { flex: 1; min-width: 220px; max-width: 420px; margin-left: auto; }
.scope {
  flex-basis: 100%; display: flex; align-items: center; gap: 8px;
  font-size: 12.5px; color: var(--ink-2);
}
.scope-chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--brand-bg); border: 1px solid var(--brand-border); color: var(--brand-active);
  border-radius: 99px; padding: 3px 6px 3px 11px; font-weight: 650;
}
.scope-x {
  border: none; background: none; width: 18px; height: 18px; border-radius: 50%;
  color: var(--brand-active); cursor: pointer; font-size: 14px; line-height: 1;
}
.scope-x:hover { background: #dbe9ff; }

/* ── 批次卡 ── */
.list { display: flex; flex-direction: column; gap: 10px; min-height: 160px; }
.bt {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md);
  box-shadow: var(--shadow); overflow: hidden;
}
.bt.has-pay { border-color: var(--pay-bd); }
.bt-head {
  display: grid; grid-template-columns: 14px minmax(0, 1fr) auto; gap: 10px; align-items: center;
  padding: 11px 14px; cursor: pointer; user-select: none;
}
.bt-head:hover { background: #fafbfc; }
.bt-caret { font-size: 10px; color: var(--muted); }
.bt-main { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.bt-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.bt-bid {
  font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px; font-weight: 700;
  color: var(--brand-active); background: var(--brand-bg); border: 1px solid var(--brand-border);
  border-radius: 6px; padding: 1px 8px; cursor: pointer;
}
.bt-bid:hover { border-color: var(--brand); }
.bt-mode {
  font-size: 11.5px; font-weight: 650; padding: 1px 8px; border-radius: 5px;
  background: var(--line-2); color: var(--ink-2);
}
.bt-meta { font-size: 12.5px; color: var(--ink-2); white-space: nowrap; }
.bt-meta .bt-shown { color: var(--brand-active); font-weight: 650; }
.bt-mix { display: flex; align-items: center; gap: 10px; min-width: 0; }
/* 一条比例条：这一批的号各在哪一格，一眼看全貌（收起状态下也看得见） */
.bt-bar {
  flex: none; width: 160px; height: 6px; border-radius: 99px; overflow: hidden;
  display: flex; background: var(--line-2);
}
.bt-bar i { display: block; height: 100%; }
.bt-bar .s-pay { background: var(--pay); }
.bt-bar .s-issue { background: var(--issue); }
.bt-bar .s-wait { background: #7fb3ff; }
.bt-bar .s-done { background: var(--done); }
.bt-legend { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 1 1 auto; }
.bt-legend b { font-weight: 650; font-variant-numeric: tabular-nums; }
.bt-legend .l-pay { color: var(--pay); }
.bt-legend .l-issue { color: var(--issue); }
.bt-legend .l-wait { color: var(--wait); }
.bt-legend .l-done { color: var(--done); }
.bt-acts { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.bt-body { border-top: 1px solid var(--line-2); }

/* ── 行 ──
   列宽在表头与行里【共用同一套】。**最后一列必须定宽**：待付款的行有三个按钮（去支付 / 复制链接 / 刷新），
   用 auto 会让前面的 1fr 跟着漂，每一行的列位都对不上。 */
.rw-head, .rw {
  display: grid;
  grid-template-columns: 86px minmax(0, 1.25fr) 58px minmax(0, 1fr) minmax(80px, auto) 96px 248px;
  gap: 12px; align-items: center; padding: 0 14px;
}
.rw-head {
  padding-top: 7px; padding-bottom: 7px; background: #fafbfc;
  font-size: 11px; font-weight: 650; color: var(--muted); letter-spacing: .2px;
}
.rw-head .h-amt, .rw-head .h-act { text-align: right; }
.rw {
  min-height: 50px; padding-top: 8px; padding-bottom: 8px;
  border-top: 1px solid var(--line-2); cursor: pointer; transition: background .12s;
}
.rw:hover { background: #fafbfc; }
.rw.is-busy { opacity: .5; pointer-events: none; }

/* 状态胶囊：用字说状态，一眼扫得到 */
.pill {
  justify-self: start; display: inline-flex; align-items: center;
  font-size: 12px; font-weight: 700; padding: 2px 9px; border-radius: 99px;
  border: 1px solid transparent; white-space: nowrap;
}
.pill.p-pay { color: var(--pay); background: var(--pay-bg); border-color: var(--pay-bd); }
.pill.p-wait { color: var(--wait); background: var(--wait-bg); border-color: var(--wait-bd); }
.pill.p-issue { color: var(--issue); background: var(--issue-bg); border-color: var(--issue-bd); }
.pill.p-done { color: var(--done); background: var(--done-bg); border-color: var(--done-bd); }

.c-acct { min-width: 0; }
.acct-main {
  font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; font-weight: 600;
  color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.acct-main.is-id { font-weight: 500; color: var(--ink-2); }
.acct-sub { font-size: 11px; color: var(--muted); font-family: ui-monospace, Menlo, Consolas, monospace; }

.c-tier { font-size: 12px; font-weight: 700; white-space: nowrap; }
.c-tier.t-pro { color: var(--brand); }
.c-tier.t-pro_plus { color: var(--violet); }
.c-tier.t-ultra { color: #1d2129; }

.c-info { min-width: 0; font-size: 12.5px; color: var(--ink-2); line-height: 1.35; }
.c-info .i-sub { font-size: 11.5px; color: var(--muted); }
.c-info .i-soon { color: var(--pay); font-weight: 650; }
.c-info .i-bad { color: var(--issue); font-weight: 600; }

.c-amt { text-align: right; font-size: 12.5px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.c-deadline { font-size: 11.5px; color: var(--ink-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.c-deadline .dl-warn { color: var(--pay); font-weight: 650; }
.c-deadline .dl-ok { color: var(--done); }
.c-amt s { color: var(--faint); margin-right: 5px; }
.c-amt b { color: var(--ink); }
.c-amt .a-note { color: var(--muted); font-weight: 500; }

.c-act { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }

/* ── 空 / 加载 ── */
.state-box {
  display: flex; align-items: center; justify-content: center; gap: 9px; flex-direction: column;
  padding: 52px 20px; color: var(--muted); font-size: 13px;
  background: var(--card); border: 1px dashed var(--line); border-radius: var(--r-md);
}
.state-box .btn { margin-top: 4px; }
.spinner {
  width: 18px; height: 18px;
  border: 2px solid var(--line-2); border-top-color: var(--brand);
  border-radius: 50%; animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── 分页 ── */
.pager { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; gap: 12px; flex-wrap: wrap; }
.p-info { font-size: 12px; color: var(--muted); }
.p-ctl { display: flex; align-items: center; gap: 7px; }
.btn-page {
  border: 1px solid var(--line); background: #fff; color: var(--ink-2);
  font: 600 12px/1 inherit; font-family: inherit;
  padding: 7px 11px; border-radius: var(--r-sm); cursor: pointer; transition: all .14s;
}
.btn-page:hover:not(:disabled) { border-color: var(--brand-border); color: var(--brand-active); background: var(--brand-bg); }
.btn-page:disabled { opacity: .4; cursor: not-allowed; }
.p-cur { font-size: 12px; color: var(--ink); font-variant-numeric: tabular-nums; padding: 0 3px; }

/* ── 详情抽屉 ── */
.drawer-mask { position: fixed; inset: 0; background: rgba(15, 20, 30, .28); z-index: 90; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: 440px; max-width: 100vw;
  background: #fff; z-index: 100; box-shadow: -12px 0 32px rgba(0, 0, 0, .12);
  display: flex; flex-direction: column;
  animation: drIn .18s ease;
}
@keyframes drIn { from { transform: translateX(24px); opacity: 0; } }
.dr-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 14px 18px; border-bottom: 1px solid var(--line-2);
}
.dr-title {
  font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 14px; font-weight: 700;
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.dr-close {
  flex: none; width: 30px; height: 30px; border-radius: 8px; border: none; background: none;
  font-size: 22px; line-height: 1; color: var(--muted); cursor: pointer;
}
.dr-close:hover { background: var(--line-2); color: var(--ink); }
.dr-body { flex: 1; overflow-y: auto; padding: 16px 18px 24px; }
.dr-status { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.dr-note { font-size: 13px; line-height: 1.6; border-radius: var(--r-sm); padding: 9px 12px; margin-bottom: 14px; }
.dr-note.n-pay { background: var(--pay-bg); color: #8a4400; }
.dr-note.n-issue { background: var(--issue-bg); color: #a8161e; }
.dr-note.n-done { background: var(--done-bg); color: #0b6b25; }
.dr-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.dr-acts .btn { flex: 1; height: 38px; }
.dr-hint { font-size: 12px; line-height: 1.6; color: var(--muted); margin: -8px 0 16px; }
.dr-sec { font-size: 11.5px; font-weight: 700; color: var(--muted); letter-spacing: .3px; margin: 4px 0 8px; }

/* 完整时间线：只在抽屉里出现，可以铺开讲清楚每一步 */
.steps { list-style: none; margin: 0 0 16px; }
.step { position: relative; padding: 0 0 12px 20px; }
.step:last-child { padding-bottom: 0; }
.step::before {
  content: ""; position: absolute; left: 0; top: 5px;
  width: 9px; height: 9px; border-radius: 50%;
  background: #fff; border: 1.5px solid var(--line);
}
.step::after {
  content: ""; position: absolute; left: 4px; top: 15px; bottom: 0;
  width: 1.5px; background: var(--line-2);
}
.step:last-child::after { display: none; }
.step-t { font-size: 13px; font-weight: 650; color: var(--ink-2); }
.step-d { font-size: 12px; color: var(--muted); margin-top: 1px; line-height: 1.5; }
.step.is-done::before { background: var(--done); border-color: var(--done); }
.step.is-done::after { background: #c6efd2; }
.step.is-done .step-t { color: var(--ink); }
.step.is-now::before { border-color: var(--wait); box-shadow: 0 0 0 2.5px rgba(22, 119, 255, .18); }
.step.is-now .step-t { color: var(--brand-active); font-weight: 750; }
.step.is-bad::before { background: var(--issue); border-color: var(--issue); }
.step.is-bad .step-t { color: var(--issue); }

.facts { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 7px 10px; font-size: 12.5px; }
.facts dt { color: var(--muted); }
.facts dd { color: var(--ink); min-width: 0; word-break: break-all; }

/* 账单明细：一列能自己验算的竖式 —— 左边窄栏放运算符，金额右对齐、等宽数字，
   小计与应付上方各一条线，像在纸上列算式。 */
#drBill { margin-bottom: 16px; }
.bill { border: 1px solid var(--line); border-radius: var(--r-md); padding: 8px 14px 9px; background: var(--card); }
.bill-r {
  display: grid; grid-template-columns: 14px minmax(0, 1fr) auto; align-items: baseline; gap: 6px;
  padding: 4px 0; font-size: 12.5px; color: var(--ink-2);
}
.bill-op { color: var(--muted); }
.bill-a { color: var(--ink); white-space: nowrap; font-variant-numeric: tabular-nums; }
.bill-r.is-off .bill-a { color: var(--done); }
.bill-r.is-sum, .bill-r.is-total { border-top: 1px dashed var(--line); margin-top: 2px; padding-top: 7px; }
.bill-r.is-total { border-top-style: solid; font-weight: 700; color: var(--ink); }
.bill-r.is-total .bill-a { font-size: 15px; }
.bill-foot { font-size: 11px; color: var(--muted); margin-top: 5px; }
.bill-wait { font-size: 12.5px; color: var(--muted); padding: 2px 0 6px; }
.copyable { cursor: pointer; border-bottom: 1px dashed var(--faint); }
.copyable:hover { color: var(--brand-active); border-bottom-color: var(--brand); }

/* ── Toast ── */
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%);
  background: rgba(29, 33, 41, .95); color: #fff;
  padding: 9px 18px; border-radius: 99px; font-size: 13px; font-weight: 550;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .18); z-index: 200; pointer-events: none;
  max-width: 88vw; text-align: center; animation: tin .16s ease;
}
@keyframes tin { from { opacity: 0; transform: translate(-50%, 8px); } }

.ft { text-align: center; margin-top: 32px; font-size: 11px; }
.ft a { color: var(--faint); text-decoration: none; }
.ft a:hover { color: var(--brand); }

/* ── 窄屏：行折成两层，但仍是行，不退回大卡片 ── */
@media (max-width: 860px) {
  .search-wrap { max-width: none; margin-left: 0; flex-basis: 100%; }
  .rw-head { display: none; }
  .rw {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "acct pill"
      "info tier"
      "dl   dl"
      "amt  act";
    gap: 4px 10px; padding-top: 11px; padding-bottom: 11px;
  }
  .rw .pill { grid-area: pill; justify-self: end; }
  .rw .c-acct { grid-area: acct; }
  .rw .c-tier { grid-area: tier; text-align: right; }
  .rw .c-info { grid-area: info; }
  .rw .c-amt { grid-area: amt; text-align: left; }
  .rw .c-deadline { grid-area: dl; }
  .rw .c-act { grid-area: act; }
  .bt-head { grid-template-columns: 14px minmax(0, 1fr); }
  .bt-acts { grid-column: 1 / -1; justify-content: flex-start; padding-left: 24px; flex-wrap: wrap; }
  .bt-bar { width: 110px; }
  .drawer { width: 100vw; }
}
@media (max-width: 480px) {
  .topbar-in { padding: 9px 12px; }
  .wrap { padding: 14px 12px 40px; }
  .brand-t { display: none; }
  .key-chip { max-width: 120px; }
  .mini-btn { padding: 5px 9px; }
}
.rw:focus-visible, .bt-head:focus-visible { outline: 2px solid var(--brand, #1677ff); outline-offset: -2px; }
