/* ═══════════════════════════════════════════════
   遁一 · 二次元 UI 组件 + 动效系统
   （在 style.css / theme.css 之后加载）
   ═══════════════════════════════════════════════ */

/* ───── 动效基线 ───── */
:root {
  --spring: cubic-bezier(.34, 1.46, .64, 1);
  --ease-out: cubic-bezier(.22, 1, .36, 1);
}

/* 页面切换：轻微上浮 */
.screen { animation: screenIn .36s var(--ease-out) both; }
@keyframes screenIn {
  from { opacity: 0; transform: translateY(16px) scale(.985); }
  to   { opacity: 1; transform: none; }
}

/* 卡片逐个弹入 */
@keyframes popIn {
  0%   { opacity: 0; transform: translateY(14px) scale(.96); }
  55%  { opacity: 1; }
  100% { opacity: 1; transform: none; }
}
.stg { animation: popIn .5s var(--spring) both; animation-delay: calc(var(--i, 0) * 42ms); }

/* 按压果冻感 */
.btn, .tile, .seg-item, .tab, .icon-btn, .us-trigger, .view-tabs button, .theme-card {
  transition: transform .16s var(--spring), box-shadow .22s ease,
              background-color .2s ease, border-color .2s ease, color .2s ease;
}
.btn:active, .tile:active, .us-opt:active { transform: scale(.955); }
.icon-btn:active { transform: scale(.88) rotate(-10deg); }
.tab:active > span:first-child { transform: scale(1.25) translateY(-3px); }

/* 点击涟漪 */
.rip-host { position: relative; overflow: hidden; }
.rip {
  position: absolute; border-radius: 50%; pointer-events: none;
  background: currentColor; opacity: .2;
  transform: scale(0); animation: rip .58s ease-out forwards;
}
@keyframes rip { to { transform: scale(2.8); opacity: 0; } }

/* 底部 tab 图标弹跳 */
.tabbar .tab .ti { display: inline-block; transition: transform .26s var(--spring); }
.tabbar .tab.is-on .ti { animation: tabPop .46s var(--spring); }
@keyframes tabPop {
  0%   { transform: translateY(0) scale(1); }
  38%  { transform: translateY(-6px) scale(1.26); }
  100% { transform: translateY(0) scale(1); }
}

/* ───── 输入框：聚焦发光 ───── */
input[type=text], input[type=number], input[type=password] {
  border-radius: 14px; padding: 12px 14px;
  transition: border-color .2s ease, box-shadow .26s ease,
              transform .2s var(--spring), background .2s ease;
}
input[type=text]:focus, input[type=number]:focus, input[type=password]:focus {
  border-color: var(--line-strong);
  box-shadow: 0 0 0 3.5px var(--glow-1);
  background: var(--sur-1);
  transform: translateY(-1px);
}
input::placeholder { color: var(--fg-dim); opacity: .75; }

