/* Prompt Gen (/promptgen): the niche chat's look (style.css .igf, .chatbox, .msg, .pick, .assess) plus the form parts. */
.pg-hero { padding-bottom: 8px; }
.pg-hero .offer-kicker { margin: 0 0 6px; }
.pg-access { min-height: 1.4em; margin: 10px 0 0; font-size: 14px; color: var(--muted); }
.pg-access[data-access="full"] { color: var(--cyan); }
.pg-access[data-access="expired"] { color: #ffcfb5; }
.pg-access a { color: var(--cyan); font-weight: 600; }

.pg-wrap { width: min(100% - 32px, 1120px); margin-inline: auto; }
@media (min-width: 960px) {
  .pg-wrap { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: start; }
  .pg-wrap .igf-copy { position: sticky; top: 16px; }
}
#pg-log { position: relative; } /* offsetTop of each message is measured inside the log for scrolling */
.pg-box { height: min(760px, calc(100svh - 24px)); }
.chat-head .who small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* answered steps: the person's answer with an edit button */
.pg-answer { display: flex; align-items: flex-end; gap: 8px; align-self: flex-end; max-width: 92%; }
.pg-answer .msg { max-width: none; }
.pg-edit {
  flex: none;
  min-height: 32px;
  padding: 2px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
.pg-edit:hover, .pg-edit:focus-visible { color: var(--fg); border-color: var(--cyan); outline: none; }

/* the open step's panel */
.pg-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #181818;
  animation: pop .22s ease-out;
}
.pg-panel h4 { margin: 4px 0 0; font-size: 14px; color: #d4d4d4; }
.pg-panel .fine { margin: 0; }
.pg-field { display: grid; gap: 6px; }
.pg-field > span { font-size: 14px; font-weight: 600; }
.pg-field > span small { color: var(--muted); font-weight: 400; }
.pg-field input, .pg-field textarea, .pg-field select {
  width: 100%;
  min-height: 46px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg);
  color: var(--fg);
  font: inherit;
  font-size: 16px;
}
.pg-field textarea { min-height: 88px; resize: vertical; }
.pg-field input:focus, .pg-field textarea:focus, .pg-field select:focus { outline: none; border-color: var(--cyan); }
.pg-row { display: flex; flex-wrap: wrap; gap: 8px; }
.pg-chip {
  min-height: 38px;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--fg);
  font: inherit;
  font-size: 14px;
  text-align: left;
  cursor: pointer;
}
.pg-chip:hover, .pg-chip:focus-visible { border-color: var(--cyan); outline: none; }
.pg-chip[aria-pressed="true"] { border-color: var(--orange); background: #2a160c; }
.pg-chip small { display: block; color: var(--muted); font-size: 12px; }
.pg-chip:disabled { opacity: .45; cursor: not-allowed; }
.pg-ideas { display: grid; gap: 8px; }
.pg-ideas .pg-chip { border-radius: 12px; }
.pg-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.pg-actions .btn { min-height: 44px; }
.pg-err { margin: 0; color: #ff9b7a; font-size: 14px; min-height: 1em; }

/* style picker */
.pg-styles { display: grid; grid-template-columns: repeat(auto-fill, minmax(108px, 1fr)); gap: 10px; }
.pg-style {
  position: relative;
  display: grid;
  gap: 6px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--fg);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.pg-style:hover, .pg-style:focus-visible { border-color: var(--cyan); outline: none; }
.pg-style[aria-pressed="true"] { border-color: var(--orange); box-shadow: 0 0 0 1px var(--orange); }
.pg-style .shot { display: block; aspect-ratio: 9 / 16; overflow: hidden; border-radius: 8px; background: #1f1f1f; }
.pg-style .shot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pg-style .shot.wide img { object-fit: contain; }
.pg-style .shot.ai, .pg-style .shot.lock { display: grid; place-items: center; padding: 8px; color: var(--cyan); font-size: 13px; font-weight: 600; text-align: center; background: radial-gradient(circle at 50% 35%, #1d3b3a, #121212 70%); }
.pg-style .shot.lock { color: var(--muted); background: repeating-linear-gradient(135deg, #161616 0 10px, #1b1b1b 10px 20px); }
.pg-style b { font-size: 12.5px; line-height: 1.35; }
.pg-style .sid { color: var(--muted); font-size: 11px; font-weight: 400; }
.pg-style .tag { position: absolute; top: 10px; left: 10px; padding: 1px 7px; border-radius: 999px; background: var(--orange); color: #111; font-size: 11px; font-weight: 700; }
.pg-style.locked { cursor: default; text-decoration: none; }
.pg-swatch { display: flex; height: 100%; }
.pg-swatch i { flex: 1; }
.pg-preview { display: grid; gap: 8px; padding: 10px; border: 1px solid #23413f; border-radius: 12px; background: #0f1a19; }
.pg-preview video { width: 100%; max-height: 52vh; border-radius: 8px; background: #000; }
.pg-preview p { margin: 0; font-size: 14px; color: #d4d4d4; }

/* Design DNA and character cards */
.pg-dna { display: grid; gap: 8px; padding: 12px; border: 1px solid #23413f; border-radius: 12px; background: #0f1a19; font-size: 14px; }
.pg-dna p { margin: 0; color: #d4d4d4; }
.pg-dna code { font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.pg-pal { display: flex; gap: 6px; }
.pg-pal i { width: 28px; height: 28px; border-radius: 8px; border: 1px solid #ffffff22; }
.pg-ids { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pg-id { display: grid; justify-items: center; gap: 4px; padding: 8px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); font-size: 12px; text-align: center; }
.pg-id svg { width: 64px; height: 64px; }
.pg-id b { color: var(--cyan); }

/* output */
.pg-out { display: grid; gap: 12px; }
.pg-prompt {
  max-height: 340px;
  margin: 0;
  padding: 12px;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  color: #e3e3e3;
  font: 13px/1.6 ui-monospace, "SF Mono", Menlo, monospace;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.pg-out ol { margin: 0; padding-left: 22px; display: grid; gap: 6px; font-size: 14px; color: #d4d4d4; }
.pg-out .pg-copied { color: var(--cyan); font-size: 14px; }
.pg-follow { display: grid; gap: 8px; }
.pg-follow textarea { min-height: 70px; }

/* book picker: the PDF cover (A4 portrait) instead of a 9:16 clip poster */
.pick .thumb.pg-cover { aspect-ratio: 1 / 1.414; background: #1f1f1f; }
