/* 记录页与记一笔。类名前缀 v2-ledger-、v2-rec、v2-imp-、v2-rsu-、v2-maint-、v2-set-、v2-edit-。 */

.v2-ledger-note { font-size: var(--t-sm); color: var(--text-2); margin-bottom: 12px; text-wrap: pretty; }
.v2-ledger-clip { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v2-muted { color: var(--text-3); }

/* ── 流水 ─────────────────────────────────────────────────────────── */

.v2-ledger-pane .v2-tr__compact .v2-lrow__sub { word-break: keep-all; overflow-wrap: anywhere; text-wrap: pretty; }

.v2-ledger-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: var(--gap-title); }
.v2-ledger-filters__search { flex: 1 1 220px; min-width: 180px; max-width: 360px; }
.v2-ledger-filters__search .v2-search { width: 100%; }
.v2-ledger-filters__search .v2-search input { width: 100%; }
.v2-ledger-filters .v2-select--compact { max-width: 10em; }
@media (max-width: 599px) {
  /* 手机：搜索和日期一行，三个筛选等宽一行 */
  .v2-ledger-filters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .v2-ledger-filters__search { grid-column: span 2; max-width: none; min-width: 0; }
  .v2-ledger-filters > .v2-btn { order: 1; min-width: 0; justify-content: center; }
  .v2-ledger-filters > .v2-btn > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .v2-ledger-filters > .v2-select--compact { order: 2; width: 100%; max-width: none; min-width: 0; }
  .v2-ledger-filters > .v2-ledger-count { order: 3; grid-column: 1 / -1; margin-left: 0; }
}
.v2-ledger-count { display: flex; align-items: center; gap: 12px; min-height: var(--ctl-compact); margin-left: auto; font-size: var(--t-sm); color: var(--text-3); white-space: nowrap; }
.v2-ledger-clear { position: relative; border: 0; padding: 0; background: none; color: var(--accent); font-size: var(--t-sm); font-weight: 500; cursor: pointer; }
.v2-ledger-clear::after { content: ""; position: absolute; inset: calc((1.5em - max(var(--hit), 1.5em)) / 2) -4px; }
.v2-ledger-datepop { display: flex; flex-direction: column; gap: 12px; width: min(288px, calc(100vw - 64px)); }
.v2-ledger-pane .v2-td--num .v2-ph { margin-left: auto; }
.v2-ledger-datepop__fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.v2-ledger-datepop__fields .v2-input { width: 100%; min-width: 0; padding-left: 8px; padding-right: 4px; }
@media (max-width: 599px) { .v2-ledger-datepop__fields { grid-template-columns: minmax(0, 1fr); } }
.v2-ledger-datepop__presets { display: flex; flex-wrap: wrap; gap: 8px; }

/* ── 账户 ─────────────────────────────────────────────────────────── */

.v2-ledger-order { margin-top: 16px; }
.v2-ledger-order__intro { margin-bottom: 4px; }
.v2-ledger-order__head { font-size: var(--t-md); font-weight: 500; color: var(--text-2); margin-bottom: 4px; }
.v2-ledger-order__row { display: flex; align-items: center; gap: 4px; min-height: 44px; border-top: 0.5px solid var(--line); }
.v2-ledger-order__name { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; font-size: var(--t-md); }
.v2-ledger-order__meta { flex: none; font-size: var(--t-xs); color: var(--text-3); margin-right: 8px; }
.v2-ledger-order__row .v2-iconbtn[disabled] { opacity: 0.3; cursor: default; }

/* ── 导入 ─────────────────────────────────────────────────────────── */

