.tool-prompt-generator-body .tool-shell {
  grid-template-columns: minmax(0, 1fr);
}

.tool-prompt-generator-body .tool-card {
  padding: 0;
  overflow: visible;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.pgp-premium {
  --pgp-ink: #172033;
  --pgp-muted: #64748b;
  --pgp-line: #dce4ee;
  --pgp-soft: #f5f8fc;
  --pgp-accent: #5b4be7;
  --pgp-accent-dark: #4338ca;
  --pgp-accent-soft: #eeecff;
  --pgp-success: #14795d;
  --pgp-warning: #9a5b0b;
  --pgp-danger: #b42318;
  color: var(--pgp-ink);
}

.pgp-premium *,
.pgp-premium *::before,
.pgp-premium *::after {
  box-sizing: border-box;
}

.pgp-premium button,
.pgp-premium input,
.pgp-premium select,
.pgp-premium textarea {
  font: inherit;
}

.pgp-hero,
.pgp-panel,
.pgp-template-section,
.pgp-feature-section,
.pgp-rail-card {
  border: 1px solid var(--pgp-line);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.07);
}

.pgp-hero {
  display: grid;
  gap: 22px;
  padding: clamp(22px, 4vw, 38px);
  background:
    radial-gradient(circle at 88% 18%, rgba(91, 75, 231, 0.18), transparent 30%),
    linear-gradient(135deg, #ffffff 0%, #f8f7ff 58%, #f3f7ff 100%);
  margin-bottom: 22px;
}

.pgp-hero h2,
.pgp-section-heading h3,
.pgp-panel-heading h3,
.pgp-rail-heading h3,
.pgp-dialog-head h3 {
  margin: 0;
  color: var(--pgp-ink);
}

.pgp-hero h2 {
  max-width: 860px;
  font-size: clamp(1.55rem, 3vw, 2.45rem);
  line-height: 1.12;
}

.pgp-hero p,
.pgp-section-heading p,
.pgp-panel-heading p {
  color: var(--pgp-muted);
}

.pgp-hero-copy > p:last-child {
  max-width: 860px;
  margin-bottom: 0;
}

.pgp-kicker {
  margin: 0 0 7px;
  color: var(--pgp-accent-dark) !important;
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.pgp-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  align-items: center;
}

.pgp-trust span,
.pgp-local-badge {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 12px;
  border: 1px solid rgba(91, 75, 231, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  color: #4035a8;
  font-size: 0.82rem;
  font-weight: 800;
}

.pgp-template-section {
  padding: clamp(18px, 3vw, 28px);
  margin-bottom: 22px;
}

.pgp-section-heading,
.pgp-panel-heading,
.pgp-rail-heading,
.pgp-dialog-head,
.pgp-preview-heading {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
}

.pgp-section-heading {
  margin-bottom: 18px;
}

.pgp-section-heading > div:first-child {
  max-width: 760px;
}

.pgp-section-heading p {
  margin: 7px 0 0;
}

.pgp-template-controls {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(145px, 0.65fr);
  gap: 8px;
  min-width: min(100%, 390px);
}

.pgp-template-controls label:first-child {
  grid-column: 1 / -1;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--pgp-muted);
}

.pgp-template-controls input,
.pgp-template-controls select,
.pgp-form-grid input,
.pgp-form-grid select,
.pgp-field input,
.pgp-field textarea,
.pgp-field select,
.pgp-library-controls input,
.pgp-library-controls select,
.pgp-followup-preview,
.pgp-schema-builder input {
  width: 100%;
  border: 1px solid #cfd8e5;
  border-radius: 12px;
  background: #fff;
  color: var(--pgp-ink);
  padding: 11px 12px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.pgp-premium input:focus,
.pgp-premium select:focus,
.pgp-premium textarea:focus {
  border-color: var(--pgp-accent);
  box-shadow: 0 0 0 4px rgba(91, 75, 231, 0.11);
}

.pgp-template-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 13px;
}

.pgp-template-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 9px;
  min-width: 0;
  padding: 11px;
  border: 1px solid var(--pgp-line);
  border-radius: 16px;
  background: #fff;
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.pgp-template-card:hover {
  transform: translateY(-3px);
  border-color: #aaa2ff;
  box-shadow: 0 14px 24px rgba(48, 41, 126, 0.12);
}

.pgp-template-card.is-selected {
  border-color: var(--pgp-accent);
  box-shadow: 0 0 0 3px rgba(91, 75, 231, 0.12), 0 15px 28px rgba(48, 41, 126, 0.12);
}

.pgp-template-top,
.pgp-template-category {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  color: var(--pgp-muted);
  font-size: 0.69rem;
}

.pgp-template-top b {
  color: #4035a8;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.pgp-template-top small {
  padding: 3px 6px;
  border-radius: 7px;
  background: var(--pgp-soft);
  font-weight: 900;
}

.pgp-template-paper {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 168px;
  padding: 13px;
  border: 1px solid #e5e9f1;
  border-radius: 10px;
  background:
    linear-gradient(90deg, rgba(91, 75, 231, 0.08) 0 3px, transparent 3px),
    linear-gradient(#fff, #fbfcff);
  overflow: hidden;
}

.pgp-template-paper strong {
  display: block;
  font-size: 0.73rem;
  line-height: 1.3;
  color: #222b40;
}

.pgp-template-paper span {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 0.61rem;
  line-height: 1.4;
  color: #6f7a8e;
}

.pgp-template-paper i {
  display: block;
  margin-bottom: 2px;
  color: var(--pgp-accent-dark);
  font-style: normal;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.pgp-template-name {
  font-weight: 900;
  line-height: 1.25;
}

.pgp-template-category {
  display: block;
}

.pgp-empty-state {
  margin: 16px 0 0;
  padding: 13px;
  border-radius: 12px;
  background: var(--pgp-soft);
  color: var(--pgp-muted);
  text-align: center;
}

.pgp-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(295px, 340px);
  gap: 22px;
  align-items: start;
}

.pgp-editor-column {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.pgp-panel {
  padding: clamp(18px, 3vw, 27px);
}

.pgp-panel-heading {
  margin-bottom: 18px;
}

.pgp-panel-heading p {
  margin: 4px 0 0;
}

.pgp-history-actions {
  display: flex;
  gap: 7px;
}

.pgp-icon-button {
  width: 40px;
  height: 40px;
  border: 1px solid var(--pgp-line);
  border-radius: 11px;
  background: var(--pgp-soft);
  color: var(--pgp-ink);
  font-size: 1.15rem;
  font-weight: 900;
  cursor: pointer;
}

.pgp-icon-button:hover {
  border-color: var(--pgp-accent);
  color: var(--pgp-accent-dark);
}

.pgp-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
  margin-bottom: 13px;
}

.pgp-form-grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.pgp-form-grid > label,
.pgp-field,
.pgp-library-controls label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
  color: #334155;
  font-size: 0.83rem;
  font-weight: 850;
}

.pgp-field {
  margin-bottom: 13px;
}

.pgp-field-major textarea {
  min-height: 110px;
  font-size: 1rem;
  line-height: 1.55;
}

.pgp-field span em {
  margin-left: 4px;
  color: var(--pgp-danger);
  font-size: 0.73rem;
  font-style: normal;
}

.pgp-field small,
.pgp-feature-note,
.pgp-schema-builder small {
  color: var(--pgp-muted);
  font-size: 0.77rem;
  font-weight: 600;
}

.pgp-field textarea,
#pgp-output,
#pgp-followup-preview {
  resize: vertical;
  line-height: 1.55;
}

