/* 未登录首页的功能区：外层大圆角卡片，1px 发丝线分格，每格一个装饰性的「操作→结果」小场景。
   静态样式就是终态；动画只写「从哪来」（backwards 填充），所以减少动效时直接显示终态。 */
.feature-section { margin-top: 36px; }
.feature-section h3 { margin: 0 0 18px; font-size: 20px; font-weight: 600; }
.feature-grid {
  --ft-radius: 28px;
  --ft-move: cubic-bezier(.22, 1, .36, 1);
  --ft-pop: cubic-bezier(.34, 1.4, .64, 1);
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; overflow: hidden;
  border-radius: var(--ft-radius); background: var(--line);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--ink) 5%, transparent), var(--shadow-paper);
}
.feature-tile {
  --ft-tile: var(--paper);
  --ft-panel: var(--surface);
  --ft-window: var(--paper);
  --ft-ring: color-mix(in srgb, var(--ink) 9%, transparent);
  --ft-texture: color-mix(in srgb, var(--ink) 3.5%, transparent);
  --ft-inner: color-mix(in srgb, var(--ink) 5%, var(--ft-window));
  --ft-body: color-mix(in srgb, var(--ink) 16%, transparent);
  --ft-heading: color-mix(in srgb, var(--ink) 30%, transparent);
  --ft-data: color-mix(in srgb, var(--ink) 11%, transparent);
  --ft-accent: var(--accent);
  --ft-shadow: color-mix(in srgb, var(--ink) 11%, transparent);
  --ft-icon: var(--muted);
  --ft-chip-shadow: 0 1px 2px color-mix(in srgb, var(--ink) 8%, transparent);
  --ft-chip-scale: 1;
  display: flex; flex-direction: column; min-width: 0; background: var(--ft-tile);
}
[data-theme="dark"] .feature-tile { --ft-window: var(--paper-secondary); }
.feature-tile:focus-visible {
  --ft-tile: color-mix(in srgb, var(--ink) 2.5%, var(--paper));
  --ft-panel: color-mix(in srgb, var(--ink) 2.5%, var(--surface));
  --ft-ring: color-mix(in srgb, var(--ink) 15%, transparent);
  --ft-texture: color-mix(in srgb, var(--ink) 5.5%, transparent);
  --ft-icon: var(--ink);
  --ft-chip-shadow: 0 2px 6px color-mix(in srgb, var(--ink) 16%, transparent);
  --ft-chip-scale: 1.125;
  outline: 2px solid var(--focus); outline-offset: -2px;
}
@media (hover: hover) {
  .feature-tile:hover {
    --ft-tile: color-mix(in srgb, var(--ink) 2.5%, var(--paper));
    --ft-panel: color-mix(in srgb, var(--ink) 2.5%, var(--surface));
    --ft-ring: color-mix(in srgb, var(--ink) 15%, transparent);
    --ft-texture: color-mix(in srgb, var(--ink) 5.5%, transparent);
    --ft-icon: var(--ink);
    --ft-chip-shadow: 0 2px 6px color-mix(in srgb, var(--ink) 16%, transparent);
    --ft-chip-scale: 1.125;
  }
}
.feature-copy { display: grid; gap: 10px; align-content: start; padding: 22px 24px 20px; }
.feature-copy h4 { margin: 6px 0 0; font-size: 16px; font-weight: 600; line-height: 1.5; }
.feature-copy p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.7; }
.feature-chip {
  position: relative; display: grid; place-items: center; width: 32px; height: 32px; border: 1px solid var(--line);
  border-radius: 10px; background: var(--ft-window); color: var(--ft-icon); box-shadow: var(--ft-chip-shadow);
  transform: scale(var(--ft-chip-scale)); transform-origin: 0 0;
}
.feature-chip > svg { grid-area: 1 / 1; width: 20px; height: 20px; }
.feature-chip-draw { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; opacity: 0; }
.feature-chip-draw path { stroke-dasharray: 1; stroke-dashoffset: 0; }
.feature-art {
  position: relative; display: grid; place-items: center; height: 156px; margin: auto 8px 8px; overflow: hidden;
  border-radius: calc(var(--ft-radius) - 8px); background: var(--ft-panel); box-shadow: inset 0 0 0 1px var(--ft-ring);
}
.feature-art::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(-45deg, var(--ft-texture) 0 1px, transparent 1px 7px);
}
.feature-scene { position: relative; z-index: 1; width: 126px; height: 118px; }