.v2-imp { container-type: inline-size; display: flex; flex-direction: column; gap: var(--gap-section); }
.v2-imp-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--gap-section); align-items: start; }
@container (min-width: 760px) { .v2-imp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.v2-imp > .v2-section + .v2-section, .v2-imp-review > .v2-section + .v2-section, .v2-rsu > .v2-section + .v2-section, .v2-maint > .v2-section + .v2-section { margin-top: 0; }
.v2-imp-step { display: flex; align-items: center; gap: 8px; font-size: var(--t-md); font-weight: 500; line-height: 1.4; color: var(--text-2); margin-bottom: 12px; }
.v2-imp-step__n { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; background: var(--fill-1); color: var(--text-2); font-size: var(--t-xs); font-weight: 500; font-variant-numeric: tabular-nums; }
.v2-imp-form { display: flex; flex-direction: column; gap: 12px; }
.v2-imp-note { font-size: var(--t-sm); color: var(--text-2); line-height: 1.5; text-wrap: pretty; }
/* 只在手机宽度出现的一句话：这件事用电脑更方便。只放在确实如此的步骤上（要在几个应用之间来回复制、要对照宽表格），不放在入口。 */
.v2-desk-hint { display: none; font-size: var(--t-sm); color: var(--text-2); line-height: 1.5; text-wrap: pretty; }
@media (max-width: 599px) { .v2-desk-hint { display: block; } }
.v2-imp-sub { font-size: var(--t-xs); color: var(--text-3); line-height: 1.4; font-weight: 400; }
.v2-imp-danger { color: var(--danger); }
.v2-imp-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.v2-imp-check { position: relative; display: flex; align-items: flex-start; gap: 8px; font-size: var(--t-md); color: var(--text-1); line-height: 1.4; cursor: pointer; }
.v2-imp-check input { flex: none; width: 16px; height: 16px; margin: 2px 0 0; accent-color: var(--accent); }
.v2-imp-check::after { content: ""; position: absolute; inset: calc((1.4em - max(var(--hit), 1.4em)) / 2) 0; }
.v2-imp-copied { display: flex; align-items: flex-start; gap: 6px; font-size: var(--t-sm); color: var(--text-1); line-height: 1.5; }
.v2-imp-copied svg { flex: none; margin-top: 2px; color: var(--ok); }
.v2-imp-prompt {
  max-height: 280px; overflow: auto; margin: 0; padding: 12px;
  background: var(--fill-1); border-radius: var(--r-field);
  font-size: var(--t-xs); line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--text-2);
}
.v2-imp-paste { width: 100%; min-height: 200px; font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: var(--t-sm); line-height: 1.5; resize: vertical; white-space: pre; overflow-x: auto; }
.v2-imp-done-accounts { margin-bottom: -8px; }

/* 最近导入与其他小列表 */
.v2-imp-recent { display: flex; align-items: center; gap: 12px; padding: 10px var(--card-pad); border-top: 0.5px solid var(--line); min-height: 56px; }
.v2-imp-recent:first-child { border-top: 0; }
.v2-imp-recent__main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.v2-imp-recent__title { font-size: var(--t-md); font-weight: 500; }
.v2-imp-recent__acts { flex: none; display: flex; gap: 4px; }
.v2-imp-recent__acts .v2-btn, .v2-imp-row__line > .v2-btn, .v2-set-comp .v2-btn { min-width: 44px; justify-content: center; }
.v2-imp .v2-section > .v2-imp-note:first-of-type { margin-bottom: 8px; }
.v2-imp-batch { margin-top: 12px; }
.v2-imp-batchrow { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 0.5px solid var(--line); font-size: var(--t-md); }
.v2-imp-batchrow__main { min-width: 0; display: flex; flex-direction: column; gap: 2px; }

