/* AI 出差记事本 · iPhone 优先样式 */
:root {
  --bg: #f3f5fa;
  --bg-2: #eaeef7;
  --card: #ffffff;
  --text: #0f172a;
  --text-2: #475467;
  --muted: #8a94a6;
  --line: #e8ecf4;
  --line-strong: #d9dfeb;
  --accent: #2f6bff;
  --accent-deep: #1f4fe0;
  --accent-soft: #edf2ff;
  --green: #069b74;
  --green-soft: #e6f7f1;
  --orange: #f79009;
  --orange-soft: #fff4e5;
  --danger: #ef4444;
  --danger-soft: #fdecec;
  --radius: 18px;
  --shadow: 0 10px 30px rgba(23, 43, 99, 0.07);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  -webkit-text-size-adjust: 100%;
  height: 100%;
}

body {
  margin: 0;
  background:
    radial-gradient(120% 60% at 50% 0%, #eaf0ff 0%, rgba(234, 240, 255, 0) 60%),
    var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Helvetica Neue",
    "Microsoft YaHei", sans-serif;
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
  min-height: 100%;
}

body.sheet-open {
  overflow: hidden;
}

button,
input,
textarea,
select {
  font-family: inherit;
  color: inherit;
  font-size: 16px;
}

button {
  border: none;
  background: none;
  padding: 0;
  cursor: pointer;
}

img {
  display: block;
}

.app {
  max-width: 640px;
  margin: 0 auto;
  min-height: 100vh;
}

/* ------------------------------ 顶部栏 ------------------------------ */

.appbar {
  position: sticky;
  top: 0;
  z-index: 30;
  padding: calc(10px + var(--safe-top)) 16px 10px;
  background: rgba(244, 246, 251, 0.82);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid rgba(232, 236, 244, 0.8);
}

.appbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  font-size: 23px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(140deg, #3f7bff 0%, #2f6bff 55%, #1e4fe0 100%);
  box-shadow: 0 6px 16px rgba(47, 107, 255, 0.32);
  flex: none;
}

.brand-text {
  min-width: 0;
}

.brand-text h1 {
  margin: 0;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.brand-text p {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--text-2);
  flex: none;
}

.status-pill .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--danger);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12);
}

.status-pill.is-online .dot {
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(6, 155, 116, 0.14);
}

/* ------------------------------ 主区域 ------------------------------ */

.main {
  padding: 12px 14px calc(150px + var(--safe-bottom));
}

.section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 4px 4px 10px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.section-note {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
}

/* ------------------------------ 表格切换 ------------------------------ */

.table-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 2px 10px;
  scrollbar-width: none;
}

.table-chips::-webkit-scrollbar {
  display: none;
}

.table-chip {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 34px;
  padding: 0 13px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--text-2);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  transition: 0.18s ease;
}

.table-chip.is-active {
  background: var(--text);
  border-color: var(--text);
  color: #fff;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.18);
}

.table-chip--add {
  border-style: dashed;
  color: var(--accent);
  background: rgba(47, 107, 255, 0.05);
}

/* ------------------------------ 统计卡 ------------------------------ */

.stats {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 2px 12px;
  scrollbar-width: none;
}

.stats::-webkit-scrollbar {
  display: none;
}

.stat {
  flex: 1;
  min-width: 92px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 11px 12px;
  box-shadow: 0 4px 14px rgba(23, 43, 99, 0.04);
}

.stat b {
  display: block;
  font-size: 18px;
  font-weight: 750;
  letter-spacing: -0.2px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stat span {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
}

.stat--money b {
  color: var(--accent);
  font-size: 16px;
}

/* ------------------------------ 搜索 ------------------------------ */

.search-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 12px;
}

.search-box {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 12px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--line);
}

.search-box svg {
  width: 17px;
  height: 17px;
  color: var(--muted);
  flex: none;
}

.search-box input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 14.5px;
  min-width: 0;
}

.search-box input::placeholder {
  color: #aab2c2;
}

.search-clear {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #eef1f7;
  color: var(--muted);
}

.search-clear svg {
  width: 12px;
  height: 12px;
  color: inherit;
}

.is-hidden {
  display: none !important;
}

.view-toggle {
  display: inline-flex;
  padding: 3px;
  border-radius: 11px;
  background: #fff;
  border: 1px solid var(--line);
  gap: 2px;
}

.view-toggle button {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  color: var(--muted);
}

.view-toggle button.is-active {
  background: var(--accent-soft);
  color: var(--accent);
}

.view-toggle svg,
.icon-square svg {
  width: 18px;
  height: 18px;
}