/* ───── 二次元复选框 ───── */
.check input[type=checkbox] {
  appearance: none; -webkit-appearance: none;
  width: 21px; height: 21px; flex: none; margin: 0;
  border-radius: 8px; border: 2px solid var(--line-strong);
  background: var(--sur-1); position: relative; cursor: pointer;
  transition: background .24s var(--spring), border-color .2s ease, transform .18s var(--spring);
}
.check input[type=checkbox]:active { transform: scale(.86); }
.check input[type=checkbox]:checked {
  background: linear-gradient(135deg, var(--gold), var(--gold-deep));
  border-color: transparent;
}
.check input[type=checkbox]:checked::after {
  content: "✓";
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: var(--on-gold); font-size: 13px; font-weight: 900; line-height: 1;
  animation: tickPop .32s var(--spring);
}
@keyframes tickPop {
  0%   { transform: scale(.3); opacity: 0; }
  60%  { transform: scale(1.25); }
  100% { transform: scale(1); opacity: 1; }
}
[data-theme="ink"] .check input[type=checkbox]:checked::after { color: #fffaf0; }

/* ───── 分段控件：滑动胶囊 ───── */
.seg { position: relative; border-radius: 999px; padding: 4px; overflow: hidden; }
.seg-slider {
  position: absolute; top: 4px; bottom: 4px; left: 0; width: 0;
  border-radius: 999px; z-index: 0;
  background: linear-gradient(135deg, var(--gold), var(--gold-deep));
  box-shadow: 0 3px 10px rgba(0, 0, 0, .14);
  transition: transform .38s var(--spring), width .38s var(--spring), opacity .2s;
  opacity: 0;
}
.seg.has-slider .seg-slider { opacity: 1; }
.seg-item { position: relative; z-index: 1; background: transparent !important; border: none; }
.seg-item.is-on { color: var(--on-gold); font-weight: 700; }
[data-theme="ink"] .seg-item.is-on { color: #fffaf0; }
[data-theme="cyber"] .seg-slider { box-shadow: 0 0 14px rgba(0, 212, 255, .45); }

/* ───── 顶部按钮与返回键 ───── */
.icon-btn { border-radius: 50% !important; }
#btn-back { transition: transform .22s var(--spring), opacity .2s; }

/* ═══════════ 二次元下拉选择器 ═══════════ */
.ui-sel { position: relative; min-width: 0; }
.ui-sel.grow { flex: 1; min-width: 0; }

.us-trigger {
  width: 100%; min-height: 45px;
  display: flex; align-items: center; gap: 8px;
  padding: 11px 10px 11px 13px;
  border-radius: 15px; font-family: inherit; font-size: 15px;
  background: var(--sur-2); border: 1.5px solid var(--line-soft);
  color: var(--fg); cursor: pointer; text-align: left;
  -webkit-tap-highlight-color: transparent;
}
.us-trigger .us-val {
  flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.us-trigger .us-arrow {
  flex: none; position: relative;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--sur-1); border: 1.5px solid var(--line-soft);
  transition: transform .3s var(--spring), background .22s ease, border-color .22s ease;
}
.us-trigger .us-arrow::after {
  content: ""; position: absolute; left: 50%; top: 44%;
  width: 5.5px; height: 5.5px;
  border-right: 2px solid var(--fg-dim); border-bottom: 2px solid var(--fg-dim);
  transform: translate(-50%, -50%) rotate(45deg);
  transition: border-color .22s ease;
}
.us-trigger.is-open {
  border-color: var(--line-strong);
  box-shadow: 0 0 0 3.5px var(--glow-1);
  background: var(--sur-1);
}
.us-trigger.is-open .us-arrow {
  transform: rotate(180deg);
  background: linear-gradient(135deg, var(--gold), var(--gold-deep));
  border-color: transparent;
}
.us-trigger.is-open .us-arrow::after { border-color: var(--on-gold); }
[data-theme="ink"] .us-trigger.is-open .us-arrow::after { border-color: #fffaf0; }
.us-trigger.is-empty .us-val { color: var(--fg-dim); }
.us-trigger.pop { animation: usPop .38s var(--spring); }
@keyframes usPop {
  0%   { transform: scale(1); }
  42%  { transform: scale(1.05); }
  100% { transform: scale(1); }
}

/* 弹层 */
.us-mask {
  position: fixed; inset: 0; z-index: 92;
  background: rgba(18, 10, 22, .42);
  backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
  opacity: 0; pointer-events: none; transition: opacity .26s ease;
}
.us-mask.is-open { opacity: 1; pointer-events: auto; }

.us-sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 93;
  background: var(--panel-solid);
  border-radius: 26px 26px 0 0;
  padding: 4px 14px calc(16px + var(--safe-bottom));
  box-shadow: var(--card-shadow-lg);
  transform: translateY(103%);
  transition: transform .38s var(--spring);
  max-height: 70vh; display: flex; flex-direction: column;
}
.us-sheet.is-open { transform: translateY(0); }
.us-sheet .sh-handle {
  width: 42px; height: 4px; border-radius: 4px;
  background: var(--line-strong); margin: 6px auto 10px; opacity: .45;
}
.us-title {
  font-size: 12.5px; color: var(--fg-dim); font-weight: 700;
  padding: 0 6px 10px; letter-spacing: .6px;
  display: flex; align-items: center; gap: 6px;
}
.us-title::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--gold); flex: none;
}
.us-list {
  position: relative;
  overflow-y: auto; -webkit-overflow-scrolling: touch;
  display: grid; gap: 6px; padding: 0 2px 4px;
}
.us-list.grid { grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)); }
.us-list.grid .us-opt { justify-content: center; text-align: center; padding: 11px 6px; font-size: 14.5px; }
.us-list.grid .us-opt .uk { display: none; }

