/* The hero phone: "snap, sort, read, write, say what's missing, listed".
   A plain-CSS twin of the app's onboarding finish-screen phone
   (Beatem/apps/web/src/components/onboarding/journey/PhoneScene.tsx).
   Drawn at the app's 196px width, then scaled whole with --pd-s so every
   line of 6-9px text grows with it and nothing is re-laid-out. */

.pd {
  --pd-s: 1.5;
  --pd-destructive: #dc2626;
  --pd-success-deep: #157a47;
  display: flex; flex-direction: column; align-items: center; gap: 22px;
  width: calc(206px * var(--pd-s));
  color: var(--foreground);
}
.pd-stage { position: relative; width: calc(206px * var(--pd-s)); height: calc(434px * var(--pd-s)); }
.pd-scale { width: 206px; transform: scale(var(--pd-s)); transform-origin: top left; }

/* The device: black glass, a bright rim, a dynamic island and side keys. */
.pd-phone {
  position: relative; box-sizing: content-box;
  width: 196px; height: 424px; /* 585 : 1266, the real screen's shape */
  border: 5px solid #0d0e10; border-radius: 28px;
  background: #0d0e10; overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, .55),
    0 0 0 2.5px rgba(13, 14, 16, .9),
    0 30px 40px -24px rgba(0, 70, 72, .4);
}
.pd-phone::before { /* dynamic island */
  content: ''; position: absolute; z-index: 7; top: 7px; left: 50%;
  width: 52px; height: 14px; transform: translateX(-50%);
  border-radius: 9px; background: #0d0e10;
}
.pd-phone::after { /* glass: a faint rim light and a soft diagonal reflection */
  content: ''; position: absolute; inset: 0; z-index: 6; pointer-events: none; border-radius: 23px;
  background: linear-gradient(118deg, rgba(255, 255, 255, .13) 0%, rgba(255, 255, 255, 0) 30%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .10);
}

.pd-phone img { display: block; width: 100%; height: 100%; object-fit: cover; max-width: none; }
.pd-scene { position: absolute; inset: 0; opacity: 0; pointer-events: none; will-change: opacity, transform; }
.pd-abs { position: absolute; inset: 0; }

