/* ==========================================================================
   pet-enrollment.css / PURR 对话式可爱建档体验（借鉴 Letterly 交互节奏，适配 PURR 暖纸治愈风）
   --------------------------------------------------------------------------
   作用域：严格限定在 body.pet-enrolling（仅新建档案生效，编辑已有档案保持完整表单页）
   ========================================================================== */

html body.pet-enrolling {
  --enroll-ink: var(--purr-ink, #262924);
  --enroll-muted: var(--purr-muted, #686b5e);
  --enroll-accent: var(--purr-accent, #404d3f);
  --enroll-line: var(--purr-line, #ddd8c8);
  --enroll-tint: var(--purr-tint, #e8eadf);
  --enroll-paper: var(--purr-surface, #f9f7ef);
  --enroll-white: #fffdf8;
  --enroll-error: #884137;
  --pe-peach: #f2be9f;
  --pe-gold: #f2d593;
  --pe-sage: #bfd4b7;
  --pe-lilac: #d3c2db;
  --pe-cream: #f4e6c8;
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-paper: cubic-bezier(0.22, 1, 0.36, 1);
  color: var(--enroll-ink);
  caret-color: var(--enroll-accent);
  background:
    radial-gradient(62% 44% at 12% 8%, rgba(242, 190, 159, 0.24) 0%, transparent 72%),
    radial-gradient(56% 42% at 92% 14%, rgba(191, 212, 183, 0.28) 0%, transparent 72%),
    radial-gradient(50% 44% at 74% 88%, rgba(211, 194, 219, 0.20) 0%, transparent 74%),
    var(--purr-bg, #f4f0e4) !important;
}

.pet-enrolling .app { background: transparent !important; }
.pet-enrolling .topbar,
.pet-enrolling .tabbar { display: none !important; }

.pet-enrolling .main {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100dvh;
  padding: max(14px, env(safe-area-inset-top)) 18px calc(28px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
}

.pet-enrolling #detail {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* ---- 顶部极简导航条（<  PURR  跳过） ---- */
.pet-enrolling #detail > .page-head {
  display: grid;
  grid-template-columns: 78px 1fr 78px;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  padding: 0;
}

.pet-enrolling #detail-title {
  margin: 0;
  text-align: center;
  font-family: var(--purr-font-ui, inherit);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--enroll-accent);
  line-height: 1;
}

.pet-enrolling #back,
.pet-enrolling .pe-skip {
  min-height: 40px;
  padding: 0 8px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--enroll-muted);
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  transition: background-color 150ms ease, color 150ms ease, transform 130ms ease;
}
.pet-enrolling #back { justify-content: flex-start; }
.pet-enrolling .pe-skip { justify-content: flex-end; }
.pet-enrolling #back:hover,
.pet-enrolling .pe-skip:hover { color: var(--enroll-ink); background: rgba(64, 77, 63, 0.06); }
.pet-enrolling #back:active,
.pet-enrolling .pe-skip:active { transform: scale(0.94); }

/* 极细 3 段进度条（原 ol.enroll-progress 视觉重塑） */
.pet-enrolling .enroll-progress {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin: 0 0 16px;
  padding: 0 4px;
  list-style: none;
}
.pet-enrolling .enroll-progress li {
  height: 4px;
  border-radius: 999px;
  background: rgba(64, 77, 63, 0.12);
  overflow: hidden;
  font-size: 0;
  color: transparent;
  position: relative;
}
.pet-enrolling .enroll-progress li::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--enroll-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 360ms var(--ease-paper);
}
.pet-enrolling .enroll-progress li[aria-current="step"]::after,
.pet-enrolling .enroll-progress li.complete::after {
  transform: scaleX(1);
}
.pet-enrolling .enroll-progress li[aria-current="step"]::after {
  opacity: 1;
}
.pet-enrolling .enroll-progress li.complete::after {
  opacity: 0.55;
}
.pet-enrolling .enroll-progress li > span { display: none; }

/* ---- 小管家眨眼头像 + 动态回应气泡 ---- */
.pe-guide {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  margin: 0 0 18px;
}
.pe-mascot {
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: 15px;
  background: var(--pe-sage);
  border: 1.5px solid rgba(81, 65, 56, 0.22);
  box-shadow: 0 8px 18px -10px rgba(64, 77, 63, 0.45);
  display: grid;
  place-items: center;
  transition: transform 280ms var(--ease-spring), background-color 260ms ease;
}
.pe-mascot svg { width: 32px; height: 32px; overflow: visible; }
.pe-mascot .pe-eye {
  transform-box: fill-box;
  transform-origin: center;
  animation: pe-blink 4.4s infinite;
}
.pe-mascot.is-happy {
  animation: pe-hop 420ms var(--ease-spring);
}
@keyframes pe-blink {
  0%, 92%, 100% { transform: scaleY(1); }
  95% { transform: scaleY(0.12); }
}
@keyframes pe-hop {
  0%   { transform: translateY(0) rotate(0deg) scale(1); }
  38%  { transform: translateY(-6px) rotate(-6deg) scale(1.08); }
  70%  { transform: translateY(1px) rotate(4deg) scale(0.97); }
  100% { transform: translateY(0) rotate(0deg) scale(1); }
}

.pe-bubble {
  flex: 1;
  min-width: 0;
  position: relative;
  background: var(--enroll-white);
  border: 1px solid rgba(221, 216, 200, 0.9);
  border-radius: 16px 16px 16px 6px;
  padding: 10px 14px;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--enroll-ink);
  box-shadow: 0 8px 22px -14px rgba(48, 43, 32, 0.24);
  transition: opacity 180ms ease, transform 220ms var(--ease-paper);
}
.pe-bubble.is-swap {
  animation: pe-bubble-pop 260ms var(--ease-paper);
}
@keyframes pe-bubble-pop {
  from { opacity: 0.45; transform: translateY(4px); }
  to   { opacity: 1; transform: none; }
}

/* ---- 主舞台容器：去掉沉重边框，让留白和焦点卡片呼吸 ---- */
.pet-enrolling #detail .enroll-sheet {
  flex: 1;
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.pet-enrolling .enroll-stage {
  display: flex;
  flex-direction: column;
  gap: 16px;
  animation: pe-stage-in 320ms var(--ease-paper);
}
.pet-enrolling .enroll-stage[hidden] { display: none !important; }
@keyframes pe-stage-in {
  from { opacity: 0; transform: translateX(16px); }
  to   { opacity: 1; transform: none; }
}

.pet-enrolling .enroll-stage-head {
  padding: 0;
  margin: 0 0 2px;
}
.pet-enrolling .enroll-stage-head h3 {
  margin: 0;
  font-family: var(--purr-font-display, "Songti SC", "STSong", serif);
  font-size: clamp(24px, 6.8vw, 29px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.24;
  color: var(--enroll-ink);
}
.pet-enrolling .enroll-stage-head p {
  margin: 6px 0 0;
  color: var(--enroll-muted);
  font-size: 13px;
}

/* 建档时隐藏底部老式文件夹外框区（建档完在首页直接展开体验，编辑页仍完整保留） */
.pet-enrolling #pfSec { display: none !important; }

/* ---- Step 1：名字输入框 + 弹跳性格字块小精灵 ---- */
.pet-enrolling .field { margin: 0; min-width: 0; }
.pet-enrolling .field label {
  display: block;
  margin-bottom: 6px;
  color: var(--enroll-muted);
  font-size: 12.5px;
  font-weight: 650;
}
.pet-enrolling .field label i { color: var(--enroll-accent); font-style: normal; }

.pet-enrolling .field :is(input, select, textarea) {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  border: 1.5px solid var(--enroll-line);
  border-radius: 16px;
  background: var(--enroll-white);
  color: var(--enroll-ink);
  font-size: 16px;
  font-family: inherit;
  box-shadow: 0 4px 12px -10px rgba(48, 43, 32, 0.25);
  transition: border-color 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}
.pet-enrolling #f-name {
  min-height: 54px;
  font-size: 18px;
  font-weight: 650;
  padding: 12px 16px;
  border-radius: 18px;
}
.pet-enrolling .field :is(input, select, textarea):focus {
  outline: none;
  border-color: var(--enroll-accent);
  box-shadow: 0 0 0 4px rgba(64, 77, 63, 0.11);
}
.pet-enrolling .field textarea { min-height: 70px; line-height: 1.5; resize: vertical; }

/* 弹跳字块小精灵容器 */
.pe-name-tiles {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  min-height: 62px;
  padding: 4px 2px 6px;
}
.pe-tile {
  position: relative;
  width: 48px;
  height: 52px;
  border-radius: 15px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1.5px solid rgba(81, 65, 56, 0.18);
  box-shadow: 0 8px 16px -10px rgba(64, 52, 36, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.65);
  transform: rotate(var(--pe-rot, 0deg));
  animation: pe-tile-pop 380ms var(--ease-spring) both;
  user-select: none;
}
.pe-tile.is-ghost {
  opacity: 0.42;
  border-style: dashed;
  box-shadow: none;
  animation: none;
}
.pe-tile-eyes {
  display: flex;
  gap: 5px;
  margin-bottom: 1px;
}
.pe-tile-eyes i {
  display: block;
  width: 3.5px;
  height: 5px;
  border-radius: 99px;
  background: #3d332c;
}
.pe-tile-char {
  font-size: 19px;
  font-weight: 800;
  line-height: 1.05;
  color: #2f2822;
}
@keyframes pe-tile-pop {
  0%   { opacity: 0; transform: translateY(14px) scale(0.55) rotate(0deg); }
  65%  { opacity: 1; transform: translateY(-4px) scale(1.08) rotate(var(--pe-rot, 0deg)); }
  100% { opacity: 1; transform: translateY(0) scale(1) rotate(var(--pe-rot, 0deg)); }
}

/* 证件照紧凑暖纸卡 */
.pet-enrolling .pet-detail .avatar-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 76px;
  margin: 0;
  padding: 12px 14px;
  border: 1.5px dashed var(--enroll-line);
  border-radius: 18px;
  background: rgba(255, 253, 248, 0.78);
}
.pet-enrolling #ava {
  display: grid;
  place-items: center;
  flex: none;
  width: 58px;
  height: 58px;
  border: 1.5px solid var(--enroll-line);
  border-radius: 16px;
  background: var(--enroll-tint);
  color: var(--enroll-accent);
  overflow: hidden;
  font-size: 28px;
  cursor: pointer;
  transition: transform 200ms var(--ease-spring);
}
.pet-enrolling #ava:active { transform: scale(0.92); }
.pet-enrolling #ava img { width: 100%; height: 100%; object-fit: cover; }

