/* 店小发 · 移动端 UI 设计令牌与共享组件
   唯一 Token 事实源。页面与设计稿墙均消费本文件，不重复原始视觉数值。 */

:root {
  color-scheme: light;

  /* ---- 品牌色 ---- */
  --color-primary: #FF6B35;
  --color-primary-light: #FF8F5E;
  --color-primary-bg: #FFF0E8;
  --color-background: #FFF8F0;
  --color-surface: #FFFFFF;
  --color-text: #2B2118;
  --color-muted-text: #8A7A6D;
  --color-border: #F0E6DC;
  --color-focus: #FF6B35;
  --color-success: #4CAF7D;
  --color-success-bg: #F5FBF7;
  --color-success-deep: #3E9269;
  --color-success-line: rgba(76, 175, 125, 0.28);
  --color-disabled: #D9CFC5;
  --color-primary-dark: #F25C26;

  /* 商品图 / 缩略图占位用的暖色层次（只用于渐变占位，不做界面语义色） */
  --tone-cream: #FFE6D2;
  --tone-peach: #FFD3B8;
  --tone-blush: #FFDDC6;
  --tone-sand: #FFC9A8;
  --tone-apricot: #FFB98F;
  --tone-clay: #EFB08A;
  --tone-amber: #F2713C;
  --tone-ember: #E85E2B;
  --tone-paper: #F7F1EA;

  /* 设计规格原词别名 */
  --color-bg: var(--color-background);
  --color-card: var(--color-surface);
  --color-text-2: var(--color-muted-text);

  /* ---- 字体 ---- */
  --font-body: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;

  /* ---- 字号 ---- */
  --fs-hero: 30px;
  --fs-display: 32px;
  --fs-card-title: 26px;
  --fs-page-title: 22px;
  --fs-nav: 20px;
  --fs-pct: 20px;
  --fs-subtitle: 18px;
  --fs-button: 17px;
  --fs-body: 16px;
  --fs-note: 14px;
  --fs-caption: 13px;
  --fs-tiny: 12px;

  /* ---- 圆角 ---- */
  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 20px;
  --radius-xl: 24px;

  /* ---- 间距 ---- */
  --space-unit: 4px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 28px;
  --space-8: 32px;
  --gutter: 20px;
  --content-width: 375px;
  --screen-height: 812px;
  --tabbar-height: 64px;
  --tap-min: 44px;

  /* ---- 层级与阴影 ---- */
  --shadow-card: 0 4px 20px rgba(43, 33, 24, 0.06);
  --shadow-primary: 0 8px 24px rgba(255, 107, 53, 0.28);
  --shadow-bar: 0 -4px 20px rgba(43, 33, 24, 0.05);
  --shadow-float: 0 14px 32px rgba(255, 107, 53, 0.28);
  --shadow-player: 0 18px 40px rgba(255, 107, 53, 0.24);
  --shadow-control: 0 6px 18px rgba(43, 33, 24, 0.18);
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--color-primary-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  background: var(--color-primary-bg);
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

h1,
h2,
h3,
p,
ul,
li {
  margin: 0;
  padding: 0;
}

ul {
  list-style: none;
}

:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

.skip-link {
  left: 1rem;
  position: fixed;
  top: 1rem;
  transform: translateY(-200%);
  z-index: 100;
  background: var(--color-surface);
  color: var(--color-text);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-sm);
  text-decoration: none;
  box-shadow: var(--shadow-card);
}

.skip-link:focus {
  transform: translateY(0);
}

/* ============ 屏幕壳层 ============ */
.screen {
  position: relative;
  width: var(--content-width);
  max-width: 100%;
  height: var(--screen-height);
  max-height: 100dvh;
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--color-background);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.5;
}

.screen-main {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0 var(--gutter);
  -webkit-overflow-scrolling: touch;
}

.screen-main--tabbed {
  padding-bottom: calc(var(--tabbar-height) + var(--space-6));
}