/* 1 · camera */
.pd-cam { background: #0d0e10; }
.pd-cam-top { position: absolute; left: 0; right: 0; top: 28px; display: flex; justify-content: center; }
.pd-cam-top span { background: rgba(255,255,255,.16); color: #fff; border-radius: 9999px; padding: 2px 8px; font-size: 8px; font-weight: 500; }
.pd-vf { position: absolute; top: 19%; left: 50%; width: 136px; height: 170px; transform: translateX(-50%); }
.pd-vf-in { position: relative; width: 100%; height: 100%; overflow: hidden; border-radius: 6px; background: rgba(0,0,0,.4); }
.pd-corner { position: absolute; width: 12px; height: 12px; border: 0 solid rgba(255,255,255,.85); }
.pd-corner.tl { top: -6px; left: -6px; border-top-width: 2px; border-left-width: 2px; border-top-left-radius: 6px; }
.pd-corner.tr { top: -6px; right: -6px; border-top-width: 2px; border-right-width: 2px; border-top-right-radius: 6px; }
.pd-corner.bl { bottom: -6px; left: -6px; border-bottom-width: 2px; border-left-width: 2px; border-bottom-left-radius: 6px; }
.pd-corner.br { bottom: -6px; right: -6px; border-bottom-width: 2px; border-right-width: 2px; border-bottom-right-radius: 6px; }
.pd-cam-bottom { position: absolute; left: 0; right: 0; bottom: 20px; display: flex; align-items: center; justify-content: center; }
.pd-thumbs { position: absolute; left: 16px; display: flex; }
.pd-thumb { display: none; width: 32px; height: 32px; overflow: hidden; border-radius: 5px; border: 2px solid #fff; }
.pd-thumb + .pd-thumb { margin-left: -12px; }
.pd-shutter { position: relative; width: 44px; height: 44px; border-radius: 9999px; border: 3px solid #fff; display: grid; place-items: center; transition: transform 120ms; }
.pd-shutter > div { width: 32px; height: 32px; border-radius: 9999px; background: #fff; }
.pd-flash { position: absolute; inset: 0; background: #fff; opacity: 0; }
/* a tap: a ring that grows out of the thing being pressed */
.pd-rip { position: absolute; inset: -3px; border-radius: inherit; opacity: 0; pointer-events: none; }
.pd-shutter .pd-rip { border: 2px solid rgba(255,255,255,.8); }
.pd-go .pd-rip { inset: 0; background: rgba(255,255,255,.55); }

/* 2 · sort */
.pd-sort, .pd-read { background: var(--surface); padding: 28px 12px 0; }
.pd-h { margin: 0; font-size: 10px; font-weight: 600; color: var(--foreground); }
.pd-sub { margin: 0 0 12px; font-size: 8px; color: var(--muted-foreground); }
.pd-haul { position: relative; width: 172px; height: 224px; margin-top: 2px; }
.pd-hp { position: absolute; left: 0; top: 0; width: 34px; height: 42px; overflow: hidden; border-radius: 5px; box-shadow: 0 1px 4px rgba(0, 0, 0, .18); will-change: transform; }
.pd-hl { position: absolute; left: 118px; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; opacity: 0; }
.pd-hl b { font-size: 9px; font-weight: 600; }
.pd-pill { display: inline-flex; align-items: center; gap: 4px; background: var(--success-soft); color: var(--pd-success-deep); border-radius: 9999px; padding: 2px 6px; font-size: 8px; font-weight: 500; }

/* 3 · read */
.pd-scan { position: relative; width: 102px; height: 128px; margin: 0 auto; overflow: hidden; border-radius: 6px; }
.pd-sweep { position: absolute; left: 0; right: 0; top: 0; height: 32px; background: linear-gradient(to bottom, transparent, color-mix(in srgb, var(--brand) 45%, transparent), transparent); }
.pd-read-t { margin: 12px 0 0; text-align: center; font-size: 9px; font-weight: 600; }
.pd-steps { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; padding: 0 4px; }
.pd-step { display: flex; align-items: center; gap: 6px; font-size: 8px; color: var(--muted-foreground); }
.pd-step i { width: 12px; height: 12px; flex-shrink: 0; display: grid; place-items: center; border-radius: 9999px; border: 1px solid var(--border-strong); color: #fff; }
.pd-step i svg { display: none; }
.pd-step.done { color: var(--foreground); }
.pd-step.done i { background: var(--success); border-color: var(--success); }
.pd-step.done i svg { display: block; }

/* 4 · the listing form */
.pd-form { background: var(--surface-muted); }
.pd-form-top { display: flex; align-items: center; gap: 4px; background: var(--surface); padding: 26px 8px 6px; }
.pd-form-top svg { color: var(--muted-foreground); flex-shrink: 0; }
.pd-form-top p { margin: 0; }
.pd-form-title { font-size: 8px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 160px; min-height: 10px; }
.pd-caret { display: inline-block; width: 1px; height: 8px; margin-left: 1px; background: var(--foreground); transform: translateY(1px); }
.pd-form-item { font-size: 7px; color: var(--muted-foreground); }
.pd-form-photos { display: flex; gap: 4px; padding: 6px 8px; }
.pd-form-photos div { width: 28px; height: 36px; overflow: hidden; border-radius: 4px; }
.pd-eyebrow { margin: 0; padding: 0 8px 4px; font-size: 6px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--muted-foreground); }
.pd-fields { margin: 0 8px; overflow: hidden; border: 1px solid var(--border-strong); border-radius: 6px; background: var(--surface); }
.pd-field { display: flex; align-items: center; gap: 6px; padding: 6px 8px; border-bottom: 1px solid var(--border-strong); }
.pd-field:last-child { border-bottom: 0; }
.pd-field .dot { width: 4px; height: 4px; border-radius: 9999px; background: var(--success); flex-shrink: 0; }
.pd-field.todo .dot { background: var(--pd-destructive); }
.pd-field span:nth-child(2) { font-size: 8px; font-weight: 500; color: var(--foreground); }
.pd-field .val { margin-left: auto; font-size: 8px; color: var(--muted-foreground); max-width: 96px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pd-field.todo .val { color: var(--pd-destructive); }
.pd-field.filled .val { color: var(--foreground); }
.pd-field svg { color: var(--muted-foreground); flex-shrink: 0; }
.pd-bottom { position: absolute; left: 8px; right: 8px; bottom: 8px; display: flex; flex-direction: column; gap: 6px; }
.pd-said { border-radius: 6px; background: var(--brand-soft); color: var(--brand-deep); padding: 4px 8px; font-size: 8px; line-height: 1.35; }
.pd-btns { display: flex; gap: 6px; }
.pd-talk { display: flex; align-items: center; justify-content: center; gap: 4px; height: 28px; padding: 0 8px; border-radius: 9999px; background: var(--surface); color: var(--foreground); font-size: 8px; font-weight: 500; transition: background-color 300ms, color 300ms; }
.pd-talk.on { background: var(--brand-deep); color: #fff; }
.pd-bars { display: flex; align-items: center; gap: 2px; height: 12px; }
.pd-bars i { display: block; width: 2px; border-radius: 9999px; background: #fff; }
.pd-go { position: relative; overflow: hidden; flex: 1; display: flex; align-items: center; justify-content: center; height: 28px; border-radius: 9999px; background: color-mix(in srgb, var(--brand-deep) 45%, transparent); color: #fff; font-size: 8px; font-weight: 600; transition: background-color 300ms, transform 300ms; }
.pd-go.ready { background: var(--brand-deep); }
.pd-go.press { transform: scale(.95); }

/* 5 · listed */
.pd-done { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; background: var(--surface); padding: 0 16px; }
.pd-done-ph { position: relative; width: 66px; height: 84px; }
.pd-done-ph > div:first-child { width: 100%; height: 100%; overflow: hidden; border-radius: 6px; box-shadow: var(--shadow-overlay); }
.pd-done-ok { position: absolute; right: -8px; bottom: -8px; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 9999px; background: var(--success); color: #fff; }
.pd-done h4 { margin: 0; font-size: 11px; font-weight: 600; text-align: center; }
.pd-done p { margin: 2px 0 0; font-size: 8px; color: var(--muted-foreground); text-align: center; }
.pd-coins { display: flex; align-items: center; gap: 4px; }
.pd-coins > * { opacity: 0; }
.pd-logo { display: inline-flex; align-items: center; justify-content: center; height: 20px; padding: 0 7px; border-radius: 9999px; background: var(--surface); border: 1px solid var(--border-strong); font-size: 8px; font-weight: 800; white-space: nowrap; }
.pd-phone .pd-logo img { width: auto; height: 9px; }

/* the live status under the phone */
.pd-cap {
  display: inline-flex; align-items: center; gap: 9px; margin: 0;
  padding: 8px 16px 8px 12px; border-radius: 9999px;
  background: rgba(255, 255, 255, .88); border: 1px solid rgba(16, 48, 48, .09);
  box-shadow: 0 10px 22px -12px rgba(0, 80, 82, .35), inset 0 1px 0 #fff;
  font-family: var(--font-display, inherit); font-size: 14.5px; font-weight: 650; letter-spacing: -.01em;
  color: var(--foreground); white-space: nowrap;
}
.pd-cap i { width: 7px; height: 7px; border-radius: 9999px; background: var(--brand); box-shadow: 0 0 0 3px rgba(0, 206, 209, .22); flex-shrink: 0; }
.pd-cap.in span { animation: pd-cap-in .35s var(--ease-standard, ease) both; }
@keyframes pd-cap-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .pd-cap.in span { animation: none; } }