.pe-ava-quick {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
}
.pe-ava-dot {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  border: 1px solid var(--enroll-line);
  background: var(--enroll-white);
  font-size: 16px;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: transform 160ms var(--ease-spring), border-color 140ms ease;
}
.pe-ava-dot:active { transform: scale(0.88); }
.pe-ava-dot.on { border-color: var(--enroll-accent); background: var(--enroll-tint); }
.pet-enrolling .enroll-demo-photo {
  min-height: 32px;
  padding: 0 11px;
  border-radius: 999px;
  border: 1px solid var(--enroll-line);
  background: var(--enroll-white);
  color: var(--enroll-accent);
  font: inherit;
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
}
.pet-enrolling .enroll-avatar-copy label {
  display: block;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--enroll-ink);
  cursor: pointer;
}
.pet-enrolling .enroll-avatar-copy [role="status"] {
  display: block;
  margin-top: 4px;
  font-size: 11.5px;
  color: var(--enroll-accent);
}

/* ---- Step 2：猫猫 / 狗狗两大类选择 + 右侧弧形品种滚轮 ---- */
.pe-sp-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.pe-sp-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 13px;
  border-radius: 18px;
  border: 1.5px solid var(--enroll-line);
  background: rgba(255, 253, 248, 0.85);
  color: var(--enroll-ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 180ms ease, background-color 180ms ease, transform 200ms var(--ease-spring), box-shadow 180ms ease;
}
.pe-sp-btn:active { transform: scale(0.96); }
.pe-sp-btn.on {
  border-color: var(--enroll-accent);
  background: var(--enroll-white);
  box-shadow: 0 10px 22px -16px rgba(64, 77, 63, 0.55), 0 0 0 3px rgba(64, 77, 63, 0.09);
}
.pe-sp-ico {
  width: 38px;
  height: 38px;
  border-radius: 13px;
  background: var(--enroll-paper);
  display: grid;
  place-items: center;
  font-size: 20px;
  flex: none;
  transition: transform 240ms var(--ease-spring), background-color 180ms ease;
}
.pe-sp-btn.on .pe-sp-ico {
  background: var(--pe-cream);
  transform: scale(1.06) rotate(-4deg);
}
.pe-sp-txt b {
  display: block;
  font-size: 15px;
  font-weight: 760;
  line-height: 1.2;
}
.pe-sp-txt small {
  display: block;
  font-size: 11px;
  color: var(--enroll-muted);
  margin-top: 2px;
}