/* 线框原件：文字条、迷你窗口、强调色只用在「结果」徽标上 */
.fx { position: absolute; display: block; }
.fx-win { border-radius: 9px; background: var(--ft-window); box-shadow: 0 0 0 1px var(--ft-ring), 0 6px 16px var(--ft-shadow); }
.fx-bar { height: 4px; border-radius: 2px; background: var(--ft-body); transform-origin: left center; }
.fx-bar.h { height: 5px; background: var(--ft-heading); }
.w34 { width: 34px; } .w44 { width: 44px; } .w52 { width: 52px; } .w64 { width: 64px; } .w78 { width: 78px; } .w92 { width: 92px; }
.fx-ok { width: 1em; height: 1em; border-radius: 50%; background: var(--ft-accent); color: var(--on-accent); font-size: 20px; box-shadow: 0 0 0 3px var(--ft-window); }
.fx-ok.quiet { background: color-mix(in srgb, var(--ink) 55%, var(--ft-window)); color: var(--ft-window); }
.fx-ok::after {
  content: ""; position: absolute; left: .35em; top: .17em; width: .2em; height: .4em;
  border: solid currentColor; border-width: 0 .1em .1em 0; rotate: 45deg;
}

/* 1 写下约定 → 发给对方 → 对方确认 */
.a-card { left: 6px; top: 4px; width: 76px; height: 72px; }
.a-card .fx-bar, .a-peer .fx-bar { left: 10px; }
.a-h { top: 12px; } .a-b1 { top: 28px; } .a-b2 { top: 38px; } .a-b3 { top: 48px; }
.a-send { left: 6px; top: 86px; width: 56px; height: 22px; border-radius: 8px; background: var(--ft-inner); box-shadow: 0 0 0 1px var(--ft-ring); }
.a-send .fx-bar { left: 11px; top: 8px; }
.a-peer { left: 64px; top: 28px; width: 56px; height: 54px; }
.a-ph { top: 12px; } .a-pb { top: 26px; }
.a-ok { right: -7px; bottom: -7px; }

/* 2 点「+」补充进展 → 新记录带图片落下 → 对方确认 */
.p-win { left: 6px; top: 4px; width: 114px; height: 110px; }
.p-title { left: 10px; top: 12px; }
.p-add { right: 9px; top: 6px; width: 16px; height: 16px; border-radius: 6px; background: var(--ft-inner); box-shadow: 0 0 0 1px var(--ft-ring); }
.p-add::before, .p-add::after { content: ""; position: absolute; border-radius: 1px; background: var(--ft-heading); }
.p-add::before { left: 4.5px; top: 7px; width: 7px; height: 2px; }
.p-add::after { left: 7px; top: 4.5px; width: 2px; height: 7px; }
.p-row { left: 10px; right: 10px; height: 20px; }
.p-r1 { top: 28px; } .p-r2 { top: 52px; } .p-new { top: 78px; }
.p-dot { left: 0; top: 7px; width: 6px; height: 6px; border-radius: 50%; background: var(--ft-data); }
.p-rh, .p-nh { top: 3px; } .p-rb, .p-nb { top: 12px; }
.p-rh, .p-rb { left: 14px; } .p-nh, .p-nb { left: 28px; }
.p-thumb { left: 0; top: 0; width: 20px; height: 20px; overflow: hidden; border-radius: 5px; background: var(--ft-inner); box-shadow: 0 0 0 1px var(--ft-ring); }
.p-pic { inset: 0; }
.p-pic::before { content: ""; position: absolute; left: 11px; top: 4px; width: 5px; height: 5px; border-radius: 50%; background: var(--ft-heading); }
.p-pic::after { content: ""; position: absolute; left: 3px; top: 12px; width: 14px; height: 14px; border-radius: 4px; background: var(--ft-body); rotate: 45deg; }
.p-state { right: 0; top: 4px; width: 12px; height: 12px; }
.p-pending { inset: 0; border: 1.5px dashed var(--ft-heading); border-radius: 50%; opacity: 0; }
.p-done { inset: 0; font-size: 12px; box-shadow: none; }

