/* PROMPTSMITH STUDIO, the shared look (2026-11-06, Alec: "premium like Tempest, never cheap or weird"). One sheet for the Downpour page and the free public
   site (promptsmithstudio.com): tokens, the header band, the setup row, messages, prompt blocks, steer buttons, the compose bar, the forge and the reveal.
   Nothing here knows about Downpour's sidebar, limits or history: that shell lives in promptsmith-downpour.css. Every class starts ps2- and everything hangs off
   one root (.ps2), so it can't reach any other page. It pairs with JavaScript/promptsmith.js.
   THE RULES: one accent, violet #6D28D9; no pink or magenta anywhere (the badge keeps its own colors); the band is the only gradient at rest; type is
   12 / 13 / 14 / 15 / 16 / 18 and secondary text recedes in grey; nothing loops unless something is really happening. */

.ps2 {
	--ps2-ink: #0F172A; --ps2-ink-2: #475569; --ps2-ink-3: #64748B; --ps2-body: #334155;
	--ps2-page: #F7F8FC; --ps2-card: #FFFFFF; --ps2-edge: #E3EAF7;
	--ps2-accent: #6D28D9; --ps2-accent-deep: #5B21B6; --ps2-accent-soft: #F3EFFD; --ps2-accent-edge: #D9CDF6; --ps2-accent-glow: 139, 92, 246;
	--ps2-night: #120A36; --ps2-ok: #15803D;
	--ps2-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 10px 24px -20px rgba(30, 20, 90, .28);
	--accent: var(--ps2-accent);
	color: var(--ps2-ink); font-family: Roboto, Helvetica, Arial, sans-serif; font-size: 15px; container-type: inline-size;
}
.ps2 * { box-sizing: border-box; }
.ps2 :is(button, a, select):focus-visible { outline: 3px solid var(--ps2-accent); outline-offset: 2px; }