/* 核对 */
.v2-imp-review { display: flex; flex-direction: column; gap: 16px; }
.v2-imp-reviewhead { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.v2-imp-reviewtitle { font-size: var(--t-section); font-weight: 600; line-height: var(--lh-tight); letter-spacing: -0.01em; }
.v2-imp-report { display: flex; align-items: flex-start; gap: 6px; font-size: var(--t-sm); color: var(--text-2); line-height: 1.5; }
.v2-imp-report svg { flex: none; margin-top: 2px; }
.v2-imp-report.v2-warn { color: var(--warn); }
.v2-imp-fix { padding: 14px var(--card-pad); border-top: 0.5px solid var(--line); }
.v2-imp-fix:first-child { border-top: 0; }
.v2-card:not(.v2-card--flush) > .v2-imp-fix { padding-left: 0; padding-right: 0; }
.v2-card:not(.v2-card--flush) > .v2-imp-fix:first-child { padding-top: 0; }
.v2-card:not(.v2-card--flush) > .v2-imp-fix:last-child { padding-bottom: 0; }
.v2-imp-fix__title .v2-tag { flex: none; white-space: nowrap; }
.v2-imp-fix__title > span:first-child { min-width: 0; text-wrap: balance; }
.v2-imp-fix__title { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; font-size: var(--t-md); font-weight: 500; margin-bottom: 10px; overflow-wrap: anywhere; }
.v2-imp-fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(170px, 100%), 1fr)); gap: 12px; }
.v2-imp-matched { margin-top: 8px; }
.v2-imp-row { border-top: 0.5px solid var(--line); padding: 2px 0; }
.v2-imp-row:first-child { border-top: 0; }
.v2-imp-row__line { display: flex; align-items: center; gap: 4px; padding-right: 8px; }
.v2-imp-row__main {
  flex: 1 1 auto; min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: max(var(--hit), 56px); padding: 8px 8px 8px var(--card-pad);
  border: 0; background: none; text-align: left; cursor: pointer; color: inherit; font: inherit;
}
.v2-imp-row__main:hover { background: var(--fill-1); }
.v2-imp-row__text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.v2-imp-row__title { font-size: var(--t-md); font-weight: 500; overflow-wrap: anywhere; }
.v2-imp-row__value { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; font-size: var(--t-md); text-align: right; }
.v2-imp-row__msg { padding: 0 var(--card-pad) 8px; font-size: var(--t-sm); line-height: 1.45; color: var(--text-2); text-wrap: pretty; }
.v2-imp-row__extra { padding: 0 var(--card-pad) 10px; }
.v2-imp-editor { padding: 4px var(--card-pad) 14px; }
.v2-imp-row > .v2-imp-fields { padding: 4px var(--card-pad) 14px; }
.v2-imp-row.is-dup .v2-imp-row__title, .v2-imp-row.is-skip .v2-imp-row__title, .v2-imp-row.is-hold .v2-imp-row__title { color: var(--text-2); font-weight: 400; }
.v2-imp-row.is-skip .v2-imp-row__title { text-decoration: line-through; }
.v2-imp-empty { padding: 20px var(--card-pad); font-size: var(--t-sm); color: var(--text-3); }
.v2-imp-fmv { display: flex; align-items: center; gap: 8px; font-size: var(--t-sm); color: var(--text-2); }
.v2-imp-fmv .v2-input { width: 8em; }
.v2-imp-monthly { margin-top: 8px; }
.v2-imp-monthrow { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; gap: 4px 12px; align-items: baseline; padding: 6px 0; border-top: 0.5px solid var(--line); font-size: var(--t-sm); }
.v2-imp-monthrow__name { overflow-wrap: anywhere; }
@media (max-width: 599px) {
  .v2-imp-monthrow { grid-template-columns: minmax(0, 1fr) auto; }
}
/* 写入条：贴底，核对长表时按钮一直在手边 */
.v2-imp-commit {
  position: sticky; bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); z-index: 2;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px;
  margin: 0 calc(var(--gutter) * -1); padding: 12px var(--gutter);
  background: var(--bg-page); border-top: 0.5px solid var(--line);
}
@media (min-width: 1024px) { .v2-imp-commit { bottom: 0; } }
/* 新用户流程里没有底部标签栏：贴到屏幕底，下面不留一条透出列表的空隙 */
body[data-v2-focus] .v2-imp-commit { bottom: 0; padding-bottom: calc(12px + env(safe-area-inset-bottom)); }
.v2-imp-commit__todo { flex: 1 1 200px; min-width: 0; font-size: var(--t-sm); color: var(--warn); line-height: 1.45; }
.v2-imp-commit__todo.is-ready { color: var(--text-2); }
.v2-imp-done { outline: none; }
.v2-imp-done__title { display: flex; align-items: center; gap: 8px; font-size: var(--t-lead); font-weight: 600; line-height: 1.35; letter-spacing: -0.01em; margin-bottom: 8px; }
.v2-imp-done__title svg { color: var(--ok); }
.v2-imp-done .v2-imp-actions { margin-top: 16px; }
.v2-imp-done + .v2-section { margin-top: 0; }

/* ── RSU ──────────────────────────────────────────────────────────── */