/* ============ 顶栏 ============ */
.app-header {
  flex: 0 0 auto;
  position: relative;
  height: 56px;
  padding: 0 var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.app-header--page {
  padding-top: var(--space-2);
  height: 64px;
  align-items: flex-end;
  padding-bottom: var(--space-2);
}

.nav-title {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-size: var(--fs-nav);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.page-title {
  font-size: var(--fs-page-title);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.01em;
}

.back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--tap-min);
  height: var(--tap-min);
  margin-left: calc(var(--space-3) * -1);
  border-radius: 50%;
  color: var(--color-text);
  text-decoration: none;
  transition: background-color 0.18s var(--ease);
}

.back:active {
  background: var(--color-primary-bg);
}

.store-name {
  font-size: var(--fs-subtitle);
  font-weight: 600;
  letter-spacing: 0.01em;
}

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  background: linear-gradient(150deg, var(--color-primary-light), var(--color-primary));
  box-shadow: 0 4px 12px rgba(255, 107, 53, 0.28);
}

.avatar .icon {
  width: 22px;
  height: 22px;
}

.icon-btn {
  width: var(--tap-min);
  height: var(--tap-min);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  color: var(--color-muted-text);
  border-radius: 50%;
  cursor: pointer;
  margin-right: calc(var(--space-3) * -1);
}

.icon-btn:active {
  background: var(--color-primary-bg);
  color: var(--color-primary);
}

/* ============ 图标 ============ */
.icon {
  display: block;
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
}

/* ============ 按钮 ============ */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  width: 100%;
  height: 56px;
  border: 0;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: var(--fs-button);
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.18s var(--ease), background-color 0.18s var(--ease),
    box-shadow 0.18s var(--ease);
}

.btn--primary {
  background: var(--color-primary);
  color: #FFFFFF;
  box-shadow: var(--shadow-primary);
}

.btn--primary:active {
  background: var(--color-primary-dark);
  transform: translateY(1px);
}

.btn--ghost {
  background: var(--color-surface);
  color: var(--color-primary);
  border: 1.5px solid var(--color-primary);
}

.btn--ghost:active {
  background: var(--color-primary-bg);
}

.btn.is-disabled {
  background: var(--color-disabled);
  color: #FFFFFF;
  box-shadow: none;
  pointer-events: none;
}

/* ============ 底部操作区 ============ */
.bottom-bar {
  flex: 0 0 auto;
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: var(--space-3) var(--gutter) calc(var(--space-5) + env(safe-area-inset-bottom));
  background: var(--color-background);
  border-top: 1px solid var(--color-border);
}

.bottom-note {
  margin-top: var(--space-3);
  text-align: center;
  font-size: var(--fs-caption);
  color: var(--color-muted-text);
  line-height: 1.5;
}

/* ============ 底部导航 ============ */
.tabbar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: calc(var(--tabbar-height) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  display: flex;
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  box-shadow: var(--shadow-bar);
}

.tab {
  flex: 1 1 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-height: var(--tap-min);
  text-decoration: none;
  color: var(--color-muted-text);
  font-size: var(--fs-caption);
  font-weight: 500;
  letter-spacing: 0.02em;
}

.tab.is-active {
  color: var(--color-primary);
  font-weight: 600;
}

/* ============ 通用文字 ============ */
.subtitle {
  font-size: var(--fs-body);
  color: var(--color-muted-text);
  line-height: 1.55;
}

.section-title {
  font-size: var(--fs-body);
  font-weight: 600;
  color: var(--color-text);
}

.muted {
  color: var(--color-muted-text);
}

/* ============ P1 首页 ============ */
.glow {
  position: absolute;
  pointer-events: none;
  border-radius: 50%;
}

.glow--home {
  top: 46px;
  right: -70px;
  width: 260px;
  height: 260px;
  background: radial-gradient(circle, rgba(255, 143, 94, 0.32) 0%, rgba(255, 143, 94, 0) 68%);
}

.screen-main--home {
  padding-top: var(--space-2);
}

.greeting {
  font-size: var(--fs-hero);
  font-weight: 700;
  line-height: 1.28;
  letter-spacing: 0.005em;
  margin-top: var(--space-3);
}

.make-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 240px;
  margin-top: var(--space-7);
  padding: var(--space-6);
  border-radius: var(--radius-xl);
  background: linear-gradient(148deg, var(--color-primary-light) 0%, var(--color-primary) 100%);
  box-shadow: var(--shadow-float);
  color: #FFFFFF;
  text-decoration: none;
  overflow: hidden;
  transition: transform 0.2s var(--ease);
}

