/* 圆和医疗 · 手术跟台记录 H5
   设计原则：手术室里单手可用 —— 大触控区（≥44px）、高对比、少层级、暗光环境自动深色。 */

:root {
  --brand: #043e8c;
  --brand-2: #3463a0;
  --brand-soft: #e8eff9;
  --on-brand: #ffffff;
  --bg: #f3f5f8;
  --surface: #ffffff;
  --surface-2: #f7f9fb;
  --ink: #142033;
  --muted: #5d6a7c;
  --faint: #98a3b3;
  --line: #e1e6ed;
  --ok: #157f4a;
  --ok-soft: #e6f4ec;
  --warn: #a35b06;
  --warn-soft: #fff4e2;
  --danger: #b42318;
  --danger-soft: #fdecea;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 8px rgba(16, 24, 40, .04);
  --topbar-h: 56px;
  --bottombar-h: 72px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --brand: #6b9be0;
    --brand-2: #8fb3e8;
    --brand-soft: #1b2a40;
    --on-brand: #0c1118;
    --bg: #0c1118;
    --surface: #151c26;
    --surface-2: #1b2430;
    --ink: #e7edf5;
    --muted: #9aa8ba;
    --faint: #66748a;
    --line: #283242;
    --ok: #4cc38a;
    --ok-soft: #12291e;
    --warn: #f0a94a;
    --warn-soft: #2c2112;
    --danger: #ff7a6e;
    --danger-soft: #2f1614;
    --shadow: none;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --brand: #6b9be0;
  --brand-2: #8fb3e8;
  --brand-soft: #1b2a40;
  --on-brand: #0c1118;
  --bg: #0c1118;
  --surface: #151c26;
  --surface-2: #1b2430;
  --ink: #e7edf5;
  --muted: #9aa8ba;
  --faint: #66748a;
  --line: #283242;
  --ok: #4cc38a;
  --ok-soft: #12291e;
  --warn: #f0a94a;
  --warn-soft: #2c2112;
  --danger: #ff7a6e;
  --danger-soft: #2f1614;
  --shadow: none;
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.5 -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  overscroll-behavior-y: none;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--brand); }
svg.i { width: 22px; height: 22px; flex: none; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; }

#app { max-width: 760px; margin: 0 auto; min-height: 100vh; min-height: 100dvh; }

/* ---------- 顶栏 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  height: var(--topbar-h);
  display: flex; align-items: center; gap: 4px;
  padding: 0 8px;
  padding-top: env(safe-area-inset-top);
  height: calc(var(--topbar-h) + env(safe-area-inset-top));
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar .title { flex: 1; min-width: 0; line-height: 1.25; }
.topbar .title b {
  display: block; font-size: 17px; font-weight: 600; letter-spacing: .02em;
  color: var(--brand); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.topbar .title small { display: block; color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .logo { height: 26px; margin-left: 8px; }
:root[data-theme="dark"] .topbar .logo, .dark-logo { filter: brightness(0) invert(1) opacity(.9); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .topbar .logo { filter: brightness(0) invert(1) opacity(.9); } }

.iconbtn {
  width: 44px; height: 44px; border: 0; background: transparent; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center; color: var(--ink);
}
.iconbtn:active { background: var(--surface-2); }

.savestate { font-size: 12px; color: var(--muted); white-space: nowrap; display: inline-flex; align-items: center; gap: 4px; padding: 0 4px; }
.savestate .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }
.savestate.saving .dot { background: var(--brand-2); animation: pulse 1s infinite; }
.savestate.offline .dot { background: var(--warn); }
.savestate.error .dot { background: var(--danger); }
@keyframes pulse { 50% { opacity: .3; } }

/* ---------- 报告页顶栏 + 板块菜单 ---------- */
.topbar.editor-topbar .title b { font-size: 15px; font-weight: 600; color: var(--brand); }
.topbar.editor-topbar .topbar-actions {
  display: flex; align-items: center; flex: none; margin-left: auto;
}
.topbar.editor-topbar .savestate { flex: none; font-size: 12px; max-width: 42vw; overflow: hidden; text-overflow: ellipsis; }

.sec-menu {
  position: fixed; inset: 0; z-index: 80;
  display: flex; align-items: flex-end; justify-content: center;
  pointer-events: none; visibility: hidden;
}
.sec-menu.open { pointer-events: auto; visibility: visible; }
html.sec-menu-open { overflow: hidden; }

.sec-menu-backdrop {
  position: absolute; inset: 0;
  background: rgba(8, 12, 20, .42);
  opacity: 0; transition: opacity .25s ease;
}
.sec-menu.open .sec-menu-backdrop { opacity: 1; }

.sec-menu-panel {
  position: relative; z-index: 1;
  width: 100%; max-width: 760px;
  max-height: calc(100dvh - env(safe-area-inset-top));
  display: flex; flex-direction: column;
  background: var(--surface);
  border-radius: 18px 18px 0 0;
  box-shadow: 0 -6px 28px rgba(16, 24, 40, .14);
  transform: translateY(105%);
  transition: transform .28s cubic-bezier(.32, .72, 0, 1);
  padding-bottom: env(safe-area-inset-bottom);
}
.sec-menu.open .sec-menu-panel { transform: translateY(0); }

.sec-menu-grab {
  flex: none; width: 40px; height: 4px; border-radius: 2px;
  background: var(--line); margin: 6px auto 2px;
}

.sec-menu-bar {
  flex: none;
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; padding: 0 4px 8px 14px;
  border-bottom: 1px solid var(--line);
}
.sec-menu-bar h2 {
  margin: 0; flex: 1; min-width: 0;
  font-size: 16px; font-weight: 600; letter-spacing: .02em; color: var(--brand);
}

