/* ============================================================
   陪跑 正式版骨架 · 星宠页（页面 8）
   视觉：demo/08_星宠.html 提取（金粉萌宠主题 + 玻璃卡片 + 进化链）
   作用域：.pt 整页固定层（自带滚动 + 自带 :root 变量），不影响主页 body 布局
   交互动画 keyframes 全部 pt 前缀，避免污染全局动画名
   ============================================================ */
.pt {
  --main: #e05570;
  --main-deep: #d6456d;
  --ink: #5a3a42;
  --ink-soft: #a87f8b;
  --gold: #a8792a;
  --gold-deep: #8a6420;
  --gold-line: #e0b36a;
  --sun: #ffc965;
  --amber: #ff9f43;
  position: fixed; inset: 0; overflow-y: auto; -webkit-overflow-scrolling: touch;
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(85% 62% at 8% 4%, rgba(255,255,255,.62), transparent 60%),
    radial-gradient(66% 54% at 92% 6%, rgba(255,214,156,.34), transparent 66%),
    radial-gradient(72% 58% at 50% 110%, rgba(255,196,220,.26), transparent 62%),
    #fff6ec;
}
.pt, .pt *, .pt *::before, .pt *::after { box-sizing: border-box; }
.pt button, .pt input { font-family: inherit; }