.us-opt {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 12px 14px; border: 1.5px solid transparent; border-radius: 15px;
  background: var(--sur-1); color: var(--fg);
  font-family: inherit; font-size: 15px; cursor: pointer; text-align: left;
  -webkit-tap-highlight-color: transparent;
  animation: optIn .36s var(--ease-out) both;
  animation-delay: calc(var(--d, 0) * 1ms);
  transition: background .2s ease, color .2s ease, transform .14s var(--spring),
              box-shadow .2s ease, border-color .2s ease;
}
@keyframes optIn {
  from { opacity: 0; transform: translateY(12px) scale(.97); }
  to   { opacity: 1; transform: none; }
}
.us-opt.is-on {
  background: var(--acc-surface, var(--acc-soft));
  border-color: var(--acc-edge, var(--acc-line));
  color: var(--acc-ink, var(--gold-fg)); font-weight: 700;
  box-shadow: none;
}
[data-theme="ink"] .us-opt.is-on { color: var(--gold-fg); }
[data-theme="cyber"] .us-opt.is-on { box-shadow: inset 0 0 0 1px var(--acc-edge, var(--acc-line)); }
.us-opt .ut { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.us-opt .uk {
  flex: none; width: 19px; height: 19px;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 900;
  color: var(--acc-ink, var(--gold-deep));
  opacity: 0; transform: scale(.3);
  transition: opacity .2s ease, transform .26s var(--spring);
}
.us-opt.is-on .uk { opacity: 1; transform: scale(1); }

/* ───── 主题切换：柔和扩散 ───── */
.theme-flash {
  position: fixed; inset: 0; z-index: 99; pointer-events: none;
  background: radial-gradient(circle at var(--fx, 50%) var(--fy, 50%),
              var(--panel-solid) 0%, rgba(255, 255, 255, 0) 62%);
  opacity: 0;
}
.theme-flash.go { animation: tflash .6s ease-out; }
@keyframes tflash {
  0%   { opacity: 0; transform: scale(.4); }
  35%  { opacity: .95; }
  100% { opacity: 0; transform: scale(1.5); }
}

/* ───── 减少动效偏好 ───── */
@media (prefers-reduced-motion: reduce) {
  .screen, .stg, .us-opt, .us-trigger.pop, .tabbar .tab.is-on .ti { animation: none !important; }
  .us-sheet, .seg-slider { transition-duration: .01ms !important; }
}

/* ═══════════════════════════════════════════════
   软糖质感包（cute=1 专属）：按钮 / 下拉框 / 卡片
   奶油渐变 + 波点纹理 + 按压果冻回弹
   ═══════════════════════════════════════════════ */
[data-cute="1"] {
  --candy-hi: rgba(255, 255, 255, .65);   /* 顶部高光 */
  --candy-dot: rgba(255, 255, 255, .34);  /* 波点 */
  --candy-dot2: rgba(255, 255, 255, .18);
}

/* ── 主按钮：暖调实心（干净、无塑料高光） ── */
[data-cute="1"] .btn.primary {
  background: var(--gold);
  box-shadow: 0 3px 12px var(--acc-shadow, rgba(0, 0, 0, .14));
  border: none;
  border-radius: 999px;
}
[data-cute="1"] .btn.primary:active {
  transform: scale(.965) translateY(1px);
  box-shadow: 0 1px 5px var(--acc-shadow, rgba(0,0,0,.10));
  filter: brightness(.96);
}

/* ── 幽灵按钮：素净奶饼 ── */
[data-cute="1"] .btn.ghost {
  background: var(--panel-solid);
  border: 1.5px solid var(--line);
  border-radius: 999px;
  box-shadow: none;
}
[data-cute="1"] .btn.ghost:active { transform: scale(.965) translateY(1px); }

/* ── 通用卡片：轻阴影 ── */
[data-cute="1"] .panel,
[data-cute="1"] .pcard,
[data-cute="1"] .tile {
  border-radius: 20px;
  border: none;
  box-shadow: 0 2px 10px var(--glow-1);
}

/* ── 下拉触发器：轻胶囊（无波点） ── */
[data-cute="1"] .us-trigger {
  background: var(--panel-solid);
  border: 1.5px solid var(--line);
  border-radius: 999px;
  box-shadow: none;
}
/* 小箭头：淡彩薄涂（不再是大块橙金） */
[data-cute="1"] .us-trigger .us-arrow {
  width: 24px; height: 24px;
  background: var(--acc-surface, var(--acc-soft));
  border: none;
  box-shadow: none;
}
[data-cute="1"] .us-trigger .us-arrow::after { border-color: var(--acc-ink, var(--gold-fg)); }
[data-cute="1"] .us-trigger.is-open {
  border-color: var(--acc-edge, var(--acc-line));
  box-shadow: 0 0 0 4px var(--acc-surface, var(--acc-soft));
}
/* 展开态箭头：同样走淡彩，不再变实心块 */
[data-cute="1"] .us-trigger.is-open .us-arrow {
  background: var(--acc-surface-2, var(--acc-surface));
  border-color: transparent;
}
[data-cute="1"] .us-trigger.is-open .us-arrow::after { border-color: var(--acc-ink, var(--gold-fg)); }
/* 弹窗主按钮：暖调实心（去掉跨阶渐变高光） */
[data-cute="1"] .dlg-btn.primary {
  background: var(--gold);
  box-shadow: 0 3px 12px var(--acc-shadow, rgba(0,0,0,.14));
}
[data-cute="1"] .dlg-btn.primary.danger {
  background: var(--cinnabar);
  box-shadow: 0 3px 12px rgba(0, 0, 0, .12);
}
/* 版式选择卡：选中态走淡彩，不用满饱和描边 */
[data-cute="1"] .ex-tpl.is-on {
  border-color: var(--acc-edge, var(--acc-line));
  background: var(--acc-surface, var(--acc-soft));
  box-shadow: 0 2px 10px var(--acc-shadow, var(--glow-1));
}
[data-cute="1"] .ex-tpl.is-on .ex-tpl-name { color: var(--acc-ink, var(--gold-fg)); }
[data-cute="1"] .ex-tpl-thumb i { background: var(--acc-surface-2, var(--acc-surface)); opacity: .7; }
[data-cute="1"] .ex-tpl.is-on .ex-tpl-thumb i { opacity: 1; }

/* ── 选择弹层选项：淡彩选中（文字保持可读） ── */
[data-cute="1"] .us-opt {
  border-radius: 999px;
  background: var(--sur-1);
  border: 1.5px solid transparent;
}
[data-cute="1"] .us-opt:active { transform: scale(.97); }
[data-cute="1"] .us-opt.is-on {
  background: var(--acc-surface, var(--acc-soft));
  border-color: var(--acc-edge, var(--acc-line));
  color: var(--acc-ink, var(--gold-fg));
  font-weight: 700;
  box-shadow: none;
}
[data-cute="1"] .us-opt.is-on .uk { color: var(--acc-ink, var(--gold-fg)); }
[data-cute="1"] .us-list.grid .us-opt { border-radius: 18px; }

/* ── 分段控件胶囊也软一点 ── */
[data-cute="1"] .seg { border-radius: 999px; box-shadow: none; }
[data-cute="1"] .seg-slider {
  border-radius: 999px;
  background: var(--acc-surface, var(--acc-soft));
  border: 1.5px solid var(--acc-edge, var(--acc-line));
  box-shadow: none;
}

/* ── 分段/胶囊控件：选中态改为淡彩（原为满色块） ── */
[data-cute="1"] .seg-item.is-on { color: var(--acc-ink, var(--gold-fg)); font-weight: 700; }
[data-cute="1"] .chips button.is-on {
  background: var(--acc-surface, var(--acc-soft));
  border-color: var(--acc-edge, var(--acc-line));
  color: var(--acc-ink, var(--gold-fg));
  font-weight: 700;
  box-shadow: none;
}
[data-cute="1"] .view-tabs button.is-on {
  background: var(--acc-surface, var(--acc-soft));
  border: 1.5px solid var(--acc-edge, var(--acc-line));
  color: var(--acc-ink, var(--gold-fg));
  box-shadow: none;
}

/* ── 复选框：勾选改暖调实心（去渐变高光） ── */
[data-cute="1"] .check input[type=checkbox]:checked {
  background: var(--gold);
  box-shadow: none;
}

/* ── 底部 tab：淡彩胶囊（不再是大块橙金） ── */
[data-cute="1"] .tabbar .tab.is-on { color: var(--acc-ink, var(--gold-fg)); }
[data-cute="1"] .tabbar .tab.is-on .ti {
  background: var(--acc-surface, var(--acc-soft));
  color: var(--acc-ink, var(--gold-fg));
  border-radius: 999px;
  padding: 3px 12px;
  box-shadow: none;
}

/* ═══════════════════════════════════════════════
   统一弹窗：居中确认框 + 底部动作面板
   ═══════════════════════════════════════════════ */
.dlg-mask {
  position: fixed; inset: 0; z-index: 96;
  background: rgba(18, 10, 22, .45);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center; padding: 30px;
  opacity: 0; pointer-events: none; transition: opacity .24s ease;
}
.dlg-mask.is-vis { pointer-events: auto; }
.dlg-mask.is-open { opacity: 1; }
.dlg-card {
  width: 100%; max-width: 320px;
  background: var(--panel-solid);
  border-radius: 24px; padding: 26px 22px 20px;
  text-align: center;
  box-shadow: var(--card-shadow-lg);
  transform: scale(.82) translateY(14px); opacity: 0;
  transition: transform .34s var(--spring), opacity .22s ease;
}
.dlg-mask.is-open .dlg-card { transform: none; opacity: 1; }
.dlg-icon {
  width: 54px; height: 54px; margin: 0 auto 12px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px;
  background: var(--acc-soft, var(--glow-1));
  animation: dlgWob .6s var(--spring) .1s;
}
.dlg-icon.danger { background: rgba(213, 73, 65, .12); }
@keyframes dlgWob {
  0% { transform: rotate(-8deg) scale(.7); }
  55% { transform: rotate(5deg) scale(1.08); }
  100% { transform: none; }
}
.dlg-card h3 { font-size: 17px; margin: 0 0 8px; color: var(--fg); }
.dlg-card p { font-size: 13.5px; line-height: 1.65; color: var(--fg-dim); margin: 0 0 18px; word-break: break-all; }
.dlg-btns { display: flex; gap: 10px; }
.dlg-btns.single { display: block; }
.dlg-btn {
  flex: 1; min-height: 42px; border-radius: 999px;
  font-family: inherit; font-size: 14.5px; font-weight: 700; cursor: pointer;
  transition: transform .16s var(--spring), box-shadow .2s ease, filter .2s ease;
  -webkit-tap-highlight-color: transparent;
}
.dlg-btn:active { transform: scale(.94); }
.dlg-btn.ghost {
  background: var(--sur-2); border: 1.5px solid var(--line); color: var(--fg-dim);
}
.dlg-btn.primary {
  background: linear-gradient(160deg, var(--gold-bright), var(--gold-deep));
  border: none; color: var(--on-gold);
  box-shadow: inset 0 1.5px 0 rgba(255, 255, 255, .4), 0 4px 12px var(--acc-shadow, rgba(0,0,0,.16));
}
.dlg-btn.primary.danger {
  background: linear-gradient(160deg, #e2695f, #b33a32);
  box-shadow: inset 0 1.5px 0 rgba(255, 255, 255, .3), 0 4px 12px rgba(179, 58, 58, .3);
}
[data-cute="1"] .dlg-btn { border-radius: 999px; }
[data-cute="0"] .dlg-card { border-radius: 16px; max-width: 300px; }
[data-cute="0"] .dlg-btn { border-radius: var(--td-radius-default, 6px); font-weight: 600; }
[data-cute="0"] .dlg-btn.primary {
  background: var(--td-brand, var(--gold)); color: var(--on-gold, #fff); box-shadow: none;
}
[data-cute="0"] .dlg-btn.primary.danger { background: var(--td-error, #d54941); }
[data-cute="0"] .dlg-icon { border-radius: var(--td-radius-xl, 12px); }

/* 底部动作面板 */
.dlg-sheet-mask {
  position: fixed; inset: 0; z-index: 96;
  background: rgba(18, 10, 22, .42);
  backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
  opacity: 0; pointer-events: none; transition: opacity .26s ease;
}
.dlg-sheet-mask.is-vis { pointer-events: auto; }
.dlg-sheet-mask.is-open { opacity: 1; }
.dlg-sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 97;
  background: var(--panel-solid);
  border-radius: 26px 26px 0 0;
  padding: 4px 14px calc(14px + var(--safe-bottom));
  box-shadow: var(--card-shadow-lg);
  transform: translateY(103%);
  transition: transform .38s var(--spring);
}
.dlg-sheet.is-open { transform: translateY(0); }
.dlg-sheet .sh-handle {
  width: 42px; height: 4px; border-radius: 4px;
  background: var(--line-strong); margin: 6px auto 10px; opacity: .45;
}
.dlg-sheet-title {
  font-size: 12.5px; color: var(--fg-dim); font-weight: 700;
  padding: 2px 6px 10px; letter-spacing: .6px;
  display: flex; align-items: center; gap: 6px;
}
.dlg-sheet-title::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--gold); flex: none;
}
.dlg-act {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 13px 14px; margin-bottom: 6px;
  border: 1.5px solid transparent; border-radius: 18px;
  background: var(--sur-1); color: var(--fg);
  font-family: inherit; text-align: left; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  animation: optIn .36s var(--ease-out) both;
  animation-delay: calc(var(--d, 0) * 1ms);
  transition: transform .14s var(--spring), background .2s ease;
}
.dlg-act:active { transform: scale(.97); }
.dlg-act .da-ic {
  flex: none; width: 38px; height: 38px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; background: var(--sur-2);
}
.dlg-act .da-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.dlg-act .da-tx b { font-size: 15px; font-weight: 600; }
.dlg-act .da-tx i { font-style: normal; font-size: 11.5px; color: var(--fg-dim); }
.dlg-act.danger { color: var(--cinnabar-fg, #b33a32); }
.dlg-act.danger .da-ic { background: rgba(179, 58, 58, .1); }
.dlg-act.cancel {
  justify-content: center; font-weight: 700; color: var(--fg-dim);
  background: transparent; border: 1.5px dashed var(--line-strong);
}
[data-cute="1"] .dlg-act { border-radius: 999px; }
[data-cute="1"] .dlg-act .da-ic { border-radius: 50%; }

/* ═══════════════════════════════════════════════
   记录管理页（问真式）
   ═══════════════════════════════════════════════ */
.more-link {
  margin-left: 8px; font-size: 12px; color: var(--gold-bright);
  cursor: pointer; white-space: nowrap; font-weight: 600;
}
.more-link:active { opacity: .7; }

.rec-toolbar { display: flex; gap: 10px; align-items: center; padding: 10px 12px; margin-bottom: 12px; }
.rec-search {
  flex: 1; display: flex; align-items: center; gap: 8px;
  background: var(--sur-2); border: 1.5px solid var(--line-soft);
  border-radius: 999px; padding: 9px 14px;
  transition: border-color .2s ease, box-shadow .24s ease;
}
.rec-search:focus-within { border-color: var(--line-strong); box-shadow: 0 0 0 3.5px var(--glow-1); }
.rec-search span { font-size: 14px; opacity: .7; flex: none; }
.rec-search input {
  flex: 1; min-width: 0; border: none !important; background: transparent !important;
  padding: 0 !important; font-size: 14px; color: var(--fg); box-shadow: none !important;
  transform: none !important;
}
.rec-search input:focus { outline: none; }
.rec-editbtn { flex: none; min-height: 38px; padding: 0 16px; font-size: 13px; }
.rec-editbtn.is-on {
  background: var(--acc-surface, var(--acc-soft));
  color: var(--acc-ink, var(--gold-fg));
  border-color: var(--acc-edge, var(--gold));
}

/* 分组字母 */
.rgroup-h {
  font-size: 12px; font-weight: 800; color: var(--gold-bright);
  margin: 14px 4px 8px; display: flex; align-items: center; gap: 8px;
  letter-spacing: 1px;
}
.rgroup-h::after { content: ""; flex: 1; height: 1px; background: var(--line-soft); }

/* 记录行 */
.rrow {
  display: flex; align-items: center; gap: 11px;
  background: var(--panel-solid); border-radius: 18px;
  padding: 12px 12px; margin-bottom: 8px;
  border: 1px solid var(--line-soft);
  box-shadow: 0 2px 10px var(--glow-1);
  cursor: pointer; position: relative;
  animation: popIn .45s var(--spring) both;
  animation-delay: calc(var(--i, 0) * 36ms);
  transition: transform .16s var(--spring), box-shadow .2s ease;
}
.rrow:active { transform: scale(.977); }
[data-cute="1"] .rrow { border-radius: 22px; box-shadow: 0 4px 14px var(--glow-1), inset 0 1px 0 rgba(255,255,255,.5); }
.rrow .avatar {
  flex: none; width: 44px; height: 44px; border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  font-size: 19px; font-weight: 700; font-family: "KaiTi", serif;
  background: var(--sur-2);
}
[data-cute="1"] .rrow .avatar { border-radius: 50%; box-shadow: inset 0 1.5px 0 rgba(255,255,255,.5); }
.rrow .rinfo { flex: 1; min-width: 0; }
.rrow .rinfo b { display: flex; align-items: center; gap: 6px; font-size: 15px; color: var(--fg); }
.rrow .rinfo .rdim { display: block; font-size: 11px; color: var(--fg-dim); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* 四柱彩色（问真式：单字按五行着色） */
.rpillars { flex: none; display: flex; gap: 7px; }
.rpillars .rp {
  display: flex; flex-direction: column; align-items: center; gap: 0;
  font-size: 13.5px; font-weight: 700; line-height: 1.25;
  font-family: "KaiTi", serif;
}
.rpillars .rp.none { color: var(--fg-dim); opacity: .5; font-size: 11px; justify-content: center; }
.rpillars .rp i { font-style: normal; }
/* 编辑模式的删除钮 */
.rrow-del {
  flex: none; width: 34px; height: 34px; border-radius: 50%;
  background: rgba(179, 58, 58, .1); border: 1.5px solid rgba(179, 58, 58, .25);
  color: var(--cinnabar-fg, #b33a32); font-size: 15px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: transform .16s var(--spring);
}
.rrow-del:active { transform: scale(.85); }
.rrow.is-editing { animation: wiggle .5s ease-in-out infinite; }
@keyframes wiggle {
  0%, 100% { transform: rotate(0); }
  25% { transform: rotate(-.5deg); }
  75% { transform: rotate(.5deg); }
}

/* 编辑横幅 */
.edit-banner {
  display: flex; align-items: center; gap: 10px;
  background: var(--acc-soft, var(--glow-1));
  border: 1.5px solid var(--acc-line, var(--gold));
  border-radius: 16px; padding: 10px 14px; margin: 0 0 14px;
  font-size: 12.5px; color: var(--fg);
  animation: popIn .4s var(--spring) both;
}
.edit-banner[hidden] { display: none; }
.edit-banner b { color: var(--gold-bright); }
.edit-banner span { flex: 1; min-width: 0; }
.edit-banner button {
  flex: none; border: none; background: none; cursor: pointer;
  font-family: inherit; font-size: 12.5px; font-weight: 700;
  color: var(--cinnabar-fg, #b33a32); padding: 4px 8px;
  border-radius: 10px;
}
.edit-banner button:active { transform: scale(.92); }

/* ═══════════ 地区选择器（问真式 三列滚轮） ═══════════ */
.rp-mask { z-index: 90; }
.rp-sheet { padding: 0 0 env(safe-area-inset-bottom, 0); }
.rp-sheet .sh-handle { margin: 10px auto 4px; }

.rp-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px 4px; gap: 12px;
}
.rp-tabs {
  display: flex; background: var(--acc-soft, var(--glow-1));
  border-radius: 999px; padding: 4px; gap: 2px;
}
.rp-tab {
  border: none; background: none; cursor: pointer; font-family: inherit;
  font-size: 13.5px; font-weight: 700; color: var(--fg-dim);
  padding: 7px 22px; border-radius: 999px; transition: all .22s var(--spring);
}
.rp-tab.is-on {
  background: var(--panel-solid, var(--panel));
  color: var(--acc-ink, var(--gold-fg));
  box-shadow: 0 1px 4px var(--glow-1);
}
.rp-tab:active { transform: scale(.94); }
.rp-ok {
  border: none; cursor: pointer; font-family: inherit;
  font-size: 14.5px; font-weight: 800; color: var(--on-gold, #fff);
  padding: 9px 26px; border-radius: 999px;
  background: var(--gold);
  box-shadow: 0 3px 10px var(--acc-shadow, rgba(0,0,0,.16));
  transition: transform .18s var(--spring);
}
.rp-ok:active { transform: scale(.93); }

/* 搜索框 */
.rp-search {
  position: relative; margin: 8px 16px 4px;
}
.rp-search input {
  width: 100%; box-sizing: border-box; border: 1.5px solid var(--line);
  background: var(--bg); border-radius: 999px; padding: 10px 16px 10px 40px;
  font: inherit; font-size: 13.5px; color: var(--fg); outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.rp-search input:focus {
  border-color: var(--acc-line, var(--gold));
  box-shadow: 0 0 0 4px var(--acc-soft, var(--glow-1));
}
.rp-search input::placeholder { color: var(--fg-dim); opacity: .75; }
.rp-sicon {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  font-size: 13px; opacity: .7; pointer-events: none;
}

/* 三列滚轮 */
.rp-cols {
  display: flex; gap: 6px; padding: 6px 12px 14px; position: relative;
}
.rp-col { flex: 1.2; min-width: 0; display: flex; flex-direction: column; }
.rp-col:nth-child(2) { flex: 1.4; }
.rp-col:nth-child(3) { flex: 1.3; }
.rp-col-head {
  text-align: center; font-size: 11.5px; font-weight: 700;
  color: var(--fg-dim); padding: 4px 0 2px; letter-spacing: 2px;
}
.rp-wheel {
  position: relative; height: 220px; overflow-y: auto; overscroll-behavior: contain;
  scroll-snap-type: y proximity; -webkit-overflow-scrolling: touch;
  scrollbar-width: none; list-style: none; margin: 0; padding: 0;
  mask-image: linear-gradient(transparent, #000 22%, #000 78%, transparent);
  -webkit-mask-image: linear-gradient(transparent, #000 22%, #000 78%, transparent);
}
.rp-wheel::-webkit-scrollbar { display: none; }
.rp-band {
  position: sticky; top: 88px; height: 44px; margin: 0 4px -44px; pointer-events: none;
  background: var(--acc-surface, var(--acc-soft));
  border: 1.5px solid var(--acc-edge, var(--acc-line));
  border-radius: 14px;
  box-shadow: none;
}
.rp-it {
  height: 44px; display: flex; align-items: center; justify-content: center;
  font-size: 14.5px; font-weight: 600; color: var(--fg);
  cursor: pointer; scroll-snap-align: center; white-space: nowrap;
  opacity: .45; transform: scale(.92);
  transition: opacity .18s, transform .18s, color .18s;
  animation: rpIn .32s var(--spring) both; animation-delay: calc(var(--d, 0) * 1ms);
}
@keyframes rpIn { from { opacity: 0; transform: translateY(6px) scale(.9); } }
.rp-it.is-on {
  opacity: 1; transform: scale(1.02);
  color: var(--gold-deep); font-weight: 800;
}
.rp-it.rp-empty { opacity: .35; cursor: default; }
.rp-pad { list-style: none; }

/* 搜索结果列表 */
.rp-res {
  display: none; position: absolute; left: 12px; right: 12px;
  top: 108px; bottom: 12px; overflow-y: auto; z-index: 3;
  background: var(--panel-solid, var(--panel));
  border: 1.5px solid var(--line); border-radius: 18px;
  box-shadow: var(--card-shadow-lg); padding: 6px;
}
.rp-res.is-show { display: block; animation: popIn .28s var(--spring) both; }
.rp-res-it {
  display: flex; align-items: center; gap: 10px; width: 100%;
  border: none; background: none; cursor: pointer; font-family: inherit;
  padding: 11px 12px; border-radius: 12px; text-align: left;
  transition: background .15s, transform .15s var(--spring);
}
.rp-res-it:active { background: var(--acc-soft, var(--glow-1)); transform: scale(.98); }
.rp-res-it .rr-name {
  flex: none; font-size: 14px; font-weight: 800; color: var(--gold-deep);
  min-width: 64px;
}
.rp-res-it .rr-path {
  flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 12px; color: var(--fg-dim);
}
.rp-res-none { text-align: center; padding: 26px 10px; font-size: 13px; color: var(--fg-dim); }

/* 海外面板 */
.rp-overseas { padding: 8px 16px 18px; }
.rp-overseas[hidden] { display: none; }
.rp-ov-tip { font-size: 12.5px; color: var(--fg-dim); margin: 4px 2px 12px; }
.rp-ov-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px;
}
.rp-ov-city {
  border: 1.5px solid var(--line); background: var(--panel-solid, var(--panel));
  cursor: pointer; font-family: inherit; font-size: 13.5px; font-weight: 700;
  color: var(--fg); padding: 10px 4px; border-radius: 14px;
  transition: all .18s var(--spring);
}
.rp-ov-city:active {
  transform: scale(.93);
  background: var(--acc-surface, var(--acc-soft));
  border-color: var(--acc-edge, var(--acc-line));
  color: var(--acc-ink, var(--gold-fg));
}

/* 出生 trigger（替代原生 datalist 输入框） */
.city-trigger {
  width: 100%; display: flex; align-items: center; gap: 10px;
  border: 1.5px solid var(--line); border-radius: 16px;
  background: var(--panel-solid, var(--panel)); cursor: pointer;
  padding: 12px 14px; font-family: inherit; text-align: left;
  transition: border-color .2s, box-shadow .2s, transform .18s var(--spring);
}
.city-trigger:active { transform: scale(.985); }
.city-trigger .ct-val {
  flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 14px; color: var(--fg); font-weight: 600;
}
.city-trigger.is-empty .ct-val { color: var(--fg-dim); font-weight: 400; }
.city-trigger .us-arrow {
  flex: none; width: 22px; height: 22px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--acc-soft, var(--glow-1));
  transition: transform .25s var(--spring), background .2s;
}
.city-trigger .us-arrow::after {
  content: ''; width: 7px; height: 7px;
  border-right: 2px solid var(--gold-deep); border-bottom: 2px solid var(--gold-deep);
  transform: rotate(45deg) translateY(-2px);
  transition: border-color .2s;
}
.city-trigger.is-open .us-arrow { transform: rotate(180deg); }
.city-trigger.pop { animation: usPop .38s var(--spring); }
[data-cute="1"] .city-trigger {
  border-radius: 18px;
  box-shadow: 0 2px 6px var(--glow-1);
}
[data-cute="1"] .city-trigger.is-open {
  border-color: var(--acc-edge, var(--acc-line));
  box-shadow: 0 0 0 4px var(--acc-surface, var(--acc-soft));
}
[data-cute="1"] .city-trigger .us-arrow {
  background: var(--acc-surface, var(--acc-soft));
  box-shadow: none;
}
[data-cute="1"] .city-trigger .us-arrow::after { border-color: var(--acc-ink, var(--gold-fg)); }

@media (prefers-reduced-motion: reduce) {
  .rp-it, .rp-res-it, .rp-res.is-show { animation: none !important; }
}

/* ─── 首页「我的记录」入口 ─── */
.rec-entry {
  width: 100%; display: flex; align-items: center; gap: 12px;
  border: 1.5px solid var(--line); border-radius: var(--radius, 20px);
  background: var(--panel-solid, var(--panel)); cursor: pointer;
  padding: 14px 16px; margin: 0 0 4px; font-family: inherit; text-align: left;
  box-shadow: var(--card-shadow);
  transition: transform .18s var(--spring), box-shadow .2s, border-color .2s;
}
.rec-entry:active { transform: scale(.975); }
.rec-entry .re-ico {
  flex: none; width: 40px; height: 40px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center; font-size: 19px;
  background: var(--acc-soft, var(--glow-1));
  border: 1.5px solid var(--acc-line, var(--gold));
}
.rec-entry .re-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.rec-entry .re-txt b { font-size: 14.5px; font-weight: 800; color: var(--fg); }
.rec-entry .re-txt i {
  font-style: normal; font-size: 12px; color: var(--fg-dim);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.rec-entry .us-arrow {
  flex: none; width: 22px; height: 22px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--acc-soft, var(--glow-1));
  transition: transform .25s var(--spring), background .2s;
}
.rec-entry .us-arrow::after {
  content: ''; width: 7px; height: 7px;
  border-right: 2px solid var(--gold-deep); border-bottom: 2px solid var(--gold-deep);
  transform: rotate(-45deg) translateY(-1px);
}
[data-cute="1"] .rec-entry {
  box-shadow: inset 0 1.5px 0 var(--candy-hi, rgba(255,255,255,.5)), 0 2px 8px var(--acc-shadow, rgba(0,0,0,.08));
}
[data-cute="1"] .rec-entry:active {
  border-color: var(--acc-line, var(--gold));
  box-shadow: 0 0 0 4px var(--acc-soft, var(--glow-1));
}
[data-cute="1"] .rec-entry .re-ico {
  background: var(--acc-surface, var(--acc-soft));
  color: var(--acc-ink, var(--gold-fg));
  box-shadow: none;
}
[data-cute="1"] .rec-entry .us-arrow {
  background: var(--acc-surface, var(--acc-soft));
  box-shadow: none;
}
[data-cute="1"] .rec-entry .us-arrow::after { border-color: var(--acc-ink, var(--gold-fg)); }

/* 记录页空状态复用 .empty，无需新样式 */