.sec-menu-list {
  flex: none; overflow: hidden;
  padding: 6px 12px 8px;
  display: flex; flex-direction: column; gap: 3px;
}
.sec-menu-item {
  display: flex; align-items: center; gap: 8px;
  width: 100%; min-height: 40px; text-align: left; cursor: pointer;
  padding: 6px 10px; color: var(--ink);
  border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--brand) 8%, var(--line));
  background: var(--surface); box-shadow: none;
}
.sec-menu-item:active { background: var(--surface-2); }
.sec-menu-item.on {
  background: color-mix(in srgb, var(--brand-soft) 75%, var(--surface));
  border-color: color-mix(in srgb, var(--brand) 32%, var(--line));
}
.sec-menu-item.on .sec-menu-label { color: var(--brand); font-weight: 700; }
.sec-menu-item.done:not(.on) .sec-menu-prog { color: var(--ok); }
.sec-menu-item.partial:not(.on) .sec-menu-prog { color: var(--muted); }
.sec-menu-no {
  width: 26px; height: 26px; border-radius: 8px; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--brand-soft); color: var(--brand); font-weight: 700; font-size: 12px;
}
.sec-menu-label {
  flex: 1; min-width: 0; font-size: 14px; font-weight: 600; line-height: 1.25; color: var(--brand);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sec-menu-prog { flex: none; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ---------- 页面主体（报告页横向滑页） ---------- */
.editor-main { padding: 4px 0 calc(var(--bottombar-h) + 20px + env(safe-area-inset-bottom)); }
.editor-main > .banner-slot { padding-left: 12px; padding-right: 12px; }

.sections-swipe {
  display: flex; overflow-x: auto; overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 4px;
}
.sections-swipe::-webkit-scrollbar { display: none; }
.sections-swipe > .section {
  flex: 0 0 100%; width: 100%; scroll-snap-align: start; scroll-snap-stop: always;
  box-sizing: border-box; padding: 0 12px;
  margin-bottom: 0;
}
.card {
  background: var(--surface); border-radius: 14px; box-shadow: var(--shadow);
  border: 1px solid color-mix(in srgb, var(--brand) 12%, var(--line)); margin-bottom: 12px;
}
.section { scroll-margin-top: 0; }
.section .body { padding: 12px 14px 16px; }

fieldset.secfs { border: 0; margin: 0; padding: 0; min-width: 0; }
.field.readonly { opacity: .6; }
.section > header h2 .tag { font-size: 12px; font-weight: 500; vertical-align: 2px; }
.grid2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 10px;
}
.grid2 > .field.full { grid-column: 1 / -1; }
@media (min-width: 560px) {
  .grid2 { gap: 0 12px; }
}

.field { padding: 10px 0 6px; min-width: 0; }
.field > .lab { display: flex; align-items: baseline; gap: 6px; margin-bottom: 6px; font-size: 14px; color: var(--muted); font-weight: 500; }
.field > .lab .req { color: var(--danger); }
.field > .lab .hint { font-size: 12px; color: var(--faint); font-weight: 400; }
.field > .lab.lab-stack { flex-direction: column; align-items: stretch; gap: 4px; margin-bottom: 10px; }
.field > .lab.lab-stack .lab-title { font-size: 15px; font-weight: 600; color: var(--ink); line-height: 1.35; }
.field > .lab.lab-stack .hint-block { margin: 0; font-size: 13px; line-height: 1.45; color: var(--muted); font-weight: 400; }
.field > .lab .nowlink { margin-left: auto; border: 0; background: var(--brand-soft); color: var(--brand); font-size: 13px; font-weight: 600; border-radius: 6px; padding: 2px 10px; min-height: 26px; }
.field.invalid > .lab { color: var(--danger); }
.field .warnline { margin-top: 6px; font-size: 13px; color: var(--warn); background: var(--warn-soft); border-radius: 8px; padding: 6px 10px; }

.input, select.input, textarea.input {
  width: 100%; min-height: 46px; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2);
  font-size: 16px; /* ≥16px 防止 iOS 聚焦时自动放大 */
  outline: none; transition: border-color .15s, box-shadow .15s;
  -webkit-appearance: none; appearance: none;
}
.input:focus { border-color: var(--brand-2); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-2) 20%, transparent); background: var(--surface); }
textarea.input { resize: none; line-height: 1.5; min-height: 76px; }
select.input {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%2398a3b3' stroke-width='2'%3E%3Cpath d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px;
}
input[type="date"].input, input[type="time"].input, input[type="number"].input { min-width: 0; }
input[type="date"].input::-webkit-date-and-time-value, input[type="time"].input::-webkit-date-and-time-value { text-align: left; }
input[type="date"].input.is-empty:not(:focus)::-webkit-datetime-edit,
input[type="date"].input.is-empty:not(:focus)::-webkit-datetime-edit-fields-wrapper { opacity: 0; }
input[type="date"].input.is-empty:not(:focus) { color: transparent; }
input[type="date"].input.is-empty:focus { color: var(--ink); }
button.input.wheel-trigger {
  width: 100%; text-align: left; cursor: pointer; font: inherit; color: var(--ink);
}
button.input.wheel-trigger.is-empty { color: var(--muted); }
.inline { display: flex; gap: 8px; align-items: stretch; }
.inline > .input { flex: 1; min-width: 0; }
.suffix { position: relative; }
.suffix > .input { padding-right: 40px; }
.suffix > span { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 46px; padding: 0 16px; border-radius: 10px; border: 1px solid transparent;
  background: var(--brand); color: var(--on-brand); font-weight: 600; font-size: 15px; white-space: nowrap; text-decoration: none;
}
.btn:active { transform: translateY(1px); filter: brightness(.95); }
.btn.soft { background: var(--brand-soft); color: var(--brand); }
.btn.ghost { background: transparent; color: var(--brand); border-color: var(--line); }
.btn.danger { background: var(--danger-soft); color: var(--danger); }
.btn.small { min-height: 36px; padding: 0 12px; font-size: 14px; border-radius: 8px; }
.btn.block { width: 100%; }
.btn.big { min-height: 56px; font-size: 17px; border-radius: 14px; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.nowbtn { flex: none; min-width: 64px; }

/* 单选 / 多选 —— 纯文字胶囊，选中变色 */
.chips-rows { display: flex; flex-direction: column; gap: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  min-height: 42px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface-2); color: var(--ink); display: inline-flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 500;
}
.chip:active { filter: brightness(.97); }
.chip.on {
  background: var(--brand-soft); border-color: var(--brand); color: var(--brand); font-weight: 600;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--brand) 25%, transparent);
}
.chips.chips-binary {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%;
}
.chips.chips-binary .chip {
  width: 100%; min-height: 50px; border-radius: 12px; font-size: 16px;
}
.chips.chips-binary .chip-ok.on {
  background: var(--ok-soft); border-color: var(--ok); color: color-mix(in srgb, var(--ok) 85%, var(--ink));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--ok) 30%, transparent);
}
.chips.chips-binary .chip-warn.on {
  background: var(--danger-soft); border-color: var(--danger); color: var(--danger);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--danger) 25%, transparent);
}
.subinput { margin-top: 10px; }

