/* 我的形象（ADR-0157）：照原型 web/avatar.css 的样子 */
:root {
  --coral: #ef6b5b;
  --mint: #7cc8a4;
}

h1 {
  margin: 8px 0 8px;
}

.step {
  display: flex;
  flex-direction: column;
}

.step.center {
  align-items: center;
  text-align: center;
}

.progress {
  color: var(--muted);
  font-size: 14px;
}

.plain {
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  cursor: pointer;
}

.lead {
  margin: 0;
  font-size: 16px;
}

.center-title,
.center-text {
  text-align: center;
}

.small {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
}

.enter {
  width: 100%;
  border: 0;
  font: inherit;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
}

.enter:disabled {
  opacity: 0.45;
  cursor: default;
}

.text-button {
  height: 48px;
  margin-top: 6px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 16px;
  cursor: pointer;
}

a.text-button {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 抠好的头肩，没有底色和圆框 */
.face {
  --size: 56px;
  display: block;
  flex: none;
  width: var(--size);
  height: var(--size);
  background: center bottom / contain no-repeat;
  filter: drop-shadow(0 3px 4px rgba(120, 80, 40, 0.2));
}

.sample-mama { background-image: url(avatars/mama.png); }
.sample-ajie { background-image: url(avatars/ajie.png); }
.sample-amei { background-image: url(avatars/amei.png); }
.sample-tom { background-image: url(avatars/tom.png); }
.sample-laowang { background-image: url(avatars/laowang.png); }

/* 说明页：一排示例形象轻轻跳 */
.parade {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 30px 0 26px;
}

.parade .face {
  animation: hop 2.4s ease-in-out infinite;
}

.parade .face:nth-child(2) { animation-delay: -0.4s; }
.parade .face:nth-child(3) { animation-delay: -0.8s; }
.parade .face:nth-child(4) { animation-delay: -1.2s; }
.parade .face:nth-child(5) { animation-delay: -1.6s; }

.parade .big {
  --size: 84px;
}

@keyframes hop {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.promises {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0 0 8px;
  padding: 0;
  list-style: none;
}

.promises li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 18px;
  background: var(--paper);
  font-size: 15px;
  line-height: 1.4;
}

/* 说明页：怎么拍的小动画（一遍 8 秒，一直循环）：0–10% 看着镜头，10–84% 顺时针转一圈（上、右上 … 左上，转到哪一格哪一格亮；
   画面跟前置摄像头一样是镜像，本人的左边在左边），86–97% 笑一笑 */
.howto {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 14px 0 8px;
  padding: 14px 16px;
  border-radius: 18px;
  background: var(--paper);
}

.howto-stage {
  position: relative;
  flex: none;
  width: 112px;
  height: 112px;
  perspective: 260px;
}

.howto-ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.howto-ring .seg {
  fill: none;
  stroke: #e6ddd0;
  stroke-width: 7;
  stroke-dasharray: 32 245;
  animation: 8s linear infinite;
}

.howto-ring .s0 { animation-name: seg0; }
.howto-ring .s1 { animation-name: seg1; }
.howto-ring .s2 { animation-name: seg2; }
.howto-ring .s3 { animation-name: seg3; }
.howto-ring .s4 { animation-name: seg4; }
.howto-ring .s5 { animation-name: seg5; }
.howto-ring .s6 { animation-name: seg6; }
.howto-ring .s7 { animation-name: seg7; }

@keyframes seg0 { 0%, 18.7% { stroke: #e6ddd0; } 18.8%, 97% { stroke: var(--mint); } 100% { stroke: #e6ddd0; } }
@keyframes seg1 { 0%, 27.4% { stroke: #e6ddd0; } 27.5%, 97% { stroke: var(--mint); } 100% { stroke: #e6ddd0; } }
@keyframes seg2 { 0%, 36.2% { stroke: #e6ddd0; } 36.3%, 97% { stroke: var(--mint); } 100% { stroke: #e6ddd0; } }
@keyframes seg3 { 0%, 44.9% { stroke: #e6ddd0; } 45%, 97% { stroke: var(--mint); } 100% { stroke: #e6ddd0; } }
@keyframes seg4 { 0%, 53.7% { stroke: #e6ddd0; } 53.8%, 97% { stroke: var(--mint); } 100% { stroke: #e6ddd0; } }
@keyframes seg5 { 0%, 62.4% { stroke: #e6ddd0; } 62.5%, 97% { stroke: var(--mint); } 100% { stroke: #e6ddd0; } }
@keyframes seg6 { 0%, 71.2% { stroke: #e6ddd0; } 71.3%, 97% { stroke: var(--mint); } 100% { stroke: #e6ddd0; } }
@keyframes seg7 { 0%, 79.9% { stroke: #e6ddd0; } 80%, 97% { stroke: var(--mint); } 100% { stroke: #e6ddd0; } }

.howto-head {
  position: absolute;
  top: 20%;
  left: 23%;
  width: 54%;
  height: 62%;
  border: 3px solid #3d362f;
  border-radius: 50% 50% 46% 46%;
  background: #fff3e4;
  animation: howto-turn 8s ease-in-out infinite;
}

.howto-face {
  position: absolute;
  inset: 0;
  animation: howto-look 8s ease-in-out infinite;
}

.howto-face .eye {
  position: absolute;
  top: 38%;
  width: 11%;
  height: 10%;
  border-radius: 50%;
  background: #3d362f;
}

.howto-face .eye:first-child { left: 27%; }
.howto-face .eye:nth-child(2) { right: 27%; }

.howto-face .mouth {
  position: absolute;
  top: 64%;
  left: 33%;
  width: 34%;
  height: 4%;
  border-bottom: 3px solid #3d362f;
  border-radius: 0 0 40% 40%;
  animation: howto-smile 8s ease-in-out infinite;
}

@keyframes howto-turn {
  0%, 10%, 86%, 100% { transform: none; }
  18.75% { transform: rotateX(22deg); }
  27.5% { transform: rotateX(16deg) rotateY(20deg); }
  36.25% { transform: rotateY(28deg); }
  45% { transform: rotateX(-16deg) rotateY(20deg); }
  53.75% { transform: rotateX(-22deg); }
  62.5% { transform: rotateX(-16deg) rotateY(-20deg); }
  71.25% { transform: rotateY(-28deg); }
  80% { transform: rotateX(16deg) rotateY(-20deg); }
}

@keyframes howto-look {
  0%, 10%, 86%, 100% { transform: none; }
  18.75% { transform: translate(0, -14%); }
  27.5% { transform: translate(12%, -10%); }
  36.25% { transform: translate(16%, 0); }
  45% { transform: translate(12%, 10%); }
  53.75% { transform: translate(0, 14%); }
  62.5% { transform: translate(-12%, 10%); }
  71.25% { transform: translate(-16%, 0); }
  80% { transform: translate(-12%, -10%); }
}

@keyframes howto-smile {
  0%, 86%, 100% { top: 64%; left: 33%; width: 34%; height: 4%; }
  89%, 97% { top: 58%; left: 28%; width: 44%; height: 14%; border-radius: 0 0 50% 50% / 0 0 100% 100%; }
}

.howto-steps {
  margin: 0;
  padding: 0 0 0 20px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--muted);
}

.howto-steps li { padding: 3px 0; animation: 8s step-end infinite; }
.howto-steps .h1 { animation-name: howto-h1; }
.howto-steps .h2 { animation-name: howto-h2; }
.howto-steps .h3 { animation-name: howto-h3; }

@keyframes howto-h1 { 0% { color: var(--ink); font-weight: 600; } 10% { color: var(--muted); font-weight: 400; } }
@keyframes howto-h2 { 0% { color: var(--muted); font-weight: 400; } 10% { color: var(--ink); font-weight: 600; }
  86% { color: var(--muted); font-weight: 400; } }
@keyframes howto-h3 { 0% { color: var(--muted); font-weight: 400; } 86% { color: var(--ink); font-weight: 600; }
  98% { color: var(--muted); font-weight: 400; } }

@media (prefers-reduced-motion: reduce) {
  .howto-ring .seg, .howto-head, .howto-face, .howto-face .mouth, .howto-steps li { animation: none; }
  .howto-ring .seg { stroke: var(--mint); }
  .howto-steps li { color: var(--ink); }
}

.promises .icon {
  flex: none;
  color: var(--coral);
}

/* 拍照：圆形取景，外圈按拍了几张变绿 */
.stage {
  position: relative;
  width: min(78vw, 300px);
  aspect-ratio: 1;
  margin: 18px auto 0;
}

.stage video,
.no-camera {
  position: absolute;
  inset: 14px;
  width: calc(100% - 28px);
  height: calc(100% - 28px);
  border-radius: 50%;
  object-fit: cover;
  background: #2d2a27;
  transform: scaleX(-1);
}

.no-camera {
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% 40%, #4a4440, #2d2a27);
  transform: none;
}

.ghost-face {
  position: relative;
  width: 46%;
  height: 58%;
  border: 3px dashed rgba(255, 255, 255, 0.55);
  border-radius: 50% 50% 46% 46%;
  transition: transform 0.6s ease;
}

.ghost-face::before,
.ghost-face::after {
  content: "";
  position: absolute;
  top: 40%;
  width: 12%;
  height: 9%;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.7);
}

.ghost-face::before { left: 26%; }
.ghost-face::after { right: 26%; }

.stage[data-turn="left"] .ghost-face { transform: perspective(300px) rotateY(-32deg); }
.stage[data-turn="right"] .ghost-face { transform: perspective(300px) rotateY(32deg); }
.stage[data-turn="up"] .ghost-face { transform: perspective(300px) rotateX(26deg); }
.stage[data-turn="down"] .ghost-face { transform: perspective(300px) rotateX(-26deg); }

.ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(var(--mint) calc(var(--done, 0) * 1turn), #e6ddd0 0);
  -webkit-mask: radial-gradient(circle, transparent calc(50% - 8px), #000 calc(50% - 7px));
  mask: radial-gradient(circle, transparent calc(50% - 8px), #000 calc(50% - 7px));
}

/* 对准了：圈里一圈绿边 */
.arrow {
  position: absolute;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: #fff;
  font-size: 28px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.stage[data-turn] .arrow { opacity: 1; }
.arrow:empty { display: none; }
.stage[data-turn="left"] .arrow { left: -14px; top: calc(50% - 27px); animation: nudge-x 1s ease-in-out infinite reverse; }
.stage[data-turn="right"] .arrow { right: -14px; top: calc(50% - 27px); animation: nudge-x 1s ease-in-out infinite; }
.stage[data-turn="up"] .arrow { top: -14px; left: calc(50% - 27px); animation: nudge-y 1s ease-in-out infinite reverse; }
.stage[data-turn="down"] .arrow { bottom: -14px; left: calc(50% - 27px); animation: nudge-y 1s ease-in-out infinite; }
.stage[data-turn="smile"] .arrow { bottom: -14px; left: calc(50% - 27px); }

@keyframes nudge-x {
  50% { transform: translateX(5px); }
}

@keyframes nudge-y {
  50% { transform: translateY(5px); }
}

/* 对准了：圈里一圈绿边 */
.stage.good video {
  outline: 4px solid var(--mint);
  outline-offset: -4px;
}

/* 后置摄像头拍别人：画面不镜像 */
.stage.rear video {
  transform: none;
}

/* 录像中：左上角一个红点 */
.rec {
  position: absolute;
  top: 18px;
  left: 50%;
  z-index: 2;
  padding: 3px 10px 3px 22px;
  border-radius: 999px;
  background: rgba(26, 24, 20, 0.7);
  color: #fff;
  font-size: 12px;
  transform: translateX(-50%);
}

.rec::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 9px;
  width: 8px;
  height: 8px;
  margin-top: -4px;
  border-radius: 50%;
  background: #ff4d3d;
  animation: twinkle 1s ease-in-out infinite;
}

.countdown {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 64px;
  font-weight: 700;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
  pointer-events: none;
}

.say {
  margin: 22px 0 4px;
  font-size: 24px;
  font-weight: 600;
  text-align: center;
}

.tip {
  min-height: 20px;
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  text-align: center;
}

.poses {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}

.poses li {
  padding: 6px 12px;
  border: 2px dashed #d8cdbb;
  border-radius: 999px;
  color: var(--muted);
  font-size: 13px;
}

.poses li.now {
  border: 2px solid var(--ink);
  color: var(--ink);
  font-weight: 600;
}

.poses li.done {
  border: 2px solid var(--mint);
  color: var(--ink);
}

.poses li.done::before {
  content: "✓ ";
  color: #2f7a55;
  font-weight: 700;
}

/* 录好的那一段 */
.preview {
  width: min(78vw, 300px);
  aspect-ratio: 3 / 4;
  margin: 18px 0 20px;
  border-radius: 24px;
  object-fit: cover;
  background: #2d2a27;
}

.preview.mirror {
  transform: scaleX(-1);
}

#retry {
  margin-top: 20px;
}

/* 生成中 */
.making-face {
  position: relative;
  width: 170px;
  height: 170px;
  margin: 40px 0 20px;
  border-radius: 50%;
  background:
    linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.75) 50%, transparent 70%) -200% 0 / 200% 100% no-repeat,
    radial-gradient(circle at 50% 40%, #ffe3d3, #f7c7b3);
  box-shadow: 0 0 0 4px #fff, 0 10px 30px rgba(239, 107, 91, 0.25);
  animation: shimmer 1.4s linear infinite;
}

.making-face.stopped {
  animation: none;
  filter: grayscale(0.7);
}

@keyframes shimmer {
  to { background-position: 200% 0, 0 0; }
}

.sparkle {
  position: absolute;
  color: #f4b740;
  font-size: 22px;
  animation: twinkle 1.2s ease-in-out infinite;
}

.s1 { top: -6px; right: 10px; }
.s2 { bottom: 14px; left: -12px; animation-delay: -0.4s; }
.s3 { top: 40%; right: -18px; font-size: 16px; animation-delay: -0.8s; }

@keyframes twinkle {
  50% { transform: scale(0.5); opacity: 0.4; }
}

.bar {
  width: min(100%, 280px);
  height: 8px;
  margin: 8px 0 0;
  overflow: hidden;
  border-radius: 999px;
  background: #e6ddd0;
}

.bar span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--mint);
  transition: width 0.4s ease;
}

.making-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
  font-size: 16px;
  text-align: left;
}

.making-list li {
  animation: rise 0.3s ease-out;
}

.making-list li.done::before {
  content: "✓ ";
  color: var(--mint);
  font-weight: 700;
}

.making-list li:not(.done) {
  color: var(--muted);
}

#making-fail {
  width: 100%;
  margin-top: 16px;
}

#making-fail .enter {
  margin-top: 16px;
}

@keyframes rise {
  from { transform: translateY(8px); opacity: 0; }
}

/* 挑一张：两张一行 */
.cands {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 20px 0 18px;
}

.cand {
  position: relative;
  aspect-ratio: 1;
  padding: 0;
  overflow: hidden;
  border: 3px solid transparent;
  border-radius: 22px;
  background: var(--paper);
  cursor: pointer;
}

.cand img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.cand.on {
  border-color: var(--mint);
  box-shadow: 0 6px 18px rgba(47, 122, 85, 0.2);
}

.cand.on::after {
  content: "✓";
  position: absolute;
  top: 8px;
  right: 8px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--mint);
  color: #fff;
  font-weight: 700;
}

.cand:disabled {
  cursor: default;
  opacity: 0.7;
}

/* 3D：手指拖着转，两指捏合放大缩小 */
.av3d {
  width: min(100%, 360px);
  height: 340px;
  touch-action: none;
  cursor: grab;
}

.av3d canvas {
  display: block;
  width: 100%;
  height: 100%;
}

/* 朋友那边看到的你 */
.friend-view {
  display: flex;
  flex-direction: column;
  align-items: center;
  align-self: center;
  gap: 8px;
  margin: 20px 0 4px;
  padding: 14px 24px;
  border-radius: 20px;
  background: var(--paper);
}

.friend-view .small {
  margin: 0;
}

.pal-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  font-size: 12px;
}

.pal-face {
  width: 50px;
  height: 50px;
}

/* 换造型、导出的选项 */
.sheet-card .sheet-top {
  display: flex;
  align-items: center;
  min-height: 44px;
}

.sheet-top strong {
  flex: 1;
  font-size: 18px;
}

.sheet-card .close {
  height: 36px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: var(--soft);
  color: var(--ink);
  font-size: 14px;
}

.options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.sheet-card .options button,
.options a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 44px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  text-decoration: none;
  cursor: pointer;
}

.options a small {
  color: var(--muted);
  font-size: 12px;
}

.sheet-card .options button.wide {
  width: 100%;
  justify-content: center;
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

.sheet-card > .options input {
  flex: 1 1 100%;
}

.sheet-error {
  flex: 1 1 100%;
  margin: 0;
  color: #b3412f;
  font-size: 14px;
}

/* ---- 深色展示台：挑主图、「我的形象」（照「夸张卡通手办」参考的样子，字体和全站一样） ---- */
body.dark {
  --bg: #2a2c31;
  --ink: #f1ede6;
  --muted: #a8a39a;
  --paper: #1f2125;
  --line: #3a3d44;
  --soft: #34373d;
  color-scheme: dark;
}

body.dark .enter {
  color: #1f2125;
}

body.dark .found-face {
  background: #3a3d44;
}

.dark-step h1 {
  margin: 4px 0 6px;
}

/* 挑主图：一张一屏，左右滑 */
.carousel {
  display: flex;
  gap: 0;
  margin: 14px -20px 0;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.carousel::-webkit-scrollbar {
  display: none;
}

.slide {
  display: flex;
  flex: 0 0 100%;
  justify-content: center;
  padding: 0 20px;
  scroll-snap-align: center;
}

.slide img {
  display: block;
  width: 100%;
  max-width: 380px;
  aspect-ratio: 2 / 3;
  border-radius: 22px;
  object-fit: contain;
  background: radial-gradient(circle at 50% 35%, #6d7078, #3c3f45 70%);
}

.dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 14px 0 0;
}

.dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #5a5d64;
}

.dots span.on {
  background: var(--ink);
}

.pick-hint {
  margin: 14px 0 0;
  padding: 10px 14px;
  border-radius: 14px;
  background: #3a352c;
  color: #f0d9a8;
  font-size: 14px;
  line-height: 1.5;
  text-align: center;
}

/* 我的形象：主图大大地放在最上面 */
.hero-card {
  margin: 6px -20px 0;
  overflow: hidden;
  background: #3c3f45;
}

.hero-img {
  display: block;
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  cursor: zoom-in;
}

.hero-img.none {
  background:
    radial-gradient(circle at 50% 30%, #8b8e95 0 14%, transparent 15%),
    radial-gradient(ellipse 30% 26% at 50% 66%, #8b8e95 0 97%, transparent 100%),
    #4a4d53;
}

.set-status {
  margin: 14px 0 0;
  padding: 12px 14px;
  border-radius: 14px;
  background: #1f2a24;
  color: #cfe9da;
  font-size: 14px;
  line-height: 1.5;
}

.set-status .bar {
  width: 100%;
  margin-top: 8px;
  background: #33413a;
}

.panel {
  margin: 14px 0 0;
  padding: 14px 12px 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--paper);
}

.panel h2 {
  margin: 0 0 10px 2px;
  color: var(--ink);
  font-size: 16px;
  font-weight: 600;
}

.set-grid {
  display: grid;
  gap: 8px;
}

.set-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.set-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.set-grid.four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.set-tile {
  position: relative;
  aspect-ratio: 1;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 12px;
  background: #3c3f45;
  color: var(--ink);
  font: inherit;
  cursor: zoom-in;
}

.set-tile.tall {
  aspect-ratio: 2 / 3;
}

.set-tile img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.set-tile-name {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 14px 8px 6px;
  background: linear-gradient(transparent, rgba(20, 21, 24, 0.75));
  color: #fff;
  font-size: 12px;
  text-align: left;
}

/* 还没画好：轻轻闪的灰格子 */
.set-tile.pending,
.set-tile.missing {
  background:
    linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.08) 50%, transparent 70%) -200% 0 / 200% 100% no-repeat,
    #34373d;
  animation: shimmer 1.6s linear infinite;
  cursor: default;
}

.set-tile.missing img {
  visibility: hidden;
}

/* 360 度还没有：安安静静的一块 */
.wait-gpu {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 26px 16px;
  border: 1px dashed #4a4d54;
  border-radius: 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
}

.wait-gpu strong {
  color: var(--ink);
  font-size: 16px;
  font-weight: 600;
}

.wait-gpu .av3d {
  width: 100%;
  height: 300px;
}

.actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 18px 0 0;
}

.action-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.dark-button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  cursor: pointer;
}

.dark-button small {
  color: var(--muted);
  font-size: 12px;
}

/* 删掉数字人：最下面一行小红字，和别的按钮分开（老板 2026-11-06） */
.delete-link {
  align-self: center;
  margin-top: 18px;
  padding: 8px 12px;
  border: 0;
  background: none;
  color: #b2452f;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.sheet-card .options button.danger {
  width: 100%;
  justify-content: center;
  border-color: #e8c4ba;
  color: #b2452f;
}

/* 制作中「不等了，重新拍」：比「先去别处」还淡一点，不抢眼 */
.text-button.quiet {
  margin-top: 4px;
  opacity: 0.7;
  font-size: 13px;
}

/* 挑主图：最夸张那张的小标签 */
.slide {
  position: relative;
}

.cand-tag {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(255, 252, 247, 0.92);
  color: #1a1814;           /* 挑主图那页是深色底，--ink 变成浅色了，这里固定深色字 */
  font-size: 12px;
}

.dark-button:disabled {
  opacity: 0.55;
  cursor: default;
}

/* 现在的头像 */
.head-now {
  display: flex;
  flex: 1 1 100%;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

.head-now img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  background: #f3e7d6;
}

/* 看大图：整屏黑底，左右滑 */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  flex-direction: column;
  background: rgba(12, 13, 15, 0.94);
}

.lb-track {
  display: flex;
  flex: 1;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.lb-track::-webkit-scrollbar {
  display: none;
}

.lb-slide {
  display: flex;
  flex: 0 0 100%;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 0;
  padding: 16px;
  scroll-snap-align: center;
}

.lb-slide img {
  max-width: 100%;
  max-height: calc(100vh - 120px);
  border-radius: 14px;
  object-fit: contain;
}

.lb-slide figcaption {
  color: #e9e6e0;
  font-size: 15px;
}

.lb-close {
  padding: 12px 0 calc(16px + env(safe-area-inset-bottom));
  color: #a8a39a;
  font-size: 13px;
  text-align: center;
}


/* 拍之前的说明（ADR-0167） */
.consent-list { margin: 8px 0 24px; padding-left: 1.2em; line-height: 1.7; }
.consent-list li { margin-bottom: 10px; }
/* 拍好的几张照片 */
.preview-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 6px; width: 100%;
  margin: 12px 0 20px; }
.preview-photos img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 8px; transform: scaleX(-1); }
.stage.flash video { filter: brightness(1.6); transition: filter 0.1s; }