.pe-arc-stage {
  position: relative;
  height: 236px;
  border-radius: 22px;
  background: rgba(255, 253, 248, 0.72);
  border: 1px solid rgba(221, 216, 200, 0.85);
  overflow: hidden;
  touch-action: pan-x;
  user-select: none;
  cursor: grab;
}
.pe-arc-stage:active { cursor: grabbing; }
.pe-arc-svg {
  position: absolute;
  right: -12px;
  top: 0;
  width: 140px;
  height: 100%;
  pointer-events: none;
}
.pe-arc-track {
  fill: none;
  stroke: rgba(64, 77, 63, 0.16);
  stroke-width: 1.5;
  stroke-dasharray: 3 5;
}
.pe-arc-thumb {
  fill: var(--enroll-accent);
  transition: transform 240ms var(--ease-spring);
}
.pe-arc-items {
  position: relative;
  width: 100%;
  height: 100%;
}
.pe-arc-item {
  position: absolute;
  left: 14px;
  right: 54px;
  top: 50%;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  border: 0;
  background: transparent;
  padding: 5px 10px;
  font: inherit;
  color: var(--enroll-muted);
  cursor: pointer;
  transform-origin: right center;
  transition: transform 300ms var(--ease-spring), opacity 220ms ease, color 180ms ease;
}
.pe-arc-item .pe-arc-sub {
  font-size: 11px;
  color: var(--enroll-muted);
  opacity: 0;
  transform: translateX(6px);
  transition: opacity 200ms ease, transform 220ms var(--ease-paper);
}
.pe-arc-item .pe-arc-label {
  font-size: 16px;
  font-weight: 600;
  transition: font-size 220ms var(--ease-paper), color 200ms ease;
}
.pe-arc-item .pe-arc-dot {
  width: 30px;
  height: 30px;
  border-radius: 11px;
  background: var(--enroll-paper);
  border: 1px solid var(--enroll-line);
  display: grid;
  place-items: center;
  font-size: 14px;
  flex: none;
  transition: transform 240ms var(--ease-spring), background-color 200ms ease, border-color 200ms ease;
}
.pe-arc-item.is-active {
  color: var(--enroll-ink);
}
.pe-arc-item.is-active .pe-arc-sub {
  opacity: 1;
  transform: none;
}
.pe-arc-item.is-active .pe-arc-label {
  font-size: 19px;
  font-weight: 800;
  color: var(--enroll-ink);
}
.pe-arc-item.is-active .pe-arc-dot {
  background: var(--pe-cream);
  border-color: var(--enroll-accent);
  transform: scale(1.14);
  box-shadow: 0 6px 14px -8px rgba(64, 77, 63, 0.5);
}
.pe-arc-hint {
  position: absolute;
  left: 16px;
  top: 12px;
  font-size: 11px;
  color: var(--enroll-muted);
  pointer-events: none;
}