.icon-square {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--text-2);
}

/* ------------------------------ 记录卡片 ------------------------------ */

.record-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.rec-card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 15px;
  box-shadow: var(--shadow);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.rec-card:active {
  transform: scale(0.985);
}

.rec-head {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  justify-content: space-between;
}

.rec-title {
  font-size: 16.5px;
  font-weight: 700;
  letter-spacing: 0.1px;
  line-height: 1.35;
  word-break: break-word;
  padding-right: 26px;
}

.rec-title .tag {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent-deep);
  font-size: 14.5px;
  font-weight: 700;
}

.rec-money {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  flex: none;
}

.rec-money span {
  font-size: 17px;
  font-weight: 750;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.3px;
}

.rec-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.meta-chip {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 4px 9px;
  border-radius: 8px;
  background: #f5f7fb;
  color: var(--text-2);
  font-size: 12px;
  font-weight: 550;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.meta-chip--voice {
  background: var(--green-soft);
  color: var(--green);
}

.rec-note {
  margin: 9px 0 0;
  color: var(--text-2);
  font-size: 13.5px;
  line-height: 1.5;
  word-break: break-word;
}

.rec-media {
  display: flex;
  gap: 7px;
  margin-top: 10px;
  overflow-x: auto;
  scrollbar-width: none;
}

.rec-media::-webkit-scrollbar {
  display: none;
}

.thumb {
  position: relative;
  width: 58px;
  height: 58px;
  border-radius: 11px;
  overflow: hidden;
  background: #f1f4fa;
  border: 1px solid var(--line);
  flex: none;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 10px;
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumb--video,
.thumb--audio {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 10px;
}

.thumb--video svg,
.thumb--audio svg {
  width: 20px;
  height: 20px;
  color: var(--accent);
}

.thumb--audio svg {
  color: var(--green);
}

.thumb--more {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-2);
}

.rec-menu {
  position: absolute;
  top: 8px;
  right: 6px;
  width: 32px;
  height: 28px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: var(--muted);
}

.rec-menu svg {
  width: 18px;
  height: 18px;
}

/* ------------------------------ 表格视图 ------------------------------ */

.grid-wrap {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: auto;
  box-shadow: var(--shadow);
}

.data-grid {
  border-collapse: collapse;
  min-width: 100%;
  font-size: 12.5px;
}

.data-grid th {
  position: sticky;
  top: 0;
  background: #f7f9fd;
  color: var(--text-2);
  font-weight: 650;
  padding: 10px 12px;
  white-space: nowrap;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.data-grid td {
  padding: 10px 12px;
  border-bottom: 1px solid #f1f4fa;
  white-space: nowrap;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text);
}

.data-grid tr:active td {
  background: #f7f9ff;
}

.data-grid td.cell-money {
  color: var(--accent);
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.data-grid td.cell-media {
  color: var(--text-2);
}

.data-grid td.cell-media svg {
  width: 14px;
  height: 14px;
  display: inline-block;
  vertical-align: -2px;
}

/* -------------------------- 在线填写表格（可编辑） -------------------------- */

.grid-col-btn {
  flex: none;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--text-2);
  font-size: 13px;
  font-weight: 650;
}

.grid-wrap--fill {
  max-height: 64vh;
  border-radius: 12px;
}

.data-grid--fill {
  font-size: 14px;
  table-layout: fixed;
}

.data-grid--fill th {
  padding: 0 10px;
  height: 38px;
  font-size: 12.5px;
  cursor: pointer;
}

.data-grid--fill th.cell-rowhead {
  position: sticky;
  left: 0;
  z-index: 3;
  width: 36px;
  padding: 0;
  cursor: default;
  background: #f7f9fd;
}

.data-grid--fill td {
  padding: 0;
  border-right: 1px solid #f4f6fb;
  max-width: none;
  overflow: visible;
  text-overflow: clip;
}

.data-grid--fill td.cell-rowno {
  position: sticky;
  left: 0;
  z-index: 2;
  padding: 0;
  background: #f7f9fd;
  border-right: 1px solid var(--line);
}

.rowno-btn {
  width: 100%;
  height: 44px;
  border: 0;
  background: transparent;
  color: #8a94a6;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.data-grid--fill tbody tr:nth-child(even) td {
  background: #fbfcff;
}

.data-grid--fill tbody tr:nth-child(even) td.cell-rowno {
  background: #f1f4fa;
}

.data-grid--fill tbody tr:focus-within td {
  background: #f2f7ff;
}

.data-grid--fill tfoot td {
  position: sticky;
  bottom: 0;
  z-index: 2;
  background: #f7f9fd;
  border-top: 1px solid var(--line);
  border-bottom: 0;
  height: 40px;
  padding: 0 10px;
  font-size: 13px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.data-grid--fill tfoot td.cell-total {
  color: var(--accent);
  overflow: hidden;
  text-overflow: ellipsis;
}

.data-grid--fill tfoot td.cell-total-label {
  left: 0;
  z-index: 3;
  color: var(--text-2);
  font-size: 12px;
  font-weight: 600;
  text-align: center;
}

.cell-input[type='date'],
.cell-input[type='time'] {
  padding-left: 6px;
  padding-right: 2px;
}

.cell-input,
.cell-select {
  width: 100%;
  height: 44px;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 16px;
  line-height: 1.2;
  padding: 0 10px;
  border-radius: 0;
  -webkit-appearance: none;
  appearance: none;
  font-family: inherit;
}

.cell-input::placeholder {
  color: #c3cad8;
  font-size: 13px;
}

.cell-input:focus,
.cell-select:focus {
  outline: 0;
  background: #fff;
  box-shadow: inset 0 0 0 2px var(--accent);
}

.cell-input.is-saved {
  background: #eafbf0;
  box-shadow: inset 0 0 0 1px #b7e7c8;
}

.cell-input::-webkit-outer-spin-button,
.cell-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

td.cell-edit.is-money .cell-input {
  color: var(--accent);
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

td.cell-check {
  text-align: center;
}

.cell-chk {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  border: 1.5px solid #d7dde9;
  background: #fff;
  color: #fff;
  font-size: 15px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
}

.cell-chk.is-on {
  background: var(--accent);
  border-color: var(--accent);
}

.cell-media-btn {
  border: 0;
  background: transparent;
  color: var(--text-2);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 100%;
  height: 44px;
  font-size: 12px;
}

.cell-media-btn svg {
  width: 15px;
  height: 15px;
}

.grid-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0 0;
  flex: none;
}

.grid-add-row {
  flex: 1;
  min-width: 0;
  height: 40px;
  border: 1px dashed #cdd7e6;
  border-radius: 10px;
  background: #fff;
  color: var(--accent);
  font-size: 14px;
  font-weight: 650;
}

.hint--grid {
  flex: none;
  margin: 6px 2px 0;
  font-size: 11.5px;
  color: var(--text-2);
  text-align: center;
  opacity: 0.85;
}

.col-del-btn {
  height: 28px;
  padding: 0 10px;
  border: 1px solid #f3c9c9;
  border-radius: 8px;
  background: #fff;
  color: #e5484d;
  font-size: 12.5px;
  font-weight: 600;
}

.grid-wrap--fill::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.grid-wrap--fill::-webkit-scrollbar-thumb {
  background: #d6deeb;
  border-radius: 6px;
}

.grid-wrap--fill::-webkit-scrollbar-track {
  background: transparent;
}

/* 默认「空白表格记事」模式：整屏给表格，只有表格内部滚动 */
.main--fill {
  display: flex;
  flex-direction: column;
  height: calc(100dvh - var(--appbar-h, 72px) - var(--tabbar-h, 58px));
  min-height: 0;
  padding: 10px 14px calc(8px + var(--safe-bottom));
  overflow: hidden;
}

.main--fill > .table-chips {
  flex: none;
  margin-bottom: 8px;
}

.main--fill > .search-row {
  flex: none;
  margin-bottom: 8px;
}

.main--fill #records-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.fill-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  position: relative;
}

.grid-empty-tip {
  position: absolute;
  left: 0;
  right: 0;
  top: 110px;
  text-align: center;
  color: var(--text-2);
  font-size: 13px;
  line-height: 1.9;
  pointer-events: none;
}

.grid-empty {
  position: absolute;
  left: 0;
  right: 0;
  top: 92px;
  padding: 0 16px;
  text-align: center;
}

.grid-empty-art {
  font-size: 34px;
  line-height: 1;
}

.grid-empty b {
  display: block;
  margin-top: 10px;
  font-size: 17px;
  color: var(--text);
}

.grid-empty p {
  margin: 6px 0 18px;
  font-size: 13px;
  color: var(--text-2);
}

.grid-empty-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.grid-empty-actions .btn {
  flex: 0 1 auto;
  min-width: 0;
}

.main--fill .grid-wrap--fill {
  flex: 1;
  min-height: 0;
  max-height: none;
}

/* ------------------------------ 空状态 ------------------------------ */

.empty {
  text-align: center;
  padding: 46px 18px;
}

.empty--small {
  padding: 36px 16px;
}

.empty-art {
  font-size: 52px;
  line-height: 1;
  margin-bottom: 14px;
  filter: drop-shadow(0 8px 14px rgba(23, 43, 99, 0.1));
}

.empty h2 {
  margin: 0 0 6px;
  font-size: 18px;
}

.empty p {
  margin: 0 auto 18px;
  max-width: 280px;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.6;
}

.empty-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 9px;
}