/* 满意度 1–10 */
.rating { display: grid; grid-template-columns: repeat(10, 1fr); gap: 6px; }
.rating button {
  height: 44px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2);
  font-weight: 600; font-size: 16px; color: var(--ink);
}
.rating button.on { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.rating button.in { background: var(--brand-soft); border-color: color-mix(in srgb, var(--brand) 30%, var(--line)); color: var(--brand); }
@media (max-width: 420px) { .rating { grid-template-columns: repeat(5, 1fr); } }

/* 参数表 */
.ptable { display: flex; flex-direction: column; gap: 8px; }
.prow { display: grid; grid-template-columns: 1fr 1fr 1.3fr auto; gap: 6px; align-items: center; }
.prow .input { min-height: 42px; padding: 8px 10px; }
.prow .pw { grid-column: 1 / -1; font-size: 12px; color: var(--muted); margin-top: -2px; padding-left: 2px; }
.phead { display: grid; grid-template-columns: 1fr 1fr 1.3fr 44px; gap: 6px; font-size: 12px; color: var(--faint); padding: 0 2px; }

/* 器械扫码 */
.devices { display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; }
.device {
  display: flex; align-items: center; gap: 10px; padding: 10px 6px 10px 12px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2);
}
.device .info { flex: 1; min-width: 0; }
.device .info b { display: block; font-size: 15px; }
.device .info small { display: block; color: var(--muted); font-size: 12px; word-break: break-all; }
.device .cnt { text-align: center; flex: none; padding: 0 4px; }
.device .cnt b { display: block; font-size: 20px; line-height: 1.1; color: var(--brand); }
.device .cnt small { font-size: 11px; color: var(--muted); }
.device.over { border-color: var(--danger); background: var(--danger-soft); }
.device.over .cnt b { color: var(--danger); }
.device.pending { border-style: dashed; }
.tag { display: inline-block; font-size: 11px; padding: 1px 6px; border-radius: 4px; background: var(--warn-soft); color: var(--warn); margin-left: 4px; font-weight: 500; vertical-align: 1px; }
.tag.ok { background: var(--ok-soft); color: var(--ok); }
.tag.bad { background: var(--danger-soft); color: var(--danger); }
.empty-ph {
  border: 1.5px dashed var(--line); border-radius: 10px; padding: 14px; text-align: center; color: var(--faint); font-size: 14px; margin-bottom: 8px;
}
.btnrow { display: flex; gap: 8px; flex-wrap: wrap; }
.btnrow > .btn { flex: 1; }