.pgp-live-inline {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
  margin-top: 18px;
}

.pgp-live-inline > div {
  display: grid;
  grid-template-columns: auto auto 1fr;
  gap: 3px;
  align-items: baseline;
  padding: 11px;
  border: 1px solid var(--pgp-line);
  border-radius: 13px;
  background: var(--pgp-soft);
}

.pgp-live-inline span {
  grid-column: 1 / -1;
  color: var(--pgp-muted);
  font-size: 0.7rem;
  font-weight: 800;
}

.pgp-live-inline strong {
  font-size: 1.35rem;
}

.pgp-live-inline small {
  color: var(--pgp-muted);
  font-size: 0.72rem;
}

.pgp-feature-section {
  overflow: hidden;
}

.pgp-feature-section > summary {
  display: grid;
  grid-template-columns: 38px minmax(0, auto) 1fr;
  gap: 11px;
  align-items: center;
  padding: 17px 20px;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.pgp-feature-section > summary::-webkit-details-marker {
  display: none;
}

.pgp-feature-section > summary::after {
  content: "+";
  justify-self: end;
  color: var(--pgp-accent-dark);
  font-size: 1.4rem;
  font-weight: 900;
}

.pgp-feature-section[open] > summary::after {
  content: "−";
}

.pgp-feature-section > summary > span:nth-child(2) {
  color: var(--pgp-ink);
  font-weight: 900;
}

.pgp-feature-section > summary small {
  color: var(--pgp-muted);
}

.pgp-feature-number {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: var(--pgp-accent-soft);
  color: var(--pgp-accent-dark);
  font-weight: 900;
}

.pgp-feature-body {
  padding: 0 20px 20px;
  border-top: 1px solid #edf0f5;
}

.pgp-feature-body > :first-child {
  margin-top: 18px;
}

.pgp-option-row {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 12px 0;
}

.pgp-option-row label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 10px;
  border: 1px solid var(--pgp-line);
  border-radius: 10px;
  background: #fff;
  color: #475569;
  font-size: 0.78rem;
  font-weight: 750;
}