/* ------------------------------ 按钮 ------------------------------ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 44px;
  padding: 0 18px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 650;
  transition: 0.16s ease;
  white-space: nowrap;
}

.btn:active {
  transform: scale(0.97);
}

.btn:disabled {
  opacity: 0.55;
}

.btn--primary {
  background: linear-gradient(135deg, #3f7bff, #2f6bff);
  color: #fff;
  box-shadow: 0 8px 20px rgba(47, 107, 255, 0.28);
}

.btn--soft {
  background: #fff;
  color: var(--text-2);
  border: 1px solid var(--line);
}

.btn--ghost {
  background: transparent;
  color: var(--text-2);
  border: 1px solid var(--line);
}

.btn--danger {
  background: var(--danger);
  color: #fff;
}

.btn--lg {
  height: 48px;
  padding: 0 30px;
}

.mini-btn {
  height: 30px;
  padding: 0 11px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 650;
  background: var(--accent-soft);
  color: var(--accent-deep);
}

/* ------------------------------ 悬浮按钮 ------------------------------ */

.fab-stack {
  position: fixed;
  right: max(18px, calc((100vw - 640px) / 2 + 18px));
  bottom: calc(88px + var(--safe-bottom));
  z-index: 40;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.fab {
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  box-shadow: 0 12px 26px rgba(23, 43, 99, 0.22);
  transition: transform 0.16s ease;
}

.fab:active {
  transform: scale(0.93);
}

.fab svg {
  width: 24px;
  height: 24px;
}

.fab--add {
  width: 58px;
  height: 58px;
  background: linear-gradient(140deg, #4a83ff, #2f6bff 60%, #1f4fe0);
  box-shadow: 0 14px 28px rgba(47, 107, 255, 0.4);
}

.fab--add svg {
  width: 28px;
  height: 28px;
}

.fab--voice {
  width: 46px;
  height: 46px;
  background: linear-gradient(140deg, #14c39a, #069b74);
  box-shadow: 0 10px 22px rgba(6, 155, 116, 0.35);
}

/* ------------------------------ 标签栏 ------------------------------ */

.tabbar {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 100%;
  max-width: 640px;
  z-index: 45;
  display: flex;
  padding: 7px 10px calc(6px + var(--safe-bottom));
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-top: 1px solid var(--line);
}

.tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 5px 0;
  border-radius: 12px;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 600;
}

.tab.is-active {
  color: var(--accent);
}

.tab-icon svg {
  width: 22px;
  height: 22px;
}

/* ------------------------------ 表格管理页 ------------------------------ */

.table-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.table-card {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 15px 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.table-icon {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  background: linear-gradient(150deg, #f2f6ff, #e4ecff);
  display: grid;
  place-items: center;
  font-size: 23px;
  flex: none;
}

.table-info {
  min-width: 0;
  flex: 1;
}

.table-info h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
}

.table-info p {
  margin: 3px 0 8px;
  font-size: 12px;
  color: var(--muted);
}

.col-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.col-preview span {
  font-size: 11px;
  color: var(--text-2);
  background: #f5f7fb;
  border-radius: 6px;
  padding: 3px 7px;
}

.row-menu {
  position: absolute;
  top: 10px;
  right: 8px;
  width: 32px;
  height: 28px;
  display: grid;
  place-items: center;
  color: var(--muted);
}

.row-menu svg {
  width: 18px;
  height: 18px;
}

.add-table-card {
  margin-top: 12px;
  width: 100%;
  height: 54px;
  border-radius: 14px;
  border: 1.5px dashed var(--line-strong);
  background: rgba(255, 255, 255, 0.6);
  color: var(--text-2);
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.add-table-card svg {
  width: 18px;
  height: 18px;
}

/* ------------------------------ AI 页 ------------------------------ */

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
  margin-bottom: 12px;
}

.ai-card {
  background:
    radial-gradient(120% 100% at 0% 0%, #f0f5ff 0%, rgba(240, 245, 255, 0) 55%),
    #fff;
}

.card-head {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  margin-bottom: 12px;
}

.card-badge {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 19px;
  background: var(--accent-soft);
  flex: none;
}

.card-badge--green {
  background: var(--green-soft);
}

.card-badge--orange {
  background: var(--orange-soft);
}

.card-head h3 {
  margin: 1px 0 2px;
  font-size: 16px;
  font-weight: 700;
}

.card-head p {
  margin: 0;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.45;
}

.ai-input {
  width: 100%;
  min-height: 86px;
  padding: 12px 13px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #f7f9fd;
  font-size: 15px;
  line-height: 1.55;
  resize: vertical;
  outline: none;
}

.ai-input:focus {
  border-color: rgba(47, 107, 255, 0.5);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(47, 107, 255, 0.1);
}

.ai-input--single {
  min-height: 48px;
  height: 48px;
  resize: none;
}

.card-actions {
  display: flex;
  gap: 9px;
  margin-top: 12px;
}

.card-actions .btn {
  flex: 1;
}

.card-actions--end {
  justify-content: flex-end;
}

.card-actions--end .btn {
  flex: none;
}

.range-chips {
  display: flex;
  gap: 8px;
}

.range-chips button {
  flex: 1;
  height: 38px;
  border-radius: 10px;
  background: #f5f7fb;
  color: var(--text-2);
  font-size: 13px;
  font-weight: 600;
  border: 1px solid transparent;
}

.range-chips button.is-active {
  background: var(--accent-soft);
  color: var(--accent-deep);
  border-color: rgba(47, 107, 255, 0.24);
}

.summary-box {
  margin-top: 13px;
  padding: 13px;
  border-radius: 12px;
  background: #f8faff;
  border: 1px solid var(--line);
}

.summary-text {
  font-size: 14px;
  line-height: 1.65;
  color: var(--text-2);
}

.markdown h3 {
  margin: 10px 0 6px;
  font-size: 15px;
  color: var(--text);
}

.markdown h3:first-child {
  margin-top: 0;
}

.markdown h4 {
  margin: 8px 0 4px;
  font-size: 13.5px;
  color: var(--text);
}

.markdown p {
  margin: 0 0 6px;
  word-break: break-word;
}

.markdown ul {
  margin: 0 0 8px;
  padding-left: 18px;
}

.markdown li {
  margin-bottom: 3px;
}

.markdown strong {
  color: var(--text);
}

.markdown code {
  background: #eef2fb;
  border-radius: 5px;
  padding: 1px 5px;
  font-size: 12.5px;
}

.summary-skeleton {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.summary-skeleton span {
  height: 12px;
  border-radius: 6px;
  background: linear-gradient(90deg, #eef2fb, #f8faff, #eef2fb);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
}

.summary-skeleton span:nth-child(2) {
  width: 88%;
}

.summary-skeleton span:nth-child(3) {
  width: 62%;
}

@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.hint {
  margin: 12px 4px 0;
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted);
}

/* ------------------------------ 设置页 ------------------------------ */

.settings-group {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 12px;
  overflow: hidden;
}

.settings-title {
  padding: 13px 16px 7px;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.4px;
}

.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 13px 16px;
  font-size: 14.5px;
  border-top: 1px solid #f2f5fa;
}

.settings-row:first-child {
  border-top: none;
}

.settings-row strong {
  font-weight: 600;
  color: var(--text-2);
  font-size: 13.5px;
}

.settings-row strong.ok {
  color: var(--green);
}

.settings-row strong.bad {
  color: var(--danger);
}

.settings-row--code {
  flex-wrap: wrap;
}

.code-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}

.code-input {
  width: 116px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #f8faff;
  padding: 0 9px;
  font-size: 14px;
  letter-spacing: 1px;
  text-align: center;
  font-weight: 650;
  outline: none;
}

.settings-note {
  padding: 0 16px 13px;
  font-size: 12px;
  line-height: 1.65;
  color: var(--muted);
}

.settings-actions {
  display: flex;
  gap: 8px;
  padding: 0 16px 15px;
}

.settings-actions .btn {
  flex: 1;
  height: 42px;
  font-size: 14px;
}

.settings-row--action {
  width: 100%;
  text-align: left;
  font-size: 14.5px;
  color: var(--text);
  background: #fff;
}

.settings-row--action:active {
  background: #f7f9fd;
}

.settings-row--action.danger {
  color: var(--danger);
}

.chev {
  color: #c2cad9;
  font-size: 19px;
  line-height: 1;
}

.footnote {
  text-align: center;
  color: #b3bbc9;
  font-size: 11px;
  margin: 18px 0 0;
}

/* ------------------------------ 弹层 ------------------------------ */

#sheet-root {
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
}

#sheet-root.is-open {
  pointer-events: auto;
}

.sheet-mask {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.42);
  opacity: 0;
  transition: opacity 0.24s ease;
}

