

.promptscene {
  --ps-ink: var(--publication-ink, #150d2b);
  --ps-acc: var(--accent, oklch(0.53 0.205 292));
  --ps-muted: var(--muted-foreground, #605b68);
  --ps-field: #f4f4f6;
  --ps-line: #e4e2e8;
  --ps-drain: #a7a2b0;
  --ps-copy-line: #b9b4c2;
  --ps-copy-fill: #d3cfda;
  --ps-ease: var(--ease, cubic-bezier(0.22, 1, 0.36, 1));
  --ps-draw: cubic-bezier(0.45, 0, 0.2, 1);
  --ps-gap: 14px;
  max-width: 1040px;
  margin-inline: auto;
  color: var(--ps-ink);
  font-family: var(--font-sans, "Hanken Grotesk", system-ui, sans-serif);
}
.promptscene *, .promptscene *::before, .promptscene *::after { box-sizing: border-box; }
:where(.promptscene) :where(p, ol, li) { margin: 0; padding: 0; }
:where(.promptscene) :where(ol) { list-style: none; }
.promptscene .ps-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }


.ps-stage { position: relative; padding: 36px 40px 42px; border-radius: 14px; background: var(--ps-field); }


.ps-prompt {
  display: flex; align-items: flex-end; gap: 18px; max-width: 700px; padding: 14px 14px 14px 18px;
  border: 1px solid #dcd9e2; border-radius: 12px; background: #fff;
  box-shadow: 0 1px 0 rgb(21 13 43 / 0.03), 0 10px 26px rgb(21 13 43 / 0.06);
}
.ps-prompt-body { flex: 1; min-width: 0; }
.ps-prompt-label { font: 500 10.5px/1.4 var(--font-mono, "Geist Mono", ui-monospace, monospace); letter-spacing: 0.12em; text-transform: uppercase; color: var(--ps-muted); }
.ps-prompt-text { display: grid; margin-top: 6px; font: 400 16px/1.5 var(--font-mono, "Geist Mono", ui-monospace, monospace); letter-spacing: -0.01em; color: var(--ps-ink); }
.ps-sizer, .ps-typed { grid-area: 1 / 1; }
.ps-typed { display: none; }
.ps-caret { display: none; width: 2px; height: 1.15em; margin-left: 1px; vertical-align: -0.2em; background: var(--ps-ink); }
.ps-go {
  flex: none; padding: 9px 14px; border-radius: 999px; background: var(--ps-ink); color: #fff;
  font: 500 11px/1 var(--font-mono, "Geist Mono", ui-monospace, monospace); letter-spacing: 0.1em; text-transform: uppercase;
  transition: transform 0.12s ease, background-color 0.12s ease;
}


.ps-row {
  position: relative; display: grid; margin-top: 74px; padding-bottom: 14px;
  grid-template-columns: 1fr 64px 1fr; column-gap: 20px; row-gap: 12px;
  grid-template-areas: "own arrow copies" "otag . ctag";
}
.ps-own { grid-area: own; position: relative; z-index: 2; }
.ps-copies { grid-area: copies; position: relative; z-index: 1; }
.ps-own-tag { grid-area: otag; }
.ps-copies-tag { grid-area: ctag; text-align: right; }
.ps-tag { font: 500 10.5px/1.4 var(--font-mono, "Geist Mono", ui-monospace, monospace); letter-spacing: 0.12em; text-transform: uppercase; color: var(--ps-muted); }
.ps-arrow { grid-area: arrow; align-self: center; width: 100%; height: auto; overflow: visible; }
.ps-arrow path { fill: none; stroke: var(--ps-copy-line); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1 2; stroke-dashoffset: 0; }

.ps-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--ps-gap); }
.ps-cell { position: relative; aspect-ratio: 1; }
.ps-tile { position: absolute; inset: 0; border: 1px solid var(--ps-line); border-radius: 10px; background: #fff; }

.ps-tile::after { content: ""; position: absolute; inset: -1px; border-radius: inherit; box-shadow: 0 10px 28px rgb(21 13 43 / 0.12); opacity: 0; pointer-events: none; }
.ps-own .ps-cell:first-child .ps-tile::after { opacity: 1; }
.ps-mark { position: absolute; left: 11%; top: 11%; width: 78%; height: 78%; overflow: visible; }


.ps-line > * { fill: none; stroke: var(--ps-ink); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1 2; stroke-dashoffset: 0; }
.ps-fill > path { fill: var(--ps-ink); }
.ps-fill > .ps-knock { fill: none; stroke: #fff; stroke-width: 3.6; stroke-linecap: round; }
.ps-dot > * { fill: var(--ps-drain); }
.ps-dot { transform-box: fill-box; transform-origin: center; }
.ps-hand path { fill: none; stroke: var(--ps-acc); stroke-width: 3.3; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1 2; stroke-dashoffset: 0; }


.ps-copies .ps-tile { border-color: #e9e7ed; background: rgb(255 255 255 / 0.72); }
.ps-copies .ps-line > * { stroke: var(--ps-copy-line); }
.ps-copies .ps-fill > path { fill: var(--ps-copy-fill); }
.ps-copies .ps-fill > .ps-knock { fill: none; stroke: #fff; }
.ps-copies .ps-dot > * { fill: var(--ps-copy-fill); }


.ps-human {
  position: absolute; z-index: 4; left: 50%; bottom: calc(87% + 14px); margin-left: -11px;
  display: flex; align-items: center; gap: 8px; white-space: nowrap; transform-origin: 11px 100%;
}
.ps-human::after {
  content: ""; position: absolute; left: 10.25px; top: 100%; width: 1.5px; height: 14px; border-radius: 1px;
  background: var(--ps-acc); transform-origin: bottom center;
}
.ps-c {
  display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--ps-acc); color: #fff;
  font: 700 14px/1 var(--font-sans, "Hanken Grotesk", system-ui, sans-serif); padding-bottom: 1px;
}
.ps-human-line { font: 600 10.5px/1.3 var(--font-mono, "Geist Mono", ui-monospace, monospace); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ps-ink); }


.ps-court {
  grid-area: 1 / 1 / 2 / -1; align-self: end; justify-self: center; position: relative; z-index: 3;
  margin-bottom: -34px; padding: 11px 20px 12px; max-width: 100%;
  border: 2px solid var(--ps-ink); border-radius: 6px; outline: 1px solid var(--ps-ink); outline-offset: -6px;
  background: rgb(255 255 255 / 0.96); text-align: center; transform: rotate(-2.5deg);
  box-shadow: 0 8px 24px rgb(21 13 43 / 0.10);
}
.ps-court-line { font-size: 21px; font-weight: 750; line-height: 1.15; letter-spacing: 0.035em; text-transform: uppercase; }
.ps-court-src { margin-top: 5px; font: 500 11px/1.3 var(--font-mono, "Geist Mono", ui-monospace, monospace); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ps-muted); }


.ps-foot { margin-top: 18px; }
.ps-caps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; }
.ps-cap { position: relative; padding-top: 12px; }
.ps-cap::before, .ps-cap::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; border-radius: 1px; }
.ps-cap::before { background: var(--ps-line); }
.ps-cap::after { background: var(--ps-ink); transform: scaleX(0); transform-origin: left center; }
.ps-cap-n { display: block; font: 500 10.5px/1.4 var(--font-mono, "Geist Mono", ui-monospace, monospace); letter-spacing: 0.1em; color: var(--ps-muted); }
.ps-cap p { margin-top: 4px; font-size: 15px; line-height: 1.5; color: var(--ps-ink); }
.ps-cap b { font-weight: 650; }