.pgp-option-row input {
  accent-color: var(--pgp-accent);
}

.pgp-feature-preview {
  margin-top: 16px;
  padding: 16px;
  border: 1px solid #dfe4f0;
  border-radius: 15px;
  background: linear-gradient(145deg, #fafbff, #f6f7fc);
}

.pgp-preview-heading {
  align-items: baseline;
  margin-bottom: 11px;
}

.pgp-preview-heading strong {
  font-size: 0.9rem;
}

.pgp-preview-heading span {
  color: var(--pgp-muted);
  font-size: 0.73rem;
}

.pgp-preview-text,
.pgp-code-preview {
  margin: 0;
  color: #3f4b60;
  font-size: 0.86rem;
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.pgp-code-preview {
  max-height: 320px;
  overflow: auto;
  padding: 13px;
  border-radius: 11px;
  background: #182033;
  color: #e7ecf8;
}

.pgp-schema-builder {
  display: grid;
  grid-template-columns: minmax(180px, 0.9fr) minmax(220px, 1.6fr) auto;
  gap: 11px;
  align-items: end;
  padding: 14px;
  border: 1px dashed #cfd6e5;
  border-radius: 14px;
  background: #fafbfe;
}

.pgp-schema-builder > div {
  display: grid;
  gap: 4px;
}

.pgp-example-list {
  display: grid;
  gap: 12px;
  margin-bottom: 12px;
}

.pgp-example-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  padding: 13px;
  border: 1px solid var(--pgp-line);
  border-radius: 14px;
  background: #fbfcfe;
}

.pgp-example-item label {
  display: grid;
  gap: 6px;
  color: #475569;
  font-size: 0.77rem;
  font-weight: 800;
}

.pgp-example-item textarea {
  min-height: 98px;
  width: 100%;
  padding: 10px;
  border: 1px solid #d5dce8;
  border-radius: 10px;
  resize: vertical;
}

.pgp-remove-example {
  width: 34px;
  height: 34px;
  border: 1px solid #f1c9c5;
  border-radius: 9px;
  background: #fff5f4;
  color: var(--pgp-danger);
  cursor: pointer;
  font-weight: 900;
}

.pgp-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.pgp-chip-list span {
  padding: 6px 9px;
  border-radius: 999px;
  background: var(--pgp-accent-soft);
  color: #4338a6;
  font-size: 0.76rem;
  font-weight: 800;
}

.pgp-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  align-items: center;
}