/* 快捷品种胶囊 + 性别药丸 + 年龄行 */
.pe-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.pe-chip {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--enroll-line);
  background: var(--enroll-white);
  color: var(--enroll-ink);
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 150ms var(--ease-spring), background-color 150ms ease, border-color 150ms ease, color 150ms ease;
}
.pe-chip:active { transform: scale(0.93); }
.pe-chip.on {
  background: var(--enroll-accent);
  border-color: var(--enroll-accent);
  color: #fffaf2;
}

.pe-step2-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.pe-sex-pills {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.pe-sex-btn {
  min-height: 46px;
  border-radius: 14px;
  border: 1.5px solid var(--enroll-line);
  background: var(--enroll-white);
  color: var(--enroll-ink);
  font: inherit;
  font-size: 14px;
  font-weight: 680;
  cursor: pointer;
  transition: transform 160ms var(--ease-spring), background-color 160ms ease, border-color 160ms ease;
}
.pe-sex-btn:active { transform: scale(0.95); }
.pe-sex-btn.on {
  border-color: var(--enroll-accent);
  background: var(--enroll-tint);
  color: var(--enroll-accent);
}
.pet-enrolling .pe-hide-native { display: none !important; }
.pet-enrolling .age-row { display: flex; gap: 6px; }
.pet-enrolling .age-row select { flex: 0 0 74px; width: 74px; padding: 8px 6px; }
.pet-enrolling .hint { display: block; margin-top: 4px; color: var(--enroll-muted); font-size: 11.5px; }
.pet-enrolling .hint:empty { display: none; }

/* ---- Step 3：沉睡 → 唤醒照护开关清单（Adapted from Letterly Waking Mascots） ---- */
.pe-awake-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  align-self: flex-start;
  padding: 5px 13px;
  border-radius: 999px;
  background: var(--enroll-ink);
  color: #fffaf2;
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  transition: transform 240ms var(--ease-spring);
}
.pe-awake-pill.bump { animation: pe-pill-bump 320ms var(--ease-spring); }
@keyframes pe-pill-bump {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.08); }
  100% { transform: scale(1); }
}
.pe-awake-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #8cc982;
  box-shadow: 0 0 0 3px rgba(140, 201, 130, 0.25);
}