.v2-rsu { container-type: inline-size; display: flex; flex-direction: column; gap: var(--gap-section); }
/* 试用账本的「填入示例」：靠右，不占字段的位置 */
.v2-rsu-try { display: flex; justify-content: flex-end; margin: -4px -8px -8px 0; }
.v2-rsu-pending { border-top: 0.5px solid var(--line); }
.v2-rsu-pending:first-child { border-top: 0; }
.v2-rsu-pending__head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%;
  min-height: max(var(--hit), 56px); padding: 10px var(--card-pad);
  border: 0; background: none; text-align: left; cursor: pointer; color: inherit; font: inherit;
}
.v2-rsu-pending__head:hover { background: var(--fill-1); }
.v2-rsu-pending__go { flex: none; font-size: var(--t-sm); font-weight: 500; color: var(--accent); }
.v2-rsu-form { display: flex; flex-direction: column; gap: 12px; padding: 4px var(--card-pad) 16px; }
.v2-sheet .v2-rsu-form { padding: 0; }
.v2-rsu-sheetintro { margin-bottom: 16px; }
.v2-rsu-form__fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(160px, 100%), 1fr)); gap: 12px; }
.v2-rsu-impact { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; font-size: var(--t-sm); color: var(--text-2); line-height: 1.5; text-wrap: pretty; }
.v2-rsu-impact__net { font-size: var(--t-section); font-weight: 600; color: var(--text-1); font-variant-numeric: tabular-nums; white-space: nowrap; }
.v2-rsu-next { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; padding: 8px var(--card-pad); border-top: 0.5px solid var(--line); }
.v2-rsu-next:first-child { border-top: 0; }
.v2-rsu-next__val { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; font-size: var(--t-md); text-align: right; }
.v2-rsu-grant { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; padding: 12px var(--card-pad); border-top: 0.5px solid var(--line); color: inherit; text-decoration: none; }
.v2-rsu-grant:first-child { border-top: 0; }
.v2-rsu-grant:hover { background: var(--fill-1); }
.v2-rsu-grant__main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.v2-rsu-grant__progress { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
@container (min-width: 760px) {
  .v2-rsu-grant { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 24px; }
}
.v2-rsu-importnote { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-top: -12px; }
.v2-rsu-meta { margin-bottom: 12px; overflow-wrap: anywhere; }
.v2-rsu-steps { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.v2-rsu-steps li { display: flex; align-items: flex-start; gap: 10px; }
.v2-rsu-flowlead { font-size: var(--t-md); line-height: var(--lh-text); color: var(--text-2); text-wrap: pretty; }
.v2-rsu-emptyacts { margin-top: 20px; }
.v2-rsu-emptynote { margin-top: 12px; }
.v2-rsu-scheddetails { margin-top: 4px; }
.v2-rsu-schedlist { display: flex; flex-direction: column; gap: 8px; margin: 8px 0; }
.v2-rsu-sched { display: grid; grid-template-columns: 4.5em minmax(0, 1fr) minmax(0, 0.7fr); align-items: center; gap: 8px; }
.v2-rsu-sched__p { display: flex; flex-direction: column; font-size: var(--t-sm); color: var(--text-2); white-space: nowrap; }
.v2-rsu-sched .v2-input { width: 100%; min-width: 0; padding-left: 8px; padding-right: 8px; }
.v2-rsu-sched .v2-input[readonly] { color: var(--text-3); }

/* ── 维护 ─────────────────────────────────────────────────────────── */

.v2-maint { display: flex; flex-direction: column; gap: var(--gap-section); }
.v2-maint-text { font-size: var(--t-md); color: var(--text-2); line-height: 1.55; margin-bottom: 12px; text-wrap: pretty; }
.v2-maint-file { margin: 12px 0 4px; overflow-wrap: anywhere; }
.v2-maint-cmp { display: flex; flex-direction: column; margin-top: 8px; }
.v2-maint-cmp__row { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.05fr) minmax(0, 1.05fr); gap: 8px; align-items: baseline; padding: 6px 0; border-top: 0.5px solid var(--line); font-size: var(--t-sm); }
.v2-maint-cmp__head { color: var(--text-3); border-top: 0; font-size: var(--t-xs); font-weight: 500; }
.v2-maint-cmp__row > :nth-child(n + 2) { text-align: right; overflow-wrap: anywhere; }
.v2-maint-confirm { margin-top: 16px; }
.v2-maint-paste { display: flex; flex-direction: column; gap: 12px; }
.v2-maint-paste .v2-textarea { width: 100%; font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: var(--t-sm); }
.v2-maint-patchhead { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; overflow-wrap: anywhere; }
.v2-maint-errors { margin: 4px 0 0; padding-left: 1.2em; font-size: var(--t-sm); color: var(--text-2); line-height: 1.5; }
.v2-maint-diffs { max-height: 420px; overflow: auto; border-top: 0.5px solid var(--line); }
.v2-maint-diff { padding: 8px 0; border-bottom: 0.5px solid var(--line); }
.v2-maint-diff__line { display: flex; align-items: center; gap: 8px; font-size: var(--t-md); }
.v2-maint-diff__changes { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 2px; font-size: var(--t-sm); color: var(--text-2); }
.v2-maint-diff__changes li { display: flex; flex-wrap: wrap; gap: 4px 8px; overflow-wrap: anywhere; }
.v2-maint-diff__more { padding: 8px 0; }
.v2-maint-patchacts { margin-top: 12px; }
.v2-maint-recent { margin-top: 20px; padding-top: 12px; border-top: 0.5px solid var(--line); }
.v2-maint-recent .v2-imp-recent { padding-left: 0; padding-right: 0; }

/* ── 流水编辑、拆股确认 ──────────────────────────────────────────── */

.v2-edit-sub { font-size: var(--t-sm); color: var(--text-2); margin-bottom: 12px; overflow-wrap: anywhere; }
.v2-edit-note { font-size: var(--t-sm); color: var(--text-2); background: var(--fill-1); border-radius: var(--r-field); padding: 8px 12px; margin-bottom: 12px; line-height: 1.5; text-wrap: pretty; }
.v2-split { padding: 14px 0; border-top: 0.5px solid var(--line); margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.v2-split__head { display: flex; flex-direction: column; gap: 2px; }

/* ── 设置：和其他任务浮层同一个外形，白底，小标题 + 细线分行 ──────── */

.v2-settings { display: flex; flex-direction: column; gap: 20px; padding-bottom: 8px; }
.v2-set-section__title { font-size: var(--t-md); font-weight: 500; line-height: 1.4; color: var(--text-2); }
.v2-set-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 56px; padding: 10px 0; border-top: 0.5px solid var(--line); }
.v2-set-section__title + .v2-set-card { margin-top: 4px; }
.v2-set-row__text { flex: 1 1 auto; min-width: 0; }
.v2-set-row__title { font-size: var(--t-md); font-weight: 500; line-height: 1.35; }
.v2-set-row__desc { font-size: var(--t-xs); color: var(--text-3); line-height: 1.45; margin-top: 2px; overflow-wrap: anywhere; text-wrap: pretty; }
.v2-set-row__ctl { flex: none; }
.v2-set-note { margin-top: 6px; }
.v2-set-group { display: flex; flex-direction: column; gap: 8px; }
.v2-set-group .v2-card__label { margin-bottom: 0; }
.v2-set-comp { display: flex; align-items: center; gap: 8px; }
.v2-set-comp .v2-select { flex: 1 1 auto; min-width: 0; }
.v2-set-weight { flex: none; display: inline-flex; align-items: center; gap: 4px; font-size: var(--t-sm); color: var(--text-2); }
.v2-set-weight .v2-input { width: 4.5em; text-align: right; }

/* ── 账本冲突与加载失败（真警报，保留 app.js 的 DOM） ────────────── */

.conflict-banner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin-bottom: 16px; padding: 12px 16px; border-radius: var(--r-card); background: var(--warn-bg); color: var(--text-1); font-size: var(--t-md); }
.conflict-banner[hidden] { display: none; }
.conflict-banner__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.conflict-banner__btn { position: relative; min-height: var(--ctl-compact); padding: 0 12px; border: 0; border-radius: 999px; background: var(--text-1); color: var(--surface); font-size: var(--t-sm); cursor: pointer; }
.conflict-banner__btn--ghost { background: var(--accent-lt); color: var(--accent); }
.conflict-banner__btn::after { content: ""; position: absolute; inset: calc((var(--ctl-compact) - max(var(--hit), var(--ctl-compact))) / 2) 0; }