#sheet-root.is-open .sheet-mask {
  opacity: 1;
}

.sheet {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translate(-50%, 102%);
  width: 100%;
  max-width: 640px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  background: #f7f9fd;
  border-radius: 22px 22px 0 0;
  box-shadow: 0 -12px 40px rgba(15, 23, 42, 0.18);
  transition: transform 0.28s cubic-bezier(0.32, 0.72, 0, 1);
  overflow: hidden;
}

.sheet--full {
  height: 100%;
  max-height: 100%;
  border-radius: 0;
}

#sheet-root.is-open .sheet {
  transform: translate(-50%, 0);
}

.sheet-head {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: calc(9px + var(--safe-top)) 14px 9px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.sheet-head--plain {
  padding-top: calc(9px + var(--safe-top));
}

.sheet-head-btn {
  min-width: 56px;
  height: 36px;
  padding: 0 8px;
  border-radius: 9px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text-2);
}

.sheet-head-btn--primary {
  color: var(--accent);
  font-weight: 700;
}

.sheet-head-title {
  flex: 1;
  text-align: center;
  min-width: 0;
}

.sheet-head-title h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sheet-head-title p {
  margin: 1px 0 0;
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sheet-body {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 14px 14px calc(22px + var(--safe-bottom));
}

.confirm {
  padding: 26px 22px calc(22px + var(--safe-bottom));
}

.confirm h3 {
  margin: 0 0 8px;
  font-size: 18px;
  text-align: center;
}

.confirm p {
  margin: 0 auto 20px;
  max-width: 320px;
  text-align: center;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--muted);
}

