/* =====================================================================
   PinBoostr home: HERO, product tour section and "Works with" strip
   (template-parts/front-hero.php + front-video.php) and the animated How it works
   (front-how.php, .phw-*). Loaded after home.css,
   uses its .ph tokens.
   Hero (2026-10-14): the promise on the left with the free "paste a URL, see
   your pins" preview as the main action; on the right the product itself,
   drawn in HTML: a new post, the pins PinBoostr made from it and the review
   queue where you approve them. Static apart from one approve click.
   ===================================================================== */
.phh { position: relative; padding: 48px 0 64px; background: #fff; }
@media (min-width: 900px) { .phh { padding: 72px 0 88px; } }
.phh-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 48px; }
.phh-in { max-width: 40rem; }
.phh-h1 { margin: 0; font-size: clamp(2.3rem, 7.4vw, 3.6rem); font-weight: 800; line-height: 1.05; letter-spacing: -.04em; color: var(--ink); text-wrap: balance; }
.phh-h1 mark { padding: 0 .06em; margin: 0 -.06em; border-radius: .12em; background: linear-gradient(transparent 36%, #ffc9d4 36%, #ffc9d4 80%, transparent 80%); color: inherit; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.phh-lead { margin: 22px 0 0; font-size: clamp(1.04rem, 1.4vw, 1.14rem); line-height: 1.65; color: var(--mut); }

/* The free preview is the hero's main action (the form is wired by assets/landing.js). */
.phh .pbl-preview--compact { max-width: 34rem; margin: 30px 0 0; }
.phh-try__label { display: block; margin-bottom: 10px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.phh .pbl-preview__form { padding: 6px; border: 1px solid #d9d9e1; border-radius: 14px; box-shadow: var(--sh-2); }
.phh .pbl-preview__form:focus-within { border-color: var(--rose); box-shadow: 0 0 0 4px rgba(225, 29, 72, .12); }
.phh .pbl-preview__input { min-height: 48px; font: 500 16px/1.2 var(--font); color: var(--ink); }
.phh .pbl-preview__input::placeholder { color: var(--mut-2); }
.phh .pbl-preview__btn { min-height: 48px; padding: 0 20px; border-radius: 10px; background: var(--rose); font: 600 16px/1 var(--font); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14); }
.phh .pbl-preview__btn:hover { transform: none; background: var(--rose-dk); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14); }
.phh .pbl-preview__btn svg { width: 15px; height: 15px; }
.phh .pbl-preview__err { font-weight: 600; }
.phh-alt { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; margin-top: 20px; font-size: 15px; color: var(--mut); }
.phh-alt a:not(.ph-btn) { display: inline-flex; align-items: center; gap: 7px; color: var(--ink); font-weight: 600; text-decoration: none; }
.phh-alt a:not(.ph-btn):hover { color: var(--rose); }
.phh-alt a:not(.ph-btn) svg { width: 15px; height: 15px; flex: none; }
.phh-alt .phh-play { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--ink); color: #fff; }
.phh-alt .phh-play svg { width: 11px; height: 11px; margin-left: 2px; }
.phh-alt a:hover .phh-play { background: var(--rose); }
.phh-trust { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 26px 0 0; padding: 22px 0 0; border-top: 1px solid var(--line-2); list-style: none; font-size: 14px; color: var(--mut); }
.phh-trust li { display: inline-flex; align-items: center; gap: 7px; }
.phh-trust svg { width: 16px; height: 16px; flex: none; color: var(--green); }

/* ---- The product on the right: post → pins → review queue ---- */
.phq { position: relative; padding: 18px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--soft); }
@media (min-width: 640px) { .phq { padding: 26px; } }
.phq-post { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 14px; align-items: center; max-width: 30rem; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r); background: #fff; box-shadow: var(--sh-1); }
.phq-fav { grid-row: span 2; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: #fdf2e9; color: #b45309; font-size: 17px; font-weight: 800; }
.phq-url { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 12.5px; color: var(--mut-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.phq-url b { flex: none; padding: 2px 7px; border-radius: 6px; background: #e8f6ed; color: #1f8a4c; font-size: 11px; font-weight: 600; }
.phq-title { min-width: 0; font-size: 15px; font-weight: 650; line-height: 1.3; letter-spacing: -.01em; color: var(--ink); }
.phq-step { position: relative; margin: 0 0 0 20px; padding: 14px 0 14px 26px; border-left: 2px dashed #d9d9e1; font-size: 13px; line-height: 1.45; color: var(--mut); }
.phq-step svg { position: absolute; left: -12px; top: 50%; width: 22px; height: 22px; margin-top: -11px; padding: 4px; border-radius: 50%; background: var(--rose); color: #fff; }
.phq-step b { color: var(--ink); font-weight: 600; }
/* The stage: the review queue, and over it the week calendar the approved pins fly into (assets/home.js
   initQueue plays the loop; without it the queue shows with the first pin approved). */
.phq-stage { position: relative; transition: opacity .4s ease; }
.phq-stage.is-fade { opacity: 0; }
.phq-queue { padding: 16px; border: 1px solid var(--line); border-radius: var(--r); background: #fff; box-shadow: var(--sh-2); transition: opacity .35s ease, transform .35s ease; }
.phq-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.phq-head b { font-size: 15px; font-weight: 650; letter-spacing: -.01em; }
.phq-head span { font-size: 12.5px; color: var(--mut-2); }
.phq-pins { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; container-type: inline-size; }
@media (min-width: 640px) { .phq-pins { gap: 14px; } }
.phq-card { display: flex; flex-direction: column; min-width: 0; }
/* Whole pins, never cropped, all the same height: the height lets the widest (2:3) pin fill its column,
   the width follows each image (--ar). */
.phq-card figure { height: 200px; height: min(250px, calc((100cqi - 28px) / 3 * 1.5)); width: auto; aspect-ratio: var(--ar, .667); max-width: 100%; margin: 0 auto; overflow: hidden; border-radius: 10px; background: var(--line-2); }
.phq-card .ph-pin, .phq-card img { display: block; width: 100%; height: 100%; }
.phq-board { display: block; margin-top: 9px; font-size: 11.5px; font-weight: 500; color: var(--mut); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.phq-btn { display: grid; margin-top: 7px; font-size: 12.5px; font-weight: 600; }
.phq-btn > span { grid-area: 1 / 1; display: flex; align-items: center; justify-content: center; gap: 5px; min-height: 32px; padding: 0 6px; border-radius: 8px; white-space: nowrap; }
.phq-yes { background: var(--ink); color: #fff; transition: transform .15s ease, background-color .15s ease; }
.phq-done { background: #e8f6ed; color: #1f8a4c; visibility: hidden; }
.phq-done svg { width: 13px; height: 13px; flex: none; }
.phq-card.is-press .phq-yes { transform: scale(.93); background: var(--rose); }
.phq-card.is-done .phq-yes { visibility: hidden; }
.phq-card.is-done .phq-done { visibility: visible; }
.phq-stage.is-live .phq-card.is-done .phq-done { animation: phq-show .3s ease both; }
/* Without the loop: one approve click, once, a moment after load. */
@media (prefers-reduced-motion: no-preference) {
  .phq-card.is-next .phq-yes { animation: phq-press .5s ease 1.6s both; }
  .phq-card.is-next .phq-done { animation: phq-show .3s ease 2.1s both; }
}
@media (prefers-reduced-motion: reduce) {
  .phq-card.is-next .phq-yes { visibility: hidden; }
  .phq-card.is-next .phq-done { visibility: visible; }
}
@keyframes phq-press { 0% { transform: none; } 40% { transform: scale(.94); background: var(--rose); } 99% { visibility: visible; } 100% { transform: none; background: var(--rose); visibility: hidden; } }
@keyframes phq-show { from { visibility: visible; opacity: 0; transform: translateY(3px); } to { visibility: visible; opacity: 1; transform: none; } }
@media (max-width: 479px) {
  .phq-btn { font-size: 11px; }
  .phq-btn > span { min-height: 28px; padding: 0 4px; }
  .phq-done svg { display: none; }
}

/* The week calendar. Its card and labels fade in while the pins themselves fly in from the queue. */
.phq-cal { position: absolute; inset: 0; display: flex; flex-direction: column; padding: 16px; visibility: hidden; }
.phq-cal::before { content: ""; position: absolute; inset: 0; border: 1px solid var(--line); border-radius: var(--r); background: #fff; box-shadow: var(--sh-2); }
.phq-cal > * { position: relative; }
.phq-cal::before, .phq-cal .phq-head, .phq-days, .phq-grid::before, .phq-time, .phq-stat { opacity: 0; transition: opacity .45s ease; }
.phq-stage.is-cal .phq-cal { visibility: visible; }
.phq-stage.is-cal .phq-cal::before, .phq-stage.is-cal .phq-cal .phq-head, .phq-stage.is-cal .phq-days, .phq-stage.is-cal .phq-grid::before { opacity: 1; transition-delay: .1s; }
.phq-stage.is-cal .phq-time, .phq-stage.is-cal .phq-stat { opacity: 1; transition-delay: .8s; }
.phq-stage.is-cal .phq-queue { opacity: 0; transform: scale(.98); }
.phq-stage.is-cal .phq-card figure { opacity: 0; }
.phq-count i { font-style: normal; font-weight: 650; color: var(--ink); }
.phq-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); padding-bottom: 8px; border-bottom: 1px solid var(--line); text-align: center; }
.phq-days span { display: grid; gap: 2px; }
.phq-days small { font-size: 10.5px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--mut-2); }
.phq-days b { font-size: 15px; font-weight: 650; color: var(--ink); }
.phq-grid { position: relative; flex: 1; min-height: 0; container-type: size; }
.phq-grid::before { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(to right, transparent 0, transparent calc(100% / 7 - 1px), var(--line-2) calc(100% / 7 - 1px), var(--line-2) calc(100% / 7)), repeating-linear-gradient(to bottom, transparent 0, transparent calc(25% - 1px), var(--line-2) calc(25% - 1px), var(--line-2) 25%); }
.phq-ev { --th: min(124px, 100cqw / 7 * 1.3, 100cqh - 58px); position: absolute; left: calc(var(--c) * 100% / 7); top: calc(var(--y) * (100% - var(--th) - 50px)); width: calc(100% / 7); display: flex; flex-direction: column; align-items: center; gap: 4px; padding-top: 8px; }
.phq-ev figure { height: var(--th); width: auto; aspect-ratio: var(--ar, .667); margin: 0; overflow: hidden; border-radius: 6px; box-shadow: 0 0 0 2px #fff, var(--sh-2); transform-origin: 0 0; transition: box-shadow .3s ease; }
.phq-ev .ph-pin, .phq-ev img { display: block; width: 100%; height: 100%; }
.phq-time { font-size: 10.5px; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.phq-stat { display: grid; justify-items: center; font-size: 10px; font-weight: 600; }
.phq-stat > span { grid-area: 1 / 1; display: inline-flex; align-items: center; gap: 3px; padding: 2px 6px; border-radius: 5px; white-space: nowrap; transition: opacity .3s ease, transform .3s ease; }
.phq-stat > span:first-child { background: var(--line-2); color: var(--mut); }
.phq-stat > span:last-child { background: #e8f6ed; color: #1f8a4c; opacity: 0; transform: scale(.7); }
.phq-stat svg { width: 10px; height: 10px; }
.phq-ev.is-pub .phq-stat > span:first-child { opacity: 0; }
.phq-ev.is-pub .phq-stat > span:last-child { opacity: 1; transform: none; }
.phq-ev.is-pub figure { box-shadow: 0 0 0 2px var(--green), var(--sh-2); animation: phq-pulse .7s ease; }
@keyframes phq-pulse { 0% { box-shadow: 0 0 0 2px var(--green), 0 0 0 2px rgba(5, 150, 105, .4); } 100% { box-shadow: 0 0 0 2px var(--green), 0 0 0 14px rgba(5, 150, 105, 0); } }
/* Narrow calendars (phones): a smaller time, and "Published" becomes a green check. */
@container (max-width: 420px) {
  .phq-time { font-size: 9px; }
  .phq-stat > span:first-child { display: none; }
  .phq-stat > span:last-child { width: 16px; height: 16px; padding: 0; justify-content: center; border-radius: 50%; background: var(--green); color: #fff; font-size: 0; }
}
/* The "now" line that walks through the week. */
.phq-now { position: absolute; z-index: 2; top: 0; bottom: 0; left: 0; width: 2px; margin-left: -1px; background: var(--rose); opacity: 0; transition: opacity .3s ease; }
.phq-now::before { content: ""; position: absolute; top: -5px; left: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--rose); }
.phq-now.is-on { opacity: 1; }
/* The cursor that approves the pins. */
.phq-cursor { position: absolute; z-index: 5; left: 0; top: 0; width: 22px; height: 22px; opacity: 0; pointer-events: none; transition: transform .65s cubic-bezier(.3, .7, .2, 1), opacity .3s ease; }
.phq-cursor svg { display: block; width: 100%; height: 100%; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .25)); transition: transform .12s ease; }
.phq-cursor.is-on { opacity: 1; }
.phq-cursor.is-click svg { transform: scale(.8); }

/* Desktop: text left, the product right, both above the fold. */
@media (min-width: 1100px) {
  .phh-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.04fr); align-items: center; gap: 64px; }
  .phh-h1 { font-size: clamp(2.8rem, 3.7vw, 3.6rem); }
}

/* ---- Product tour section, right under the hero ---- */
.phv { padding: 64px 0 72px; border-top: 1px solid var(--line); background: var(--soft); }
@media (min-width: 900px) { .phv { padding: 88px 0 96px; } }
.phv .ph-head { margin-bottom: 36px; }
.phv .phd { max-width: 60rem; margin: 0 auto; }

/* =====================================================================
   PRODUCT TOUR VIDEO (template-parts/front-video.php, assets/home.js):
   a dark stage with a poster, a play button and a player bar so it reads as a video
   at a glance. Once on screen after the page has loaded it plays a silent preview in
   place, with a "Watch with sound" button (.is-preview); the <video> loads nothing before that.
   ===================================================================== */
.phd { scroll-margin-top: 96px; }
.phd-stage { position: relative; padding: 14px; border-radius: 28px; background: var(--ink); box-shadow: 0 1px 2px rgba(16, 16, 28, .1), 0 40px 80px -36px rgba(16, 16, 28, .55); }
.phd-stage::before { content: ""; position: absolute; inset: 0; border-radius: inherit; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32'%3E%3Cpath d='M32 0H0v32' fill='none' stroke='%23ffffff' stroke-opacity='.05'/%3E%3C/svg%3E"); pointer-events: none; }
.phd-head { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding: 6px 10px 14px; color: #fff; text-align: left; }
.phd-kick { display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px 5px 8px; border-radius: 8px; background: rgba(251, 113, 133, .14); color: #fb7185; font-size: 13px; font-weight: 600; }
.phd-kick svg { width: 14px; height: 14px; }
.phd-title { font-size: 16px; font-weight: 650; letter-spacing: -.015em; }
.phd-meta { margin-left: auto; color: #a1a1ad; font-size: 14px; font-variant-numeric: tabular-nums; }
.phd-frame { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 16px; background: #fff; }
.phd-video { position: absolute; inset: 0; display: block; width: 100%; height: 100%; background: #fff; }
.phd-cover { position: absolute; inset: 0; display: block; width: 100%; height: 100%; margin: 0; padding: 0; border: 0; background: #fff; color: #fff; cursor: pointer; }
.phd-cover[hidden] { display: none !important; }
.phd-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2, .7, .2, 1); }
.phd-cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(rgba(11, 11, 16, .14), rgba(11, 11, 16, .14) 62%, rgba(11, 11, 16, .6)); }
.phd-cover:hover img { transform: scale(1.015); }
.phd-play { position: absolute; z-index: 1; left: 50%; top: 50%; display: grid; place-items: center; width: 96px; height: 96px; margin: -48px 0 0 -48px; border-radius: 50%; background: #fff; color: var(--ink); box-shadow: 0 0 0 8px rgba(255, 255, 255, .22), 0 22px 44px -14px rgba(0, 0, 0, .55); transition: transform .2s ease, background-color .2s ease, color .2s ease; }
.phd-play svg { width: 38px; height: 38px; margin-left: 5px; }
.phd-cover:hover .phd-play { transform: scale(1.06); background: var(--rose); color: #fff; }
.phd-cover:focus-visible { outline: none; }
.phd-cover:focus-visible .phd-play, .phd-cover:focus-visible .phd-sound { outline: 3px solid var(--rose); outline-offset: 5px; }
.phd-chrome { position: absolute; z-index: 1; left: 0; right: 0; bottom: 0; display: flex; align-items: center; gap: 16px; padding: 0 22px 18px; color: rgba(255, 255, 255, .92); font: 600 14px/1 var(--font); }
.phd-chrome svg { flex: none; width: 20px; height: 20px; }
.phd-track { position: relative; flex: 1; height: 5px; border-radius: 3px; background: rgba(255, 255, 255, .3); }
.phd-track i { position: absolute; left: 0; top: 50%; width: 13px; height: 13px; margin-top: -6.5px; border-radius: 50%; background: var(--rose); }
.phd-time { font-variant-numeric: tabular-nums; white-space: nowrap; }
/* Silent preview: the video shows through; one "Watch with sound" button, and a click anywhere starts it. */
.phd-sound { display: none; }
.phd-frame.is-preview .phd-cover { background: transparent; }
.phd-frame.is-preview .phd-cover img, .phd-frame.is-preview .phd-cover::after, .phd-frame.is-preview .phd-play, .phd-frame.is-preview .phd-chrome { display: none; }
.phd-frame.is-preview .phd-sound { position: absolute; left: 18px; bottom: 18px; display: inline-flex; align-items: center; gap: 10px; padding: 7px 16px 7px 7px; border-radius: 999px; background: var(--ink); color: #fff; font: 600 15px/1 var(--font); letter-spacing: -.01em; white-space: nowrap; box-shadow: 0 1px 2px rgba(16, 16, 28, .2), 0 14px 30px -12px rgba(16, 16, 28, .55); transition: background-color .15s ease; }
.phd-frame.is-preview .phd-cover:hover .phd-sound { background: var(--rose); }
.phd-sound b { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--rose); }
.phd-frame.is-preview .phd-cover:hover .phd-sound b { background: rgba(255, 255, 255, .2); }
.phd-sound svg { width: 18px; height: 18px; }
.phd-sound small { padding-left: 10px; border-left: 1px solid rgba(255, 255, 255, .22); color: #b4b4c0; font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
@media (max-width: 599px) {
  .phd-stage { padding: 8px; border-radius: 18px; }
  .phd-head { padding: 4px 6px 9px; }
  .phd-title { font-size: 13.5px; }
  .phd-meta { display: none; }
  .phd-frame { border-radius: 11px; }
  .phd-play { width: 64px; height: 64px; margin: -32px 0 0 -32px; box-shadow: 0 0 0 5px rgba(255, 255, 255, .22), 0 14px 30px -10px rgba(0, 0, 0, .55); }
  .phd-play svg { width: 26px; height: 26px; margin-left: 3px; }
  .phd-chrome { gap: 10px; padding: 0 12px 10px; font-size: 11px; }
  .phd-chrome svg { width: 15px; height: 15px; }
  .phd-cc, .phd-vol { display: none; }
  .phd-frame.is-preview .phd-sound { left: 10px; bottom: 10px; gap: 8px; padding: 5px 12px 5px 5px; font-size: 12.5px; }
  .phd-sound b { width: 26px; height: 26px; }
  .phd-sound svg { width: 14px; height: 14px; }
  .phd-sound small { padding-left: 8px; font-size: 12px; }
}

/* "Works with" strip */
.ph-works { border-bottom: 1px solid var(--line); background: #fff; }
.ph-works__in { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 14px 36px; padding: 26px 20px; }
.ph-works__label { font-size: 13px; font-weight: 500; color: var(--mut-2); }
.ph-works__item { display: inline-flex; align-items: center; gap: 9px; font-size: 15px; font-weight: 600; color: var(--ink-2); text-decoration: none; }
.ph-works__item i { font-size: 19px; }
a.ph-works__item:hover { color: var(--ink); }
.ph-works__soon { padding: 2px 6px; border-radius: 6px; background: #fffbeb; color: #b45309; font-size: 10.5px; font-weight: 600; }

/* =====================================================================
   HOW IT WORKS (template-parts/front-how.php), animated. Each card plays when
   .is-play is set (assets/home.js initHow): delay = card offset --d (desktop
   only) + element offset --t. Without .is-play the CSS shows the final frame,
   so no JS or reduced motion shows the finished picture.
   ===================================================================== */
.phw-rail { display: none; }
.phw-steps { display: grid; gap: 20px; margin: 0; padding: 0; list-style: none; }
@media (min-width: 900px) {
  .phw-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
  .phw-rail { position: relative; display: block; height: 2px; margin: 0 0 30px; border-radius: 2px; background: var(--line); }
  .phw-rail i { position: absolute; left: 0; top: 0; bottom: 0; width: 83.33%; border-radius: inherit; background: var(--rose); }
  .phw-rail b { position: absolute; top: 50%; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: var(--rose); box-shadow: 0 0 0 4px #fff; }
  .phw-rail b:nth-of-type(1) { left: 16.67%; } .phw-rail b:nth-of-type(2) { left: 50%; } .phw-rail b:nth-of-type(3) { left: 83.33%; }
}
@media (max-width: 899px) { .phw-step { --d: 0s !important; } }
.phw-step { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: var(--r-lg); background: #fff; box-shadow: var(--sh-2); }
.phw-vis { position: relative; height: 252px; padding: 20px; border-bottom: 1px solid var(--line); background: var(--soft); overflow: hidden; }
.phw-body { padding: 24px 26px 28px; }
.phw-n { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: var(--ink); color: #fff; font-size: 13px; font-weight: 700; }
.phw-step h3 { margin-top: 16px; font-size: 1.2rem; font-weight: 700; letter-spacing: -.02em; }
.phw-step p { margin-top: 8px; font-size: .97rem; line-height: 1.65; color: var(--mut); }

/* 1: connections */
.phw-conn { display: grid; gap: 10px; }
.phw-row { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: var(--sh-1); font-size: 14px; font-weight: 600; }
.phw-row > i { display: grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 9px; font-size: 17px; }
.phw-row > span:not(.phw-st) { flex: 1; min-width: 0; line-height: 1.25; }
.phw-row small { display: block; font-size: 12px; font-weight: 500; color: var(--mut-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.phw-st { display: grid; flex: none; place-items: center end; }
.phw-st > * { grid-area: 1 / 1; }
.phw-spin { display: none; width: 16px; height: 16px; border: 2px solid var(--line); border-top-color: var(--rose); border-radius: 50%; }
.phw-chip { padding: 3px 8px; border-radius: 6px; background: #e8f6ed; color: #1f8a4c; font-size: 11.5px; font-weight: 600; }

/* 2: posts, then pins, then a title */
.phw-gen { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.7fr); grid-template-rows: minmax(0, 1fr) auto; gap: 12px 14px; height: 100%; }
.phw-src { position: relative; align-self: start; display: grid; gap: 7px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: var(--sh-1); overflow: hidden; }
.phw-src b { font-size: 11.5px; font-weight: 600; line-height: 1.3; }
.phw-src span { height: 7px; border-radius: 4px; background: var(--line-2); }
.phw-src span:nth-of-type(2) { width: 80%; } .phw-src span:nth-of-type(3) { width: 60%; }
.phw-scan { position: absolute; left: 0; right: 0; top: 0; height: 26px; background: linear-gradient(rgba(225, 29, 72, 0), rgba(225, 29, 72, .14)); border-bottom: 2px solid var(--rose); opacity: 0; }
/* The new pins fan out: whole pins, height from the row, width from the image. */
.phw-made { position: relative; display: flex; align-items: center; justify-content: center; min-height: 0; padding: 10px 0 2px; }
.phw-pop { flex: none; height: 100%; margin-left: -36px; }
.phw-pop:first-child { margin-left: 0; }
.phw-pop figure { width: auto; height: 100%; aspect-ratio: var(--ar, .667); margin: 0; overflow: hidden; border-radius: 8px; box-shadow: 0 0 0 2px #fff, var(--sh-2); }
.phw-pop .ph-pin, .phw-pop img { display: block; width: 100%; height: 100%; }
.phw-pop:nth-child(1) { transform: rotate(-7deg) translateY(6px); }
.phw-pop:nth-child(2) { position: relative; z-index: 1; }
.phw-pop:nth-child(3) { transform: rotate(7deg) translateY(6px); }
.phw-write { grid-column: 1 / -1; display: flex; align-items: center; gap: 7px; padding: 9px 11px; border-radius: 10px; background: #fff; border: 1px solid var(--line); box-shadow: var(--sh-1); font-size: 12px; font-weight: 600; line-height: 1.3; color: var(--ink); white-space: nowrap; overflow: hidden; }
.phw-write svg { flex: none; width: 14px; height: 14px; color: var(--rose); }
.phw-write small { flex: none; font-size: 11px; font-weight: 500; color: var(--mut-2); }
.phw-type { display: block; }

/* 3: the approved week */
.phw-week { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.phw-day { display: flex; flex-direction: column; align-items: center; gap: 6px; min-height: 176px; padding: 7px 4px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.phw-day > b { font-size: 10.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--mut-2); }
.phw-slot { position: relative; }
.phw-slot figure { width: calc(72px * var(--ar, .667)); height: 72px; margin: 0; overflow: hidden; border-radius: 6px; }
.phw-slot .ph-pin, .phw-slot img { display: block; width: 100%; height: 100%; }
.phw-slot em { position: absolute; right: -5px; top: -5px; display: grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; background: var(--green); color: #fff; box-shadow: 0 0 0 2px #fff; }
.phw-slot em svg { width: 10px; height: 10px; }
.phw-li { display: inline-flex; align-items: center; gap: 4px; padding: 4px 6px; border-radius: 6px; background: var(--li-50); color: var(--li); font-size: 10.5px; font-weight: 600; }
.phw-total { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 12px 0 0; font-size: 12.5px; font-weight: 600; color: #1f8a4c; }
.phw-total svg { width: 14px; height: 14px; }

/* ---- Motion ---- */
.ph-js .phw-step:not(.is-play):not(.is-static) .phw-a { opacity: 0; }
.ph-js .phw-rail:not(.is-play):not(.is-static) i { width: 0; }
.ph-js .phw-rail:not(.is-play):not(.is-static) b { background: #d9d9e1; }
.phw-step.is-play { animation: phw-ring 2.6s ease var(--d) both; }
.phw-step.is-play .phw-n { animation: phw-num .4s ease var(--d) both; }
.phw-step.is-play .phw-a { animation: phw-in .55s cubic-bezier(.2, .7, .2, 1) calc(var(--d) + var(--t, 0s)) both; }
.phw-step.is-play .phw-pop { animation-name: none; }
.phw-step.is-play .phw-pop figure { animation: phw-pop .55s cubic-bezier(.2, .7, .2, 1) calc(var(--d) + var(--t, 0s)) both; }
.phw-step.is-play .phw-slot { animation-name: phw-drop; }
.phw-step.is-play .phw-slot em { animation: phw-pop .4s cubic-bezier(.2, .7, .2, 1) calc(var(--d) + var(--t, 0s) + .35s) both; }
.phw-step.is-play .phw-chip { animation: phw-pop .4s cubic-bezier(.2, .7, .2, 1) calc(var(--d) + var(--t, 0s)) both; }
.phw-step.is-play .phw-spin { display: block; animation: phw-rot .7s linear infinite, phw-out .01s linear calc(var(--d) + var(--t, 0s)) forwards; }
.phw-step.is-play .phw-scan { animation: phw-scan 1.1s ease-in-out calc(var(--d) + .2s) both; }
.phw-step.is-play .phw-type { animation: phw-type 1.2s steps(42, end) calc(var(--d) + var(--t, 0s) + .25s) both; }
.phw-rail.is-play i { animation: phw-fill 7.6s linear both; }
.phw-rail.is-play b { animation: phw-dot .3s ease both; }
.phw-rail.is-play b:nth-of-type(1) { animation-delay: .4s; } .phw-rail.is-play b:nth-of-type(2) { animation-delay: 3.1s; } .phw-rail.is-play b:nth-of-type(3) { animation-delay: 5.7s; }
@keyframes phw-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes phw-pop { 0% { opacity: 0; transform: scale(.6); } 70% { opacity: 1; transform: scale(1.06); } 100% { opacity: 1; transform: none; } }
@keyframes phw-drop { 0% { opacity: 0; transform: translateY(-16px) scale(.9); } 75% { opacity: 1; transform: translateY(2px); } 100% { opacity: 1; transform: none; } }
@keyframes phw-rot { to { transform: rotate(360deg); } }
@keyframes phw-out { to { opacity: 0; visibility: hidden; } }
@keyframes phw-scan { 0% { opacity: 0; transform: translateY(-26px); } 15% { opacity: 1; } 85% { opacity: 1; } 100% { opacity: 0; transform: translateY(90px); } }
@keyframes phw-type { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes phw-num { from { background: var(--ink); } to { background: var(--rose); } }
@keyframes phw-ring { 0%, 100% { border-color: var(--line); box-shadow: var(--sh-2); } 15%, 80% { border-color: #f6b3c1; box-shadow: 0 0 0 4px rgba(225, 29, 72, .07), var(--sh-2); } }
@keyframes phw-fill { 0% { width: 0; } 6% { width: 16.67%; } 33% { width: 16.67%; } 42% { width: 50%; } 66% { width: 50%; } 75% { width: 83.33%; } 100% { width: 83.33%; } }
@keyframes phw-dot { from { background: #d9d9e1; transform: scale(.7); } to { background: var(--rose); transform: none; } }