.make-card::after {
  content: "";
  position: absolute;
  top: -60px;
  right: -50px;
  width: 190px;
  height: 190px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.22) 0%, rgba(255, 255, 255, 0) 70%);
}

.make-card:active {
  transform: scale(0.985);
}

.make-card-title {
  font-size: var(--fs-card-title);
  font-weight: 700;
  line-height: 1.28;
  letter-spacing: 0.01em;
}

.make-card-sub {
  margin-top: var(--space-2);
  font-size: var(--fs-body);
  font-weight: 400;
  color: rgba(255, 255, 255, 0.92);
}

.make-card-icon {
  position: absolute;
  right: var(--space-6);
  top: var(--space-6);
  width: 28px;
  height: 28px;
  color: #FFFFFF;
  opacity: 0.92;
}

/* 主卡片右下角装饰：手机框 + 播放三角，暗示「一条视频正在等你做」 */
.make-card-deco {
  position: absolute;
  right: 14px;
  bottom: 10px;
  width: 120px;
  height: 160px;
  pointer-events: none;
}

.recent-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-top: var(--space-7);
}

/* ============ 首页「想怎么说」货架 ============
 * 横着滑的两列小卡。首页只有一个大按钮的时候，店主不知道还能换个说法拍；
 * 露出六个说法，他才知道这产品不止一条路。
 */
.say-shelf {
  margin-top: var(--space-7);
}
.shelf-row {
  display: flex;
  gap: var(--space-3);
  margin-top: var(--space-3);
  overflow-x: auto;
  padding-bottom: 4px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.shelf-row::-webkit-scrollbar {
  display: none;
}
.shelf-card {
  flex: 0 0 44%;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.16s ease, transform 0.16s ease;
}
.shelf-card:active {
  transform: scale(0.985);
  border-color: var(--color-primary);
}
.shelf-title {
  font-size: var(--fs-body);
  font-weight: 600;
  color: var(--color-text);
}
.shelf-sub {
  font-size: var(--fs-caption);
  line-height: 1.5;
  color: var(--color-muted-text);
}

.recent-count {
  font-size: var(--fs-caption);
  color: var(--color-muted-text);
}

.recent-row {
  display: flex;
  gap: var(--space-3);
  margin-top: var(--space-3);
  overflow-x: auto;
  padding-bottom: var(--space-1);
}

.recent-item {
  flex: 0 0 auto;
  text-decoration: none;
}

.recent-thumb {
  position: relative;
  width: 128px;
  height: 228px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

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

.recent-thumb--a {
  background: linear-gradient(158deg, var(--tone-peach) 0%, var(--tone-apricot) 46%, var(--color-primary) 100%);
}

.recent-thumb--b {
  background: linear-gradient(162deg, var(--tone-cream) 0%, var(--tone-apricot) 52%, var(--tone-amber) 100%);
}

.recent-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(43, 33, 24, 0.22) 0%, rgba(43, 33, 24, 0) 42%);
}

.recent-date {
  position: absolute;
  left: var(--space-2);
  bottom: var(--space-2);
  z-index: 1;
  font-size: var(--fs-tiny);
  font-weight: 500;
  color: #FFFFFF;
  padding: 2px var(--space-2);
  border-radius: 999px;
  background: rgba(43, 33, 24, 0.26);
}

.recent-dur {
  position: absolute;
  right: 6px;
  bottom: 8px;
  z-index: 2;
  font-size: var(--fs-tiny);
  font-weight: 500;
  line-height: 1.45;
  color: #FFFFFF;
  padding: 1px 5px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.55);
  letter-spacing: 0.02em;
}

/* ============ P2 拍照页 ============ */
.shot-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-top: var(--space-5);
}

.shot-card {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 96px;
  padding: 0 12px 0 var(--space-4);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  box-shadow: var(--shadow-card);
  border: 1px solid transparent;
}

.shot-card.is-done {
  background: var(--color-success-bg);
  border-color: rgba(76, 175, 125, 0.22);
}

.shot-frame {
  flex: 0 0 auto;
  width: 64px;
  height: 64px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
  background: var(--color-primary-bg);
  border: 1.5px dashed var(--color-primary-light);
}

