/* ==========================================================
   MT2027 · 后台（houtai）样式
   与主站共用设计语言：纸白 / 墨黑 / 赛事红
   独立成文件，不依赖 assets/css/style.css
   ========================================================== */

:root {
  --red: #c82016;
  --red-deep: #8c0f0a;
  --ink: #0c0b09;
  --ink-2: #1c1a17;
  --muted: #6f6a62;
  --muted-2: #928c82;
  --paper: #f7f5f0;
  --paper-2: #efeae0;
  --paper-3: #fbf9f5;
  --line: #ded8cb;
  --line-2: #e9e4d9;
  --white: #ffffff;

  --display: "Barlow Condensed", "Oswald", "Arial Narrow", "Helvetica Neue", Arial,
    "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
  --sans: "Inter", "Segoe UI", "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei",
    "Hiragino Sans GB", Arial, sans-serif;
  --mono: "SFMono-Regular", "JetBrains Mono", Consolas, "Liberation Mono", Menlo, monospace;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --hb-top: 56px;
  --hb-foot: 38px;
}

* { box-sizing: border-box; }

html, body { margin: 0; }

body {
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }
img { max-width: 100%; display: block; }
::selection { background: var(--red); color: #fff; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- 共用小组件 ---------- */
.hbtn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 7px 12px; font-size: 12px; font-weight: 600; letter-spacing: 0.02em;
  border: 1px solid var(--line); border-radius: 2px; background: var(--white);
  color: var(--ink); white-space: nowrap;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease),
    color 0.2s var(--ease), opacity 0.2s;
}
.hbtn:hover { border-color: var(--ink); }
.hbtn svg { width: 13px; height: 13px; flex: 0 0 auto; }
.hbtn--dark { background: var(--ink); border-color: var(--ink); color: #fff; }
.hbtn--dark:hover { background: var(--red); border-color: var(--red); color: #fff; }
.hbtn--plain { background: transparent; }
.hbtn--sm { padding: 5px 9px; font-size: 11.5px; }
.hbtn[disabled], .hbtn.is-disabled {
  opacity: 0.42; cursor: not-allowed; pointer-events: none;
}

.chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 8px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--white); color: var(--muted);
  font-size: 10px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase;
  white-space: nowrap;
}
.chip i { width: 5px; height: 5px; border-radius: 50%; background: var(--red); flex: 0 0 auto; }
.chip--warn { color: #8a5a00; border-color: #e3cb95; background: #fdf5e2; }
.chip--warn i { background: #c8961e; }
.chip--ink { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip--ok { color: #14663a; border-color: #b9dcc4; background: #eef7f0; }
.chip--ok i { background: #177e32; }
.chip--ink i { background: #fff; }

/* 品牌小标 */
.hb-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; flex: 0 0 auto;
  border: 1.4px solid currentColor; border-radius: 2px;
  font-family: var(--display); font-size: 12px; font-weight: 800; letter-spacing: 0.02em;
  line-height: 1;
}
.hb-brand { display: flex; align-items: center; gap: 9px; }
.hb-brand__text { display: flex; flex-direction: column; line-height: 1.15; }
.hb-brand__en {
  font-family: var(--display); font-size: 11px; font-weight: 700;
  letter-spacing: 0.22em; text-transform: uppercase;
}
.hb-brand__sub { font-size: 10.5px; color: var(--muted-2); letter-spacing: 0.08em; }

/* ==========================================================
   1. 登录页
   ========================================================== */
.hb-login {
  min-height: 100vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: clamp(24px, 4vh, 40px);
  padding: clamp(28px, 6vh, 64px) 20px clamp(32px, 6vh, 56px);
  background: #0b0a08; color: var(--paper);
  position: relative; overflow: hidden;
}

.lg__grid {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.055) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.028) 1px, transparent 1px);
  background-size: 25% 100%, 100% 92px;
  mask-image: radial-gradient(120% 92% at 50% 40%, #000 0%, transparent 84%);
  -webkit-mask-image: radial-gradient(120% 92% at 50% 40%, #000 0%, transparent 84%);
}
.lg__glow {
  position: absolute; left: 50%; top: -34%;
  width: min(820px, 120vw); height: min(820px, 120vw);
  translate: -50% 0; pointer-events: none;
  background: radial-gradient(circle at 50% 50%, rgba(200, 32, 22, 0.3), transparent 62%);
}
.lg__glow--b {
  top: auto; bottom: -46%; left: auto; right: -18%; width: 520px; height: 520px;
  translate: none; background: radial-gradient(circle at 50% 50%, rgba(200, 150, 30, 0.12), transparent 64%);
}

.lg__top {
  position: absolute; top: 0; left: 0; right: 0; z-index: 2;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px clamp(18px, 4vw, 40px);
  font-size: 11.5px; letter-spacing: 0.14em; color: rgba(247, 245, 240, 0.6);
  text-transform: uppercase;
}
.lg__back { display: inline-flex; align-items: center; gap: 7px; transition: color 0.2s; }
.lg__back:hover { color: #fff; }
.lg__back svg { width: 13px; height: 13px; }
.lg__env { display: inline-flex; align-items: center; gap: 7px; }
.lg__env i { width: 5px; height: 5px; border-radius: 50%; background: var(--red); }

.lg__card {
  position: relative; z-index: 1;
  width: 100%; max-width: 418px;
  padding: clamp(28px, 4vw, 38px) clamp(22px, 4vw, 34px) clamp(22px, 3vw, 28px);
  background: var(--paper); color: var(--ink);
  border-radius: 3px;
  box-shadow: 0 50px 90px -40px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255, 255, 255, 0.07);
}
.lg__card::before {
  content: ""; position: absolute; inset: 0 auto auto 0;
  width: 100%; height: 3px; background: var(--red); border-radius: 3px 3px 0 0;
}
.lg__card.is-err { animation: lgShake 0.42s var(--ease); }
@keyframes lgShake {
  0%, 100% { transform: translateX(0); }
  18% { transform: translateX(-7px); }
  38% { transform: translateX(6px); }
  58% { transform: translateX(-4px); }
  78% { transform: translateX(3px); }
}

.lg__head { margin-bottom: clamp(20px, 3vw, 28px); }
.lg__head .hb-brand { color: var(--ink); margin-bottom: 18px; }
.lg__title {
  margin: 0; font-size: 22px; font-weight: 800; letter-spacing: 0.01em; line-height: 1.3;
}
.lg__title span {
  display: block; margin-top: 4px;
  font-family: var(--display); font-size: 10.5px; font-weight: 700;
  letter-spacing: 0.24em; color: var(--muted-2); text-transform: uppercase;
}
.lg__desc { margin: 10px 0 0; font-size: 12.5px; color: var(--muted); line-height: 1.8; }

.field { display: block; }
.field__k {
  display: block; margin-bottom: 7px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.1em;
  color: var(--muted); text-transform: uppercase;
}
.field__box {
  display: flex; align-items: center;
  border: 1px solid var(--line); border-radius: 2px; background: var(--white);
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.field__box:focus-within {
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(200, 32, 22, 0.09);
}
.field__box input {
  flex: 1; min-width: 0; border: 0; outline: none; background: none;
  padding: 13px 14px; font: inherit; font-size: 15px; letter-spacing: 0.14em;
  color: var(--ink);
}
.field__box input::placeholder {
  font-size: 12.5px; letter-spacing: 0.06em; color: var(--muted-2);
}
.field__eye {
  flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; color: var(--muted-2);
  transition: color 0.2s;
}
.field__eye:hover { color: var(--ink); }
.field__eye svg { width: 16px; height: 16px; }

.lg__err {
  min-height: 20px; margin: 9px 0 0;
  font-size: 12px; font-weight: 600; color: var(--red); line-height: 1.6;
}
.lg__err.is-ok { color: #177e32; }

.lg__row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin: 4px 0 18px;
}
.chk { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); cursor: pointer; }
.chk input {
  appearance: none; -webkit-appearance: none;
  width: 15px; height: 15px; margin: 0; flex: 0 0 auto;
  border: 1px solid var(--line); border-radius: 2px; background: var(--white);
  position: relative; cursor: pointer; transition: border-color 0.2s, background 0.2s;
}
.chk input:checked { background: var(--ink); border-color: var(--ink); }
.chk input:checked::after {
  content: ""; position: absolute; left: 4px; top: 1px;
  width: 5px; height: 9px; border: 1.6px solid #fff;
  border-top: 0; border-left: 0; transform: rotate(42deg);
}
.chk:hover input { border-color: var(--ink); }

.lg__submit {
  width: 100%; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 18px; border-radius: 2px;
  background: var(--ink); color: #fff;
  font-size: 14px; font-weight: 700; letter-spacing: 0.06em;
  transition: background 0.22s var(--ease), transform 0.22s var(--ease);
}
.lg__submit:hover { background: var(--red); }
.lg__submit:active { transform: translateY(1px); }
.lg__submit[disabled] { opacity: 0.55; cursor: progress; }
.lg__submit svg { width: 14px; height: 14px; }

.lg__hint {
  margin: 18px 0 0; padding-top: 16px; border-top: 1px solid var(--line-2);
  font-size: 11px; line-height: 1.8; color: var(--muted-2);
}
.lg__hint b { color: var(--muted); font-weight: 600; }

.lg__foot {
  position: relative; z-index: 1;
  font-size: 10.5px; letter-spacing: 0.2em; text-transform: uppercase;
  color: rgba(247, 245, 240, 0.34); text-align: center;
}

/* ==========================================================
   2. 后台工作台
   ========================================================== */
.hb-app {
  height: 100vh; height: 100svh;
  display: grid;
  grid-template-columns: 264px minmax(0, 1fr) 336px;
  grid-template-rows: var(--hb-top) minmax(0, 1fr) var(--hb-foot);
  background: var(--paper);
  overflow: hidden;
}

/* ---------- 顶栏 ---------- */
.hb-top {
  grid-column: 1 / -1;
  display: flex; align-items: center; gap: 14px;
  padding: 0 16px 0 18px;
  background: var(--paper-3);
  border-bottom: 1px solid var(--line);
  z-index: 5;
}
.hb-top__sep { width: 1px; height: 20px; background: var(--line); flex: 0 0 auto; }
.hb-top__meta { display: flex; align-items: center; gap: 8px; min-width: 0; }
.hb-top__path {
  font-size: 11.5px; color: var(--muted-2); white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.hb-top__path b { color: var(--ink); font-weight: 600; }
.hb-top__actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }

/* ---------- 左：站点结构 ---------- */
.hb-side {
  grid-row: 2; min-height: 0;
  display: flex; flex-direction: column;
  background: var(--paper-3);
  border-right: 1px solid var(--line);
}
.hb-side__bar {
  flex: 0 0 auto;
  display: flex; flex-direction: column; gap: 8px;
  padding: 12px 12px 11px;
  border-bottom: 1px solid var(--line);
}
.hb-side__k {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 10px; font-weight: 700; letter-spacing: 0.18em;
  color: var(--muted-2); text-transform: uppercase;
}
.hb-search { position: relative; }
.hb-search svg {
  position: absolute; left: 9px; top: 50%; translate: 0 -50%;
  width: 12px; height: 12px; color: var(--muted-2); pointer-events: none;
}
.hb-search input {
  width: 100%; border: 1px solid var(--line); border-radius: 2px;
  background: var(--white); padding: 7px 9px 7px 27px;
  font: inherit; font-size: 12px; color: var(--ink); outline: none;
  transition: border-color 0.2s;
}
.hb-search input:focus { border-color: var(--ink); }
.hb-search input::placeholder { color: var(--muted-2); }

.hb-tree { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 6px 0 18px; }
.hb-tree::-webkit-scrollbar,
.hb-panel__body::-webkit-scrollbar,
.hb-view::-webkit-scrollbar { width: 9px; height: 9px; }
.hb-tree::-webkit-scrollbar-thumb,
.hb-panel__body::-webkit-scrollbar-thumb,
.hb-view::-webkit-scrollbar-thumb {
  background: #ddd6c8; border-radius: 9px; border: 2px solid var(--paper-3);
}

.pg { border-bottom: 1px solid var(--line-2); }
.pg:last-child { border-bottom: 0; }
.pg__head {
  width: 100%; display: flex; align-items: center; gap: 8px;
  padding: 10px 12px 10px 14px; text-align: left;
  font-size: 13px; font-weight: 700; color: var(--ink);
  transition: background 0.18s;
}
.pg__head:hover { background: #f3efe6; }
.pg__no {
  font-family: var(--display); font-size: 10px; font-weight: 700;
  letter-spacing: 0.08em; color: var(--muted-2); width: 16px; flex: 0 0 auto;
}
.pg__name { flex: 1 1 auto; min-width: 0; }
.pg__name em {
  display: block; font-style: normal; font-family: var(--display);
  font-size: 9.5px; font-weight: 700; letter-spacing: 0.16em;
  color: var(--muted-2); text-transform: uppercase;
}
.pg__caret {
  width: 9px; height: 9px; flex: 0 0 auto; color: var(--muted-2);
  transition: transform 0.25s var(--ease);
}
.pg.is-open .pg__caret { transform: rotate(90deg); }
.pg__count {
  font-size: 10px; font-weight: 600; color: var(--muted-2);
  font-variant-numeric: tabular-nums; min-width: 14px; text-align: right;
}
.pg__list { display: none; padding: 0 0 8px; }
.pg.is-open .pg__list { display: block; }

.sec {
  width: 100%; display: flex; align-items: center; gap: 8px;
  padding: 7px 12px 7px 24px; text-align: left;
  font-size: 12.5px; color: var(--muted);
  border-left: 2px solid transparent;
  transition: background 0.16s, color 0.16s, border-color 0.16s;
}
.sec:hover { background: #f3efe6; color: var(--ink); }
.sec.is-active {
  background: #f0ece1; color: var(--ink); font-weight: 600;
  border-left-color: var(--red);
}
.sec__name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sec__dot {
  width: 4px; height: 4px; border-radius: 50%; background: var(--line);
  flex: 0 0 auto;
}
.sec.is-active .sec__dot { background: var(--red); }
.sec.is-dirty .sec__dot { background: #d8a93a; box-shadow: 0 0 0 3px rgba(216, 169, 58, 0.18); }
.hb-empty {
  padding: 22px 16px; text-align: center;
  font-size: 12px; color: var(--muted-2);
}

/* ---------- 中：预览 ---------- */
.hb-stage {
  grid-row: 2; min-width: 0; min-height: 0;
  display: flex; flex-direction: column;
  background: var(--paper-2);
}
.hb-strip {
  flex: 0 0 auto; display: flex; align-items: center; gap: 10px;
  padding: 8px 14px;
  background: var(--paper-3);
  border-bottom: 1px solid var(--line);
  font-size: 11.5px; color: var(--muted);
}
.hb-strip__url {
  flex: 1 1 auto; min-width: 0;
  display: flex; align-items: center; gap: 6px;
  padding: 3px 9px; border: 1px solid var(--line); border-radius: 2px;
  background: var(--white); font-family: var(--mono); font-size: 11px;
  color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.hb-strip__url i { width: 5px; height: 5px; border-radius: 50%; background: #177e32; flex: 0 0 auto; }
.hb-strip__flags { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }

.hb-view {
  flex: 1 1 auto; min-height: 0;
  overflow: auto;
  padding: 16px;
  display: flex; align-items: stretch; justify-content: center;
}
.hb-frame {
  position: relative;
  flex: 1 1 auto; min-width: 0;
  display: flex; flex-direction: column;
  width: 100%; max-width: var(--frame-w, 100%);
  margin: 0 auto;
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: 0 26px 46px -34px rgba(0, 0, 0, 0.55);
  transition: max-width 0.34s var(--ease);
}
.hb-frame iframe {
  display: block; width: 100%;
  flex: 1 1 auto; min-height: 520px;
  border: 0;
}
.hb-frame__hint {
  flex: 0 0 auto; position: static;
  padding: 5px 10px; text-align: center;
  font-size: 10.5px; letter-spacing: 0.06em; color: var(--muted-2);
  background: var(--paper-3);
  border-top: 1px solid var(--line-2);
}

/* ---------- 右：字段面板 ---------- */
.hb-panel {
  grid-row: 2; min-height: 0;
  display: flex; flex-direction: column;
  background: var(--paper-3);
  border-left: 1px solid var(--line);
}
.hb-panel__head {
  flex: 0 0 auto; padding: 14px 16px 13px;
  border-bottom: 1px solid var(--line);
}
.hb-panel__en {
  font-family: var(--display); font-size: 9.5px; font-weight: 700;
  letter-spacing: 0.2em; color: var(--muted-2); text-transform: uppercase;
}
.hb-panel__title {
  margin: 3px 0 0; font-size: 15px; font-weight: 800; line-height: 1.4;
}
.hb-panel__src {
  margin-top: 7px; display: flex; align-items: center; gap: 6px;
  font-family: var(--mono); font-size: 10px; color: var(--muted-2);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.hb-panel__src svg { width: 11px; height: 11px; flex: 0 0 auto; }

.hb-panel__body { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 14px 16px 22px; }
.hb-panel__foot {
  flex: 0 0 auto; display: flex; align-items: center; gap: 8px;
  padding: 10px 16px; border-top: 1px solid var(--line);
  background: var(--paper-3);
}
.hb-panel__foot .hbtn { flex: 1 1 auto; }

.fld { margin: 0 0 13px; }
.fld:last-child { margin-bottom: 0; }
.fld__k {
  display: flex; align-items: baseline; justify-content: space-between; gap: 8px;
  margin-bottom: 5px;
  font-size: 10.5px; font-weight: 600; letter-spacing: 0.06em; color: var(--muted);
}
.fld__k em {
  font-style: normal; font-size: 9.5px; letter-spacing: 0.1em;
  color: var(--muted-2); text-transform: uppercase;
}
.fld input, .fld textarea, .fld select {
  width: 100%; font-family: inherit; font-size: 12.5px; line-height: 1.7;
  color: var(--muted); background: #f1ede5;
  border: 1px solid var(--line); border-radius: 2px;
  padding: 8px 10px; outline: none; resize: vertical;
}
.fld textarea { min-height: 76px; }
.fld select { appearance: none; -webkit-appearance: none; }
.fld input[disabled], .fld textarea[disabled], .fld select[disabled] {
  opacity: 1; cursor: not-allowed; color: var(--muted);
  -webkit-text-fill-color: var(--muted);
}
.fld__note { margin: 5px 0 0; font-size: 10.5px; line-height: 1.6; color: var(--muted-2); }
/* 已改动的字段：琥珀色边框 + 标签同步变色 */
.fld.is-dirty input, .fld.is-dirty textarea { border-color: #d8a93a; background: #fffdf6; }
.fld.is-dirty .fld__k em { color: #8a5a00; }
.fld.is-ro .fld__k em { color: var(--muted-2); }

.note {
  border: 1px dashed var(--line);
  background: #f4f0e7;
  border-radius: 2px;
  padding: 10px 11px;
  font-size: 11px; line-height: 1.8; color: var(--muted);
}
.note b { color: var(--ink); font-weight: 700; }
.note + .note { margin-top: 10px; }
.note--warn { border-color: #e3cb95; background: #fdf5e2; color: #7d5a10; }
.note--warn b { color: #6b4a06; }

.pn-group {
  margin: 18px 0 10px; display: flex; align-items: center; gap: 8px;
  font-size: 10px; font-weight: 700; letter-spacing: 0.16em;
  color: var(--muted-2); text-transform: uppercase;
}
.pn-group::after { content: ""; flex: 1 1 auto; height: 1px; background: var(--line); }

/* ---------- 底栏 ---------- */
.hb-foot {
  grid-column: 1 / -1;
  display: flex; align-items: center; gap: 12px;
  padding: 0 16px;
  background: var(--paper-3);
  border-top: 1px solid var(--line);
  font-size: 11px; color: var(--muted);
}
.hb-foot__item { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.hb-foot__item b { font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.hb-foot__spacer { flex: 1 1 auto; }
.hb-foot__right { display: flex; align-items: center; gap: 12px; }

.seg {
  display: inline-flex; align-items: stretch;
  border: 1px solid var(--line); border-radius: 2px; overflow: hidden;
  background: var(--white);
}
.seg button {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px; font-size: 10.5px; font-weight: 600; color: var(--muted);
  transition: background 0.18s, color 0.18s;
}
.seg button + button { border-left: 1px solid var(--line); }
.seg button:hover { color: var(--ink); }
.seg button.is-on { background: var(--ink); color: #fff; }
.seg svg { width: 11px; height: 11px; }

/* ---------- 提示条 ---------- */
.hb-banner {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 14px;
  background: #fdf5e2; border-bottom: 1px solid #e9d8b0;
  font-size: 11.5px; color: #7d5a10;
}
.hb-banner b { color: #6b4a06; }
.hb-banner svg { width: 13px; height: 13px; flex: 0 0 auto; }
.hb-banner--ok { background: #eef7f0; border-bottom-color: #c3e0cc; color: #14663a; }
.hb-banner--ok b { color: #0d4d2b; }

/* ==========================================================
   3. 响应式
   ========================================================== */
@media (max-width: 1240px) {
  .hb-app { grid-template-columns: 232px minmax(0, 1fr) 300px; }
}

@media (max-width: 1040px) {
  .hb-app {
    height: auto; min-height: 100vh;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: var(--hb-top) auto 64vh auto var(--hb-foot);
    overflow: visible;
  }
  /* 单列堆叠：三栏不再锁定第 2 行，避免被自动排进隐式列 */
  .hb-side, .hb-stage, .hb-panel { grid-row: auto; grid-column: 1 / -1; }
  .hb-side { border-right: 0; border-bottom: 1px solid var(--line); max-height: 280px; }
  .hb-stage { min-height: 0; }
  .hb-panel { border-left: 0; border-top: 1px solid var(--line); }
  .hb-panel__body { max-height: none; overflow: visible; }
  .hb-top__meta { display: none; }
  .hb-top { gap: 10px; }
}

@media (max-width: 720px) {
  .hb-top__actions .hbtn span { display: none; }
  .hb-strip { flex-wrap: wrap; gap: 6px; }
  .hb-strip__flags { width: 100%; }
  .hb-foot { height: auto; padding: 8px 12px; flex-wrap: wrap; gap: 8px; }
  .hb-foot__right { width: 100%; justify-content: space-between; }
  .lg__row { flex-direction: column; align-items: flex-start; gap: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

/* ---------- 轻提示 ---------- */
.hb-toast {
  position: fixed; left: 50%; bottom: 64px; translate: -50% 0;
  z-index: 90; padding: 9px 16px;
  background: var(--ink); color: #fff;
  font-size: 12px; letter-spacing: 0.02em;
  opacity: 0; pointer-events: none;
  transition: opacity 0.2s var(--ease, ease), translate 0.2s var(--ease, ease);
}
.hb-toast.is-on { opacity: 1; translate: -50% -6px; }