.ps-foot-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px 16px; margin-top: 16px; }
.ps-src { font: 400 11px/1.6 var(--font-mono, "Geist Mono", ui-monospace, monospace); color: var(--ps-muted); overflow-wrap: anywhere; }
.ps-src > span:first-child { margin-right: 6px; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ps-ink); }
.ps-src a { color: var(--ps-acc); text-decoration: none; }
.ps-src a:hover { text-decoration: underline; }
.ps-replay {
  margin-left: auto; padding: 6px 0; border: 0; background: none; cursor: pointer; color: var(--ps-ink);
  font: 500 11px/1.4 var(--font-mono, "Geist Mono", ui-monospace, monospace); letter-spacing: 0.1em; text-transform: uppercase;
  text-decoration: underline; text-decoration-color: var(--ps-acc); text-decoration-thickness: 1.5px; text-underline-offset: 4px;
}
.ps-replay[hidden] { display: none; }
.ps-replay:hover { color: var(--ps-acc); }


@media (max-width: 719px) {
  .promptscene { --ps-gap: 10px; }
  .ps-stage { padding: 18px 14px 26px; border-radius: 12px; }
  .ps-prompt { flex-wrap: wrap; gap: 10px; padding: 12px 12px 12px 14px; }
  .ps-prompt-body { flex-basis: 100%; }
  .ps-prompt-text { font-size: 14px; }
  .ps-go { margin-left: auto; padding: 8px 12px; font-size: 10.5px; }
  .ps-row {
    margin-top: 56px; padding-bottom: 44px; grid-template-columns: minmax(0, 1fr); row-gap: 10px;
    grid-template-areas: "own" "otag" "ctag" "copies";
  }
  .ps-copies-tag { margin-top: 14px; text-align: left; }
  .ps-arrow { display: none; }
  .ps-tile { border-radius: 8px; }
  .ps-court { grid-area: copies; margin-bottom: -42px; padding: 8px 12px 9px; outline-offset: -5px; }
  .ps-court-src { white-space: nowrap; }
  .ps-court-line { font-size: 15px; }
  .ps-court-src { margin-top: 4px; font-size: 10px; letter-spacing: 0.05em; }
  .ps-human-line { font-size: 10px; letter-spacing: 0.08em; }
  .ps-caps { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .ps-cap p { font-size: 15px; }
}

@media (max-width: 359px) {
  .ps-court { padding: 7px 9px 8px; }
  .ps-court-line { font-size: 14px; letter-spacing: 0.02em; }
  .ps-court-src { font-size: 9px; letter-spacing: 0.02em; }
}


.promptscene.is-reset, .promptscene.is-reset *, .promptscene.is-reset *::before, .promptscene.is-reset *::after { transition: none !important; animation: none !important; }


.promptscene.is-live .ps-sizer { color: transparent; }
.promptscene.is-live .ps-typed { display: block; }
.promptscene.is-live.is-typing .ps-caret { display: inline-block; animation: ps-blink 1s steps(1, end) infinite; }
.promptscene.is-live.is-pressed .ps-go { transform: scale(0.93); background: #2b2240; }
@keyframes ps-blink { 50% { opacity: 0; } }


.promptscene.is-live .ps-own .ps-tile { border-style: dashed; background: rgb(255 255 255 / 0.4); transition: background-color 0.4s ease calc(var(--i) * 260ms); }
.promptscene.is-live.is-b2 .ps-own .ps-tile { border-style: solid; background: #fff; }
.promptscene.is-live .ps-own .ps-line > * { stroke-dashoffset: 1.02; transition: stroke-dashoffset 0.62s var(--ps-draw) calc(var(--i) * 260ms + var(--j, 0) * 70ms); }
.promptscene.is-live .ps-own .ps-fill { opacity: 0; transition: opacity 0.34s ease calc(var(--i) * 260ms + 600ms); }
.promptscene.is-live .ps-own .ps-dot { transform: scale(0); transition: transform 0.34s var(--ps-ease) calc(var(--i) * 260ms + 820ms); }
.promptscene.is-live .ps-own .ps-dot > * { fill: var(--ps-acc); transition: fill 0.45s ease 1.02s; }
.promptscene.is-live .ps-own-tag { opacity: 0; transition: opacity 0.4s ease 0.3s; }
.promptscene.is-live.is-b2 .ps-own .ps-line > * { stroke-dashoffset: 0; }
.promptscene.is-live.is-b2 .ps-own .ps-fill { opacity: 1; }
.promptscene.is-live.is-b2 .ps-own .ps-dot { transform: none; }
.promptscene.is-live.is-b2 .ps-own-tag { opacity: 1; }


.promptscene.is-live .ps-copies .ps-cell > * { opacity: 0; transform: translate(var(--dx, -60px), var(--dy, 0px)); transition: opacity 0.28s ease calc(var(--i) * 90ms + 60ms), transform 0.74s cubic-bezier(0.2, 0.75, 0.2, 1) calc(var(--i) * 90ms); }
.promptscene.is-live .ps-arrow path { stroke-dashoffset: 1.02; transition: stroke-dashoffset 0.5s var(--ps-draw) 0.25s; }
.promptscene.is-live .ps-copies-tag { opacity: 0; transition: opacity 0.4s ease 0.55s; }
.promptscene.is-live .ps-court { opacity: 0; }
.promptscene.is-live.is-b3 .ps-copies .ps-cell > * { opacity: 1; transform: none; }
.promptscene.is-live.is-b3 .ps-arrow path { stroke-dashoffset: 0; }
.promptscene.is-live.is-b3 .ps-copies-tag { opacity: 1; }
.promptscene.is-live.is-b3 .ps-court { animation: ps-stamp 0.42s cubic-bezier(0.3, 0.7, 0.25, 1) 0.9s both; }
.promptscene.is-live.is-b3 .ps-own .ps-dot > * { fill: var(--ps-drain); }
@keyframes ps-stamp {
  0% { opacity: 0; transform: scale(1.22) rotate(-6deg); }
  40% { opacity: 1; }
  72% { transform: scale(0.985) rotate(-2.2deg); }
  100% { opacity: 1; transform: rotate(-2.5deg); }
}


.promptscene.is-live .ps-hand path { stroke-dashoffset: 1.02; transition: stroke-dashoffset 0.44s cubic-bezier(0.5, 0, 0.3, 1) calc(var(--j, 0) * 210ms + 150ms); }
.promptscene.is-live .ps-human { opacity: 0; transform: translateY(4px) scale(0.9); transition: opacity 0.3s ease 1.1s, transform 0.42s var(--ps-ease) 1.1s; }
.promptscene.is-live .ps-human::after { transform: scaleY(0); transition: transform 0.24s ease 0.95s; }
.promptscene.is-live.is-b4 .ps-hand path { stroke-dashoffset: 0; }
.promptscene.is-live.is-b4 .ps-human { opacity: 1; transform: none; }
.promptscene.is-live.is-b4 .ps-human::after { transform: none; }
.promptscene.is-live .ps-own .ps-cell:first-child .ps-tile::after { opacity: 0; transition: opacity 0.6s ease 0.9s; }
.promptscene.is-live.is-b4 .ps-own .ps-cell:first-child .ps-tile::after { opacity: 1; }


.promptscene.is-live .ps-cap { opacity: 0; transition: opacity 0.4s ease; }
.promptscene.is-live .ps-cap.is-seen { opacity: 1; }
.promptscene.is-live .ps-cap.is-seen p { color: var(--ps-muted); transition: color 0.4s ease; }
.promptscene.is-live .ps-cap.is-on p { color: var(--ps-ink); }
.promptscene.is-live .ps-cap.is-seen::after { transform: none; background: var(--ps-copy-line); }
.promptscene.is-live .ps-cap.is-on::after { background: var(--ps-ink); animation: ps-bar 1.6s linear both; }
.promptscene.is-live.is-done .ps-cap.is-on::after { animation: none; transform: none; }
.promptscene.is-live:not(.is-done) .ps-replay { visibility: hidden; }
@keyframes ps-bar { from { transform: scaleX(0); } to { transform: scaleX(1); } }