.shot-card.is-done .shot-frame {
  color: var(--color-success);
  background: var(--color-surface);
  border: 1.5px solid rgba(76, 175, 125, 0.4);
}

.shot-frame .icon {
  width: 30px;
  height: 30px;
}

.shot-body {
  flex: 1 1 auto;
  min-width: 0;
}

.shot-title {
  display: block;
  font-size: var(--fs-body);
  font-weight: 600;
  line-height: 1.4;
}

.shot-hint {
  display: block;
  margin-top: 2px;
  font-size: var(--fs-caption);
  color: var(--color-muted-text);
  line-height: 1.45;
}

.shot-action {
  flex: 0 0 auto;
  width: var(--tap-min);
  height: var(--tap-min);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid var(--color-primary);
  background: transparent;
  color: var(--color-primary);
  cursor: pointer;
  transition: background-color 0.18s var(--ease), transform 0.18s var(--ease);
}

.shot-action:active {
  background: var(--color-primary-bg);
  transform: scale(0.94);
}

.shot-action .icon {
  width: 22px;
  height: 22px;
}

.shot-check {
  flex: 0 0 auto;
  width: var(--tap-min);
  height: var(--tap-min);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-success);
  color: #FFFFFF;
}

.shot-check .icon {
  width: 22px;
  height: 22px;
}

/* ============ P3 选说法页 ============ */

/* 说法类型 chips：横着滑，一行放不下不换行不挤扁 */
.say-chips {
  display: flex;
  gap: var(--space-2);
  margin-top: var(--space-4);
  overflow-x: auto;
  padding-bottom: 2px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.say-chips::-webkit-scrollbar {
  display: none;
}
.say-chip {
  flex: 0 0 auto;
  padding: 7px 14px;
  border: 1.5px solid var(--color-border);
  border-radius: 999px;
  background: var(--color-surface);
  font-family: inherit;
  font-size: var(--fs-caption);
  font-weight: 600;
  color: var(--color-text);
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.16s ease, background 0.16s ease, color 0.16s ease;
}
.say-chip.is-on {
  border-color: var(--color-primary);
  background: var(--color-primary-soft, #fff0e8);
  color: var(--color-primary-dark);
}
.say-chip:active {
  transform: scale(0.97);
}

.say-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-top: var(--space-5);
}

/* 选说法页：卡片下方兜底提示（纯文案，无边框无背景） */
.say-hint {
  margin-top: 40px;
  text-align: center;
  font-size: var(--fs-note);
  line-height: 1.5;
  color: var(--color-muted-text);
}

.say-card {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  height: 88px;
  padding: 0 var(--space-5) 0 var(--space-5);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  border: 2px solid transparent;
  box-shadow: var(--shadow-card);
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.18s var(--ease), background-color 0.18s var(--ease);
}

/* 选中态只用 2px 橘色边框表达；左侧竖条在未选中/选中态均不出现，避免被读成错位 */
.say-bar {
  display: none;
}

.say-text {
  display: block;
  font-size: var(--fs-body);
  font-weight: 600;
  line-height: 1.4;
  color: var(--color-text);
}

.say-fit {
  display: block;
  margin-top: 3px;
  font-size: var(--fs-caption);
  color: var(--color-muted-text);
}

.say-card.is-selected {
  border-color: var(--color-primary);
  background: var(--color-primary-bg);
  box-shadow: 0 6px 18px rgba(255, 107, 53, 0.14);
}

.say-check {
  position: absolute;
  top: var(--space-3);
  right: var(--space-3);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #FFFFFF;
  display: none;
  align-items: center;
  justify-content: center;
}

.say-card.is-selected .say-check {
  display: flex;
}

.say-check .icon {
  width: 14px;
  height: 14px;
}

/* ============ P4 生成中 ============ */
.screen-main--making {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-bottom: 0;
  overflow: hidden;
}

.making-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: calc(var(--space-4) * -1);
}