.pgp-existing-preview {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 15px;
  align-items: start;
}

.pgp-existing-preview .pgp-preview-heading {
  grid-column: 1 / -1;
  margin-bottom: 0;
}

.pgp-existing-score {
  display: flex;
  align-items: baseline;
  gap: 3px;
  min-width: 94px;
  padding: 16px;
  border-radius: 15px;
  background: #fff;
  border: 1px solid var(--pgp-line);
}

.pgp-existing-score strong {
  font-size: 2rem;
}

.pgp-existing-score span {
  color: var(--pgp-muted);
  font-size: 0.8rem;
}

.pgp-findings-list,
.pgp-analysis-split ul {
  margin: 0;
  padding-left: 19px;
  color: #475569;
  line-height: 1.6;
}

.pgp-library-controls {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(170px, 0.6fr);
  gap: 12px;
}

.pgp-library-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 13px;
}

.pgp-library-card {
  display: grid;
  gap: 7px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--pgp-line);
  border-radius: 13px;
  background: #fff;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.pgp-library-card:hover,
.pgp-library-card.is-selected {
  border-color: var(--pgp-accent);
  background: #faf9ff;
}

.pgp-library-card strong {
  line-height: 1.35;
}

.pgp-library-card span {
  color: var(--pgp-muted);
  font-size: 0.74rem;
}

.pgp-score-layout {
  display: grid;
  grid-template-columns: minmax(250px, 0.85fr) minmax(0, 1.6fr);
  gap: 14px;
}

.pgp-score-card {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--pgp-line);
  border-radius: 15px;
  background: #fafbfe;
}

.pgp-score-ring {
  --score: 0;
  display: grid;
  place-items: center;
  align-content: center;
  width: 94px;
  height: 94px;
  flex: 0 0 94px;
  border-radius: 50%;
  background: conic-gradient(var(--pgp-accent) calc(var(--score) * 1%), #e8ebf2 0);
  position: relative;
}

.pgp-score-ring::before {
  content: "";
  position: absolute;
  inset: 9px;
  border-radius: 50%;
  background: #fff;
}

.pgp-score-ring strong,
.pgp-score-ring span {
  position: relative;
  z-index: 1;
}

.pgp-score-ring strong {
  font-size: 1.8rem;
  line-height: 1;
}

.pgp-score-ring span {
  color: var(--pgp-muted);
  font-size: 0.7rem;
}

.pgp-score-card h4,
.pgp-insight-card h4 {
  margin: 0 0 6px;
}

.pgp-score-card p {
  margin: 0;
  color: var(--pgp-muted);
  font-size: 0.83rem;
}

.pgp-score-checks {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.pgp-score-check {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 10px;
  border: 1px solid var(--pgp-line);
  border-radius: 10px;
  background: #fff;
  font-size: 0.75rem;
}

.pgp-score-check.is-ready {
  border-color: #b8decf;
  background: #f0faf6;
  color: #17664f;
}

.pgp-score-check.is-missing {
  color: #7b5360;
}

.pgp-analysis-split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 13px;
}

.pgp-insight-card {
  padding: 14px;
  border: 1px solid var(--pgp-line);
  border-radius: 14px;
  background: #fff;
}

.pgp-structure-map {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.pgp-structure-item {
  padding: 9px;
  border-radius: 10px;
  background: #eef1f6;
  color: #6b7280;
  font-size: 0.72rem;
  font-weight: 800;
  text-align: center;
}

.pgp-structure-item.is-ready {
  background: #e8f7f1;
  color: #17664f;
}

.pgp-followup-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.pgp-followup-card {
  display: grid;
  gap: 6px;
  padding: 13px;
  border: 1px solid var(--pgp-line);
  border-radius: 13px;
  background: #fff;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.pgp-followup-card:hover,
.pgp-followup-card.is-selected {
  border-color: var(--pgp-accent);
  background: #faf9ff;
}

.pgp-followup-card span {
  color: var(--pgp-muted);
  font-size: 0.74rem;
}

.pgp-export-panel {
  margin-bottom: 6px;
}

.pgp-variation-tabs {
  display: flex;
  gap: 7px;
  margin-bottom: 12px;
}

.pgp-variation-tabs button {
  padding: 8px 13px;
  border: 1px solid var(--pgp-line);
  border-radius: 999px;
  background: #fff;
  color: #475569;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 850;
}

.pgp-variation-tabs button.is-active {
  border-color: var(--pgp-accent);
  background: var(--pgp-accent-soft);
  color: var(--pgp-accent-dark);
}

#pgp-output {
  min-height: 430px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.87rem;
}

.pgp-output-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: -4px 0 13px;
}

.pgp-output-stats span {
  padding: 6px 9px;
  border-radius: 8px;
  background: var(--pgp-soft);
  color: var(--pgp-muted);
  font-size: 0.74rem;
}

.pgp-output-stats strong {
  color: var(--pgp-ink);
}

.pgp-import-button {
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.pgp-import-button input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.pgp-live-rail {
  min-width: 0;
}

.pgp-rail-sticky {
  position: sticky;
  top: 86px;
  padding: 18px;
}

.pgp-rail-heading {
  align-items: flex-start;
  margin-bottom: 14px;
}

.pgp-rail-heading > span {
  max-width: 120px;
  padding: 5px 8px;
  border-radius: 999px;
  background: var(--pgp-soft);
  color: #526075;
  font-size: 0.68rem;
  font-weight: 850;
  text-align: center;
}

.pgp-rail-score {
  display: flex;
  align-items: baseline;
  gap: 7px;
  padding: 13px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--pgp-accent-dark), #7165ee);
  color: #fff;
}

.pgp-rail-score strong {
  font-size: 2rem;
  line-height: 1;
}

.pgp-rail-score span {
  font-size: 0.77rem;
}

.pgp-rail-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  margin: 10px 0;
}