.confirm-actions {
  display: flex;
  gap: 10px;
}

.confirm-actions .btn {
  flex: 1;
}

/* ------------------------------ 编辑面板 ------------------------------ */

.ai-quick {
  background: linear-gradient(135deg, #eef4ff, #e7f0ff);
  border: 1px solid #dee9ff;
  border-radius: 14px;
  padding: 12px;
  margin-bottom: 12px;
}

.ai-quick-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-deep);
  margin-bottom: 8px;
}

.ai-quick-row {
  display: flex;
  gap: 8px;
}

.ai-quick-row input {
  flex: 1;
  height: 40px;
  border-radius: 10px;
  border: 1px solid #dee9ff;
  background: #fff;
  padding: 0 11px;
  font-size: 14px;
  outline: none;
  min-width: 0;
}

.ai-quick-btn {
  flex: none;
  height: 40px;
  padding: 0 14px;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font-size: 13.5px;
  font-weight: 650;
}

.fields {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.field {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 13px 13px;
}

.field-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 650;
  color: var(--muted);
  margin-bottom: 8px;
  letter-spacing: 0.2px;
}

.field-unit {
  font-size: 11px;
  font-weight: 500;
  color: #b2bac8;
}

.field-body {
  position: relative;
}

.field-input {
  width: 100%;
  height: 46px;
  border-radius: 11px;
  border: 1px solid transparent;
  background: #f5f7fb;
  padding: 0 12px;
  font-size: 16px;
  outline: none;
  transition: 0.16s ease;
}