/* ── 记一笔 ───────────────────────────────────────────────────────── */

/* 电脑上窗口顶部不动：切类型时只有下面的字段变化，标题和切换留在原位 */
@media (min-width: 700px) {
  .v2-rec-sheet { margin-block: min(10vh, 96px) auto; }
  .v2-rec > .v2-seg--scroll { display: flex; }
  .v2-rec > .v2-seg--scroll .v2-seg__item { flex: 1 1 0; padding: 0 6px; }
}
.v2-rec { display: flex; flex-direction: column; gap: 16px; }
.v2-rec__body, .v2-rec__stack { display: flex; flex-direction: column; gap: 16px; }
.v2-rec .v2-seg--scroll { max-width: 100%; }
.v2-rec__side .v2-seg { width: 100%; }
/* 六列网格：两列和三列的字段共用列线，上下对齐 */
.v2-rec__grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px 12px; }
.v2-rec__grid > * { grid-column: span 3; }
.v2-rec__grid--3 > * { grid-column: span 2; }
.v2-rec__desc { font-size: var(--t-xs); color: var(--text-3); }
/* 添加账户：第一项和账户信息分开 */
.v2-rec__group { margin-top: 4px; font-size: var(--t-sm); font-weight: 600; }
/* 分类选项带例子，半宽放不下 */
.v2-rec__grid .v2-field:has(#rec-cat), .v2-rec__grid .v2-field:has(#ae-cat) { grid-column: 1 / -1; }
.v2-imp-howto { margin: 0; padding-left: 1.4em; list-style: decimal; font-size: var(--t-sm); line-height: 1.6; color: var(--text-2); }
.v2-rec__formerror { font-size: var(--t-sm); color: var(--danger); }
.v2-rec__status { font-size: var(--t-xs); color: var(--text-2); margin-top: -8px; }
.v2-rec__hits { display: flex; flex-wrap: wrap; gap: 8px; }
.v2-rec__check { display: inline-flex; align-items: center; gap: 8px; font-size: var(--t-sm); color: var(--text-2); min-height: 24px; align-self: flex-start; }
.v2-rec__with-fill { position: relative; }
.v2-rec__fill { position: absolute; top: 0; right: 0; border: 0; padding: 0; background: none; color: var(--accent); font-size: var(--t-sm); font-weight: 500; cursor: pointer; line-height: 1.6; }
.v2-rec__fill::after { content: ""; position: absolute; inset: calc((1.5em - max(var(--hit), 1.5em)) / 2) -10px; }
@media (max-width: 599px) {
  /* 手机上表单一栏一行（开发指南 6.1「表单」）：两栏时标签折行、说明挤成窄条，左右输入框对不齐。
     只有本来就成对读的短数字并排：--pair 的前两项（数量和单价），第三项（金额）占满一行 */
  .v2-rec__grid > *, .v2-rec__grid--3 > * { grid-column: 1 / -1; }
  .v2-rec__grid--pair > :nth-child(-n+2) { grid-column: span 3; }
}

.v2-rec__feenote { font-size: var(--t-xs); color: var(--text-2); line-height: 1.5; margin-top: -8px; text-wrap: pretty; }
.v2-rec__feenote.v2-warn { color: var(--warn); }
.v2-rec__feenote .v2-btn { margin-top: 8px; }
.v2-rec__feenote .v2-field { margin-top: 8px; }
.v2-rec__amt { white-space: nowrap; }

/* 资产搜索框 */
.v2-rec-picker { position: relative; }
.v2-rec-picker__icon { position: absolute; left: 10px; top: calc(var(--ctl-form) / 2 - 8px); color: var(--text-3); pointer-events: none; display: flex; }
.v2-rec-picker__input { padding-left: 32px; width: 100%; text-overflow: ellipsis; }
.v2-rec-picker__list {
  margin-top: 6px; max-height: 240px; overflow: auto;
  border-radius: var(--r-field); background: var(--fill-1);
  padding: 4px;
}
.v2-rec-picker__opt {
  display: flex; flex-direction: column; align-items: flex-start; width: 100%;
  border: 0; background: none; padding: 6px 10px; border-radius: var(--r-item); cursor: pointer; text-align: left;
  min-height: 44px; justify-content: center;
}
.v2-rec-picker__opt:hover, .v2-rec-picker__opt.is-active { background: var(--fill-2); }
.v2-rec-picker__name { font-size: var(--t-md); font-weight: 500; line-height: 1.35; overflow-wrap: anywhere; }
.v2-rec-picker__sub { font-size: var(--t-xs); color: var(--text-3); line-height: 1.35; }
.v2-rec-picker__none { padding: 10px; font-size: var(--t-sm); color: var(--text-3); }
.v2-rec-picker__goto { display: block; width: 100%; min-height: var(--hit); padding: 10px; border: 0; background: none; text-align: left; font: inherit; font-size: var(--t-sm); color: var(--accent); cursor: pointer; }
.v2-rec-picker__goto:hover { background: var(--fill-2); }
/* 列表末尾「买入账本里还没有的」：和上面的选项隔开，前面带加号 */
/* 列表可以滚动，这一行钉在底部：不滚到最后也看得到 */
.v2-rec-picker__new { display: flex; align-items: center; gap: 6px; position: sticky; bottom: -4px; background: var(--surface); border-top: 1px solid var(--line); border-radius: 0 0 var(--r-item) var(--r-item); }
.v2-rec-picker__new:hover { background: var(--surface-2, var(--surface)); text-decoration: underline; text-underline-offset: 2px; }
.v2-rec__switch { padding: 0; border: 0; background: none; font: inherit; color: var(--accent); cursor: pointer; position: relative; }
.v2-rec__switch::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: max(var(--hit), 24px); transform: translateY(-50%); }
.v2-rec__switch:hover { text-decoration: underline; text-underline-offset: 2px; }
.v2-rec__back { display: block; margin-top: 6px; font-size: var(--t-xs); }