/* 照片 / 视频 */
.media-slot { display: flex; flex-direction: column; gap: 10px; }
.media-strip:empty { display: none; }
.media-strip {
  display: flex; flex-wrap: nowrap; align-items: stretch; gap: 10px;
  overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain;
  scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch;
  padding: 2px 2px 6px; margin: 0 -2px; scrollbar-width: none;
}
.media-strip::-webkit-scrollbar { display: none; }
.media-strip .tile.thumb {
  flex: none; width: 76px; height: 76px; scroll-snap-align: start;
}
.media-strip .tile.thumb.long-press { outline: 2px solid var(--danger); outline-offset: 1px; }
.tile.add.album-bar {
  width: 100%; aspect-ratio: auto; min-height: 52px;
  flex-direction: row; justify-content: center; gap: 8px;
}
.tile {
  position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: var(--surface-2);
  border: 1px solid var(--line); display: flex; align-items: center; justify-content: center;
}
.tile img, .tile video { width: 100%; height: 100%; object-fit: cover; display: block; }
.tile .play { position: absolute; inset: auto 6px 6px auto; background: rgba(0,0,0,.6); color: #fff; border-radius: 6px; font-size: 11px; padding: 2px 6px; display: flex; gap: 3px; align-items: center; }
.tile .play svg { width: 12px; height: 12px; }
.tile.add {
  border: 1.5px dashed color-mix(in srgb, var(--brand) 35%, var(--line)); background: transparent; color: var(--brand);
  flex-direction: column; gap: 4px; font-size: 13px;
}
.tile.add input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.tile .bar { position: absolute; left: 8px; right: 8px; bottom: 8px; height: 4px; border-radius: 2px; background: rgba(255,255,255,.5); overflow: hidden; }
.tile .bar i { display: block; height: 100%; width: 0; background: var(--brand); transition: width .2s; }
.tile .err { position: absolute; inset: 0; background: rgba(180,35,24,.75); color: #fff; font-size: 12px; display: flex; align-items: center; justify-content: center; text-align: center; padding: 6px; }
.tile.uploading img { opacity: .55; }

/* 签名（第八板块） */
.section-sign-body { display: flex; flex-direction: column; gap: 14px; padding: 14px 14px 16px; }
.section-sign-body .field-signature { padding: 0; }
.field-signature .req { color: var(--danger); margin-left: 2px; }

.sig-card {
  border-radius: 12px; overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--brand) 14%, var(--line));
  background: var(--surface); box-shadow: var(--shadow);
}
.sig-card.signed { border-color: color-mix(in srgb, var(--ok) 32%, var(--line)); }
.sig-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 10px;
  padding: 12px 14px 0;
}
.sig-title { font-size: 15px; font-weight: 600; color: var(--ink); line-height: 1.35; }
.sig-redo {
  flex: none; border: 0; background: var(--brand-soft); color: var(--brand);
  font-size: 13px; font-weight: 600; border-radius: 8px; padding: 4px 10px; min-height: 32px;
}
.sig-redo:active { filter: brightness(.95); }

.sigbox {
  margin: 10px 12px 0; width: auto; height: 96px;
  border: 1.5px dashed color-mix(in srgb, var(--brand) 24%, var(--line));
  border-radius: 10px; background: var(--surface-2);
  display: flex; align-items: center; justify-content: center; overflow: hidden; position: relative;
  cursor: pointer; transition: border-color .15s, background .15s;
}
.sigbox:active { background: color-mix(in srgb, var(--brand-soft) 55%, var(--surface-2)); }
.sigbox.signed { border-style: solid; border-color: color-mix(in srgb, var(--ok) 22%, var(--line)); background: var(--surface); }
.sig-ph {
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  color: var(--muted); font-size: 14px; font-weight: 500; text-align: center; padding: 0 12px;
}
.sig-ph svg { width: 26px; height: 26px; color: var(--brand-2); opacity: .9; }
.sig-ph small { font-size: 12px; color: var(--faint); font-weight: 400; }
.sigbox img { max-height: 88px; max-width: calc(100% - 16px); object-fit: contain; }
:root[data-theme="dark"] .sigbox img { filter: invert(1) hue-rotate(180deg); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .sigbox img { filter: invert(1) hue-rotate(180deg); } }

.sig-foot {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px 12px; margin-top: 10px;
  border-top: 1px solid color-mix(in srgb, var(--line) 85%, transparent);
}
.sig-date-label { flex: none; font-size: 13px; font-weight: 500; color: var(--muted); }
.sig-foot .input { flex: 1; min-height: 42px; padding: 8px 12px; font-size: 15px; background: var(--surface-2); }

/* ---------- 底部操作栏 ---------- */
.bottombar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
}
.bottombar .inner { max-width: 736px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; align-items: stretch; }
.bottombar .inner.bottombar-two { grid-template-columns: 1fr 1fr; }
.bottombar .btn.big {
  border-radius: 12px; min-height: 52px; font-size: 15px; font-weight: 600;
  padding: 0 10px; gap: 5px;
}
.bottombar .btn.big .i { width: 20px; height: 20px; flex: none; }
.bottombar .btn.big.soft:disabled { opacity: .45; color: var(--muted); }
.bottombar .btn.big.ghost { background: var(--surface); color: var(--ink); border-color: var(--line); }