/* 3 一方提交 → 双方各自同意 → 结案 */
.d-card { left: 14px; top: 4px; width: 98px; height: 54px; }
.d-card .fx-bar { left: 10px; }
.d-h { top: 10px; } .d-b1 { top: 24px; } .d-b2 { top: 34px; }
.d-pill { right: 8px; bottom: 7px; width: 28px; height: 10px; border-radius: 5px; background: color-mix(in srgb, var(--ft-accent) 20%, var(--ft-window)); box-shadow: inset 0 0 0 1px var(--ft-accent); }
.d-av { top: 80px; width: 24px; height: 24px; border-radius: 50%; background: var(--ft-window); box-shadow: 0 0 0 1px var(--ft-ring), 0 4px 10px var(--ft-shadow); }
.d-a1 { left: 18px; } .d-a2 { left: 84px; }
.d-head { left: 8px; top: 5px; width: 8px; height: 8px; border-radius: 50%; background: var(--ft-heading); }
.d-body { left: 5px; top: 15px; width: 14px; height: 6px; border-radius: 6px 6px 2px 2px; background: var(--ft-body); }
.d-tick { right: -4px; bottom: -4px; font-size: 11px; box-shadow: 0 0 0 2px var(--ft-window); }
.d-link { left: 46px; top: 91px; width: 34px; height: 2px; border-radius: 1px; background: var(--ft-heading); }
.d-seal { left: 47px; top: 46px; font-size: 32px; }

/* 4 等了 14 天 → 点「结束」→ 状态变为已结束 */
.c-win { left: 6px; top: 4px; width: 114px; height: 110px; }
.c-win .fx-bar { left: 10px; }
.c-h { top: 14px; } .c-b1 { top: 34px; } .c-b2 { top: 44px; }
.c-pill { right: 10px; top: 9px; width: 30px; height: 14px; border-radius: 7px; background: color-mix(in srgb, var(--ft-accent) 16%, var(--ft-window)); box-shadow: inset 0 0 0 1px var(--ft-accent); }
.c-pill-bar { left: 8px; top: 5px; width: 14px; background: var(--ft-accent); }
.c-days { left: 10px; top: 62px; display: flex; gap: 3px; }
.c-day { width: 4px; height: 12px; border-radius: 2px; background: var(--ft-heading); }
.c-btn { left: 10px; top: 84px; width: 58px; height: 20px; border-radius: 8px; background: var(--ft-inner); box-shadow: 0 0 0 1px var(--ft-ring); }
.c-btn .fx-bar { left: 12px; top: 8px; }

@media (max-width: 767px) {
  .feature-section { margin-top: 28px; }
  .feature-grid { grid-template-columns: minmax(0, 1fr); }
  .feature-copy { padding: 20px 20px 18px; }
}

