/* "Share from Instagram" step cards. Base styles = the final, meaningful frame
   (shown as-is under reduced motion). Keyframes loop from the start state to it.
   Only transform and opacity animate. */
.fc-grid {
  --fc-out: cubic-bezier(0.23, 1, 0.32, 1);
  --fc-io: cubic-bezier(0.77, 0, 0.175, 1);
  --fc-drawer: cubic-bezier(0.32, 0.72, 0, 1);
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px;
}
@media (max-width: 899px) { .fc-grid { grid-template-columns: minmax(0, 1fr); } }

.fc { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: 0 1px 2px rgba(20, 24, 36, .04), 0 6px 20px -12px rgba(20, 24, 36, .14); overflow: hidden; }
.fc-stage { position: relative; height: 212px; margin: 6px 6px 0; border-radius: 11px; overflow: hidden;
  background: radial-gradient(120% 90% at 50% 0%, #fff 0%, #f4f5f8 70%); box-shadow: inset 0 0 0 1px rgba(20, 24, 36, .05); }
.fc-stage::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(rgba(20, 24, 36, .07) 1px, transparent 1.2px); background-size: 14px 14px;
  -webkit-mask-image: radial-gradient(70% 70% at 50% 40%, transparent 30%, #000 100%); mask-image: radial-gradient(70% 70% at 50% 40%, transparent 30%, #000 100%); }
.fc-copy { padding: 16px 18px 18px; flex: 1; }
.fc-n { display: block; font-size: 11.5px; font-weight: 600; letter-spacing: .02em; color: var(--ink-3); margin-bottom: 4px; }
.fc-copy h3 { margin: 0; font-size: 15px; font-weight: 650; letter-spacing: -.01em; color: var(--ink); }
.fc-copy p { margin: 4px 0 0; font-size: 13.5px; line-height: 1.45; color: var(--ink-2); max-width: 40ch; }
.fc svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.fc svg.fc-tower { fill: currentColor; stroke: none; }

/* shared animation plumbing: one clock per card, offsets are deliberately uneven */
.fc .fa { animation-duration: var(--d); animation-delay: var(--dl); animation-iteration-count: infinite;
  animation-fill-mode: both; animation-timing-function: var(--fc-out); }
.fc-1 { --d: 5.2s; --dl: .2s; }
.fc-2 { --d: 5.6s; --dl: 1.1s; }
.fc-3 { --d: 6.2s; --dl: 1.9s; }

/* ---------- 1. Tap Share: phone ---------- */
.ph { position: absolute; left: 50%; top: 20px; width: 128px; height: 226px; margin-left: -64px; }
.ph-screen { position: absolute; inset: 0; border-radius: 22px; overflow: hidden; background: linear-gradient(165deg, #3a404d 0%, #23272f 55%, #181b21 100%);
  box-shadow: 0 0 0 4px #fff, 0 0 0 5px rgba(20, 24, 36, .10), 0 18px 34px -14px rgba(20, 24, 36, .45); }
.ph-blob { position: absolute; border-radius: 50%; }
.ph-blob.a { width: 120px; height: 120px; left: -26px; top: 18px; background: radial-gradient(circle at 40% 40%, rgba(255,255,255,.22), rgba(255,255,255,0) 65%); }
.ph-blob.b { width: 70px; height: 70px; right: -12px; top: 70px; background: radial-gradient(circle, rgba(140, 160, 255, .22), rgba(140,160,255,0) 70%); }
.ph-rail { position: absolute; right: 9px; top: 40px; display: flex; flex-direction: column; gap: 10px; color: rgba(255,255,255,.92); }
.ph-rail svg { width: 17px; height: 17px; display: block; }
.ph-plane { position: relative; display: block; animation: none; }
.ph-ring { position: absolute; left: 50%; top: 50%; width: 30px; height: 30px; margin: -15px 0 0 -15px; border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,.9); opacity: 0; animation-name: ph-ring; }
.ph-cap { position: absolute; left: 10px; bottom: 46px; display: grid; grid-template-columns: 16px auto; gap: 4px 6px; align-items: center; }
.ph-cap .av { width: 16px; height: 16px; border-radius: 50%; background: rgba(255,255,255,.55); grid-row: span 2; }
.ph-cap .ln { height: 4px; border-radius: 2px; background: rgba(255,255,255,.6); }
.ph-cap .w1 { width: 46px; } .ph-cap .w2 { width: 30px; background: rgba(255,255,255,.3); }
.ph-scrim { position: absolute; inset: 0; background: rgba(10, 12, 18, .38); animation-name: ph-scrim; }
.ph-sheet { position: absolute; left: 0; right: 0; bottom: 0; height: 112px; padding: 6px 10px 0; background: #fff; border-radius: 14px 14px 0 0;
  animation-name: ph-sheet; }
.ph-sheet .grab, .sheet .grab { display: block; width: 22px; height: 3px; border-radius: 2px; background: #d5d9e2; margin: 0 auto 9px; }
.ph-people { display: flex; justify-content: space-between; }
.ph-people span { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.ph-people i { width: 20px; height: 20px; border-radius: 50%; background: #e6e9f0; }
.ph-people span:nth-child(2) i { background: #d9dfee; } .ph-people span:nth-child(3) i { background: #eceef3; }
.ph-people b { width: 16px; height: 3px; border-radius: 2px; background: #e3e6ee; }
.ph-acts { display: flex; justify-content: space-between; margin-top: 10px; padding-top: 9px; border-top: 1px solid #eef0f4; }
.ph-acts i { width: 20px; height: 20px; border-radius: 6px; background: #f1f3f7; box-shadow: inset 0 0 0 1px #e3e6ee; }
.ph-finger { position: absolute; right: 4px; top: 89px; width: 26px; height: 26px; border-radius: 50%; pointer-events: none;
  background: rgba(255,255,255,.28); box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.95), 0 4px 14px rgba(10, 12, 18, .4);
  -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); opacity: 0; animation-name: ph-finger; }
/* finger: rests, glides in, presses, lifts away */
@keyframes ph-finger {
  0%, 8%   { opacity: 0; transform: translate(46px, 58px) scale(1); animation-timing-function: var(--fc-io); }
  14%      { opacity: 1; }
  27%      { opacity: 1; transform: translate(0, 0) scale(1); animation-timing-function: var(--fc-out); }
  30%      { transform: translate(0, 0) scale(.84); }
  34%      { opacity: 1; transform: translate(0, 0) scale(1); }
  42%, 100% { opacity: 0; transform: translate(-4px, 10px) scale(1); }
}
@keyframes ph-ring {
  0%, 29%  { opacity: 0; transform: scale(.6); }
  31%      { opacity: .7; transform: scale(.75); }
  46%, 100% { opacity: 0; transform: scale(1.6); }
}
@keyframes ph-scrim {
  0%, 32%  { opacity: 0; }
  46%, 84% { opacity: 1; }
  94%, 100% { opacity: 0; }
}
@keyframes ph-sheet {
  0%, 32%  { transform: translateY(102%); animation-timing-function: var(--fc-drawer); }
  48%, 84% { transform: translateY(0); animation-timing-function: var(--fc-io); }
  95%, 100% { transform: translateY(102%); }
}

/* ---------- 2. Pick Watch in Tower: share sheet ---------- */
.sheet { position: absolute; left: 50%; top: 22px; width: 220px; margin-left: -110px; padding: 7px 7px 7px; background: #fff; border-radius: 16px;
  box-shadow: 0 0 0 1px rgba(20, 24, 36, .07), 0 2px 4px rgba(20, 24, 36, .04), 0 18px 36px -16px rgba(20, 24, 36, .30); }
.sh-rows { position: relative; }
.sh-hi { position: absolute; left: 0; right: 0; top: 0; height: 38px; border-radius: 10px; background: var(--primary-soft);
  transform: translateY(76px); animation-name: sh-hi; }
.sh-row { position: relative; display: flex; align-items: center; gap: 10px; height: 38px; padding: 0 8px; font-size: 12.5px; color: var(--ink-2); }
.sh-row .tile { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: #f4f5f8; box-shadow: inset 0 0 0 1px #e6e9f0; color: #6b7282; flex: none; }
.sh-row .tile svg { width: 14px; height: 14px; }
.sh-row.is-t { color: var(--ink); font-weight: 600; animation-name: sh-press; }
.sh-row.is-t .tile { background: var(--primary); box-shadow: none; color: #fff; }
.sh-row.is-t .tile svg { width: 15px; height: 15px; }
.sh-end { position: relative; margin-left: auto; width: 16px; height: 16px; color: var(--primary); }
.sh-end svg { position: absolute; inset: 0; width: 16px; height: 16px; }
.sh-end .chev { color: var(--ink-3); opacity: 0; animation-name: sh-chev; }
.sh-end .ok { stroke-width: 2.2; animation-name: sh-ok; }
@keyframes sh-hi {
  0%, 10%  { opacity: 0; transform: translateY(0) scale(1); }
  17%      { opacity: 1; transform: translateY(0) scale(1); animation-timing-function: var(--fc-io); }
  38%      { transform: translateY(76px) scale(1); }
  42%      { transform: translateY(76px) scale(.97); }
  47%      { opacity: 1; transform: translateY(76px) scale(1); }
  86%      { opacity: 1; transform: translateY(76px) scale(1); }
  94%, 100% { opacity: 0; transform: translateY(76px) scale(1); }
}
@keyframes sh-press {
  0%, 38%  { transform: scale(1); }
  42%      { transform: scale(.97); }
  47%, 100% { transform: scale(1); }
}
@keyframes sh-chev {
  0%, 44%  { opacity: 1; }
  50%, 88% { opacity: 0; }
  96%, 100% { opacity: 1; }
}
@keyframes sh-ok {
  0%, 45%  { opacity: 0; transform: scale(.8); }
  53%, 86% { opacity: 1; transform: scale(1); }
  92%, 100% { opacity: 0; transform: scale(1); }
}

/* ---------- 3. Watched: watchers list ---------- */
.wl { position: absolute; left: 50%; top: 22px; width: 248px; margin-left: -124px; background: #fff; border-radius: 14px;
  box-shadow: 0 0 0 1px rgba(20, 24, 36, .07), 0 2px 4px rgba(20, 24, 36, .04), 0 18px 36px -16px rgba(20, 24, 36, .30); }
.wl-head { display: flex; align-items: center; justify-content: space-between; height: 36px; padding: 0 12px; border-bottom: 1px solid #eef0f4;
  font-size: 12px; font-weight: 650; color: var(--ink); }
.wl-count { height: 18px; min-width: 24px; padding: 0 6px; border-radius: 99px; background: #f1f3f7; overflow: hidden; font-size: 11px; font-weight: 600; color: var(--ink-2); }
.wl-count .roll { display: flex; flex-direction: column; transform: translateY(-18px); animation-name: wl-roll; }
.wl-count b { display: block; height: 18px; line-height: 18px; text-align: center; font-weight: 600; font-variant-numeric: tabular-nums; }
.wl-list { position: relative; height: 132px; overflow: hidden; padding: 0 12px; }
.wl-row { display: flex; align-items: center; gap: 9px; height: 44px; }
.wl-row + .wl-row { box-shadow: inset 0 1px 0 #f1f3f7; }
.wl-row .av { position: relative; width: 26px; height: 26px; border-radius: 8px; flex: none; }
.av.new { display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); font-size: 12px; font-weight: 700; }
.av.g1 { background: #e6e9f0; } .av.g2 { background: #eceef3; } .av.g3 { background: #e9ebf1; }
.wl-row .who { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1; }
.wl-row .who b { font-size: 12px; font-weight: 650; color: var(--ink); }
.wl-row .who small { font-size: 10.5px; color: var(--ink-3); }
.wl-row .ln { display: block; width: 62px; height: 5px; border-radius: 3px; background: #e6e9f0; }
.wl-row .ln.s { width: 40px; margin-top: 4px; background: #eff1f5; }
.mini-bars { display: flex; align-items: flex-end; gap: 3px; height: 14px; }
.mini-bars i { width: 4px; border-radius: 1px; background: #e3e6ee; height: 7px; }
.mini-bars i:nth-child(2) { height: 11px; } .mini-bars i:nth-child(3) { height: 9px; }
.tick { position: absolute; right: -4px; bottom: -4px; width: 13px; height: 13px; border-radius: 50%; display: grid; place-items: center;
  background: var(--primary); color: #fff; box-shadow: 0 0 0 2px #fff; animation-name: wl-tick; }
.tick svg { width: 9px; height: 9px; stroke-width: 3; }
.spark { position: relative; width: 64px; height: 22px; overflow: hidden; flex: none; }
.spark svg { display: block; width: 64px; height: 22px; color: var(--primary); stroke-width: 1.7; }
.spark .cover { position: absolute; top: 0; bottom: 0; left: -10px; width: calc(100% + 10px);
  background: linear-gradient(90deg, rgba(255,255,255,0), #fff 10px); transform: translateX(101%); animation-name: wl-draw; }
.wl-row.is-new { animation-name: wl-new; }
.wl-row.old { animation-name: wl-old; }
/* new row lands at the top while the others make room; on reset it leaves and they close the gap */
@keyframes wl-old {
  0%, 10%  { transform: translateY(-44px); animation-timing-function: var(--fc-io); }
  24%, 87% { transform: translateY(0); animation-timing-function: var(--fc-io); }
  98%, 100% { transform: translateY(-44px); }
}
@keyframes wl-new {
  0%, 13%  { opacity: 0; transform: translateY(-10px) scale(.98); }
  27%, 85% { opacity: 1; transform: translateY(0) scale(1); }
  91%, 100% { opacity: 0; transform: translateY(0) scale(.98); }
}
@keyframes wl-tick {
  0%, 27%  { opacity: 0; transform: scale(.7); }
  34%, 100% { opacity: 1; transform: scale(1); }
}
@keyframes wl-draw {
  0%, 30%  { transform: translateX(0); animation-timing-function: cubic-bezier(0.65, 0, 0.35, 1); }
  56%, 100% { transform: translateX(101%); }
}
@keyframes wl-roll {
  0%, 19%  { transform: translateY(0); }
  27%, 88% { transform: translateY(-18px); animation-timing-function: var(--fc-io); }
  96%, 100% { transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .fc .fa { animation: none; }
}