/* ---------- 欢迎页 ---------- */
.welcome-main {
  position: relative; min-height: 100dvh; box-sizing: border-box;
  display: flex; flex-direction: column;
}
/* 欢迎页与各功能页共用背景 */
.app-bg, .home-bg {
  pointer-events: none; position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(ellipse 100% 55% at 50% -8%, color-mix(in srgb, var(--brand) 22%, transparent), transparent 72%),
    radial-gradient(ellipse 70% 45% at 100% 0%, color-mix(in srgb, var(--brand-2) 18%, transparent), transparent 60%),
    linear-gradient(180deg, color-mix(in srgb, var(--brand-soft) 88%, var(--bg)) 0%, var(--bg) 55%, var(--bg) 100%);
}
.app-page {
  position: relative; min-height: 100dvh; display: flex; flex-direction: column;
  box-sizing: border-box;
}
/* 勿覆盖 fixed 层（板块菜单、底栏）与 sticky 顶栏 */
.app-page > :not(.app-bg):not(.sec-menu):not(.bottombar):not(.topbar) {
  position: relative; z-index: 1;
}
.app-page > .topbar { z-index: 20; }
.app-page > .sec-menu { z-index: 80; }
.app-page > .bottombar { z-index: 30; }
.app-topbar {
  background: color-mix(in srgb, var(--bg) 72%, transparent) !important;
  backdrop-filter: saturate(1.25) blur(10px);
  -webkit-backdrop-filter: saturate(1.25) blur(10px);
  border-bottom: 1px solid color-mix(in srgb, var(--brand) 10%, var(--line)) !important;
}
.app-content { flex: 1; padding: 0 16px calc(20px + env(safe-area-inset-bottom)); min-width: 0; }
.section-heading, .listhead h3 {
  margin: 0; font-size: 17px; font-weight: 600; letter-spacing: .02em; color: var(--brand);
}
.app-content .input:not(.follow-search-input) {
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--brand) 12%, var(--line));
  box-shadow: var(--shadow);
}
.home-bar {
  position: relative; z-index: 1;
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(10px + env(safe-area-inset-top)) 16px 4px;
}
.home-logo { height: 32px; width: auto; display: block; }
.home-wrap { position: relative; z-index: 1; flex: 1; padding: 0 16px; }
.home-hero { padding: 20px 4px 24px; text-align: center; }
.home-hero h1 {
  margin: 0 0 10px; font-size: 26px; font-weight: 700; line-height: 1.25;
  color: var(--brand); letter-spacing: .02em;
}
.home-lead {
  margin: 0 auto; max-width: 20em; font-size: 15px; line-height: 1.5; color: var(--muted);
}
.welcome-actions { display: flex; flex-direction: column; gap: 14px; margin: 0 0 8px; }
.welcome-card {
  display: flex; align-items: center; gap: 16px; padding: 20px 18px; text-decoration: none; color: inherit;
  border-radius: 14px; border: 1px solid color-mix(in srgb, var(--brand) 12%, var(--line));
  background: var(--surface); box-shadow: var(--shadow);
}
.welcome-card:active { background: var(--surface-2); }
.welcome-card b { font-size: 17px; font-weight: 600; color: var(--brand); }
.welcome-ic {
  width: 48px; height: 48px; border-radius: 12px; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--brand-soft); color: var(--brand);
}
.welcome-ic svg { width: 24px; height: 24px; }
.welcome-foot {
  position: relative; z-index: 1; flex: none; margin-top: auto;
  text-align: center; color: var(--faint); font-size: 12px;
  padding: 16px 16px calc(20px + env(safe-area-inset-bottom));
}
.welcome-foot button {
  background: none; border: 0; color: var(--muted); text-decoration: underline; font-size: 12px;
}
.welcome-main .preset { margin-bottom: 12px; }

/* ---------- 跟台草稿页 ---------- */
.follow-page { padding: 0; }
.follow-topbar .title { text-align: center; }
.follow-top-new {
  flex: none; min-width: 44px; min-height: 44px; padding: 0 6px;
  border: 0; background: transparent; color: var(--brand);
  font-size: 15px; font-weight: 600; white-space: nowrap;
}
.follow-top-new:active { opacity: .75; }
.follow-top-new[disabled] { opacity: .45; pointer-events: none; }
.follow-head {
  position: sticky; top: 0; z-index: 5;
  background: transparent;
}
.follow-head .topbar { position: static; border-bottom: 0; background: transparent; backdrop-filter: none; }
.follow-toolbar { padding: 4px 16px 12px; }
.follow-search {
  display: flex; align-items: center; gap: 8px;
  min-height: 44px; padding: 0 12px 0 10px; box-sizing: border-box;
  border-radius: 12px; background: var(--surface);
  border: 1px solid color-mix(in srgb, var(--brand) 22%, var(--line));
  box-shadow: var(--shadow);
}
.follow-search-ic { flex: none; display: inline-flex; color: var(--faint); line-height: 0; }
.follow-search-ic svg { width: 20px; height: 20px; }
.follow-search-input {
  flex: 1; min-width: 0; width: auto; min-height: 40px; padding: 8px 0;
  font-size: 15px; border: 0; background: transparent; box-shadow: none;
}
.follow-search-input:focus { outline: none; }
.follow-search-refresh {
  flex: none; margin: 0; padding: 8px 0 8px 12px;
  border: 0; border-left: 1px solid var(--line); background: transparent;
  font-size: 14px; font-weight: 500; color: var(--muted); white-space: nowrap;
}
.follow-search-refresh:active { color: var(--brand); }
.follow-section { padding: 0 16px; min-width: 0; }
.follow-section-title {
  display: flex; align-items: center; gap: 8px;
  margin: 4px 0 12px; font-size: 17px; font-weight: 600; color: var(--brand);
}
.follow-section-bar {
  width: 4px; height: 15px; border-radius: 2px; flex: none;
  background: var(--brand);
}
.follow-list {
  display: flex; flex-direction: column; gap: 10px; min-height: 80px;
}
.follow-list .swipe-row {
  border-radius: 14px;
  border: 1px solid color-mix(in srgb, var(--brand) 12%, var(--line));
  box-shadow: var(--shadow); background: var(--surface);
  overflow: hidden;
}
.follow-list .swipe-row.recent .row-link {
  border-left: 4px solid var(--brand);
  padding-left: 12px;
}
/* 跟台列表：滑条前景叠在操作层之上 */
.follow-list .swipe-front {
  position: relative; z-index: 2; width: 100%; box-sizing: border-box;
  background: var(--surface); border-radius: 14px;
}
.follow-list .swipe-row.recent .swipe-front {
  background: color-mix(in srgb, var(--brand-soft) 70%, var(--surface));
}
.follow-list .swipe-front .row-link { padding: 14px 14px 14px 16px; }
.follow-list .meta small { line-height: 1.35; }
.follow-tail { padding: 12px 16px 0; text-align: center; }
.follow-more-link {
  border: 0; background: none; padding: 10px 16px; font-size: 15px; font-weight: 600; color: var(--brand);
}
.follow-more-link[disabled] { opacity: .5; }
.follow-foot { margin-top: 6px; font-size: 12px; color: var(--faint); }
.follow-empty {
  padding: 36px 8px 16px; text-align: center;
}
.follow-empty p { margin: 0 0 16px; color: var(--muted); font-size: 15px; }
.follow-list .spinner { margin: 32px auto; }

