/* ══════════════════════════════════════
   PROJECT CARD FACES (js/faces.js)
   Each face is a 9-12s product demo of the tool. Sizes are container units so the
   same face fits the 252px desktop tile and the phone tile. Resting styles are the
   finished frame; animations only ever start from hidden and land on it.
══════════════════════════════════════ */

.case-card--face { background: var(--color-surface-card); }
.case-card--face::after { display: none; }
.case-card--face .case-face { display: none; }

.fx-host { position: absolute; inset: 0; z-index: 0; }
.fx {
  --fx-line: color-mix(in srgb, currentColor 10%, transparent);
  --fx-well: color-mix(in srgb, currentColor 4%, transparent);
  --fx-soft: color-mix(in srgb, currentColor 45%, transparent);
  --fx-paper: var(--color-surface-card-white);
  --fx-ease: cubic-bezier(0.22, 1, 0.36, 1);
  position: absolute;
  inset: 0;
  container-type: size;
  overflow: hidden;
  font-family: var(--font-family-primary);
  color: var(--color-text-primary);
  line-height: 1.2;
  user-select: none;
}
.fx *, .fx *::before, .fx *::after { box-sizing: border-box; }
.fx b, .fx strong {
  font-weight: 600;
  background: none;
  -webkit-background-clip: border-box;
  background-clip: border-box;
  -webkit-text-fill-color: currentColor;
}
.fx .fx-vid { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.fx-label {
  position: absolute;
  left: 0; right: 0; bottom: 4.2cqh;
  text-align: center;
  font-size: 2cqw;
  font-weight: 500;
  letter-spacing: 0.14em;
  opacity: 0.5;
}

/* Typewriter: clip the line open, caret blinks at the end */
.fx-type { position: relative; display: inline-block; vertical-align: bottom; white-space: nowrap; }
.fx-type > span { display: inline-block; clip-path: inset(0 0 0 0); animation: fx-type 10s steps(26, end) infinite; }
.fx-type::after {
  content: '';
  position: absolute;
  right: -0.35em; top: 12%; bottom: 12%;
  width: 1.5px;
  background: currentColor;
  animation: fx-caret 1s steps(1) infinite;
}
@keyframes fx-type {
  0%, 4%   { clip-path: inset(0 100% 0 0); }
  26%, 94% { clip-path: inset(0 0 0 0); }
  100%     { clip-path: inset(0 100% 0 0); }
}
@keyframes fx-caret { 50% { opacity: 0; } }

/* Staged entrances on a shared 10s clock: in at a, out at 94% */
@keyframes fx-in-a { 0%, 3% { opacity: 0; transform: translateY(6%) scale(0.94); } 9%, 92% { opacity: 1; transform: none; } 98%, 100% { opacity: 0; } }
@keyframes fx-in-b { 0%, 18% { opacity: 0; transform: translateY(6%) scale(0.94); } 24%, 92% { opacity: 1; transform: none; } 98%, 100% { opacity: 0; } }
@keyframes fx-in-c { 0%, 30% { opacity: 0; transform: translateY(6%) scale(0.94); } 36%, 92% { opacity: 1; transform: none; } 98%, 100% { opacity: 0; } }
@keyframes fx-in-d { 0%, 44% { opacity: 0; transform: translateY(6%) scale(0.94); } 50%, 92% { opacity: 1; transform: none; } 98%, 100% { opacity: 0; } }
@keyframes fx-in-e { 0%, 56% { opacity: 0; transform: translateY(6%) scale(0.94); } 62%, 92% { opacity: 1; transform: none; } 98%, 100% { opacity: 0; } }
@keyframes fx-in-f { 0%, 68% { opacity: 0; transform: translateY(6%) scale(0.94); } 74%, 92% { opacity: 1; transform: none; } 98%, 100% { opacity: 0; } }

/* ── RGP · dark editor ── */
.case-card--face.rgp-card { background: #111114; }
.fx-rgp { color: #f2f2f4; font-size: 4.2cqw; }
.fx-rgp-bar { position: absolute; left: 7cqw; top: 4.4cqh; display: flex; align-items: center; gap: 2.4cqw; }
.fx-rgp-bar i { width: 6.4cqw; height: 6.4cqw; border-radius: 2cqw; background: var(--gradient-brand); }
.fx-rgp-bar b { font-size: 5.6cqw; font-weight: 700; }
.fx-rgp-bar span { font-family: var(--font-family-mono); font-size: 3.6cqw; opacity: 0.45; }
.fx-rgp-brief {
  position: absolute; left: 7cqw; right: 7cqw; top: 11.4cqh;
  padding: 2.4cqw 3.6cqw;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 3.7cqw;
  overflow: hidden;
}
.fx-rgp-brief em { font-style: normal; color: #ff8a5c; }
.fx-rgp-player {
  position: absolute; top: 19.6cqh; left: 50%;
  height: 45cqh; aspect-ratio: 9 / 16;
  transform: translateX(-50%);
  border-radius: 5cqw;
  overflow: hidden;
  background: #222 url('../media/faces/rgp-reel.jpg') center / cover;
  box-shadow: 0 8cqw 14cqw -6cqw rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.08);
}
.fx-rgp-fxtag {
  position: absolute; left: 50%; bottom: 3.4cqw; z-index: 2;
  transform: translateX(-50%);
  padding: 1.2cqw 2.4cqw;
  border-radius: 99px;
  background: rgba(10, 10, 12, 0.72);
  backdrop-filter: blur(6px);
  font-family: var(--font-family-mono); font-size: 3cqw; white-space: nowrap;
  color: #ff8a5c;
  animation: fx-in-c 7s var(--fx-ease) infinite;
}
.fx-rgp-tl {
  position: absolute; left: 7cqw; right: 7cqw; top: 68.5cqh;
  display: grid; gap: 1.3cqh;
}
.fx-rgp-row { display: grid; grid-template-columns: 9cqw 1fr; align-items: center; gap: 2cqw; height: 3.6cqh; }
.fx-rgp-row em { font-style: normal; font-family: var(--font-family-mono); font-size: 2.9cqw; opacity: 0.4; }
.fx-trk { position: relative; height: 100%; border-radius: 1.4cqw; background: rgba(255, 255, 255, 0.05); }
.fx-trk i { position: absolute; top: 0; bottom: 0; border-radius: 1.4cqw; background: linear-gradient(90deg, #3a3a44, #4a4a56); border: 1px solid rgba(255, 255, 255, 0.08); }
.fx-trk b, .fx-trk s {
  position: absolute; top: 12%; bottom: 12%;
  display: flex; align-items: center;
  padding: 0 1.4cqw;
  border-radius: 1cqw;
  font-size: 2.7cqw; font-weight: 600; text-decoration: none; white-space: nowrap;
}
.fx-trk b { background: rgba(255, 255, 255, 0.12); }
.fx-trk b:nth-child(3) { background: var(--color-primary); color: #fff; }
.fx-trk s { background: rgba(232, 84, 42, 0.18); color: #ff8a5c; border: 1px solid rgba(232, 84, 42, 0.45); }
.fx-trk--duck svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.fx-trk--duck path { fill: none; stroke: #7dd3c0; stroke-width: 1.2px; vector-effect: non-scaling-stroke; }
.fx-rgp-head {
  position: absolute; top: -1cqh; bottom: -1cqh; left: 11cqw;
  width: 2px; border-radius: 2px;
  background: #ff8a5c;
  box-shadow: 0 0 8px rgba(255, 138, 92, 0.8);
  animation: fx-rgp-head 7s linear infinite;
}
@keyframes fx-rgp-head { from { left: 11cqw; } to { left: 100%; } }
.fx-rgp-foot {
  position: absolute; left: 7cqw; right: 7cqw; bottom: 3.6cqh;
  display: flex; justify-content: space-between;
  font-family: var(--font-family-mono); font-size: 2.9cqw; opacity: 0.4;
}

/* ── Kiasu · layers scanned against the guidebook ── */
.fx-kiasu { --k-red: #c8102e; font-size: 4cqw; }
.fx-k-layers { position: absolute; left: 6cqw; right: 6cqw; top: 3.4cqh; margin: 0; padding: 0; list-style: none; display: grid; gap: 0.95cqh; }
.fx-k-layers li {
  display: flex; align-items: center; gap: 2.4cqw;
  height: 7.6cqh;
  padding: 0 3cqw;
  border-radius: 3cqw;
  border: 1px solid var(--fx-line);
  background: var(--fx-paper);
  font-family: var(--font-family-mono);
  font-size: 3.4cqw;
}
.fx-k-ic { width: 4cqw; text-align: center; opacity: 0.3; }
.fx-k-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; opacity: 0.32; }
.fx-k-v {
  flex: none;
  padding: 0.9cqw 2cqw;
  border-radius: 99px;
  font-family: var(--font-family-primary);
  font-size: 2.9cqw; font-weight: 600; white-space: nowrap;
  animation: fx-k-v 10s var(--fx-ease) infinite;
  animation-delay: calc(var(--i) * 0.62s);
}
.fx-k-v--ok  { color: #138a5e; background: rgba(19, 138, 94, 0.1); }
.fx-k-v--bad { color: #fff; background: var(--k-red); }
.fx-k-v--chk { color: #a86a00; background: rgba(240, 170, 20, 0.16); }
@keyframes fx-k-v {
  0%      { opacity: 0; transform: scale(0.6); }
  4%, 74% { opacity: 1; transform: none; }
  80%, 100% { opacity: 0; transform: scale(0.9); }
}
.fx-k-scan {
  position: absolute; left: 3cqw; right: 3cqw; height: 2px;
  top: 3cqh;
  background: linear-gradient(90deg, transparent, var(--k-red) 20%, var(--k-red) 80%, transparent);
  box-shadow: 0 0 12px 2px rgba(200, 16, 46, 0.35);
  opacity: 0;
  animation: fx-k-scan 10s linear infinite;
}
@keyframes fx-k-scan {
  0%   { top: 3cqh; opacity: 1; }
  62%  { top: 88cqh; opacity: 1; }
  64%, 100% { top: 88cqh; opacity: 0; }
}
.fx-k-mark {
  position: absolute; left: 50%; top: 46%;
  transform: translate(-50%, -50%);
  display: grid; justify-items: center; gap: 1.2cqh;
  padding: 4cqw 6cqw 4.4cqw;
  border-radius: 6cqw;
  background: color-mix(in srgb, var(--color-surface-card) 82%, transparent);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.fx-k-glyph { display: grid; gap: 1.2cqw; width: 22cqw; }
.fx-k-glyph i { height: 3.2cqw; border-radius: 1cqw; background: var(--k-red); }
.fx-k-glyph i:nth-child(2) { opacity: 0.55; }
.fx-k-glyph i:nth-child(3) { opacity: 0.25; }
.fx-k-mark b { font-size: 15cqw; font-weight: 700; letter-spacing: -0.02em; line-height: 1; }
.fx-k-mark span { font-size: 3.4cqw; letter-spacing: 0.1em; text-transform: uppercase; opacity: 0.55; }
.fx-k-count {
  position: absolute; left: 0; right: 0; bottom: 2.6cqh;
  text-align: center; font-size: 3.2cqw; opacity: 0.7;
}
.fx-k-count b { color: var(--k-red); }

/* ── AI UGC · design-lab layout ── */
.case-card--face.ugc-card { background: linear-gradient(165deg, #fff3ec 0%, var(--color-surface-card) 46%, #fbefe8 100%); }
html[data-theme="dark"] .case-card--face.ugc-card { background: linear-gradient(165deg, #2b1f1b 0%, var(--color-surface-card) 50%, #251b18 100%); }
.fx-ugc { font-size: 2.2cqw; }
.fx-prompt {
  position: absolute; left: 6cqw; right: 15cqw; top: 6cqh;
  display: flex; align-items: center; gap: 2cqw;
  height: 8.6cqh; padding: 0 3cqw;
  border-radius: 99px;
  background: var(--fx-paper);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 4cqw 8cqw -4cqw rgba(232, 84, 42, 0.18);
  font-size: 2.6cqw; font-weight: 500;
}
.fx-prompt::before { content: ''; width: 2.6cqw; height: 2.6cqw; flex: none; border-radius: 0.8cqw; background: var(--gradient-brand); }
.fx-ugc-stage {
  position: absolute; left: 6cqw; right: 6cqw; top: 19.5cqh; height: 50cqh;
  display: grid; grid-template-columns: repeat(3, 1fr); justify-items: center; gap: 4cqw;
}
.fx-ugc-stage::before {
  content: '';
  position: absolute; left: 12%; right: 12%; top: 50%;
  border-top: 2px dashed color-mix(in srgb, var(--color-primary) 35%, transparent);
}
.fx-ugc-card {
  position: relative;
  height: 100%;
  aspect-ratio: 9 / 16;
  border-radius: 3.2cqw;
  overflow: hidden;
  background: var(--fx-paper);
  box-shadow: 0 0 0 1px var(--fx-line), 0 4cqw 8cqw -4cqw rgba(0, 0, 0, 0.25);
}
.fx-ugc-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.fx-ugc-card--1 { animation: fx-in-a 10s var(--fx-ease) infinite; }
.fx-ugc-card--2 { animation: fx-in-c 10s var(--fx-ease) infinite; }
.fx-ugc-card--3 { animation: fx-in-e 10s var(--fx-ease) infinite; box-shadow: 0 0 0 2px var(--color-primary), 0 5cqw 10cqw -4cqw rgba(232, 84, 42, 0.45); }
.fx-ugc-tag {
  position: absolute; left: 1.4cqw; right: 1.4cqw; bottom: 1.4cqw; z-index: 2;
  padding: 0.9cqw 1.4cqw;
  border-radius: 99px;
  background: rgba(16, 16, 20, 0.66);
  backdrop-filter: blur(6px);
  color: #fff;
  font-size: 1.7cqw; font-weight: 500; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.fx-ugc-gate {
  position: absolute; z-index: 3; top: 50%;
  translate: -50% -50%;
  display: grid; justify-items: center; gap: 0.4cqw;
  padding: 1.4cqw 1.8cqw;
  border-radius: 2.4cqw;
  background: var(--fx-paper);
  box-shadow: 0 0 0 1px var(--fx-line), 0 2cqw 5cqw -2cqw rgba(0, 0, 0, 0.2);
  font-size: 2cqw; white-space: nowrap;
}
.fx-ugc-gate b { font-weight: 700; }
.fx-ugc-gate span { color: #138a5e; font-weight: 600; }
.fx-ugc-gate--1 { left: 33.3%; }
.fx-ugc-gate--2 { left: 66.6%; }
.fx-ugc-gate--1 { animation: fx-in-b 10s var(--fx-ease) infinite; }
.fx-ugc-gate--2 { animation: fx-in-d 10s var(--fx-ease) infinite; }
.fx-ugc-cast { position: absolute; left: 6cqw; bottom: 11.4cqh; display: flex; align-items: center; }
.fx-ugc-cast img {
  width: 6.4cqw; height: 6.4cqw; border-radius: 50%; object-fit: cover; object-position: top;
  border: 2px solid var(--color-surface-card);
  margin-right: -1.8cqw;
}
.fx-ugc-cast span { margin-left: 3.4cqw; font-size: 2.1cqw; font-weight: 600; opacity: 0.6; }
.fx-ugc-cost {
  position: absolute; right: 6cqw; bottom: 10.8cqh;
  display: flex; align-items: baseline; gap: 1.6cqw;
  animation: fx-in-f 10s var(--fx-ease) infinite;
}
.fx-ugc-cost s { font-size: 2.4cqw; opacity: 0.4; }
.fx-ugc-cost b { font-size: 5.4cqw; font-weight: 800; letter-spacing: -0.02em; color: var(--color-primary); }
.fx-ugc-cost span { font-size: 1.9cqw; opacity: 0.6; }

/* ── Model Advisory + harness ── */
.fx-harness { font-size: 3.8cqw; }
.fx-h-title { position: absolute; left: 7cqw; top: 4.6cqh; display: grid; gap: 0.6cqh; }
.fx-h-title b { font-size: 8.2cqw; font-weight: 700; letter-spacing: -0.02em; line-height: 1; }
.fx-h-title span { font-size: 3.4cqw; opacity: 0.5; }
.fx-h-term {
  position: absolute; left: 6cqw; right: 6cqw; top: 16cqh; height: 22cqh;
  border-radius: 5cqw;
  background: #18181c;
  color: #ededf0;
  font-family: var(--font-family-mono);
  box-shadow: 0 6cqw 12cqw -6cqw rgba(0, 0, 0, 0.45);
}
.fx-h-scene {
  position: absolute; inset: 0;
  display: grid; align-content: center; gap: 1.6cqh;
  padding: 0 5cqw;
  opacity: 0;
  animation: fx-h-scene 12s linear infinite;
  animation-delay: calc(var(--s) * 4s);
}
.fx-h-scene:last-child { opacity: 1; }
@keyframes fx-h-scene { 0% { opacity: 0; } 2%, 31% { opacity: 1; } 33.3%, 100% { opacity: 0; } }
.fx-h-prompt { font-size: 3.4cqw; opacity: 0.6; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fx-h-line { font-size: 3.7cqw; white-space: nowrap; }
.fx-h-line b { color: #ff8a5c; }
.fx-h-verdict { justify-self: start; padding: 0.8cqw 2.4cqw; border-radius: 99px; font-size: 3cqw; font-family: var(--font-family-primary); font-weight: 600; }
.fx-h-verdict--ok { background: rgba(52, 199, 140, 0.16); color: #5fe0aa; }
.fx-h-verdict--stop { background: rgba(232, 84, 42, 0.95); color: #fff; }
.fx-h-ladder {
  position: absolute; left: 6cqw; right: 6cqw; top: 42cqh;
  display: grid; grid-auto-rows: 5.6cqh; gap: 0.8cqh;
}
.fx-h-ladder span {
  position: relative; z-index: 1;
  display: flex; align-items: center; padding: 0 4cqw;
  border-radius: 99px;
  border: 1px solid var(--fx-line);
  font-size: 3.3cqw; font-weight: 600; letter-spacing: 0.04em;
}
.fx-h-dot {
  position: absolute; left: 0; right: 0; top: 0; height: 5.6cqh;
  border-radius: 99px;
  background: color-mix(in srgb, var(--color-primary) 14%, transparent);
  box-shadow: inset 0 0 0 1.5px var(--color-primary);
  transform: translateY(calc(1 * (5.6cqh + 0.8cqh)));
  animation: fx-h-dot 12s var(--fx-ease) infinite;
}
@keyframes fx-h-dot {
  0%, 31%   { transform: translateY(calc(3 * (5.6cqh + 0.8cqh))); }
  34%, 64%  { transform: translateY(calc(2 * (5.6cqh + 0.8cqh))); }
  67%, 100% { transform: translateY(calc(1 * (5.6cqh + 0.8cqh))); }
}
.fx-h-surfaces {
  position: absolute; left: 6cqw; right: 6cqw; top: 70.5cqh;
  display: grid; grid-template-columns: 1fr 1fr; gap: 1.2cqh 2.4cqw;
}
.fx-h-surfaces span {
  display: grid; gap: 0.3cqh;
  padding: 1.4cqh 3cqw;
  border-radius: 3.4cqw;
  background: var(--fx-paper);
  border: 1px solid var(--fx-line);
  font-family: var(--font-family-mono); font-size: 2.7cqw; opacity: 0.85;
}
.fx-h-surfaces b { font-family: var(--font-family-primary); font-size: 3.3cqw; font-weight: 600; }
.fx-h-hook {
  position: absolute; left: 7cqw; right: 7cqw; bottom: 3.4cqh;
  display: flex; align-items: center; gap: 2cqw;
  font-family: var(--font-family-mono); font-size: 2.9cqw; opacity: 0.55; white-space: nowrap;
}
.fx-h-hook i { width: 2cqw; height: 2cqw; border-radius: 50%; background: #34c78c; animation: fx-pulse 2s ease-in-out infinite; }
@keyframes fx-pulse { 50% { opacity: 0.25; } }

/* ── Six Degrees · vermilion card ── */
.case-card--face.sixDegrees-card { background: linear-gradient(170deg, #f0794a 0%, #e8542a 55%, #d4471f 100%); }
.fx-six { color: #fff; font-size: 3.8cqw; }
.fx-six-title { position: absolute; left: 7cqw; top: 4.6cqh; display: grid; gap: 0.7cqh; }
.fx-six-title b { font-size: 8.6cqw; font-weight: 700; letter-spacing: -0.02em; line-height: 1; white-space: nowrap; }
.fx-six-title span { font-size: 3.3cqw; opacity: 0.78; }
.fx-six-chain {
  position: absolute; left: 7cqw; right: 6cqw; top: 17.5cqh;
  margin: 0; padding: 0 0 0 7cqw; list-style: none;
  display: grid; gap: 1.5cqh;
}
.fx-six-chain::before {
  content: '';
  position: absolute; left: 1.6cqw; top: 2cqh; bottom: 2cqh;
  border-left: 2px dashed rgba(255, 255, 255, 0.35);
}
.fx-six-chain li { position: relative; display: grid; gap: 0.2cqh; height: 6.4cqh; align-content: center; }
.fx-six-chain li::before {
  content: '';
  position: absolute; left: -7cqw; top: 50%;
  width: 3.4cqw; height: 3.4cqw; margin-top: -1.7cqw;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 1.4cqw rgba(255, 255, 255, 0.18);
  animation: fx-six-node 9s ease infinite;
  animation-delay: calc(var(--i) * 1.1s);
}
@keyframes fx-six-node {
  0%, 100% { box-shadow: 0 0 0 1.4cqw rgba(255, 255, 255, 0.18); transform: none; }
  4%       { box-shadow: 0 0 0 2.6cqw rgba(255, 255, 255, 0.4); transform: scale(1.25); }
  12%      { box-shadow: 0 0 0 1.4cqw rgba(255, 255, 255, 0.18); transform: none; }
}
.fx-six-chain b { font-size: 4.4cqw; font-weight: 700; }
.fx-six-chain span { font-family: var(--font-family-mono); font-size: 2.9cqw; opacity: 0.75; }
.fx-six-packet {
  position: absolute; left: 0.5cqw; top: 2cqh;
  width: 4.4cqw; height: 4.4cqw; margin-left: -0.6cqw;
  border-radius: 50%;
  background: #ffe1a8;
  box-shadow: 0 0 10px 3px rgba(255, 225, 168, 0.8);
  animation: fx-six-packet 9s cubic-bezier(0.45, 0, 0.55, 1) infinite;
}
@keyframes fx-six-packet {
  0%   { transform: translateY(0); opacity: 1; }
  73%  { transform: translateY(calc(5 * (6.4cqh + 1.5cqh))); opacity: 1; }
  78%, 100% { transform: translateY(calc(5 * (6.4cqh + 1.5cqh))); opacity: 0; }
}
.fx-six-msg {
  position: absolute; right: 5cqw;
  padding: 1.2cqw 2.4cqw;
  border-radius: 2.6cqw 2.6cqw 0.6cqw 2.6cqw;
  background: rgba(255, 255, 255, 0.95);
  color: #c8401c;
  font-family: var(--font-family-mono); font-size: 2.6cqw; font-weight: 600; white-space: nowrap;
  box-shadow: 0 3cqw 6cqw -3cqw rgba(0, 0, 0, 0.35);
}
.fx-six-msg--1 { top: 25.5cqh; animation: fx-six-msg 9s var(--fx-ease) infinite; animation-delay: 0.6s; }
.fx-six-msg--2 { top: 41cqh; animation: fx-six-msg 9s var(--fx-ease) infinite; animation-delay: 2.6s; }
@keyframes fx-six-msg { 0% { opacity: 0; transform: translateX(10%) scale(0.9); } 4%, 30% { opacity: 1; transform: none; } 36%, 100% { opacity: 0; transform: translateY(-20%); } }
.fx-six-phone {
  position: absolute; left: 6cqw; right: 6cqw; bottom: 3.6cqh;
  padding: 2.6cqw;
  border-radius: 5cqw;
  background: rgba(255, 255, 255, 0.96);
  color: #1f1f23;
  box-shadow: 0 6cqw 12cqw -6cqw rgba(80, 20, 0, 0.55);
  animation: fx-six-phone 9s var(--fx-ease) infinite;
}
@keyframes fx-six-phone { 0%, 70% { opacity: 0; transform: translateY(14%); } 76%, 96% { opacity: 1; transform: none; } 100% { opacity: 0; } }
.fx-six-notif { display: grid; grid-template-columns: auto 1fr; gap: 2.4cqw; align-items: center; }
.fx-six-notif > div { display: grid; gap: 0.4cqh; min-width: 0; }
.fx-six-notif i { width: 7.4cqw; height: 7.4cqw; flex: none; border-radius: 2cqw; background: linear-gradient(160deg, #37aee2, #1e96c8); }
.fx-six-notif b { font-size: 3.6cqw; font-weight: 700; line-height: 1.2; }
.fx-six-notif span { font-size: 2.8cqw; line-height: 1.2; opacity: 0.55; }
.fx-six-btns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4cqw; margin-top: 2cqw; }
.fx-six-btns span { padding: 1.3cqw 0; border-radius: 99px; background: #f1f1f4; text-align: center; font-size: 2.7cqw; font-weight: 600; }
.fx-six-btns span:first-child { background: #1f1f23; color: #fff; }

/* ── Digital products · a desktop ── */
.case-card--face.products-card, .bucket-card--face { background: linear-gradient(160deg, #ece7f6 0%, #f6efe9 55%, #fbe9df 100%); }
html[data-theme="dark"] .case-card--face.products-card,
html[data-theme="dark"] .bucket-card--face { background: linear-gradient(160deg, #24212d 0%, #221f1d 55%, #2a1d18 100%); }
.fx-products { font-size: 2cqw; }
.fx-p-menubar {
  position: absolute; left: 0; right: 0; top: 0; height: 5.2cqh;
  display: flex; align-items: center; justify-content: flex-end; gap: 3cqw;
  padding: 0 14cqw 0 5cqw;
  background: color-mix(in srgb, var(--fx-paper) 55%, transparent);
  font-size: 2cqw;
}
.fx-p-menubar span:first-child { margin-right: auto; width: 2.4cqw; height: 2.4cqw; border-radius: 50%; background: currentColor; opacity: 0.6; }
.fx-p-menubar span:last-child { font-family: var(--font-family-mono); opacity: 0.55; }
.fx-p-win {
  position: absolute;
  border-radius: 2.6cqw;
  background: var(--fx-paper);
  box-shadow: 0 0 0 1px var(--fx-line), 0 5cqw 10cqw -5cqw rgba(30, 20, 60, 0.3);
  overflow: hidden;
}
.fx-p-chrome { display: flex; align-items: center; gap: 0.9cqw; height: 5.4cqh; padding: 0 2.2cqw; border-bottom: 1px solid var(--fx-line); }
.fx-p-chrome i { width: 1.5cqw; height: 1.5cqw; border-radius: 50%; background: #ff5f57; }
.fx-p-chrome i:nth-child(2) { background: #febc2e; }
.fx-p-chrome i:nth-child(3) { background: #28c840; }
.fx-p-chrome b { margin-left: 1.4cqw; font-size: 1.9cqw; font-weight: 600; opacity: 0.7; }
.fx-p-win--research { left: 5cqw; top: 10cqh; width: 54cqw; height: 52cqh; }
.fx-p-rs { display: grid; gap: 2.2cqh; padding: 3cqh 2.6cqw 0; }
.fx-p-rank { display: grid; grid-template-columns: 4cqw 15cqw 1fr; align-items: center; gap: 1.4cqw; font-size: 1.8cqw; }
.fx-p-rank span { font-family: var(--font-family-mono); opacity: 0.4; }
.fx-p-rank em { font-style: normal; font-weight: 500; white-space: nowrap; }
.fx-p-rank i { position: relative; height: 2.6cqh; border-radius: 99px; background: var(--fx-well); overflow: hidden; }
.fx-p-rank i::after {
  content: '';
  position: absolute; inset: 0 auto 0 0; width: var(--w);
  border-radius: inherit;
  background: linear-gradient(90deg, #7c5cfc, #a48bff);
  animation: fx-p-bar 10s var(--fx-ease) infinite;
  animation-delay: calc(var(--i) * 0.15s);
}
.fx-p-rank:first-child i::after { background: var(--gradient-brand); }
@keyframes fx-p-bar { 0%, 4% { width: 0; } 20%, 92% { width: var(--w); } 100% { width: 0; } }
.fx-p-rs-foot { position: absolute; left: 2.6cqw; bottom: 2cqh; font-family: var(--font-family-mono); font-size: 1.6cqw; opacity: 0.45; }
.fx-p-win--lottie { right: 5cqw; top: 20cqh; width: 40cqw; height: 46cqh; }
.fx-p-stage { position: relative; height: 22cqh; margin: 1.6cqh 2.4cqw 0; border-radius: 1.8cqw; background: var(--fx-well); }
.fx-p-stage svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.fx-p-stage path { fill: none; stroke: var(--fx-line); stroke-width: 1.5px; stroke-dasharray: 4 4; vector-effect: non-scaling-stroke; }
.fx-p-ball {
  position: absolute; left: 6%; bottom: 12%;
  width: 4cqw; height: 4cqw; margin-left: -2cqw;
  border-radius: 1.2cqw;
  background: var(--gradient-brand);
  animation: fx-p-x 2.4s linear infinite alternate, fx-p-y 1.2s cubic-bezier(0.33, 0, 0.2, 1) infinite alternate;
}
@keyframes fx-p-x { from { left: 9%; } to { left: 91%; } }
@keyframes fx-p-y { from { bottom: 12%; } to { bottom: 74%; } }
.fx-p-sliders { display: grid; gap: 1.6cqh; padding: 2cqh 2.6cqw 0; }
.fx-p-sliders label { display: grid; grid-template-columns: 11cqw 1fr; align-items: center; font-size: 1.7cqw; opacity: 0.75; }
.fx-p-sliders i { position: relative; height: 0.7cqh; border-radius: 99px; background: var(--fx-line); }
.fx-p-sliders b {
  position: absolute; top: 50%; left: var(--k);
  width: 2.4cqw; height: 2.4cqw; margin: -1.2cqw 0 0 -1.2cqw;
  border-radius: 50%;
  background: var(--fx-paper);
  box-shadow: 0 0 0 1.5px #7c5cfc, 0 1px 4px rgba(0, 0, 0, 0.2);
  animation: fx-p-knob 6s ease-in-out infinite alternate;
}
.fx-p-sliders label:nth-child(2) b { animation-delay: -2s; }
.fx-p-sliders label:nth-child(3) b { animation-delay: -4s; }
@keyframes fx-p-knob { from { left: calc(var(--k) - 14%); } to { left: calc(var(--k) + 14%); } }
.fx-p-note {
  position: absolute; left: 30cqw; top: 53cqh; width: 38cqw;
  padding: 0 2.6cqw 2.6cqh;
  border-radius: 1.6cqw;
  background: #ffe873;
  color: #3a3000;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.6) inset, 0 7cqw 12cqw -5cqw rgba(80, 60, 0, 0.45);
  transform: rotate(-2.4deg);
  animation: fx-p-float 6s ease-in-out infinite;
}
@keyframes fx-p-float { 50% { transform: rotate(-1.6deg) translateY(-1.4cqh); } }
.fx-p-note-bar { display: flex; gap: 2cqw; align-items: center; height: 5cqh; font-size: 1.9cqw; opacity: 0.55; }
.fx-p-note-bar span { margin-left: auto; }
.fx-p-note ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 1.3cqh; font-size: 2.3cqw; font-weight: 500; }
.fx-p-note li { display: flex; align-items: center; gap: 1.6cqw; }
.fx-p-note li::before { content: ''; flex: none; width: 2.4cqw; height: 2.4cqw; border-radius: 0.6cqw; border: 1.5px solid currentColor; opacity: 0.6; }
.fx-p-note li.done { text-decoration: line-through; opacity: 0.55; }
.fx-p-note li.done::before { background: currentColor; }
.fx-p-names { position: absolute; left: 0; right: 0; bottom: 9.6cqh; display: flex; justify-content: center; gap: 1.4cqw; }
.fx-p-names span { padding: 1cqw 2.2cqw; border-radius: 99px; background: color-mix(in srgb, var(--fx-paper) 70%, transparent); font-size: 1.9cqw; font-weight: 600; }

/* ── ComfyUI · node graph ── */
.case-card--face.comfyLora-card { background: #15151a; }
.fx-comfy {
  color: #e8e8ee; font-size: 2cqw;
  background-image: radial-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1.2px);
  background-size: 3cqw 3cqw;
}
.fx-c-canvas { position: absolute; left: 4cqw; top: 7cqh; width: 61cqw; height: 80cqh; }
.fx-c-wires { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.fx-c-wires path {
  fill: none;
  stroke: rgba(255, 255, 255, 0.3);
  stroke-width: 1.6px;
  stroke-dasharray: 5 5;
  vector-effect: non-scaling-stroke;
  animation: fx-c-flow 1s linear infinite;
}
@keyframes fx-c-flow { to { stroke-dashoffset: -10; } }
.fx-c-node {
  position: absolute; width: 29%;
  padding: 0 0 1.2cqw;
  border-radius: 1.4cqw;
  background: #25252d;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 3cqw 6cqw -3cqw rgba(0, 0, 0, 0.6);
  overflow: hidden;
  animation: fx-c-run 8s ease infinite;
  animation-delay: calc(var(--i) * 0.7s);
}
.fx-c-node b { display: block; padding: 1cqw 1.4cqw; font-size: 2cqw; font-weight: 600; background: var(--hdr); color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fx-c-node span { display: block; padding: 1cqw 1.4cqw 0; font-family: var(--font-family-mono); font-size: 1.6cqw; opacity: 0.6; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fx-c-node--in { --hdr: #2f5f9e; }
.fx-c-node--tx { --hdr: #8a6a12; }
.fx-c-node--lo { --hdr: #6b3fa0; }
.fx-c-node--md { --hdr: #c2451f; }
.fx-c-node--up { --hdr: #237a4f; }
@keyframes fx-c-run {
  0%, 100% { box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 3cqw 6cqw -3cqw rgba(0, 0, 0, 0.6); }
  5%, 12%  { box-shadow: 0 0 0 2px #7dd3a8, 0 0 4cqw rgba(125, 211, 168, 0.35); }
  18%      { box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 3cqw 6cqw -3cqw rgba(0, 0, 0, 0.6); }
}
.fx-c-out {
  position: absolute; right: 5cqw; top: 7cqh; width: 27cqw;
}
.fx-c-out::before {
  content: '';
  display: block; aspect-ratio: 9 / 16;
}
.fx-c-out .fx-vid { bottom: auto; height: auto; aspect-ratio: 9 / 16; border-radius: 2.4cqw; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1), 0 5cqw 10cqw -4cqw rgba(0, 0, 0, 0.7); background: #222 url('../media/faces/comfy-out.jpg') center / cover; }
.fx-c-prog { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 1.2cqw; margin-top: 2cqh; font-family: var(--font-family-mono); font-size: 1.6cqw; opacity: 0.8; }
.fx-c-prog i { height: 0.8cqh; border-radius: 99px; background: rgba(255, 255, 255, 0.1); overflow: hidden; }
.fx-c-prog i b { display: block; height: 100%; width: 100%; border-radius: inherit; background: #7dd3a8; transform-origin: left; animation: fx-c-prog 8s linear infinite; }
@keyframes fx-c-prog { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.fx-c-foot { position: absolute; left: 5cqw; right: 5cqw; bottom: 4cqh; display: flex; align-items: baseline; justify-content: space-between; gap: 2cqw; }
.fx-c-foot b { font-size: 3.2cqw; font-weight: 700; }
.fx-c-foot span { font-family: var(--font-family-mono); font-size: 1.6cqw; opacity: 0.5; text-align: right; }

/* ── Dark theme: paper surfaces inside light faces ── */
html[data-theme="dark"] .fx { --fx-paper: #26262f; }
html[data-theme="dark"] .fx-p-note { color: #3a3000; }

/* Delayed loops hold their first keyframe while they wait, so nothing shows early */
.fx-h-scene, .fx-k-v, .fx-six-msg, .fx-six-chain li::before, .fx-p-rank i::after, .fx-c-node { animation-fill-mode: backwards; }

/* ── Still frames + reduced motion: every face rests on its finished picture ── */
html.still .fx *, html.still .fx *::before, html.still .fx *::after { animation: none !important; }
@media (prefers-reduced-motion: reduce) {
  .fx *, .fx *::before, .fx *::after { animation: none !important; }
}
html.still .fx-rgp-head { left: 52%; }
html.still .fx-h-dot { transform: translateY(calc(1 * (5.6cqh + 0.8cqh))); }
html.still .fx-six-packet { transform: translateY(calc(2 * (6.4cqh + 1.5cqh))); }
html.still .fx-k-scan { opacity: 0; }

/* ── Instagram tile carries the reel stat, like a streak counter ── */
.instagram-card { flex-direction: column; gap: 6px; }
.instagram-card .ig-stat { position: absolute; left: 0; right: 0; top: 30px; display: grid; justify-items: center; gap: 2px; z-index: 1; }
.ig-stat-num {
  font-size: 2.9rem; font-weight: 800; letter-spacing: -0.03em; line-height: 1;
  background: linear-gradient(to bottom, #ff9404, #ff3d6e);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.ig-stat-lbl { font-size: var(--text-sm); opacity: 0.55; }
.instagram-card .ig-svg { position: absolute; left: 50%; bottom: 30px; translate: -50% 0; width: 64px; height: 64px; }
@media (max-width: 768px) {
  .instagram-card .ig-stat { top: 18px; }
  .ig-stat-num { font-size: 2.2rem; }
  .instagram-card .ig-svg { bottom: 16px; width: 48px; height: 48px; }
}