.field-input:focus {
  background: #fff;
  border-color: rgba(47, 107, 255, 0.45);
  box-shadow: 0 0 0 3px rgba(47, 107, 255, 0.1);
}

.field-textarea {
  height: auto;
  min-height: 92px;
  padding: 11px 46px 11px 12px;
  line-height: 1.6;
  resize: vertical;
}

.field-money {
  font-weight: 700;
  font-size: 19px;
  font-variant-numeric: tabular-nums;
}

.field-select {
  appearance: none;
  -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, #8a94a6 50%),
    linear-gradient(135deg, #8a94a6 50%, transparent 50%);
  background-position: calc(100% - 17px) 21px, calc(100% - 12px) 21px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 34px;
}

.input-prefix {
  position: relative;
  display: flex;
  align-items: center;
}

.input-prefix .prefix {
  position: absolute;
  left: 13px;
  font-size: 18px;
  font-weight: 700;
  color: var(--muted);
  pointer-events: none;
}

.input-prefix .field-money {
  padding-left: 30px;
}

.input-prefix .suffix {
  position: absolute;
  right: 13px;
  font-size: 13px;
  color: var(--muted);
  pointer-events: none;
}

.input-row {
  display: flex;
  gap: 8px;
}

.inline-btn {
  flex: none;
  height: 46px;
  padding: 0 14px;
  border-radius: 11px;
  background: var(--accent-soft);
  color: var(--accent-deep);
  font-size: 13.5px;
  font-weight: 650;
}

.textarea-wrap {
  position: relative;
}

.mic-inline {
  position: absolute;
  right: 7px;
  bottom: 7px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--green);
  color: #fff;
  box-shadow: 0 5px 12px rgba(6, 155, 116, 0.32);
}