.preset { display: flex; gap: 10px; align-items: center; padding: 12px 14px; }
.preset b { display: block; }
.list { display: flex; flex-direction: column; overscroll-behavior-x: contain; }
.list .item,
.swipe-front .row-link {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px; text-decoration: none; color: inherit;
}
.list .item { border-top: 1px solid var(--line); }
.list .item:first-child { border-top: 0; }
.list .item .meta,
.swipe-front .meta { flex: 1; min-width: 0; }
.list .item .meta b,
.swipe-front .meta b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list .item .meta b,
.swipe-front .meta b { font-size: 17px; font-weight: 600; color: var(--brand); }
.list .item .meta small,
.swipe-front .meta small { color: var(--muted); font-size: 13px; }

.swipe-row {
  position: relative; overflow: hidden; border-top: 1px solid var(--line); background: var(--surface);
  touch-action: pan-y;
}
.swipe-row:first-child { border-top: 0; }
.swipe-actions {
  position: absolute; right: 0; top: 0; bottom: 0; z-index: 1;
  display: flex; align-items: stretch;
  pointer-events: none;
  visibility: hidden;
}
.swipe-row.swipe-open .swipe-actions {
  visibility: visible;
  pointer-events: auto;
  z-index: 3;
}
.swipe-front { position: relative; z-index: 2; }
/* 滑开时主链接、看报告按钮不响应点击 */
.swipe-row.swipe-open .swipe-front .row-link,
.swipe-row.swipe-open .swipe-front .row-view { pointer-events: none; }
.swipe-reopen, .swipe-del {
  flex: 0 0 76px; width: 76px; border: 0; font-size: 15px; font-weight: 600;
  touch-action: manipulation;
}
.swipe-reopen { background: var(--brand); color: var(--on-brand); }
.swipe-del { background: var(--danger); color: #fff; }
.swipe-front {
  display: flex; align-items: center; gap: 6px; background: var(--surface);
  will-change: transform;
}
.swipe-front .row-link { flex: 1; min-width: 0; padding-right: 0; }
.swipe-front .row-view { flex: none; margin-right: 10px; }
.badge { font-size: 12px; padding: 2px 8px; border-radius: 999px; background: var(--warn-soft); color: var(--warn); flex: none; }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.listhead { display: flex; justify-content: space-between; align-items: center; padding: 14px 14px 6px; }
.listhead h3 { margin: 0; font-size: 15px; }
.links { display: grid; grid-template-columns: 1fr; gap: 10px; }
.links a { display: flex; gap: 10px; align-items: center; padding: 14px; text-decoration: none; color: var(--ink); }
.links a svg { color: var(--brand); }
.foot { text-align: center; color: var(--faint); font-size: 12px; padding: 16px 0 24px; }
.foot button { background: none; border: 0; color: var(--muted); text-decoration: underline; font-size: 12px; }

/* 台账 */
.tabs { display: flex; gap: 6px; padding: 4px; background: var(--surface-2); border-radius: 12px; border: 1px solid var(--line); }
.tabs button { flex: 1; min-height: 40px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font-weight: 600; }
.tabs button.on { background: var(--surface); color: var(--brand); box-shadow: var(--shadow); }
.bignum { font-size: 26px; font-weight: 700; color: var(--brand); line-height: 1; }
.kv { display: grid; grid-template-columns: 6em 1fr; gap: 8px 12px; padding: 14px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; word-break: break-all; }

/* 报告分享二维码（编辑器） */
.qrbig { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px; }
.qrbig img { width: 240px; height: 240px; background: #fff; padding: 8px; border-radius: 12px; }
.qrbig code { font-size: 12px; word-break: break-all; color: var(--muted); text-align: center; }

/* ---------- 弹层：底部抽屉 / 提示 ---------- */
.backdrop { position: fixed; inset: 0; z-index: 92; background: rgba(8, 12, 20, .45); display: flex; align-items: flex-end; justify-content: center; animation: fade .15s; }
.backdrop.sheet-layer { z-index: 100; }
.sheet {
  width: 100%; max-width: 760px; max-height: 88vh; overflow: auto;
  background: var(--surface); border-radius: 18px 18px 0 0; padding: 8px 16px calc(16px + env(safe-area-inset-bottom));
  animation: up .2s ease-out;
}
.sheet .grab { width: 40px; height: 4px; border-radius: 2px; background: var(--line); margin: 4px auto 10px; }

.wheel-picker {
  position: relative; height: 220px; margin: 4px 0 8px; overflow: hidden;
  mask-image: linear-gradient(to bottom, transparent, #000 22%, #000 78%, transparent);
}
.wheel-picker::before {
  content: ''; pointer-events: none; position: absolute; z-index: 1; left: 0; right: 0; top: 50%;
  height: 44px; transform: translateY(-50%);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--brand-soft) 35%, transparent);
}
.wheel-col {
  height: 100%; overflow-y: auto; overscroll-behavior: contain;
  scroll-snap-type: y mandatory; -webkit-overflow-scrolling: touch;
  padding: 88px 0; box-sizing: border-box;
  scrollbar-width: none;
}
.wheel-col::-webkit-scrollbar { display: none; }
.wheel-item {
  height: 44px; display: flex; align-items: center; justify-content: center;
  scroll-snap-align: center; font-size: 20px; font-weight: 600; color: var(--muted);
}
.wheel-item:active { color: var(--brand); }
.sheet h3 { margin: 4px 0 6px; font-size: 18px; }
.sheet p { margin: 6px 0 14px; color: var(--muted); white-space: pre-line; }
.sheet .actions { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.sheet ul.problems { margin: 6px 0 0; padding: 0; list-style: none; }
.sheet ul.problems li { padding: 10px 0; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; }
@keyframes up { from { transform: translateY(30px); opacity: .5; } }
@keyframes fade { from { opacity: 0; } }

.toasts { position: fixed; left: 0; right: 0; top: calc(var(--topbar-h) + 12px + env(safe-area-inset-top)); z-index: 90; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; padding: 0 12px; }
.toast {
  pointer-events: auto; max-width: 520px; width: 100%; background: #15202f; color: #fff; border-radius: 12px; padding: 12px 14px;
  box-shadow: 0 8px 24px rgba(0,0,0,.25); display: flex; gap: 10px; align-items: center; animation: up .2s ease-out; font-size: 15px;
}
.toast.ok { background: #0f5f39; }
.toast.warn { background: #8a4b05; }
.toast.err { background: #8f1d14; }
.toast .t { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.toast .t small { display: block; opacity: .85; font-size: 13px; }
.toast button { flex: none; white-space: nowrap; background: rgba(255,255,255,.18); color: #fff; border: 0; border-radius: 8px; padding: 8px 12px; font-weight: 600; }

/* ---------- 扫码 ---------- */
.scanner { position: fixed; inset: 0; z-index: 80; background: #000; color: #fff; display: flex; flex-direction: column; }
.scanner video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.scanner .top { position: relative; z-index: 2; display: flex; align-items: center; gap: 8px; padding: calc(10px + env(safe-area-inset-top)) 10px 10px; background: linear-gradient(rgba(0,0,0,.6), transparent); }
.scanner .top .iconbtn { color: #fff; }
.scanner .top b { flex: 1; font-size: 17px; }
.scanner .seg { display: flex; background: rgba(255,255,255,.14); border-radius: 10px; padding: 3px; }
.scanner .seg button { border: 0; background: transparent; color: #fff; padding: 6px 12px; border-radius: 8px; font-size: 14px; }
.scanner .seg button.on { background: #fff; color: #000; font-weight: 600; }
.scanner .view { position: relative; flex: 1; display: flex; align-items: center; justify-content: center; z-index: 1; }
.scanner .frame { width: min(68vw, 300px); aspect-ratio: 1; border-radius: 18px; box-shadow: 0 0 0 100vmax rgba(0,0,0,.45); position: relative; }
.scanner .frame::before, .scanner .frame::after { content: ""; position: absolute; inset: 0; border-radius: 18px; border: 3px solid rgba(255,255,255,.95); clip-path: polygon(0 0, 22% 0, 22% 4%, 4% 4%, 4% 22%, 0 22%, 0 78%, 4% 78%, 4% 96%, 22% 96%, 22% 100%, 0 100%, 0 0, 100% 0, 100% 22%, 96% 22%, 96% 4%, 78% 4%, 78% 0, 100% 0, 100% 100%, 78% 100%, 78% 96%, 96% 96%, 96% 78%, 100% 78%, 100% 100%); }
.scanner .laser { position: absolute; left: 8%; right: 8%; height: 2px; background: #5ea0ff; box-shadow: 0 0 12px #5ea0ff; animation: scan 2s ease-in-out infinite; top: 10%; }
@keyframes scan { 50% { top: 88%; } }
.scanner .msg { position: absolute; bottom: -54px; left: 50%; transform: translateX(-50%); width: 90vw; text-align: center; font-size: 14px; opacity: .9; }
.scanner .bottom { position: relative; z-index: 2; display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; padding: 14px 16px calc(18px + env(safe-area-inset-bottom)); background: linear-gradient(transparent, rgba(0,0,0,.7)); }
.scanner .bottom button { background: rgba(255,255,255,.14); border: 0; color: #fff; border-radius: 14px; min-height: 64px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 13px; position: relative; }
.scanner .bottom button.on { background: #fff; color: #000; }
.scanner .bottom input[type=file] { position: absolute; inset: 0; opacity: 0; }
.scanner .nocam { position: relative; z-index: 2; margin: 0 24px; padding: 18px; background: rgba(255,255,255,.1); border-radius: 14px; text-align: center; line-height: 1.6; }
.scanner .flash { position: absolute; inset: 0; background: rgba(94,160,255,.35); z-index: 3; animation: fade .3s reverse forwards; pointer-events: none; }

/* ---------- 签名板 ---------- */
.sigpad { position: fixed; inset: 0; z-index: 85; background: var(--bg); display: flex; flex-direction: column; }
.sigpad .top { display: flex; align-items: center; gap: 8px; padding: calc(8px + env(safe-area-inset-top)) 8px 8px; border-bottom: 1px solid var(--line); background: var(--surface); }
.sigpad .top b { flex: 1; }
.sigpad .canvaswrap { flex: 1; position: relative; margin: 12px; border-radius: 14px; background: #fff; border: 1px solid var(--line); overflow: hidden; touch-action: none; }
.sigpad canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; }
.sigpad .baseline { position: absolute; left: 10%; right: 10%; bottom: 28%; border-bottom: 1px dashed #c5ccd6; pointer-events: none; }
.sigpad .ph { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #b6bfcc; font-size: 22px; pointer-events: none; letter-spacing: .2em; }
.sigpad .bar { display: grid; grid-template-columns: 1fr 2fr; gap: 10px; padding: 0 12px calc(12px + env(safe-area-inset-bottom)); }

/* 媒体全屏查看（.media-viewer-app） */
.media-viewer-app {
  position: fixed; inset: 0; z-index: 85; background: #000; display: flex; flex-direction: column;
  -webkit-tap-highlight-color: transparent;
}
.media-viewer-app[hidden] { display: none !important; }
.media-viewer-app .mv-bar {
  position: absolute; top: 0; left: 0; right: 0; z-index: 6;
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(4px + env(safe-area-inset-top)) 2px 16px;
  background: linear-gradient(to bottom, rgba(0,0,0,.55), rgba(0,0,0,0));
  border: 0;
  pointer-events: none;
}
.media-viewer-app .mv-bar > * { pointer-events: auto; }
.media-viewer-app .mv-back, .media-viewer-app .mv-more {
  appearance: none; border: 0; margin: 0; width: 48px; height: 48px; background: transparent; color: #fff;
}
.media-viewer-app .mv-back { font-size: 32px; font-weight: 300; line-height: 1; padding: 0 0 2px 2px; }
.media-viewer-app .mv-more { font-size: 20px; font-weight: 700; letter-spacing: 1px; padding-bottom: 6px; }
.media-viewer-app .mv-main { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.media-viewer-app .mv-stage {
  flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; overflow: hidden;
  padding: calc(52px + env(safe-area-inset-top)) 0 8px;
}
.media-viewer-app[data-mode="video"] .mv-stage { padding-bottom: 0; }
.media-viewer-app .mv-zoom { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; touch-action: none; }
.media-viewer-app .mv-zoom img { max-width: 100%; max-height: 100%; object-fit: contain; user-select: none; transform-origin: center center; }
.media-viewer-app video.mv-player { width: 100%; max-height: 100%; object-fit: contain; background: #000; }
.media-viewer-app .mv-vwrap[hidden] { display: none !important; }
.media-viewer-app .mv-vbar {
  flex: none; display: flex; align-items: center; gap: 10px;
  padding: 12px 14px calc(12px + env(safe-area-inset-bottom)); background: rgba(0,0,0,.92); color: #fff; font-size: 13px;
}
.media-viewer-app .mv-vbar button { appearance: none; border: 0; background: transparent; color: #fff; font-size: 22px; width: 36px; flex: none; }
.media-viewer-app .mv-vbar input[type=range] {
  flex: 1; min-width: 0; height: 4px; -webkit-appearance: none; appearance: none;
  background: rgba(255,255,255,.28); border-radius: 999px;
}
.media-viewer-app .mv-vbar input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 14px; height: 14px; border-radius: 999px; background: #fff;
}
.media-viewer-app .mv-vbar .mv-time { flex: none; min-width: 4.2em; font-size: 12px; opacity: .85; }
.media-viewer-app .mv-footer { position: absolute; left: 0; right: 0; bottom: 0; pointer-events: none; padding: 12px 16px calc(72px + env(safe-area-inset-bottom)); }
.media-viewer-app[data-mode="video"] .mv-footer { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
.media-viewer-app .mv-footer[hidden] { display: none; }
.media-viewer-app .mv-dots { display: flex; justify-content: center; gap: 7px; }
.media-viewer-app .mv-dot { width: 6px; height: 6px; border-radius: 999px; background: rgba(255,255,255,.35); }
.media-viewer-app .mv-dot.on { background: #fff; }
.mv-sheet-app { position: fixed; inset: 0; z-index: 90; display: flex; flex-direction: column; justify-content: flex-end; }
.mv-sheet-app[hidden] { display: none !important; }
.mv-sheet-app .mv-shade { position: absolute; inset: 0; background: rgba(0,0,0,.45); }
.mv-sheet-app .mv-panel {
  position: relative; margin: 0 10px calc(10px + env(safe-area-inset-bottom)); border-radius: 14px;
  overflow: hidden; background: rgba(255,255,255,.98); color: #111;
}
.mv-sheet-app .mv-panel button {
  display: block; width: 100%; box-sizing: border-box; border: 0; border-top: 1px solid rgba(0,0,0,.08);
  background: transparent; padding: 16px 18px; font: inherit; font-size: 17px; text-align: center; color: #111;
}
.mv-sheet-app .mv-panel button:first-child { border-top: 0; }
.mv-sheet-app .mv-panel .mv-cancel { font-weight: 600; color: var(--brand); }
.mv-sheet-app .mv-panel .mv-danger { color: var(--danger); font-weight: 600; }
.mv-sheet-app .mv-rate-row { padding: 14px 16px 16px; border-top: 1px solid rgba(0,0,0,.08); }
.mv-sheet-app .mv-rate-row p { margin: 0 0 10px; font-size: 14px; color: var(--muted); text-align: center; }
.mv-sheet-app .mv-rate-chips { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; }
.mv-sheet-app .mv-rate-chips button {
  width: auto; display: inline-block; border: 1px solid rgba(0,0,0,.12); border-radius: 999px;
  padding: 8px 14px; font-size: 15px; border-top: 0;
}
.mv-sheet-app .mv-rate-chips button.on { background: var(--brand); color: #fff; border-color: var(--brand); font-weight: 600; }
html.mv-lock .topbar,
html.mv-lock .bottombar { display: none !important; }
html.mv-lock .editor-page .app-bg { visibility: hidden; }

.spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--brand); animation: spin .8s linear infinite; margin: 40px auto; }
@keyframes spin { to { transform: rotate(360deg); } }

@media print {
  .topbar, .sec-menu, .bottombar, .toasts { display: none !important; }
  main { padding: 0; }
}