.pgp-rail-metrics span {
  padding: 8px;
  border: 1px solid var(--pgp-line);
  border-radius: 10px;
  color: var(--pgp-muted);
  font-size: 0.67rem;
  text-align: center;
}

.pgp-rail-metrics b {
  display: block;
  margin-bottom: 2px;
  color: var(--pgp-ink);
  font-size: 0.95rem;
}

.pgp-rail-preview {
  max-height: 460px;
  overflow: auto;
  padding: 13px;
  border: 1px solid #e0e5ee;
  border-radius: 13px;
  background: #fafbfe;
  color: #465166;
  font-size: 0.74rem;
  line-height: 1.55;
  white-space: pre-wrap;
}

.pgp-rail-preview p {
  margin: 0;
}

.pgp-rail-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 11px;
}

.pgp-privacy-line {
  margin: 12px 0 0;
  color: var(--pgp-muted);
  font-size: 0.7rem;
  line-height: 1.5;
}

.pgp-mobile-bar {
  display: none;
}

.pgp-dialog {
  width: min(920px, calc(100% - 24px));
  max-height: calc(100vh - 28px);
  padding: 0;
  border: 0;
  border-radius: 20px;
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.32);
}

.pgp-dialog::backdrop {
  background: rgba(15, 23, 42, 0.72);
}

.pgp-dialog-head {
  padding: 17px 20px;
  border-bottom: 1px solid var(--pgp-line);
}

.pgp-dialog-head button {
  width: 38px;
  height: 38px;
  border: 1px solid var(--pgp-line);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  font-size: 1.45rem;
}

.pgp-dialog-content {
  max-height: 68vh;
  margin: 0;
  padding: 22px;
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: #263247;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.85rem;
  line-height: 1.65;
}

.pgp-dialog > .pgp-action-row {
  padding: 0 20px 20px;
}

@media (max-width: 1180px) {
  .pgp-template-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .pgp-workspace {
    grid-template-columns: minmax(0, 1fr) 300px;
  }
}