/* ---------- the header band: the one loud thing on the page ---------- */
.ps2-band { position: relative; isolation: isolate; overflow: hidden; display: flex; align-items: center; gap: 18px; min-height: 104px; padding: 18px 26px; border-radius: 16px;
	background: var(--ps2-night); color: #fff; }
.ps2-band::before { content: ""; position: absolute; inset: -60% -8%; z-index: -2; filter: blur(22px); background:
	radial-gradient(30% 42% at 84% 62%, rgba(124, 58, 237, .95), transparent 72%),
	radial-gradient(24% 34% at 97% 44%, rgba(56, 120, 246, .75), transparent 74%),
	radial-gradient(34% 40% at 62% 74%, rgba(67, 56, 202, .7), transparent 74%),
	radial-gradient(26% 30% at 30% 30%, rgba(76, 29, 149, .55), transparent 76%); }
.ps2-band::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: no-repeat right center / auto 150%
	url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 900 240' width='900' height='240'%3E%3Cdefs%3E%3ClinearGradient id='a' x1='0' x2='1'%3E%3Cstop offset='.42' stop-color='%236D28D9' stop-opacity='0'/%3E%3Cstop offset='.68' stop-color='%23A78BFA' stop-opacity='.75'/%3E%3Cstop offset='1' stop-color='%2360A5FA' stop-opacity='.9'/%3E%3C/linearGradient%3E%3Cfilter id='b' x='-10%25' y='-60%25' width='120%25' height='220%25'%3E%3CfeGaussianBlur stdDeviation='7'/%3E%3C/filter%3E%3C/defs%3E%3Cpath d='M0 190C170 200 280 120 450 130S740 200 900 70' fill='none' stroke='url(%23a)' stroke-width='16' filter='url(%23b)'/%3E%3Cpath d='M0 190C170 200 280 120 450 130S740 200 900 70' fill='none' stroke='url(%23a)' stroke-width='1.5'/%3E%3C/svg%3E"); }
.ps2-band-logo { flex: none; width: 68px; height: 68px; border-radius: 16px; display: block; box-shadow: 0 0 0 1px rgba(255, 255, 255, .22), 0 10px 24px -10px rgba(0, 0, 0, .7); }
.ps2-band-text { flex: 1; min-width: 0; }
.ps2-band h1 { margin: 0 0 4px; font-size: 28px; line-height: 1.15; font-weight: 800; letter-spacing: -.4px; color: #fff; }
.ps2-band p { margin: 0; font-size: 15px; line-height: 1.45; color: rgba(255, 255, 255, .78); max-width: 640px; }

/* ---------- the setup row: set once, then it recedes ---------- */
.ps2-setup { display: flex; align-items: center; gap: 26px; padding: 9px 16px; background: var(--ps2-card); border: 1px solid var(--ps2-edge); border-radius: 12px; box-shadow: var(--ps2-shadow); }
.ps2-field { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ps2-label { font-size: 12px; font-weight: 600; letter-spacing: .6px; text-transform: uppercase; color: var(--ps2-ink-3); white-space: nowrap; }
.ps2-seg { display: inline-flex; border: 1px solid var(--ps2-edge); border-radius: 10px; overflow: hidden; background: #fff; }
.ps2-seg button { border: 0; border-left: 1px solid var(--ps2-edge); background: transparent; color: var(--ps2-ink-2); font: inherit; font-size: 14px; font-weight: 500; height: 36px; min-width: 40px; padding: 0 11px; cursor: pointer; }
.ps2-seg button:first-child { border-left: 0; }
.ps2-seg button:hover:not(.on) { background: #F8F7FD; color: var(--ps2-ink); }
.ps2-seg button.on { background: var(--ps2-accent-soft); color: var(--ps2-accent-deep); font-weight: 700; box-shadow: inset 0 0 0 1px var(--ps2-accent-edge, #D9CDF6); }
.ps2 .ps2-seg button:focus-visible { outline-offset: -3px; }
.ps2-hint { margin-left: auto; font-size: 13px; color: var(--ps2-ink-3); white-space: nowrap; }
/* narrow screens: the same three settings as one compact row of dropdowns */
.ps2-picks { display: none; }
.ps2-pick { position: relative; display: flex; flex-direction: column; gap: 1px; min-width: 0; padding: 5px 24px 5px 10px; border: 1px solid var(--ps2-edge); border-radius: 10px; background: #fff; }
.ps2-pick:focus-within { border-color: var(--ps2-accent); }
.ps2-pick > span { font-size: 12px; font-weight: 500; color: var(--ps2-ink-3); line-height: 1.2; }
.ps2-pick select { appearance: none; -webkit-appearance: none; width: 100%; border: 0; outline: 0; padding: 0; background: transparent; color: var(--ps2-accent-deep); font: inherit; font-size: 15px; font-weight: 700; line-height: 1.3; text-overflow: ellipsis; cursor: pointer; }
.ps2-pick::after { content: ""; position: absolute; right: 10px; top: 50%; width: 7px; height: 7px; margin-top: -5px; border: solid var(--ps2-ink-3); border-width: 0 1.8px 1.8px 0; transform: rotate(45deg); pointer-events: none; }

/* ---------- the chat is the page: no inner scroll, nothing clips the sparks ---------- */
.ps2-chat { position: relative; flex: 1 1 auto; display: flex; flex-direction: column; min-width: 0; }
.ps2-log { display: flex; flex-direction: column; gap: 20px; padding: 14px 0 6px; }
.ps2-log:has(.ps2-hello) { flex: 1 1 auto; }

.ps2-hello { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; margin: auto 0; padding: 20px 0; }
.ps2-hello h2 { margin: 0; font-size: 26px; font-weight: 800; letter-spacing: -.3px; color: var(--ps2-ink); }
.ps2-hello > p { margin: 0; max-width: 640px; font-size: 15px; line-height: 1.5; color: var(--ps2-ink-2); }
.ps2-ideas { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; width: 100%; margin-top: 18px; }
.ps2-idea { display: flex; flex-direction: column; gap: 3px; min-height: 76px; padding: 14px 18px; text-align: left; font: inherit; color: var(--ps2-ink); background: var(--ps2-card); border: 1px solid var(--ps2-edge); border-radius: 12px;
	box-shadow: var(--ps2-shadow); cursor: pointer; transition: border-color .15s, box-shadow .2s, transform .2s; }
.ps2-idea:hover:not(:disabled) { border-color: #B9A5EE; transform: translateY(-1px); box-shadow: 0 14px 28px -20px rgba(var(--ps2-accent-glow), .7); }
.ps2-idea:disabled { opacity: .55; cursor: default; }
.ps2-idea b { font-size: 16px; font-weight: 700; line-height: 1.3; }
.ps2-idea span { font-size: 14px; color: var(--ps2-ink-3); line-height: 1.35; }

.ps2-msg { scroll-margin-top: calc(var(--dv2-phonebar, 0px) + 14px); scroll-margin-bottom: 128px; }
.ps2-msg p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.ps2-msg.me { align-self: flex-end; max-width: min(72%, 760px); padding: 10px 14px; font-size: 15px; line-height: 1.5; color: var(--ps2-ink); background: var(--ps2-accent-soft); border: 1px solid #E6DEF9; border-radius: 14px 14px 4px 14px; }
.ps2-pics { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-bottom: 8px; }
.ps2-pics img { width: 112px; height: 112px; object-fit: cover; display: block; border-radius: 10px; border: 1px solid var(--ps2-edge); background: #fff; }
.ps2-msg.me .ps2-pics:last-child { margin-bottom: 0; }
.ps2-msg.smith { align-self: stretch; display: flex; align-items: flex-start; gap: 14px; }
.ps2-say { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.ps2-say-text { position: relative; padding-top: 7px; font-size: 16px; line-height: 1.55; color: var(--ps2-ink); }

/* the badge beside Promptsmith's words */
.ps2-mark { position: relative; flex: none; width: 40px; height: 40px; }
.ps2-mark img { position: relative; z-index: 1; display: block; width: 40px; height: 40px; border-radius: 11px; box-shadow: 0 0 0 1px rgba(109, 40, 217, .2), 0 4px 10px -6px rgba(46, 16, 101, .5); }
.ps2-mark::before { content: ""; position: absolute; inset: -22px; border-radius: 50%; opacity: 0; pointer-events: none; background: radial-gradient(closest-side, rgba(var(--ps2-accent-glow), .6), rgba(var(--ps2-accent-glow), 0)); }

/* ---------- prompt blocks ---------- */
.ps2-block { position: relative; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "head copy" "body body" "more more"; column-gap: 16px;
	padding: 14px 16px 14px 20px; background: var(--ps2-card); border: 1px solid var(--ps2-edge); border-radius: 14px; box-shadow: var(--ps2-shadow); transition: border-color .25s, box-shadow .35s; }
.ps2-block-head { grid-area: head; display: flex; flex-direction: column; gap: 1px; min-width: 0; align-self: center; }
.ps2-block-title { font-size: 16px; font-weight: 700; line-height: 1.3; color: var(--ps2-ink); }
.ps2-tag { font-size: 13px; color: var(--ps2-ink-3); }
.ps2-tag.ok { color: var(--ps2-ok); font-weight: 700; } /* "Copied, paste it into Midjourney" takes the count's place: nothing covers the prompts, nothing moves */
.ps2-copy { grid-area: copy; align-self: start; display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 40px; min-width: 100px; padding: 0 18px; border: 0; border-radius: 10px;
	background: var(--ps2-accent); color: #fff; font: inherit; font-size: 15px; font-weight: 700; cursor: pointer; transition: background .15s; }
.ps2-copy:hover { background: var(--ps2-accent-deep); }
.ps2-copy.done, .ps2-copy.done:hover { background: var(--ps2-ok); }
/* Copy for ChatGPT (2026-11-21): a small second button under Copy, outlined, so Midjourney's Copy stays the main one */
.ps2-copies { grid-area: copy; align-self: start; display: flex; flex-direction: column; align-items: stretch; gap: 6px;; min-width: 140px; }
.ps2-copies .ps2-copy { align-self: stretch; } /* both buttons one width, whichever says Copied */
.ps2-copy-gpt { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 30px; padding: 0 12px; border: 1px solid var(--ps2-accent-edge, #D9CDF6); border-radius: 8px;
	background: #fff; color: var(--ps2-accent-deep, #5B21B6); font: inherit; font-size: 13px; font-weight: 600; white-space: nowrap; cursor: pointer; transition: background .15s, border-color .15s; }
.ps2-copy-gpt:hover { background: var(--ps2-accent-soft, #F3EFFD); border-color: #C4B5FD; }
.ps2-copy-gpt.done, .ps2-copy-gpt.done:hover { color: var(--ps2-ok, #15803D); border-color: #86EFAC; background: #F0FDF4; }
.ps2-copy-gpt.is-drop { height: 40px; padding: 0 14px; font-size: 14px; border-radius: 10px; }
.ps2-block-body { grid-area: body; position: relative; margin-top: 10px; min-width: 0; }
.ps2-block pre { margin: 0; font: 15px/1.6 Roboto, Helvetica, Arial, sans-serif; color: var(--ps2-body); white-space: pre-wrap; word-break: break-word; }
/* a long block rests folded, so the page stays one scroll; Copy always takes the whole block */
.ps2-block-body.is-folded { max-height: 264px; overflow: hidden; }
.ps2-block[data-long="1"] .ps2-block-body.is-folded::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 72px; pointer-events: none; background: linear-gradient(to bottom, rgba(255, 255, 255, 0), #fff); }
.ps2-more { grid-area: more; display: none; justify-self: start; margin-top: 6px; padding: 4px 0; border: 0; background: none; color: var(--ps2-accent); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.ps2-more:hover { text-decoration: underline; }
.ps2-block[data-long="1"] .ps2-more { display: inline-flex; }
.ps2-block.is-copied { border-color: #22C55E; }

/* ---------- keep steering ---------- */
.ps2-steer { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 0 4px 54px; transition: opacity .3s; }
.ps2-steer > span { margin-right: 4px; font-size: 14px; font-weight: 600; color: var(--ps2-ink-2); white-space: nowrap; }
.ps2-steer button { flex: none; height: 36px; padding: 0 14px; border: 1px solid var(--ps2-edge); border-radius: 999px; background: var(--ps2-card); color: var(--ps2-ink); font: inherit; font-size: 14px; font-weight: 500; cursor: pointer; }
.ps2-steer button:hover { border-color: #B9A5EE; background: #FBFAFE; }
.ps2-log:has(.ps2-msg[data-rv]) ~ .ps2-steer { opacity: 0; pointer-events: none; } /* they arrive after the answer has finished */

/* ---------- the compose bar: always on screen ---------- */
.ps2-dock { position: sticky; bottom: 0; z-index: 20; margin-top: auto; padding: 16px 0 14px; background: linear-gradient(to bottom, transparent, var(--ps2-page) 16px); }
.ps2-compose { display: flex; align-items: flex-end; gap: 8px; padding: 7px; background: var(--ps2-card); border: 1px solid #D5DEEE; border-radius: 14px; box-shadow: 0 12px 30px -20px rgba(30, 20, 90, .45); transition: border-color .15s, box-shadow .15s; }
.ps2-compose:focus-within { border-color: var(--ps2-accent); box-shadow: 0 0 0 3px rgba(109, 40, 217, .12), 0 12px 30px -20px rgba(30, 20, 90, .45); }
.ps2-compose textarea { flex: 1; min-width: 0; display: block; height: 42px; min-height: 42px; max-height: 200px; resize: none; border: 0; outline: 0; padding: 9px 8px; background: transparent; color: var(--ps2-ink); font: inherit; font-size: 16px; line-height: 24px; }
.ps2 .ps2-compose textarea:focus-visible { outline: none; }
.ps2-compose textarea::placeholder { color: var(--ps2-ink-3); }
.ps2-attach { flex: none; display: inline-flex; align-items: center; gap: 7px; height: 42px; padding: 0 12px; border: 1px solid var(--ps2-edge); border-radius: 10px; background: #fff; color: var(--ps2-ink-2); font: inherit; font-size: 14px; font-weight: 600; white-space: nowrap; cursor: pointer; }
.ps2-attach:hover:not(:disabled) { border-color: #B9A5EE; color: var(--ps2-accent-deep); }
.ps2-attach:disabled { opacity: .5; cursor: default; }
/* Studio's mic (2026-11-15, UsageLimits StudioMicOn): a quiet round button; while recording a soft red dot breathes beside the time, and a click stops */
.ps2-mic { flex: none; display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 42px; min-width: 42px; padding: 0 11px; border: 1px solid var(--ps2-edge); border-radius: 10px; background: #fff; color: var(--ps2-ink-2); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; transition: border-color .15s, color .15s, background .15s; }
.ps2-mic:hover:not(:disabled) { border-color: #B9A5EE; color: var(--ps2-accent-deep); }
.ps2-mic:disabled { cursor: default; }
.ps2-mic.is-rec { border-color: #F4B4B4; background: #FFF5F5; color: #9F1D1D; padding: 0 12px 0 13px; }
.ps2-mic.is-rec:hover { border-color: #E98A8A; }
.ps2-mic-dot { width: 9px; height: 9px; border-radius: 50%; background: #E5484D; box-shadow: 0 0 0 0 rgba(229, 72, 77, .45); animation: ps2MicBreathe 1.6s ease-in-out infinite; }
.ps2-mic-time { min-width: 32px; font-variant-numeric: tabular-nums; text-align: left; }
.ps2-mic.is-writing { color: var(--ps2-accent); }
.ps2-mic-spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid #E4DCF8; border-top-color: var(--ps2-accent); animation: ps2MicSpin .8s linear infinite; }
@keyframes ps2MicBreathe { 0%, 100% { opacity: .55; box-shadow: 0 0 0 0 rgba(229, 72, 77, .35); } 50% { opacity: 1; box-shadow: 0 0 0 5px rgba(229, 72, 77, 0); } }
@keyframes ps2MicSpin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .ps2-mic-dot { animation: none; opacity: 1; } .ps2-mic-spin { animation-duration: 2s; } }
.ps2-micsaved { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; padding: 10px 12px; border: 1px solid #DCD3F5; border-radius: 12px; background: #F8F5FF; color: var(--ps2-ink); font-size: 14px; }
.ps2-micsaved svg { flex: none; color: var(--ps2-accent); }
.ps2-micsaved span { flex: 1; min-width: 0; }
.ps2-micsaved-go { flex: none; height: 34px; padding: 0 14px; border: 0; border-radius: 9px; background: var(--ps2-accent); color: #fff; font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.ps2-micsaved-go:hover:not(:disabled) { background: var(--ps2-accent-deep); }
.ps2-micsaved-x { flex: none; height: 34px; padding: 0 10px; border: 0; background: none; color: var(--ps2-ink-2); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.ps2-micsaved-x:hover:not(:disabled) { color: var(--ps2-ink); text-decoration: underline; }
.ps2-micsaved button:disabled { opacity: .5; cursor: default; }
.ps2-send { flex: none; display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 42px; padding: 0 20px; border: 0; border-radius: 10px; background: var(--ps2-accent); color: #fff; font: inherit; font-size: 15px; font-weight: 700; cursor: pointer; transition: background .15s; }
.ps2-send:hover:not(:disabled) { background: var(--ps2-accent-deep); }
.ps2-send:disabled { background: #EEEAF8; color: #9A90BC; cursor: default; }
.ps2-tip { margin: 7px 2px 0; text-align: center; font-size: 13px; color: var(--ps2-ink-3); }
.ps2-full { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px 10px 16px; background: var(--ps2-card); border: 1px solid var(--ps2-edge); border-radius: 14px; font-size: 15px; }
.ps2-problem { position: absolute; left: 0; right: 0; bottom: calc(100% - 8px); z-index: 3; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 12px 9px 14px; background: #FEF2F2; color: #7F1D1D; border: 1px solid #FCA5A5; border-radius: 10px; font-size: 14px; box-shadow: 0 10px 24px -16px rgba(127, 29, 29, .5); }
.ps2-problem button { border: 0; background: none; color: inherit; font-size: 20px; line-height: 1; cursor: pointer; }

.ps2-pending { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 0 2px 8px; }
.ps2-pending-pic { position: relative; width: 68px; height: 68px; border-radius: 10px; overflow: hidden; border: 1px solid var(--ps2-edge); background: #fff; }
.ps2-pending-pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ps2-pending-pic button { position: absolute; top: 3px; right: 3px; width: 26px; height: 26px; display: flex; align-items: center; justify-content: center; border: 0; border-radius: 50%; background: rgba(15, 23, 42, .78); color: #fff; font-size: 17px; line-height: 1; cursor: pointer; }
.ps2-pending-pic button:hover:not(:disabled) { background: #B91C1C; }
.ps2-pending-note { font-size: 13px; color: var(--ps2-ink-3); }

.ps2-dropnote { display: none; }
#ps-chat.is-drop .ps2-dropnote { display: block; position: absolute; inset: 0; z-index: 30; pointer-events: none; background: rgba(243, 239, 253, .88); border: 2px dashed var(--ps2-accent); border-radius: 14px; }
.ps2-dropnote span { position: sticky; top: 40vh; display: block; width: max-content; margin: 40px auto; padding: 12px 22px; background: #fff; border: 1px solid var(--ps2-accent-edge, #D9CDF6); border-radius: 12px; color: var(--ps2-accent-deep); font-size: 18px; font-weight: 700; }

.ps2-wait { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 60px 0; color: var(--ps2-ink-3); }
.ps2-wait img { width: 150px; height: 84px; object-fit: contain; }

/* ---------- the forge: one hammer beat, everything on it ----------
   Only transform and opacity move (the old pulse animated a box-shadow on a scaling picture, which is what shimmered). The badge dips and rebounds, the halo
   flares and the sparks fly on the same 1.6 s beat, so it reads as a hammer on an anvil rather than five things blinking. */
.ps2-forge { align-items: center; }
.ps2-forge .ps2-mark img { animation: ps2-strike 1.6s cubic-bezier(.3, .7, .3, 1) infinite; will-change: transform; }
.ps2-forge .ps2-mark::before { animation: ps2-halo 1.6s ease-out infinite; will-change: transform, opacity; }
.ps2-spark { position: absolute; left: 50%; top: 50%; z-index: 2; width: 4px; height: 4px; margin: -2px 0 0 -2px; border-radius: 50%; opacity: 0; pointer-events: none; background: var(--c, #C4B5FD); box-shadow: 0 0 6px 1px var(--c, #C4B5FD);
	animation: ps2-spark 1.6s cubic-bezier(.2, .6, .4, 1) infinite; animation-delay: var(--d, 0s); will-change: transform, opacity; }
.ps2-spark:nth-of-type(1) { --x: 34px; --y: -30px; --d: 0s; --c: #A78BFA; }
.ps2-spark:nth-of-type(2) { --x: -32px; --y: -26px; --d: .03s; --c: #93C5FD; }
.ps2-spark:nth-of-type(3) { --x: 42px; --y: -8px; --d: .06s; --c: #DDD6FE; }
.ps2-spark:nth-of-type(4) { --x: -40px; --y: -6px; --d: .02s; --c: #A78BFA; }
.ps2-spark:nth-of-type(5) { --x: 12px; --y: -42px; --d: .05s; --c: #DDD6FE; }
.ps2-spark:nth-of-type(6) { --x: -14px; --y: -40px; --d: .08s; --c: #93C5FD; }
.ps2-spark:nth-of-type(7) { --x: 26px; --y: 12px; --d: .1s; --c: #8B5CF6; }
.ps2-forge-words { display: flex; align-items: baseline; min-height: 24px; font-size: 15px; font-weight: 600; color: var(--ps2-accent); }
.ps2-forge-say { display: inline-block; background: linear-gradient(90deg, #6D28D9 0%, #6D28D9 38%, #B79FF3 50%, #6D28D9 62%, #6D28D9 100%) 0 0 / 280% 100%; -webkit-background-clip: text; background-clip: text; color: transparent;
	animation: ps2-sheen 2.6s linear infinite, ps2-line-in .32s ease-out both; }
.ps2-forge-say.out { animation: ps2-sheen 2.6s linear infinite, ps2-line-out .2s ease-in both; }
.ps2-dots i { font-style: normal; opacity: .25; animation: ps2-dot 1.6s infinite; }
.ps2-dots i:nth-child(2) { animation-delay: .2s; } .ps2-dots i:nth-child(3) { animation-delay: .4s; }

/* ---------- the reveal: the whole answer is already on the page, this only uncovers it (promptsmith.js drives data-rv) ---------- */
/* pending: drawn but not yet picked up by the script. If the script never comes, the answer shows by itself after 2 s */
.ps2-msg[data-rv="pending"] .ps2-say-text { color: transparent; animation: ps2-show-text 0s linear 2s forwards; }
.ps2-msg[data-rv="pending"] .ps2-block { opacity: 0; animation: ps2-show-block 0s linear 2s forwards; }
.ps2-msg[data-rv="play"] .ps2-say-text { color: transparent; }
.ps2-msg[data-rv="play"] .ps2-mark::before { animation: ps2-land 1s ease-out 1; }
.ps2-typed { position: absolute; inset: 0; padding: inherit; color: var(--ps2-ink); white-space: pre-wrap; overflow-wrap: anywhere; pointer-events: none; }
.ps2-typed i { font-style: normal; opacity: 0; transition: opacity .12s linear; }
.ps2-typed i.on { opacity: 1; }
.ps2-typed i.at { position: relative; }
.ps2-typed i.at::after { content: ""; position: absolute; left: 100%; top: .08em; bottom: .02em; width: 2px; margin-left: 1px; border-radius: 1px; background: var(--ps2-accent); }
.ps2-block[data-rv="wait"] { opacity: 0; }
.ps2-block[data-rv="writing"] { animation: ps2-block-in .36s cubic-bezier(.2, .8, .2, 1) both; border-color: #BBA7F0; box-shadow: 0 0 0 1px rgba(109, 40, 217, .14), 0 20px 44px -26px rgba(var(--ps2-accent-glow), .85); }
.ps2-block[data-rv="writing"] pre { -webkit-mask-image: linear-gradient(to bottom, #000 calc(var(--ps2-w, 0px) - 44px), transparent var(--ps2-w, 0px)); mask-image: linear-gradient(to bottom, #000 calc(var(--ps2-w, 0px) - 44px), transparent var(--ps2-w, 0px)); }
.ps2-block[data-rv="writing"] .ps2-block-body::before { content: ""; position: absolute; left: -6px; right: -6px; top: 0; z-index: 1; height: 2px; transform: translateY(calc(var(--ps2-w, 0px) - 24px)); pointer-events: none;
	background: linear-gradient(90deg, transparent, #8B5CF6 18%, #C4B5FD 50%, #8B5CF6 82%, transparent); box-shadow: 0 0 14px 2px rgba(var(--ps2-accent-glow), .55); }
.ps2-block:is([data-rv="wait"], [data-rv="writing"]) :is(.ps2-copy, .ps2-copy-gpt, .ps2-more) { opacity: 0; } /* still clickable: a click ends the reveal and Copy takes the real block */
.ps2-block[data-rv="done"] .ps2-copy { animation: ps2-pop .34s cubic-bezier(.2, 1.3, .4, 1) both; }

@keyframes ps2-strike { 0%, 100% { transform: none; } 5% { transform: translateY(1.5px) scale(.965); } 14% { transform: translateY(-1px) scale(1.015); } 30% { transform: none; } }
@keyframes ps2-halo { 0% { opacity: 0; transform: scale(.7); } 7% { opacity: .95; transform: scale(.92); } 55% { opacity: .18; transform: scale(1.12); } 100% { opacity: 0; transform: scale(1.15); } }
@keyframes ps2-spark { 0%, 4% { opacity: 0; transform: translate(0, 0) scale(1); } 7% { opacity: 1; } 42% { opacity: .9; transform: translate(var(--x), var(--y)) scale(.8); } 70% { opacity: 0; transform: translate(calc(var(--x) * 1.25), calc(var(--y) + 18px)) scale(.3); } 100% { opacity: 0; transform: translate(calc(var(--x) * 1.25), calc(var(--y) + 18px)) scale(.3); } }
@keyframes ps2-land { 0% { opacity: .9; transform: scale(.85); } 100% { opacity: 0; transform: scale(1.3); } }
@keyframes ps2-sheen { from { background-position: 100% 0; } to { background-position: 0 0; } }
@keyframes ps2-line-in { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
@keyframes ps2-line-out { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateY(-4px); } }
@keyframes ps2-dot { 0%, 100% { opacity: .25; } 40% { opacity: 1; } }
@keyframes ps2-rise { from { transform: translateY(100%); } to { transform: none; } }
@keyframes ps2-block-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes ps2-pop { from { opacity: 0; transform: scale(.9); } to { opacity: 1; transform: none; } }
@keyframes ps2-show-text { to { color: var(--ps2-ink); } }
@keyframes ps2-show-block { to { opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
	.ps2-forge .ps2-mark img, .ps2-dots i, .ps2-forge-say, .ps2-forge-say.out { animation: none; }
	.ps2-forge .ps2-mark::before { animation: none; opacity: .5; }
	.ps2-forge-say { background: none; color: var(--ps2-accent); }
	.ps2-dots i { opacity: 1; }
	.ps2-spark { display: none; }
	.ps2-idea:hover:not(:disabled) { transform: none; }
	.ps2-msg[data-rv="pending"] .ps2-say-text { color: var(--ps2-ink); animation: none; }
	.ps2-msg[data-rv="pending"] .ps2-block { opacity: 1; animation: none; }
}

/* ---------- small screens: phone first, one column ---------- */
@container (max-width: 1240px) { .ps2-hint { display: none; } }
@container (max-width: 1000px) { .ps2-ideas { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@container (max-width: 960px) {
	.ps2-setup { display: block; padding: 8px; }
	.ps2-field, .ps2-hint { display: none; }
	.ps2-picks { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.25fr) minmax(0, .95fr); gap: 6px; }
}
@container (max-width: 760px) {
	.ps2-band { flex-wrap: wrap; min-height: 0; padding: 14px 16px 30px; border-radius: 0; gap: 8px 12px; }
	.ps2-band-text { display: contents; }
	.ps2-band::after { background-size: 150% auto; background-position: right bottom; opacity: .7; } /* the ribbon runs under the words, never through them */
	.ps2-band-logo { width: 48px; height: 48px; border-radius: 12px; }
	.ps2-band h1 { flex: 1; min-width: 0; font-size: 22px; margin: 0; }
	.ps2-band p { flex: 0 0 100%; order: 3; font-size: 14px; }
	.ps2-band-more { display: none; }
	.ps2-setup { position: relative; z-index: 1; margin: -16px 12px 0; }
	.ps2-pick { padding: 5px 20px 5px 8px; }
	.ps2-pick select { font-size: 14px; }
	.ps2-pick::after { right: 8px; }
	.ps2-chat { padding: 0 12px; }
	.ps2-log { gap: 16px; padding-top: 14px; }
	.ps2-ideas { grid-template-columns: minmax(0, 1fr); gap: 8px; margin-top: 14px; }
	.ps2-idea { min-height: 0; padding: 12px 14px; }
	.ps2-hello { padding-top: 12px; }
	.ps2-hello h2 { font-size: 22px; }
	.ps2-msg.me { max-width: 90%; }
	.ps2-msg.smith { display: grid; grid-template-columns: 34px minmax(0, 1fr); column-gap: 10px; }
	.ps2-mark, .ps2-mark img { width: 34px; height: 34px; border-radius: 10px; }
	.ps2-say { display: contents; }
	.ps2-say-text { grid-column: 2; padding-top: 4px; font-size: 15px; }
	.ps2-forge-words { grid-column: 2; }
	.ps2-block { grid-column: 1 / -1; margin-top: 12px; grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "copy" "body" "more"; padding: 12px 14px; }
	.ps2-copies { margin-top: 10px; }
	.ps2-copy { width: 100%; height: 44px; }
	.ps2-block pre { font-size: 14px; }
	.ps2-block-body.is-folded { max-height: 216px; }
	.ps2-steer { flex-wrap: nowrap; margin: 0 -12px; padding: 6px 12px; overflow-x: auto; scrollbar-width: none; }
	.ps2-steer::-webkit-scrollbar { display: none; }
	.ps2-dock { padding: 12px 0 calc(8px + env(safe-area-inset-bottom, 0px)); }
	.ps2-attach { width: 42px; padding: 0; justify-content: center; }
	.ps2-attach span, .ps2-tip { display: none; }
	.ps2-send { padding: 0 16px; }
}