.ring-block {
  position: relative;
  width: 220px;
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.orbit {
  position: absolute;
  inset: 0;
  animation: orbit-spin 9s linear infinite;
}

.orbit-dot {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 7px;
  height: 7px;
  margin: -3.5px 0 0 -3.5px;
  border-radius: 50%;
  background: var(--color-primary-light);
}

.orbit-dot:nth-child(1) {
  transform: rotate(0deg) translateY(-108px);
  opacity: 0.85;
}

.orbit-dot:nth-child(2) {
  transform: rotate(120deg) translateY(-108px);
  opacity: 0.55;
}

.orbit-dot:nth-child(3) {
  transform: rotate(240deg) translateY(-108px);
  opacity: 0.3;
}

@keyframes orbit-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.ring {
  width: 180px;
  height: 180px;
  display: block;
}

.ring-track {
  fill: none;
  stroke: var(--color-primary-bg);
  stroke-width: 10;
}

.ring-progress {
  fill: none;
  stroke: var(--color-primary);
  stroke-width: 10;
  stroke-linecap: round;
  stroke-dasharray: 350.35 515.22;
  transform: rotate(-90deg);
  transform-origin: center;
}

.ring-value {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: var(--fs-display);
  font-weight: 700;
  color: var(--color-primary);
  letter-spacing: 0.01em;
  font-variant-numeric: tabular-nums;
}

.ring-pct {
  font-size: var(--fs-pct);
  font-weight: 600;
  margin-left: 1px;
}

.making-title {
  margin-top: var(--space-5);
  font-size: var(--fs-nav);
  font-weight: 600;
  color: var(--color-text);
  text-align: center;
}

.making-sub {
  margin-top: var(--space-3);
  font-size: var(--fs-note);
  color: var(--color-muted-text);
  text-align: center;
}

.making-foot {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 60px;
  text-align: center;
  font-size: var(--fs-caption);
  color: var(--color-muted-text);
}

/* ============ P5 成片页 ============ */
.screen-main--result {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: var(--space-1);
}

.player {
  position: relative;
  flex: 0 0 auto;
  width: 280px;
  height: 498px;
  margin-top: var(--space-2);
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: var(--tone-sand);
  box-shadow: var(--shadow-player);
}

.player-cover {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.player::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(43, 33, 24, 0.34) 0%, rgba(43, 33, 24, 0) 36%);
  pointer-events: none;
}

.player-badge-ai {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
  color: #2B2118;
  background: rgba(255, 255, 255, 0.85);
  border-radius: 6px;
  padding: 3px 7px;
  letter-spacing: 0.01em;
}

.player-dur {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 2;
  font-size: var(--fs-tiny);
  font-weight: 500;
  line-height: 1.45;
  color: #FFFFFF;
  background: rgba(0, 0, 0, 0.55);
  border-radius: 6px;
  padding: 1px 6px;
  letter-spacing: 0.02em;
}

.player-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.9);
  color: var(--color-primary);
  cursor: pointer;
  box-shadow: var(--shadow-control);
  z-index: 1;
}

.player-play .icon {
  width: 30px;
  height: 30px;
  margin-left: 3px;
}

.result-title {
  margin-top: var(--space-4);
  font-size: var(--fs-subtitle);
  font-weight: 700;
  color: var(--color-text);
}

.result-meta {
  margin-top: var(--space-1);
  font-size: var(--fs-caption);
  color: var(--color-muted-text);
}

.result-actions {
  width: 100%;
  margin-top: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.result-foot {
  margin-top: var(--space-3);
  font-size: var(--fs-caption);
  color: var(--color-muted-text);
  text-align: center;
}

/* ---- 逐段验收 ----
 * 默认收成一行字：店主满意就直接走，别拿工程细节打扰他。
 * 只有真想重做的人才点开。
 */
.seg-block {
  width: 100%;
  margin-top: var(--space-5);
}
.seg-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: var(--space-3) var(--space-4);
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-md);
  background: transparent;
  font-family: inherit;
  font-size: var(--fs-caption);
  color: var(--color-muted-text);
  cursor: pointer;
}
.seg-caret {
  transition: transform 0.2s ease;
}
.seg-block.is-open .seg-caret {
  transform: rotate(180deg);
}
.seg-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-top: var(--space-3);
}
.seg-item {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--color-surface);
}
.seg-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-2) var(--space-3);
}
.seg-no {
  font-size: var(--fs-caption);
  font-weight: 600;
  color: var(--color-text);
}
.seg-redo {
  padding: 6px 12px;
  border: 1.5px solid var(--color-border);
  border-radius: 999px;
  background: var(--color-surface);
  font-family: inherit;
  font-size: var(--fs-caption);
  font-weight: 600;
  color: var(--color-text);
  cursor: pointer;
}
.seg-redo.is-armed {
  border-color: var(--color-primary);
  background: var(--color-primary-soft, #fff0e8);
  color: var(--color-primary-dark);
}
.seg-redo:disabled {
  opacity: 0.6;
  cursor: default;
}
.seg-video {
  display: block;
  width: 100%;
  background: #000;
}

/* ============ P6 我的视频 ============ */
.stat-line {
  margin-top: var(--space-1);
  font-size: var(--fs-note);
  color: var(--color-muted-text);
}

.video-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-top: var(--space-4);
}

