.purr-page-create:has(.purr-studio) > .app > .topbar { display: none; }

.purr-studio {
  --studio-line: #ded3c0;
  --studio-paper: #fbf8ef;
  --studio-soft: #e3e6d6;
  max-width: 530px;
  margin-inline: auto;
  padding-top: max(22px, env(safe-area-inset-top));
  color: var(--purr-ink);
}

.studio-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; }
.purr-studio h1 { margin: 0; font-size: clamp(28px, 8vw, 38px); font-weight: 800; line-height: 1.14; letter-spacing: -.045em; }
.studio-link { display: inline-flex; align-items: center; gap: 5px; min-height: 44px; color: #43523d; font-size: 13px; font-weight: 730; text-decoration: none; white-space: nowrap; }
.studio-link svg { width: 18px; height: 18px; }
.studio-online { margin-top: 8px; }
.studio-pet { position: relative; display: flex; min-height: 54px; align-items: center; gap: 10px; margin: 0 0 24px; padding: 6px 12px 6px 8px; border: 1px solid var(--studio-line); border-radius: 16px; background: #fffdf6b8; }
.studio-avatar { display: grid; place-items: center; flex: none; width: 38px; height: 38px; border-radius: 50%; overflow: hidden; background: var(--studio-soft); color: #5a614e; }
.studio-avatar img { width: 100%; height: 100%; object-fit: cover; }
.studio-avatar svg { width: 20px; }
.studio-pet-caption { min-width: 0; line-height: 1.35; }
.studio-pet-caption strong, .studio-pet-caption small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.studio-pet-caption small { color: var(--purr-muted); font-size: 11px; }
.studio-pet select { position: absolute; inset: 0; width: 100%; cursor: pointer; opacity: 0; }
.studio-pet:focus-within { outline: 2px solid var(--purr-accent); outline-offset: 2px; }
.studio-chevron { margin-left: auto; color: var(--purr-muted); }
.studio-category-title { margin: 0 0 9px; font-size: 17px; }
.studio-categories { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
.studio-category { position: relative; display: flex; flex-direction: column; align-items: start; justify-content: end; min-height: 145px; padding: 12px; overflow: hidden; background: #e9dfcf; border: 1px solid #a1795538; border-radius: 21px; color: #3b3229; text-decoration: none; transition: transform .2s, box-shadow .2s; }
.studio-category strong, .studio-category small { position: relative; display: block; }
.studio-category strong { font-size: 19px; font-weight: 780; }
.studio-category small { margin-top: 3px; color: #65574a; font-size: 12px; }
.studio-category img { position: absolute; object-fit: contain; pointer-events: none; }
.studio-pack { grid-column: 1 / -1; min-height: 181px; padding: 16px; background: radial-gradient(ellipse at 70% 17%, #fff3e3, transparent 63%), #efd5bc; }
.studio-pack strong { font-size: 28px; }
.studio-pack img { top: 6px; right: 5%; width: 46%; height: 104%; transform: rotate(9deg); filter: drop-shadow(0 5px 5px #51371c36); }
.studio-go { display: grid; place-items: center; width: 31px; height: 31px; margin-top: 9px; border-radius: 50%; background: #fff5e7; }
.studio-avatar-card { background: #e0e6d5; }
.studio-avatar-card img { top: 13px; left: 15px; width: 56px; height: 56px; border: 3px solid transparent; border-radius: 17px; box-shadow: 0 3px 6px #5446323b; transform: rotate(-8deg); object-fit: cover; }
.studio-sticker img { top: 10px; left: 12px; width: 67px; height: 66px; transform: rotate(7deg); filter: drop-shadow(0 3px 4px #51371c40); }
.studio-tail { position: absolute; bottom: 22px; right: 13px; }
.studio-flow-top { display: grid; grid-template-columns: 1fr auto 1fr; margin-bottom: 8px; font-weight: 750; }
.studio-flow-top a:last-child { justify-self: end; }
.studio-steps { display: flex; gap: 6px; margin: 0 0 22px; padding: 0; list-style: none; }
.studio-steps li { flex: 1; padding: 6px 0; border-bottom: 2px solid var(--studio-line); color: var(--purr-muted); font-size: 12px; text-align: center; }
.studio-steps li[aria-current] { border-color: var(--purr-accent); color: var(--purr-accent); font-weight: 750; }
.studio-help { margin: 7px 0 16px; color: var(--purr-muted); font-size: 14px; }
.studio-styles { display: grid; gap: 8px; margin-block: 16px; }
.studio-style { display: grid; grid-template-columns: 53px 1fr 20px; align-items: center; gap: 11px; min-height: 66px; padding: 6px 12px 6px 6px; border: 1px solid var(--studio-line); border-radius: 14px; background: var(--studio-paper); color: inherit; cursor: pointer; font: inherit; text-align: left; }
.studio-style[aria-pressed="true"] { border-color: #84947b; background: #edf0e4; }
.studio-style img { width: 53px; height: 53px; object-fit: cover; border-radius: 9px; background: var(--studio-soft); }
/* 贴纸 · 小情绪：透明底抠图封面，不加方形底框 */
.purr-studio[data-piece="sticker"] .studio-style { grid-template-columns: 58px 1fr 20px; }
.purr-studio[data-piece="sticker"] .studio-style img { width: 58px; height: 58px; object-fit: contain; background: transparent; border-radius: 0; }
.studio-style strong, .studio-style small { display: block; }
.studio-style small { margin-top: 2px; color: var(--purr-muted); font-size: 12px; }
.studio-style[aria-pressed="true"]::after { content: "✓"; color: var(--purr-accent); font-weight: 750; }
.studio-art { display: grid; align-content: center; justify-items: center; min-height: 255px; margin: 0 0 12px; padding: 13px; border: 1px solid var(--studio-line); border-radius: 22px; background: var(--studio-paper); }
.studio-art img { display: block; max-width: 100%; max-height: min(40vh, 310px); object-fit: contain; border-radius: 13px; }
/* 这条棋盘格只留给「生成结果」页；小情绪样片预览已换成下面的层叠卡册，不再用棋盘格底 */
.purr-studio[data-piece="sticker"] .studio-art {
  background-color: #faf7ef;
  background-image: conic-gradient(#ece6da 25%, transparent 0 50%, #ece6da 0 75%, transparent 0);
  background-size: 20px 20px;
}
/* 贴纸 · 小情绪样片：6 张去水印样片「填满整张卡」的层叠卡册（不再是缩在白卡中间的贴纸）。
   容器不加背景/边框/裁切，页面底色完全沿用 purr-shell 原有的浅米色拉丝纸。 */
.mood-deck { position: relative; height: 348px; margin: 14px 0 0; overflow: visible; cursor: pointer; touch-action: pan-y; user-select: none; }
.mood-card { position: absolute; left: 50%; margin-left: -120px; top: 14px; width: 240px; height: 286px;
  border-radius: 24px; background: var(--studio-paper); border: 1px solid var(--studio-line);
  display: flex; align-items: center; justify-content: center; transform-origin: 50% 55%;
  overflow: hidden; padding: 0;
  box-shadow: 0 2px 6px #1e1e220d, 0 18px 38px #1e1e2221;
  transition: transform .46s cubic-bezier(.22,.9,.24,1), opacity .36s ease, box-shadow .36s ease; }
.mood-card.focus { box-shadow: 0 3px 8px #1e1e220d, 0 26px 54px #1e1e2233; }
.mood-card img { display: block; width: 100%; height: 100%; object-fit: cover; pointer-events: none;
  transition: opacity .22s ease; }
.mood-dots { display: flex; justify-content: center; gap: 7px; margin: 12px 0 0; }
.mood-dots i { width: 7px; height: 7px; border-radius: 50%; background: #d5d0c2; display: block; cursor: pointer; transition: background .25s ease, transform .25s ease; }
.mood-dots i.on { background: var(--purr-accent); transform: scale(1.25); }
.mood-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0 0; }
.mood-tags span { height: 32px; padding: 0 13px; border: 1px solid #d9d7c9; border-radius: 17px; background: #e8e9dd;
  color: #5d6155; font-size: 12.5px; font-weight: 600; letter-spacing: .2px; display: flex; align-items: center;
  white-space: nowrap; user-select: none; }
/* 表情包 · 谐音梗样片：9 张无水印原图本身（1:1 方图）层叠。
   焦点直接是图片本身，没有白卡容器/双层白边；后面几张图片边角自然露出成一叠照片。
   容器不加背景/边框/裁切，页面底色沿用 purr-shell 原有浅米色拉丝纸。 */
.pack-deck { position: relative; height: 318px; margin: 16px 0 0; overflow: visible; cursor: pointer; touch-action: pan-y; user-select: none; }
.pack-card { position: absolute; left: 50%; margin-left: -122px; top: 14px; width: 244px; height: 244px;
  transform-origin: 50% 55%; border: 0; padding: 0; background: none;
  transition: transform .46s cubic-bezier(.22,.9,.24,1), opacity .36s ease, box-shadow .36s ease; }
.pack-card img { display: block; width: 244px; height: 244px; object-fit: cover; border-radius: 12px; pointer-events: none;
  box-shadow: 0 3px 8px rgba(30,30,34,.06), 0 20px 42px rgba(30,30,34,.16);
  transition: box-shadow .36s ease; }
.pack-card.focus img { box-shadow: 0 4px 10px rgba(30,30,34,.07), 0 26px 54px rgba(30,30,34,.20); }
.pack-dots { display: flex; justify-content: center; gap: 7px; margin: 14px 0 0; flex-wrap: wrap; }
.pack-dots i { width: 7px; height: 7px; border-radius: 50%; background: #d5d0c2; display: block; cursor: pointer; transition: background .25s ease, transform .25s ease; }
.pack-dots i.on { background: var(--purr-accent); transform: scale(1.25); }
.pack-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0 0; }
.pack-tags span { height: 32px; padding: 0 13px; border: 1px solid #d9d7c9; border-radius: 17px; background: #e8e9dd;
  color: #5d6155; font-size: 12.5px; font-weight: 600; letter-spacing: .2px; display: flex; align-items: center;
  white-space: nowrap; user-select: none; }
/* 头像 · 仿专辑样片：口径同 pack（焦点即图片本身、无白卡容器/白边、边角自然露出一叠） */
.avatar-sample-note { margin: 7px 0 0; color: var(--purr-muted); font-size: 14px; }
.avatar-deck { position: relative; height: 318px; margin: 16px 0 0; overflow: visible; cursor: pointer; touch-action: pan-y; user-select: none; }
.avatar-card { position: absolute; left: 50%; margin-left: -122px; top: 14px; width: 244px; height: 244px;
  transform-origin: 50% 55%; border: 0; padding: 0; background: none;
  transition: transform .46s cubic-bezier(.22,.9,.24,1), opacity .36s ease, box-shadow .36s ease; }
.avatar-card img { display: block; width: 244px; height: 244px; object-fit: cover; border-radius: 12px; pointer-events: none;
  box-shadow: 0 3px 8px rgba(30,30,34,.06), 0 20px 42px rgba(30,30,34,.16);
  transition: box-shadow .36s ease; }
.avatar-card.focus img { box-shadow: 0 4px 10px rgba(30,30,34,.07), 0 26px 54px rgba(30,30,34,.20); }
.avatar-dots { display: flex; justify-content: center; gap: 7px; margin: 14px 0 0; flex-wrap: wrap; }
.avatar-dots i { width: 7px; height: 7px; border-radius: 50%; background: #d5d0c2; display: block; cursor: pointer; transition: background .25s ease, transform .25s ease; }
.avatar-dots i.on { background: var(--purr-accent); transform: scale(1.25); }
.avatar-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0 0; }
.avatar-tags span { height: 32px; padding: 0 13px; border: 1px solid #d9d7c9; border-radius: 17px; background: #e8e9dd;
  color: #5d6155; font-size: 12.5px; font-weight: 600; letter-spacing: .2px; display: flex; align-items: center;
  white-space: nowrap; user-select: none; }
/* 头像 · 上传生成交互：上传照片后才解禁生成；后端 API 未接，生成只做前端反馈 */
.avatar-uploaded { display: none; align-items: center; gap: 10px; margin: 18px 0 0; padding: 9px 11px;
  border: 1px solid #d9d7c9; border-radius: 12px; background: var(--studio-paper); }
.avatar-uploaded.show { display: flex; }
.avatar-uploaded img { width: 52px; height: 52px; object-fit: cover; border-radius: 9px; flex: none; border: 1px solid #e5dfd0; }
.avatar-uploaded-meta { flex: 1; min-width: 0; }
.avatar-uploaded-meta b { display: block; font-size: 13px; font-weight: 750; color: var(--purr-accent); }
.avatar-uploaded-meta small { display: block; margin-top: 3px; font-size: 11.5px; color: var(--purr-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.avatar-redo { font-size: 12px; color: var(--purr-accent); text-decoration: underline; background: none; border: 0;
  padding: 4px; cursor: pointer; flex: none; }
.avatar-upload-btn { display: grid; place-items: center; width: 100%; min-height: 44px; padding: 8px 10px;
  border: 1px solid #c8c2ae; border-radius: 13px; background: #f3efe2; color: #4a5443;
  font: inherit; font-weight: 740; text-align: center; cursor: pointer; }
.avatar-upload-btn:active { opacity: .9; }
.avatar-gen-wrap { margin: 8px 0 9px; }
.avatar-gen-btn { display: grid; place-items: center; width: 100%; min-height: 44px; padding: 8px 10px;
  border: 1px solid #d9d7c9; border-radius: 13px; background: #e2ded2; color: #a7a89f;
  font: inherit; font-weight: 740; text-align: center; cursor: not-allowed; }
.avatar-gen-btn.ready { cursor: pointer; border-color: var(--purr-accent); background: var(--purr-accent); color: #fffaf2; }
.avatar-gen-btn.ready:active { opacity: .9; }
.avatar-sheet-mask { position: fixed; inset: 0; z-index: 90; background: rgba(30,28,24,.34);
  display: none; align-items: flex-end; justify-content: center; }
.avatar-sheet-mask.show { display: flex; }
.avatar-sheet { width: 100%; max-width: 530px; padding: 10px 14px 16px; animation: avatarSheetUp .25s ease; }
@keyframes avatarSheetUp { from { transform: translateY(24px); opacity: .4; } to { transform: translateY(0); opacity: 1; } }
.avatar-sheet-card { background: var(--studio-paper); border-radius: 18px; overflow: hidden; box-shadow: 0 10px 30px #2b302933; }
.avatar-sheet-title { padding: 15px 16px 11px; font-size: 13px; color: var(--purr-muted); text-align: center; border-bottom: 1px solid #ebe5d6; }
.avatar-sheet-item { display: block; width: 100%; min-height: 52px; border: 0; border-bottom: 1px solid #ebe5d6;
  background: var(--studio-paper); font: inherit; font-size: 15px; font-weight: 700; color: #354034; cursor: pointer; }
.avatar-sheet-item:last-child { border-bottom: 0; }
.avatar-sheet-cancel { display: block; width: 100%; min-height: 50px; margin-top: 9px; border: 0; border-radius: 14px;
  background: var(--studio-paper); font: inherit; font-size: 15px; font-weight: 700; color: var(--purr-muted); cursor: pointer; }
.avatar-hidden-input { display: none; }
.avatar-toast { position: fixed; left: 50%; top: 50%; transform: translate(-50%,-50%) scale(.96); z-index: 99;
  padding: 16px 22px; border-radius: 14px; background: rgba(43,48,41,.92); color: #fffaf2; font-size: 14px; font-weight: 650;
  opacity: 0; pointer-events: none; transition: opacity .25s ease, transform .25s ease; text-align: center; line-height: 1.6; }
.avatar-toast.show { opacity: 1; transform: translate(-50%,-50%) scale(1); }
.studio-source { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-left: 5px; color: var(--purr-muted); font-size: 13px; }
.studio-upload { position: relative; cursor: pointer; }
.studio-upload input { position: absolute; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.studio-upload:focus-within { outline: 2px solid var(--purr-accent); }
.studio-primary, .studio-secondary { display: grid; place-items: center; width: 100%; min-height: 44px; padding: 8px 10px; border: 1px solid var(--purr-accent); border-radius: 13px; background: var(--purr-accent); color: #fffaf2; font: inherit; font-weight: 740; text-align: center; text-decoration: none; cursor: pointer; }
.studio-secondary { border-color: var(--studio-line); background: var(--studio-paper); color: var(--purr-accent); }
.studio-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 6px 0 9px; }
.studio-message { margin: 10px 0 0; color: #925131; font-size: 13px; }
.studio-loading { display: grid; min-height: 270px; place-content: center; justify-items: center; margin: 16px 0; border: 1px solid var(--studio-line); border-radius: 22px; background: radial-gradient(ellipse, #faf0dc, var(--studio-paper) 72%); color: var(--purr-muted); }
.studio-loading-cards { position: relative; width: 110px; height: 100px; }
.studio-loading-cards i { position: absolute; inset: 10px 25px; display: grid; place-items: center; border: 1px solid #c6bdab; border-radius: 14px; background: #f6e6cc; box-shadow: 0 6px 12px #493a2526; animation: studio-sift 1.16s ease-in-out infinite alternate; }
.studio-loading-cards i:first-child { --tilt: -17deg; --lift: -17px; background: #dce4d2; }
.studio-loading-cards i:nth-child(2) { --tilt: 17deg; --lift: 17px; background: #efd5bd; }
.studio-loading-cards i:last-child { --tilt: 0deg; --lift: 0px; animation-delay: .14s; }
.studio-loading-cards svg { width: 33px; }
@keyframes studio-sift { from { transform: translateX(var(--lift)) rotate(var(--tilt)); } to { transform: translate(var(--lift), -10px) rotate(var(--tilt)); } }
@media (prefers-reduced-motion: reduce) { .studio-loading-cards i { animation: none; transform: translateX(var(--lift)) rotate(var(--tilt)); } .studio-category { transition: none; } }
@media (hover: hover) { .studio-category:hover { transform: translateY(-2px); box-shadow: 0 7px 13px #55423318; } }

