.custom-script { max-width: 1040px; margin: 0 auto; padding: 28px 24px 64px; color: var(--text-1); }
.custom-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 24px; }
.custom-header h1 { color: var(--text-0); font-size: clamp(24px, 3vw, 32px); line-height: 1.3; margin: 6px 0 10px; }
.custom-eyebrow { color: var(--primary); font-size: 12px; font-weight: 700; letter-spacing: .06em; }
.custom-header p, .custom-caption { color: var(--text-2); font-size: 13px; line-height: 1.7; }
.custom-card { padding: 24px; border: 1px solid var(--border); border-radius: var(--radius, 12px); background: var(--bg-2); margin-bottom: 20px; }
.custom-card h2 { margin: 0 0 8px; color: var(--text-0); font-size: 21px; }
.custom-preset { max-width: 720px; }
.custom-preset h2 { margin: 10px 0; }
.custom-preset p { color: var(--text-2); line-height: 1.8; margin-bottom: 24px; }
.custom-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.custom-field { display: flex; flex-direction: column; gap: 8px; min-width: 0; font-size: 14px; font-weight: 600; }
.custom-field-wide { grid-column: 1 / -1; }
.custom-field .input { width: 100%; min-width: 0; font-weight: 400; }
.custom-field textarea { resize: vertical; min-height: 126px; line-height: 1.8; }
.custom-settings summary { cursor: pointer; font-size: 13px; color: var(--text-2); }
.custom-settings .custom-form-grid { margin-top: 18px; }
.custom-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.custom-actions .btn-primary { min-width: 158px; }
.custom-price { font-size: 12px; color: var(--text-2); line-height: 1.7; flex: 1 1 200px; }
.custom-price small { display: block; font-size: 11px; margin-top: 3px; }
.custom-notice { padding: 12px 16px; margin-bottom: 18px; border: 1px solid var(--border); border-radius: 8px; color: var(--text-1); background: var(--bg-3); font-size: 13px; line-height: 1.7; overflow-wrap: anywhere; }
.custom-notice.is-error { color: var(--danger, #d75d5d); }
.custom-notice[hidden] { display: none; }
.custom-progress { border-left: 3px solid var(--primary); }
.custom-output-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; }
.custom-output-head .custom-actions { margin: 0; }
.custom-tabs { display: flex; flex-wrap: wrap; gap: 8px; padding-bottom: 14px; border-bottom: 1px solid var(--border); margin-bottom: 18px; }
.custom-tabs button[aria-pressed="true"] { border-color: var(--primary); color: var(--primary); background: var(--bg-3); }
.custom-script-text, .custom-plan { font-family: inherit; font-size: 15px; line-height: 1.95; white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; min-height: 160px; }
.custom-plan { margin-top: 16px; font-size: 14px; max-height: 520px; overflow-y: auto; }
.custom-empty { padding: 24px 0; color: var(--text-2); text-align: center; font-size: 14px; }
.custom-revision { margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--border); }
.custom-revision > summary { color: var(--text-1); }
.custom-revision-issues { padding: 0; list-style: none; margin: 16px 0; }
.custom-revision-issues li { padding: 14px 0; border-bottom: 1px solid var(--border); }
.custom-revision-choice { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; line-height: 1.7; }
.custom-revision-choice input { margin-top: 5px; flex-shrink: 0; }
.custom-revision-issues blockquote { margin: 10px 0 8px 24px; padding-left: 12px; border-left: 2px solid var(--border); white-space: pre-wrap; overflow-wrap: anywhere; color: var(--text-2); font-size: 13px; line-height: 1.8; }
.custom-revision-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-left: 24px; color: var(--text-2); font-size: 12px; }
.custom-revision-form { display: grid; gap: 12px; margin-top: 18px; }
.custom-revision-form > .btn { justify-self: start; }
.custom-revision-form textarea { min-height: 64px; }
.custom-revision-candidates { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.custom-revision-preview { margin-top: 20px; padding: 18px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg-3); }
.custom-revision-preview h3 { margin: 0 0 10px; color: var(--text-0); font-size: 17px; }
.custom-revision-preview details { margin-top: 14px; }
.custom-revision-diff, .custom-revision-compare pre { margin: 12px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; font-family: inherit; line-height: 1.85; font-size: 13px; }
.custom-revision-diff { max-height: 440px; overflow-y: auto; }
.custom-revision-compare { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.custom-revision-compare > div { min-width: 0; }
#btnCreationCustom { margin-left: auto; }
.creation-route-row { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.creation-route-row .creation-flow-tabs { flex: 1 1 auto; }
.custom-type-catalog { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.custom-type-catalog .custom-preset { display: flex; flex-direction: column; }
.custom-type-catalog .custom-preset .btn { align-self: flex-start; margin-top: auto; }
.custom-concepts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 20px; }
.custom-concept { padding: 18px; border: 1px solid var(--border); border-radius: 10px; min-width: 0; overflow-wrap: anywhere; }
.custom-concept.is-selected { border-color: var(--primary); background: var(--bg-3); }
.custom-concept h3 { margin: 0 0 12px; font-size: 17px; color: var(--text-0); }
.custom-concept p, .custom-concept dd { line-height: 1.8; font-size: 13px; }
.custom-concept dt { color: var(--text-2); font-size: 12px; margin-top: 12px; }
.custom-concept dd { margin: 4px 0 0; }
.custom-concept .btn { margin-top: 18px; }
.custom-review-summary, .custom-review-strengths { line-height: 1.8; font-size: 14px; overflow-wrap: anywhere; }
.custom-plan-detail-editor { margin-top: 24px; border-top: 1px solid var(--border); padding-top: 18px; }
.custom-plan-detail-editor h3 { font-size: 16px; margin: 22px 0 10px; }
.custom-plan-item { padding: 14px 0; border-bottom: 1px solid var(--border); }
@media (max-width: 900px) { .custom-concepts { grid-template-columns: 1fr; } }
@media (max-width: 640px) {
  .custom-type-catalog { grid-template-columns: 1fr; gap: 0; }
  .custom-script { padding: 20px 14px 44px; }
  .custom-header { gap: 10px; }
  .custom-header > .btn { padding-left: 10px; padding-right: 10px; flex-shrink: 0; }
  .custom-card { padding: 18px 15px; }
  .custom-form-grid { grid-template-columns: 1fr; gap: 17px; }
  .custom-actions { align-items: stretch; }
  .custom-actions .btn-primary { width: 100%; }
  .custom-script-text { font-size: 14px; line-height: 1.9; }
  .custom-revision-preview { padding: 14px 12px; }
  .custom-revision-compare { grid-template-columns: 1fr; }
  #btnCreationCustom { margin-left: 0; }
}