.mic-inline svg {
  width: 18px;
  height: 18px;
}

.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 46px;
  padding: 0 12px;
  border-radius: 11px;
  background: #f5f7fb;
  font-size: 14px;
  color: var(--text-2);
}

.switch-row input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.switch {
  position: relative;
  width: 48px;
  height: 29px;
  border-radius: 999px;
  background: #d8dfeb;
  transition: background 0.2s ease;
}

.switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 23px;
  height: 23px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 5px rgba(15, 23, 42, 0.18);
  transition: transform 0.2s ease;
}

.switch-row input:checked + .switch {
  background: var(--green);
}

.switch-row input:checked + .switch::after {
  transform: translateX(19px);
}

/* 媒体字段 */
.media-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.media-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: 11px;
  overflow: hidden;
  background: #f1f4fa;
  border: 1px solid var(--line);
}

.media-open {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: var(--text-2);
}

.media-open img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-item--video .video-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  font-size: 10.5px;
}

.video-badge svg {
  width: 22px;
  height: 22px;
  color: var(--accent);
}

.media-remove {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.68);
  color: #fff;
  font-size: 13px;
  line-height: 1;
  display: grid;
  place-items: center;
}

.media-add {
  aspect-ratio: 1;
  border-radius: 11px;
  border: 1.5px dashed var(--line-strong);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  color: var(--muted);
  font-size: 10.5px;
  background: #fbfcff;
}

.media-add-icon svg {
  width: 21px;
  height: 21px;
  color: var(--accent);
}

/* 录音字段 */
.audio-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 9px;
}

.audio-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px;
  border-radius: 11px;
  background: #f7f9fd;
  border: 1px solid var(--line);
}

.audio-play {
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--green-soft);
  color: var(--green);
  display: grid;
  place-items: center;
}

.audio-play svg {
  width: 17px;
  height: 17px;
}

.audio-play.is-playing {
  background: var(--green);
  color: #fff;
}

.audio-info {
  flex: 1;
  min-width: 0;
}

.audio-meta {
  font-size: 11px;
  color: var(--muted);
}

.audio-transcript {
  font-size: 13px;
  color: var(--text-2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.icon-btn {
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 17px;
}

.icon-btn--danger {
  color: var(--danger);
}

.record-btn {
  width: 100%;
  height: 48px;
  border-radius: 12px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 14px;
  font-weight: 650;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
}

.record-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(6, 155, 116, 0.15);
}

.delete-record {
  margin-top: 16px;
  width: 100%;
  height: 46px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--danger-soft);
  color: var(--danger);
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.delete-record svg {
  width: 17px;
  height: 17px;
}

.editor-footnote {
  text-align: center;
  font-size: 11.5px;
  color: var(--muted);
  padding: 18px 10px 4px;
  line-height: 1.6;
}

/* ------------------------------ 录音界面 ------------------------------ */

.recorder {
  padding: 26px 22px calc(24px + var(--safe-bottom));
  text-align: center;
}

.recorder-head {
  margin-bottom: 10px;
}

.recorder-kicker {
  margin: 0;
  font-size: 11.5px;
  color: var(--muted);
  letter-spacing: 0.4px;
}

.recorder-head h2 {
  margin: 4px 0 0;
  font-size: 20px;
  font-weight: 750;
}

.recorder-stage {
  position: relative;
  height: 132px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 6px 0;
}

.rec-wave {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 96px;
}

.rec-pulse {
  position: absolute;
  width: 132px;
  height: 132px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(47, 107, 255, 0.18) 0%, rgba(47, 107, 255, 0) 68%);
  animation: pulse 2s ease-in-out infinite;
  z-index: 1;
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(0.92);
    opacity: 0.6;
  }
  50% {
    transform: scale(1.12);
    opacity: 1;
  }
}

.rec-time {
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 26px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.5px;
  color: var(--text);
  z-index: 3;
}

.rec-hint {
  margin: 8px 0 18px;
  font-size: 13px;
  color: var(--muted);
}

.recorder-actions {
  display: flex;
  gap: 12px;
}