/* ---- 顶栏 ---- */
.pt-top { max-width: 900px; margin: 0 auto; padding: 22px 20px 6px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.pt-logo { font-size: 22px; font-weight: 900; color: var(--main-deep); letter-spacing: 2px; }
.pt-logo .heart { font-size: 13px; }
.pt-title { font-size: 15px; font-weight: 800; color: var(--ink); }
.pt-back { margin-left: auto; font-size: 12.5px; color: var(--main-deep); font-weight: 700;
  background: rgba(255,255,255,.85); border: 1px solid rgba(224,85,112,.35); padding: 7px 16px;
  border-radius: 999px; cursor: pointer; }
.pt-back:hover { background: #fff0f3; }

/* ---- 内容 ---- */
.pt-wrap { max-width: 900px; margin: 0 auto; padding: 16px 20px 60px; }

.pt-card { background: rgba(255,255,255,.86); border: 1px solid rgba(255,255,255,.78);
  border-radius: 26px; padding: 20px 24px 22px; margin-bottom: 16px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 12px 34px rgba(224,85,112,.09);
  backdrop-filter: blur(16px) saturate(1.35); -webkit-backdrop-filter: blur(16px) saturate(1.35); }
.pt-c-t { font-size: 14px; font-weight: 800; color: var(--main-deep); letter-spacing: 1px;
  display: flex; align-items: center; gap: 6px; margin-bottom: 12px; flex-wrap: wrap; }
.pt-c-t .pt-hint { margin-left: auto; font-size: 11.5px; color: var(--ink-soft); font-weight: 400; letter-spacing: 0; line-height: 1.6; text-align: right; }

/* ---- 星宠主展示 ---- */
.pt-stage { text-align: center; padding: 6px 0 2px; }
.pt-circle { position: relative; width: min(210px, 52vw); aspect-ratio: 1; margin: 0 auto;
  background: radial-gradient(circle at 50% 36%, #fff8e6, #ffe6bd);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  box-shadow: inset 0 0 42px rgba(240,168,60,.28), 0 12px 32px rgba(240,168,60,.2);
  cursor: pointer; user-select: none; }
.pt-face { font-size: clamp(76px, 15vh, 118px); line-height: 1;
  filter: drop-shadow(0 8px 10px rgba(160,110,30,.28)); transition: transform .18s; }
.pt-face { display: block; width: 100%; height: 100%; position: relative; }
/* 形态徽章：头像右下角小牌，一眼看出「第几形态」——不依赖图片加载（em 随头像字号缩放） */
.pt-face-e { position: absolute; right: 6%; bottom: 6%; z-index: 2; pointer-events: none;
  font-size: .3em; line-height: 1;
  padding: .06em .1em; border-radius: 999px; background: rgba(255,255,255,.86);
  box-shadow: 0 0 0 1px rgba(240,168,60,.35), 0 3px 9px rgba(160,110,30,.28); }
.pt-pet-art { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 50%;
  transform-origin: 50% 88%; user-select: none; -webkit-user-drag: none; }
.pt-face-contract { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.pt-stage-thumb { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.pt-ui-icon { width: 1.15em; height: 1.15em; flex: none; }
.pt-main-art { animation: ptStageBreath 4.2s cubic-bezier(.45,0,.55,1) infinite; }
.pt-pet-stage-0.pt-main-art { animation-name: ptEggBreath; }
.pt-pet-stage-1.pt-main-art { animation-name: ptHatchSettle; animation-duration: 4.8s; }
.pt-pet-stage-2.pt-main-art { animation-name: ptReaderBreath; animation-duration: 5.2s; }
.pt-circle.pt-touch .pt-pet-stage-0 { animation: ptEggReact .58s cubic-bezier(.23,1,.32,1); }
.pt-circle.pt-touch .pt-pet-stage-1 { animation: ptHatchReact .62s cubic-bezier(.23,1,.32,1); }
.pt-circle.pt-touch .pt-pet-stage-2 { animation: ptReaderReact .62s cubic-bezier(.23,1,.32,1); }
.pt-circle.pt-touch .pt-pet-stage-3,
.pt-circle.pt-touch .pt-pet-stage-4 { animation: ptWobble .6s ease; }
@keyframes ptWobble { 0%,100% { transform: rotate(0); } 20% { transform: rotate(-10deg) scale(1.08); }
  40% { transform: rotate(9deg); } 60% { transform: rotate(-6deg); } 80% { transform: rotate(4deg); } }
@keyframes ptStageBreath { 0%,100% { transform: scale(1); } 50% { transform: scale(1.008,.992); } }
@keyframes ptEggBreath { 0%,100% { transform: scale(1); } 45% { transform: scale(1.012,.988); } 55% { transform: scale(.997,1.004); } }
@keyframes ptHatchSettle { 0%,100% { transform: rotate(0deg) scale(1); } 48% { transform: rotate(-.7deg) scale(1.006,.994); } 54% { transform: rotate(.35deg) scale(1); } }
@keyframes ptReaderBreath { 0%,100% { transform: scale(1); } 50% { transform: scale(1.006,.994); } }
@keyframes ptEggReact { 0%,100% { transform: rotate(0) scale(1); } 30% { transform: rotate(-2.4deg) scale(1.025,.975); } 62% { transform: rotate(1.5deg) scale(.994,1.008); } }
@keyframes ptHatchReact { 0%,100% { transform: rotate(0) scale(1); } 34% { transform: rotate(-3deg) scale(1.018); } 68% { transform: rotate(1.4deg) scale(1.006); } }
@keyframes ptReaderReact { 0%,100% { transform: scale(1); } 38% { transform: scale(.985,1.018); } 68% { transform: scale(1.008,.994); } }
/* 低龄档：闲时轻晃（字少动画多） */
.pt-low .pt-face { animation: ptIdle 3.6s ease-in-out infinite; }
.pt-low .pt-face { animation: none; }
@keyframes ptIdle { 0%,100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-5px) rotate(2deg); } }
.pt-sticker { position: absolute; font-size: 26px; animation: ptStar .3s ease; z-index: 5;
  pointer-events: none; filter: drop-shadow(0 2px 3px rgba(0,0,0,.22)); line-height: 1; }
@keyframes ptStar { from { transform: scale(0) rotate(-32deg); } to { transform: scale(1) rotate(0); } }
.pt-heart { position: absolute; font-size: 19px; animation: ptFly 1.15s ease-out forwards;
  pointer-events: none; line-height: 1; }
@keyframes ptFly { from { opacity: 1; transform: translateY(0) scale(.55); }
  to { opacity: 0; transform: translateY(-74px) scale(1.3); } }

.pt-name-line { margin-top: 14px; display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; }
.pt-nm { font-size: 26px; font-weight: 900; color: var(--ink); }
.pt-nm.pt-noname { font-size: 19px; font-weight: 700; color: #c9a0ab; }
.pt-rename { border: none; background: #ffe3ea; color: #c26a83; border-radius: 10px; padding: 3px 10px;
  font-size: 12px; font-weight: 800; cursor: pointer; display: inline-flex; align-items: center; gap: 5px; }
.pt-rename:hover { background: var(--main); color: #fff; }
.pt-rename.first { background: var(--leaf); color: #fff;
  padding: 9px 20px; font-size: 14px; border-radius: 999px;
  box-shadow: 0 5px 14px rgba(240,168,60,.35); }
.pt-rename.first:hover { filter: brightness(1.07); }
.pt-status { font-size: 13px; color: var(--ink-soft); margin-top: 8px; line-height: 1.7; }
.pt-stagehint { font-size: 11.5px; color: #c9a0ab; margin-top: 10px; line-height: 1.7; }

.pt-act-row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 16px; }
.pt-act-row button { border: 1.5px solid rgba(224,85,112,.22); background: rgba(255,255,255,.92);
  border-radius: 999px; padding: 9px 18px; font-size: 13px; font-weight: 800; cursor: pointer;
  color: var(--ink); transition: all .15s; }
.pt-act-row button:hover { background: #fff0f3; border-color: var(--main); }
.pt-nofeed { font-size: 11px; color: #c9a0ab; text-align: center; margin-top: 8px; line-height: 1.6; }

/* ---- 进化链 ---- */
.pt-evo-line { display: flex; align-items: flex-start; justify-content: center; gap: 2px;
  flex-wrap: wrap; margin: 4px 0 10px; }
.pt-node { display: flex; flex-direction: column; align-items: center; width: 102px;
  padding: 10px 4px; border-radius: 16px; transition: all .25s; }
.pt-node .pt-e { font-size: 38px; line-height: 1.2; filter: grayscale(.65); opacity: .55; transition: all .3s; }
.pt-node .pt-e:has(.pt-evo-art) { width: 42px; height: 42px; }
.pt-evo-art { border-radius: 12px; object-fit: cover; }
.pt-ov-ic { display: block; width: 72px; height: 72px; margin: 0 auto; border-radius: 18px; overflow: hidden; }
.pt-food-lbl { display: inline-flex; align-items: center; gap: 7px; }
.pt-fallback-art { width: 88px; height: 88px; margin: 0 auto; border-radius: 22px; overflow: hidden; }

#app .pp-mpet .stage-icon { overflow: hidden; padding: 0; }
#app .pp-mpet .stage-icon .pt-stage-thumb { border-radius: .8rem; }
#app .pp-mpet .name-row button { display: inline-flex; width: auto; min-width: 44px; padding: 0 10px; align-items: center; gap: 6px; }
#app .pp-mpet .food span { display: inline-flex; align-items: center; justify-content: center; gap: 4px; }
#app .pp-mpet .food .pt-ui-icon { width: 20px; height: 20px; color: #8a6420; }
#app .pp-mpet .rename-ic { display: block; width: 68px; height: 68px; margin: 0 auto 10px; border-radius: 16px; overflow: hidden; }
#app .pp-mpet .interactions { display: grid !important; grid-template-columns: repeat(2,minmax(0,1fr)); }
#app .pp-mpet .feed { display: grid !important; }
.pt-node .pt-n { font-size: 12px; font-weight: 800; color: var(--ink-soft); margin-top: 5px; white-space: nowrap; }
.pt-node .pt-s { font-size: 10px; color: #d8b6bf; margin-top: 2px; white-space: nowrap; }
.pt-node.done .pt-e { filter: none; opacity: 1; }
.pt-node.done .pt-n { color: var(--ink); }
.pt-node.cur { background: #fff4e2; outline: 2px solid #ffd9a0; box-shadow: 0 4px 16px rgba(240,168,60,.28); }
.pt-node.cur .pt-e { transform: scale(1.16); filter: none; opacity: 1; }
.pt-node.cur .pt-n { color: var(--gold); font-size: 13px; }
.pt-node.next .pt-e { filter: grayscale(.8); opacity: .45; }
.pt-arrow { font-size: 20px; color: #f0c3cd; margin-top: 36px; flex: none; line-height: 1; }

.pt-star-area { margin-top: 10px; text-align: center; }
.pt-tip { font-size: 13.5px; color: var(--gold); font-weight: 800; margin-bottom: 6px; line-height: 1.7; }
.pt-bar { max-width: 380px; height: 13px; background: #f7e7c9; border-radius: 8px;
  overflow: hidden; margin: 0 auto; }
.pt-bar i { display: block; height: 100%; width: 0;
  background: var(--amber); border-radius: 8px;
  transition: width .6s ease; }
.pt-line { font-size: 11.5px; color: var(--ink-soft); margin-top: 8px; line-height: 1.7; }

/* ---- 喂星规则 ---- */
.pt-rule { background: rgba(255,255,255,.62); border: 1px solid rgba(255,255,255,.9);
  border-radius: 18px; padding: 14px 18px; font-size: 13.5px; color: var(--ink);
  line-height: 2.1; }
.pt-rule b { color: var(--gold); }

/* ---- 起名弹层（进化大夸由喂星端触发，不在本页） ---- */
.pt-ov { position: fixed; inset: 0; z-index: 960; display: none; align-items: center;
  justify-content: center; background: rgba(70,35,45,.42); }
.pt-ov.show { display: flex; }
.pt-ov-card { width: min(92%, 520px); text-align: center;
  background: var(--cream);
  border-radius: 28px; padding: 28px 26px 22px;
  box-shadow: 0 22px 60px rgba(90,40,55,.3); animation: ptPop .32s ease; }
@keyframes ptPop { from { opacity: 0; transform: translateY(14px) scale(.96); } to { opacity: 1; transform: none; } }
.pt-ov-ic { font-size: 54px; display: inline-block; animation: ptBounce 1.15s ease infinite; line-height: 1; }
@keyframes ptBounce { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.pt-ov-card h2 { font-size: 24px; color: var(--gold); margin: 10px 0 8px; font-weight: 900; }
.pt-ov-sub { font-size: 13.5px; color: var(--gold-deep); line-height: 1.9; font-weight: 600; margin-bottom: 12px; }
.pt-name-row { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.pt-name-row input { border: 1.5px dashed var(--gold-line); background: #fff; border-radius: 12px;
  padding: 9px 14px; font-size: 15px; outline: none; width: 190px; text-align: center; color: var(--ink); }
.pt-name-row input:focus { border-style: solid; }
.pt-name-row button { border: none; background: #e8a33d; color: #fff; border-radius: 12px;
  padding: 0 20px; font-weight: 800; cursor: pointer; }
.pt-name-row button:hover { filter: brightness(1.06); }
.pt-ov-msg { font-size: 11.5px; color: #c26a83; min-height: 16px; margin-top: 8px; font-weight: 600; }
.pt-ov-x { margin-top: 10px; border: none; background: none; font-size: 12.5px;
  color: #b08a94; cursor: pointer; font-weight: 600; padding: 6px 10px; border-radius: 8px; }
.pt-ov-x:hover { color: var(--main-deep); background: rgba(255,255,255,.6); }

/* ---- 窄屏 ---- */
@media (max-width: 640px) {
  .pt-node { width: 82px; }
  .pt-node .pt-e { font-size: 30px; }
  .pt-arrow { margin-top: 28px; }
  .pt-card { padding: 16px 16px 18px; }
}

@media (prefers-reduced-motion: reduce) {
  .pt-main-art { animation: none !important; }
  .pt-circle.pt-touch .pt-pet-art { animation: none !important; }
}