.video-card {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  height: 88px;
  padding: 0 var(--space-4);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  box-shadow: var(--shadow-card);
  text-decoration: none;
  color: inherit;
}

.video-thumb {
  position: relative;
  flex: 0 0 auto;
  width: 56px;
  height: 56px;
  border-radius: var(--radius-sm);
  overflow: hidden;
}

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

.video-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.75);
  color: var(--color-text);
}

.video-play .icon {
  width: 13px;
  height: 13px;
  margin-left: 1px;
}

.video-thumb--a {
  background: linear-gradient(155deg, var(--tone-peach), var(--tone-amber));
}

.video-thumb--b {
  background: linear-gradient(155deg, var(--tone-cream), var(--tone-amber));
}

.video-thumb--c {
  background: linear-gradient(155deg, var(--tone-blush), var(--color-primary-light));
}

.video-thumb--d {
  background: linear-gradient(155deg, var(--tone-blush), var(--tone-clay));
}

.video-info {
  flex: 1 1 auto;
  min-width: 0;
}

.video-name {
  display: block;
  font-size: var(--fs-body);
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.video-date {
  display: block;
  margin-top: 2px;
  font-size: var(--fs-caption);
  color: var(--color-muted-text);
}

.tag {
  flex: 0 0 auto;
  font-size: var(--fs-tiny);
  font-weight: 500;
  padding: 3px var(--space-2);
  border-radius: 999px;
  line-height: 1.4;
  white-space: nowrap;
}

.tag--green {
  color: var(--color-success-deep);
  background: var(--color-success-bg);
  border: 1px solid var(--color-success-line);
}

.tag--grey {
  color: var(--color-muted-text);
  background: var(--tone-paper);
  border: 1px solid var(--color-border);
}

/* ============ 轻提示 ============ */
.toast {
  position: absolute;
  left: 50%;
  bottom: calc(var(--tabbar-height) + var(--space-6));
  transform: translate(-50%, 8px);
  padding: var(--space-2) var(--space-4);
  border-radius: 999px;
  background: rgba(43, 33, 24, 0.86);
  color: #FFFFFF;
  font-size: var(--fs-caption);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease);
  z-index: 20;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============ 页面级留白工具 ============ */
.screen-main--with-bar {
  padding-bottom: 156px;
}

.screen-main--capture,
.screen-main--script {
  padding-top: var(--space-1);
}

.glow--making {
  top: 50%;
  left: 50%;
  width: 340px;
  height: 340px;
  margin: -170px 0 0 -170px;
  background: radial-gradient(circle, rgba(255, 143, 94, 0.18) 0%, rgba(255, 143, 94, 0) 70%);
}

.toast--result {
  bottom: 172px;
}

/* ============ P2 拍照示范（真实素材） ============ */
.sample-block {
  margin-top: var(--space-6);
}

.sample-title {
  font-size: var(--fs-note);
  font-weight: 500;
  color: var(--color-muted-text);
}

.sample-row {
  display: flex;
  gap: var(--space-3);
  margin-top: var(--space-3);
}

.sample-item {
  flex: 0 0 auto;
  width: 88px;
}

.sample-thumb {
  width: 88px;
  height: 88px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--tone-paper);
  box-shadow: var(--shadow-card);
}

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

.sample-cap {
  display: block;
  margin-top: 6px;
  font-size: var(--fs-tiny);
  color: var(--color-muted-text);
  text-align: center;
}