.recorder-actions .btn {
  flex: 1;
}

/* ------------------------------ 模板与菜单 ------------------------------ */

.template-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.template-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 13px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--line);
  text-align: left;
}

.template-card:active {
  background: #f8faff;
}

.template-emoji {
  font-size: 26px;
  line-height: 1.2;
}

.template-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.template-info strong {
  font-size: 15px;
}

.template-info small {
  font-size: 12px;
  color: var(--muted);
}

.template-cols {
  margin-top: 4px;
  font-size: 11px;
  color: #99a3b5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sheet-actions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-top: 14px;
}

.sheet-actions-grid .btn {
  height: 46px;
  font-size: 13.5px;
}

.menu-list {
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 14px;
  border: 1px solid var(--line);
  overflow: hidden;
}

.menu-list button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 15px;
  font-size: 15px;
  border-bottom: 1px solid #f2f5fa;
  color: var(--text);
  text-align: left;
}

.menu-list button:last-child {
  border-bottom: none;
}

.menu-list button:active {
  background: #f7f9fd;
}

.menu-list button.danger {
  color: var(--danger);
}

/* 列编辑器 */
.col-editor {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.col-row {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 10px 10px 11px;
}

.col-row-head {
  display: flex;
  align-items: center;
  gap: 6px;
}

.col-index {
  width: 22px;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.col-name-input {
  flex: 1;
  height: 38px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: #f8faff;
  padding: 0 10px;
  font-size: 15px;
  font-weight: 600;
  outline: none;
  min-width: 0;
}

.col-row-body {
  display: flex;
  gap: 7px;
  margin-top: 7px;
  padding-left: 22px;
}

.col-type-select {
  height: 36px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: #f8faff;
  padding: 0 8px;
  font-size: 13px;
  outline: none;
  flex: none;
}

.col-options-input,
.col-unit-input {
  flex: 1;
  height: 36px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: #f8faff;
  padding: 0 10px;
  font-size: 13px;
  outline: none;
  min-width: 0;
}

.add-column-btn {
  margin-top: 11px;
  width: 100%;
  height: 46px;
  border-radius: 12px;
  border: 1.5px dashed var(--line-strong);
  color: var(--accent);
  font-size: 14px;
  font-weight: 650;
  background: rgba(255, 255, 255, 0.7);
}

/* 预览 */
.preview-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
}

.preview-media {
  width: 100%;
  max-height: 62vh;
  object-fit: contain;
  border-radius: 14px;
  background: #0f172a;
}

.preview-audio {
  width: 100%;
  padding: 22px 16px;
  background: #fff;
  border-radius: 16px;
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.preview-audio .cover {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--green-soft);
  color: var(--green);
}

.preview-audio .cover svg {
  width: 28px;
  height: 28px;
}

.preview-audio audio {
  width: 100%;
}

.preview-transcript {
  width: 100%;
  padding: 14px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--line);
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--text-2);
}

.preview-transcript h4 {
  margin: 0 0 7px;
  font-size: 12px;
  color: var(--muted);
  font-weight: 700;
}

.preview-transcript p {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
}

/* ------------------------------ 吐司 ------------------------------ */

.toast-root {
  position: fixed;
  top: calc(env(safe-area-inset-top, 0px) + 16px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: max-content;
  max-width: 88vw;
  pointer-events: none;
}

.toast {
  padding: 10px 16px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.9);
  color: #fff;
  font-size: 13px;
  font-weight: 550;
  line-height: 1.45;
  text-align: center;
  opacity: 0;
  transform: translateY(-6px) scale(0.98);
  transition: 0.2s ease;
  backdrop-filter: blur(8px);
}

.toast.is-show {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.toast--success {
  background: rgba(6, 140, 105, 0.94);
}

.toast--error {
  background: rgba(214, 48, 48, 0.94);
}

/* ------------------------------ 错误页 ------------------------------ */

.boot-error {
  padding: 80px 26px;
  text-align: center;
}

.boot-error h2 {
  font-size: 18px;
  margin-bottom: 8px;
}

.boot-error p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

/* ------------------------------ 桌面预览适配 ------------------------------ */

@media (min-width: 641px) {
  body {
    background:
      radial-gradient(60% 40% at 50% 0%, #eef3ff 0%, rgba(238, 243, 255, 0) 70%),
      #e9edf5;
  }

  .app {
    min-height: 100vh;
    background: var(--bg);
    box-shadow: 0 0 60px rgba(23, 43, 99, 0.1);
  }

  .tabbar {
    border-radius: 18px 18px 0 0;
  }
}