.pe-wake-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.pe-wake-card {
  border-radius: 18px;
  border: 1.5px solid var(--enroll-line);
  background: rgba(255, 253, 248, 0.72);
  overflow: hidden;
  transition: border-color 220ms ease, background-color 220ms ease, box-shadow 220ms ease;
}
.pe-wake-card.is-awake {
  border-color: rgba(64, 77, 63, 0.42);
  background: var(--enroll-white);
  box-shadow: 0 10px 24px -18px rgba(48, 43, 32, 0.32);
}
.pe-wake-head {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 0;
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.pe-wake-badge {
  width: 40px;
  height: 40px;
  border-radius: 13px;
  flex: none;
  display: grid;
  place-items: center;
  font-size: 19px;
  background: #e9e6dc;
  filter: grayscale(1) opacity(0.65);
  transform: scale(0.94);
  transition: filter 260ms ease, background-color 260ms ease, transform 320ms var(--ease-spring);
}
.pe-wake-card.is-awake .pe-wake-badge {
  background: var(--pe-badge-bg, var(--pe-cream));
  filter: none;
  transform: scale(1.04) rotate(-3deg);
}
.pe-wake-txt { flex: 1; min-width: 0; }
.pe-wake-txt b {
  display: block;
  font-size: 14.5px;
  font-weight: 720;
  color: var(--enroll-ink);
}
.pe-wake-txt small {
  display: block;
  font-size: 12px;
  color: var(--enroll-muted);
  transition: color 200ms ease;
}
.pe-wake-card.is-awake .pe-wake-txt small {
  color: var(--enroll-accent);
  font-weight: 600;
}
.pe-wake-chk {
  width: 24px;
  height: 24px;
  border-radius: 8px;
  border: 1.5px solid var(--enroll-line);
  background: var(--enroll-paper);
  display: grid;
  place-items: center;
  flex: none;
  color: transparent;
  transition: background-color 200ms ease, border-color 200ms ease, transform 240ms var(--ease-spring), color 180ms ease;
}
.pe-wake-card.is-awake .pe-wake-chk {
  background: var(--enroll-accent);
  border-color: var(--enroll-accent);
  color: #fffaf2;
  transform: scale(1.06);
}
.pe-wake-chk svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }

.pet-enrolling .pe-wake-body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 280ms var(--ease-paper);
}
.pet-enrolling .pe-wake-card.is-awake .pe-wake-body {
  grid-template-rows: 1fr;
}
.pet-enrolling .pe-wake-body-in {
  overflow: hidden;
  padding: 0 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.pet-enrolling .pe-wake-card.is-awake .pe-wake-body-in {
  padding: 12px 14px 14px;
  border-top: 1px dashed rgba(221, 216, 200, 0.85);
}
body:not(.pet-enrolling) .pe-wake-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
body:not(.pet-enrolling) .pe-wake-card {
  border: 0;
  background: transparent;
  box-shadow: none;
  border-radius: 0;
}
body:not(.pet-enrolling) .pe-wake-body-in {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 0;
}

/* ---- 底部操作胶囊 ---- */
.pet-enrolling .enroll-actions {
  margin-top: auto;
  padding-top: 22px;
  display: flex;
  gap: 10px;
}
.pet-enrolling .enroll-actions :is(button, #save) {
  min-height: 52px;
  margin: 0;
  padding: 0 18px;
  border-radius: 999px;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 160ms var(--ease-spring), background-color 180ms ease, opacity 180ms ease;
}
.pet-enrolling .enroll-actions :is(button, #save):active:not(:disabled) {
  transform: scale(0.97);
}
.pet-enrolling .enroll-actions :is(.enroll-primary, #save) {
  flex: 1;
  border: 0;
  background: var(--enroll-accent);
  color: #fffaf2;
  box-shadow: 0 10px 22px -12px rgba(64, 77, 63, 0.65);
}
.pet-enrolling .enroll-actions :is(.enroll-primary, #save):disabled {
  background: #dedad0;
  color: #97988d;
  box-shadow: none;
  cursor: not-allowed;
}
.pet-enrolling .enroll-prev {
  flex: none;
  min-width: 88px;
  border: 1.5px solid var(--enroll-line);
  background: var(--enroll-white);
  color: var(--enroll-ink);
}

.enroll-error { margin: 10px 0 0; color: var(--enroll-error, #884137); font-size: 13px; text-align: center; }

/* ---- 收官庆祝弹层：暖纸礼花 + 新建身份卡预览 ---- */
.pe-celebrate {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 18px;
  background: rgba(244, 240, 228, 0.92);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  animation: pe-fade-in 260ms ease both;
}
.pe-celebrate[hidden] { display: none !important; }
@keyframes pe-fade-in { from { opacity: 0; } to { opacity: 1; } }

.pe-confetti {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.pe-petal {
  position: absolute;
  top: -16px;
  width: 10px;
  height: 14px;
  border-radius: 3px;
  opacity: 0.92;
  animation: pe-fall var(--dur, 2.2s) cubic-bezier(0.2, 0.6, 0.4, 1) var(--delay, 0s) forwards;
}
@keyframes pe-fall {
  0%   { transform: translate3d(0, 0, 0) rotate(0deg); opacity: 1; }
  100% { transform: translate3d(var(--dx, 40px), 105vh, 0) rotate(var(--rot, 520deg)); opacity: 0; }
}

.pe-cel-card {
  position: relative;
  width: 100%;
  max-width: 360px;
  background: var(--enroll-white);
  border: 1px solid var(--enroll-line);
  border-radius: 26px;
  padding: 24px 20px 20px;
  text-align: center;
  box-shadow: 0 24px 54px -24px rgba(42, 36, 26, 0.32);
  animation: pe-cel-pop 420ms var(--ease-spring) both;
}
@keyframes pe-cel-pop {
  from { opacity: 0; transform: translateY(20px) scale(0.92); }
  to   { opacity: 1; transform: none; }
}
.pe-cel-ava {
  width: 78px;
  height: 78px;
  margin: 0 auto 12px;
  border-radius: 24px;
  background: var(--pe-cream);
  border: 2px solid var(--enroll-line);
  display: grid;
  place-items: center;
  font-size: 38px;
  overflow: hidden;
  box-shadow: 0 10px 22px -12px rgba(64, 77, 63, 0.35);
}
.pe-cel-ava img { width: 100%; height: 100%; object-fit: cover; }
.pe-cel-card h3 {
  margin: 0;
  font-family: var(--purr-font-display, "Songti SC", serif);
  font-size: 24px;
  font-weight: 700;
  color: var(--enroll-ink);
}
.pe-cel-sub {
  margin: 6px 0 14px;
  font-size: 13px;
  color: var(--enroll-muted);
}
.pe-cel-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin-bottom: 18px;
}
.pe-cel-tags span {
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--enroll-paper);
  border: 1px solid var(--enroll-line);
  font-size: 12px;
  font-weight: 600;
  color: var(--enroll-ink);
}
.pe-cel-acts {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.pe-cel-primary, .pe-cel-secondary {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border-radius: 999px;
  text-decoration: none;
  font: inherit;
  font-size: 14.5px;
  font-weight: 700;
}
.pe-cel-primary {
  background: var(--enroll-accent);
  color: #fffaf2;
  box-shadow: 0 10px 20px -12px rgba(64, 77, 63, 0.6);
}
.pe-cel-secondary {
  background: var(--enroll-paper);
  border: 1px solid var(--enroll-line);
  color: var(--enroll-ink);
}

@media (prefers-reduced-motion: reduce) {
  .pet-enrolling .enroll-stage,
  .pe-tile,
  .pe-mascot.is-happy,
  .pe-mascot .pe-eye,
  .pe-bubble.is-swap,
  .pe-cel-card,
  .pe-petal { animation: none !important; transition: none !important; }
}