@media (max-width: 980px) {
  .pgp-template-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .pgp-workspace {
    grid-template-columns: 1fr;
  }

  .pgp-rail-sticky {
    position: static;
  }

  .pgp-live-rail {
    order: -1;
  }

  .pgp-rail-preview {
    max-height: 310px;
  }
}

@media (max-width: 760px) {
  .tool-prompt-generator-body .tool-main {
    padding-bottom: 82px;
  }

  .pgp-section-heading,
  .pgp-panel-heading,
  .pgp-preview-heading {
    flex-direction: column;
    align-items: stretch;
  }

  .pgp-template-controls,
  .pgp-form-grid,
  .pgp-form-grid-3,
  .pgp-schema-builder,
  .pgp-library-controls,
  .pgp-score-layout,
  .pgp-analysis-split {
    grid-template-columns: 1fr;
  }

  .pgp-template-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pgp-live-inline {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pgp-example-item {
    grid-template-columns: 1fr;
  }

  .pgp-remove-example {
    justify-self: end;
  }

  .pgp-library-grid,
  .pgp-followup-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pgp-score-checks {
    grid-template-columns: 1fr;
  }

  .pgp-structure-map {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pgp-feature-section > summary {
    grid-template-columns: 34px minmax(0, 1fr) auto;
  }

  .pgp-feature-section > summary small {
    display: none;
  }

  .pgp-mobile-bar {
    position: fixed;
    z-index: 70;
    right: 10px;
    bottom: 10px;
    left: 10px;
    display: grid;
    grid-template-columns: 0.7fr 0.7fr 1fr 1fr;
    gap: 6px;
    padding: 8px;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 16px;
    background: rgba(23, 32, 51, 0.96);
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.3);
    color: #fff;
    backdrop-filter: blur(12px);
  }

  .pgp-mobile-bar span {
    display: grid;
    place-items: center;
    align-content: center;
  }

  .pgp-mobile-bar strong {
    line-height: 1;
  }

  .pgp-mobile-bar small {
    margin-top: 2px;
    color: #cbd5e1;
    font-size: 0.58rem;
  }

  .pgp-mobile-bar button {
    border: 0;
    border-radius: 10px;
    background: var(--pgp-accent);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 900;
  }
}

@media (max-width: 480px) {
  .pgp-hero,
  .pgp-template-section,
  .pgp-panel,
  .pgp-feature-section,
  .pgp-rail-card {
    border-radius: 17px;
  }

  .pgp-template-grid {
    grid-template-columns: 1fr;
  }

  .pgp-template-paper {
    min-height: 145px;
  }

  .pgp-library-grid,
  .pgp-followup-grid {
    grid-template-columns: 1fr;
  }

  .pgp-live-inline,
  .pgp-rail-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pgp-rail-metrics span:last-child {
    grid-column: 1 / -1;
  }

  .pgp-score-card {
    align-items: flex-start;
  }

  .pgp-score-ring {
    width: 78px;
    height: 78px;
    flex-basis: 78px;
  }

  .pgp-export-actions .button,
  .pgp-export-actions .pgp-import-button {
    flex: 1 1 calc(50% - 9px);
    justify-content: center;
  }
}

@media print {
  .pgp-hero,
  .pgp-template-section,
  .pgp-editor-column > :not(.pgp-export-panel),
  .pgp-live-rail,
  .pgp-mobile-bar,
  .pgp-panel-heading,
  .pgp-variation-tabs,
  .pgp-output-stats,
  .pgp-export-actions,
  .tool-heading,
  .privacy-note,
  .content-grid,
  .related-tools,
  .site-header,
  .site-footer,
  .ad-slot {
    display: none !important;
  }

  .pgp-export-panel,
  .pgp-premium,
  .tool-card,
  .tool-primary,
  .tool-shell {
    border: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  #pgp-output {
    min-height: auto;
    border: 0;
    padding: 0;
    white-space: pre-wrap;
  }
}