/* 卖出时的原则 */
.v2-rec-principles { font-size: var(--t-sm); color: var(--text-2); background: var(--fill-1); border-radius: var(--r-field); padding: 8px 12px; }
.v2-rec-principles summary { cursor: pointer; font-weight: 500; min-height: 24px; list-style: none; display: flex; align-items: center; justify-content: space-between; }
.v2-rec-principles summary::-webkit-details-marker { display: none; }
.v2-rec-principles summary::after { content: ""; width: 6px; height: 6px; margin-right: 4px; border-right: 1.5px solid var(--text-3); border-bottom: 1.5px solid var(--text-3); transform: rotate(-45deg); }
.v2-rec-principles[open] summary::after { transform: rotate(45deg); }
.v2-rec-principles ul { list-style: none; padding: 4px 0 0; margin: 0; }
.v2-rec-principles li { line-height: 1.6; }

/* 账户：手机两行形态行尾的「对账」 */
.v2-tr__compact .v2-btn { flex: none; margin-left: 8px; align-self: center; }

.v2-maint-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.v2-rec__tabs { margin-bottom: 12px; }
.v2-edit-foot-left { margin-right: auto; }
/* 添加授予：行情结果只占一行。查回来时小窗不变高，否则按下和松开之间 ✕ 被顶走，这一下点空（放不下的名字省略） */
#rsu-symbol ~ .v2-field__hint { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* RSU 的一张小账：行加合计线 */
.v2-rsu-ledger .v2-kv__k { flex: none; white-space: nowrap; }
/* 说明在窄屏折成两三行时，标签和股数对齐在第一行，不对着说明的中间 */
.v2-rsu-ledger .v2-kv__row { align-items: baseline; }
.v2-rsu-ledger .v2-kv__v { font-weight: 500; }
.v2-rsu-nextline { margin-top: 12px; font-size: var(--t-sm); color: var(--text-2); line-height: 1.5; text-wrap: pretty; }
.v2-rsu-why { margin-bottom: 8px; }

/* 数据管理：一行一件事，左边说明、右边按钮；窄屏按钮落到下面 */
.v2-maint-rows { display: flex; flex-direction: column; }
.v2-maint-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; border-top: 0.5px solid var(--line); }
.v2-maint-row:first-child { border-top: 0; padding-top: 0; }
.v2-maint-row:last-child { padding-bottom: 0; }
.v2-maint-row__text { min-width: 0; max-width: 46em; }
.v2-maint-row__title { font-size: var(--t-md); font-weight: 600; line-height: 1.4; margin-bottom: 2px; }
.v2-maint-row__acts { flex: none; }
@media (max-width: 560px) { .v2-maint-row { flex-direction: column; align-items: flex-start; gap: 10px; } }