/* 播放：只在允许动效时生效。reduce 时没有任何过渡、动画或隐藏，直接是终态。 */
@media (prefers-reduced-motion: no-preference) {
  .feature-tile { transition: background-color 200ms ease; }
  .feature-art { transition: background-color 200ms ease, box-shadow 200ms ease, opacity 160ms ease, filter 160ms ease; }
  .feature-art::before { transition: background 200ms ease; }
  .feature-chip { transition: transform 220ms var(--ft-move), box-shadow 220ms ease, color 200ms ease; }
  /* 还没播放过的格子先隐藏面板，进入视口后再淡入 */
  .feature-grid[data-motion] .feature-tile:not(.is-seen) .feature-art { opacity: 0; }
  .feature-tile.is-fading .feature-art { opacity: 0; filter: blur(6px); }

  @keyframes ft-art-in { from { opacity: 0; translate: 0 6px; scale: .97; } }
  @keyframes ft-pop { from { opacity: 0; scale: .9; translate: 0 4px; } }
  @keyframes ft-rise { from { opacity: 0; translate: 0 6px; } }
  @keyframes ft-drop { from { opacity: 0; translate: 0 -6px; } }
  @keyframes ft-slide { from { opacity: 0; translate: 14px 0; } }
  @keyframes ft-grow { from { scale: 0 1; } }
  @keyframes ft-grow-x { from { scale: 0 1; opacity: 0; } }
  @keyframes ft-badge { from { opacity: 0; scale: .3; } }
  @keyframes ft-press { 50% { scale: .88; } }
  @keyframes ft-draw { from { stroke-dashoffset: 1; } }
  @keyframes ft-chip-line { 0%, 78% { opacity: 1; } 100% { opacity: 0; } }
  @keyframes ft-chip-solid { 0%, 78% { opacity: 0; } 100% { opacity: 1; } }
  @keyframes ft-pending { 0%, 75% { opacity: 1; } 100% { opacity: 0; } }
  @keyframes ft-day { from { background: var(--ft-data); } }
  @keyframes ft-pill-from { from { background: var(--ft-inner); box-shadow: inset 0 0 0 1px var(--ft-ring); } }
  @keyframes ft-bar-from { from { background: var(--ft-body); } }
  @keyframes ft-pill-neutral { from { background: var(--ft-data); box-shadow: none; } }

  .feature-tile.is-first.is-played .feature-art { animation: ft-art-in 520ms var(--ft-move) backwards; }

  /* icon chip：线条逐笔重绘，之后换回实心图标 */
  .feature-tile.is-played .feature-chip > .icon { animation: ft-chip-solid 1300ms linear backwards; }
  .feature-tile.is-played .feature-chip-draw { animation: ft-chip-line 1300ms linear backwards; }
  .feature-tile.is-played .feature-chip-draw path { animation: ft-draw 520ms var(--ft-move) backwards; }
  .feature-tile.is-played .feature-chip-draw path:nth-child(2) { animation-delay: 140ms; }
  .feature-tile.is-played .feature-chip-draw path:nth-child(3) { animation-delay: 280ms; }
  .feature-tile.is-played .feature-chip-draw path:nth-child(4) { animation-delay: 420ms; }

  /* 1 */
  .is-played .a-card { animation: ft-pop 420ms var(--ft-pop) 150ms backwards; }
  .is-played .a-h { animation: ft-grow 300ms var(--ft-move) 450ms backwards; }
  .is-played .a-b1 { animation: ft-grow 300ms var(--ft-move) 580ms backwards; }
  .is-played .a-b2 { animation: ft-grow 300ms var(--ft-move) 700ms backwards; }
  .is-played .a-b3 { animation: ft-grow 300ms var(--ft-move) 820ms backwards; }
  .is-played .a-send { animation: ft-rise 360ms var(--ft-move) 1100ms backwards, ft-press 300ms var(--ft-move) 1700ms backwards; }
  .is-played .a-peer { animation: ft-slide 480ms var(--ft-move) 1950ms backwards; }
  .is-played .a-ok { animation: ft-badge 420ms var(--ft-pop) 2450ms backwards; }

  /* 2 */
  .is-played .p-win { animation: ft-pop 420ms var(--ft-pop) 150ms backwards; }
  .is-played .p-title { animation: ft-grow 300ms var(--ft-move) 420ms backwards; }
  .is-played .p-r1 { animation: ft-rise 360ms var(--ft-move) 520ms backwards; }
  .is-played .p-r2 { animation: ft-rise 360ms var(--ft-move) 640ms backwards; }
  .is-played .p-add { animation: ft-press 320ms var(--ft-move) 1000ms backwards; }
  .is-played .p-new { animation: ft-drop 480ms var(--ft-move) 1300ms backwards; }
  .is-played .p-pic { animation: ft-badge 400ms var(--ft-pop) 1750ms backwards; }
  .is-played .p-pending { animation: ft-pending 1000ms linear 1400ms backwards; }
  .is-played .p-done { animation: ft-badge 420ms var(--ft-pop) 2300ms backwards; }

  /* 3 */
  .is-played .d-card { animation: ft-pop 420ms var(--ft-pop) 150ms backwards; }
  .is-played .d-h { animation: ft-grow 300ms var(--ft-move) 400ms backwards; }
  .is-played .d-b1 { animation: ft-grow 300ms var(--ft-move) 520ms backwards; }
  .is-played .d-b2 { animation: ft-grow 300ms var(--ft-move) 640ms backwards; }
  .is-played .d-a1 { animation: ft-pop 380ms var(--ft-pop) 800ms backwards; }
  .is-played .d-a2 { animation: ft-pop 380ms var(--ft-pop) 950ms backwards; }
  .is-played .d-t1 { animation: ft-badge 360ms var(--ft-pop) 1350ms backwards; }
  .is-played .d-t2 { animation: ft-badge 360ms var(--ft-pop) 1750ms backwards; }
  .is-played .d-link { animation: ft-grow-x 400ms var(--ft-move) 2000ms backwards; transform-origin: center; }
  .is-played .d-seal { animation: ft-badge 480ms var(--ft-pop) 2400ms backwards; }
  .is-played .d-pill { animation: ft-pill-neutral 360ms ease 2600ms backwards; }

  /* 4 */
  .is-played .c-win { animation: ft-pop 420ms var(--ft-pop) 150ms backwards; }
  .is-played .c-h { animation: ft-grow 300ms var(--ft-move) 400ms backwards; }
  .is-played .c-b1 { animation: ft-grow 300ms var(--ft-move) 520ms backwards; }
  .is-played .c-b2 { animation: ft-grow 300ms var(--ft-move) 640ms backwards; }
  .is-played .c-day { animation: ft-day 220ms ease backwards; }
  .is-played .c-day:nth-child(1) { animation-delay: 850ms; } .is-played .c-day:nth-child(2) { animation-delay: 900ms; }
  .is-played .c-day:nth-child(3) { animation-delay: 950ms; } .is-played .c-day:nth-child(4) { animation-delay: 1000ms; }
  .is-played .c-day:nth-child(5) { animation-delay: 1050ms; } .is-played .c-day:nth-child(6) { animation-delay: 1100ms; }
  .is-played .c-day:nth-child(7) { animation-delay: 1150ms; } .is-played .c-day:nth-child(8) { animation-delay: 1200ms; }
  .is-played .c-day:nth-child(9) { animation-delay: 1250ms; } .is-played .c-day:nth-child(10) { animation-delay: 1300ms; }
  .is-played .c-day:nth-child(11) { animation-delay: 1350ms; } .is-played .c-day:nth-child(12) { animation-delay: 1400ms; }
  .is-played .c-day:nth-child(13) { animation-delay: 1450ms; } .is-played .c-day:nth-child(14) { animation-delay: 1500ms; }
  .is-played .c-btn { animation: ft-rise 360ms var(--ft-move) 1850ms backwards, ft-press 300ms var(--ft-move) 2400ms backwards; }
  .is-played .c-pill { animation: ft-pill-from 400ms ease 2650ms backwards; }
  .is-played .c-pill-bar { animation: ft-bar-from 400ms ease 2650ms backwards; }
}
