.ai-entry { margin-top: 14px; background: #c4ff4d; color: #10140b; font-weight: 600; }
.ai-entry:hover { background: #d3ff7f; }
.template-ai-entry { width: calc(100% - 48px); margin: 20px 24px 0; }
.template-ai-entry svg:last-child { margin-left: auto; }
.template-options img { height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.ai-dialog { width: 1080px; }
.ai-workspace { display: grid; grid-template-columns: 340px minmax(0,1fr); }
.ai-prompt-panel { padding: 24px; border-right: 1px solid #35483b; min-width: 0; }
.ai-connection { display: flex; align-items: center; gap: 10px; min-height: 44px; margin-bottom: 22px; font-size: 13px; color: #c6d2ca; }
.ai-connection>svg { width: 19px; height: 19px; flex: none; }
.ai-connection .icon-button { margin-left: auto; flex: none; }
#ai-connection[data-state=ready] { color: #c4ff4d; }
.ai-prompt-panel>label { display: block; margin-bottom: 12px; font-weight: 600; font-size: 16px; }
#ai-prompt { width: 100%; min-height: 180px; resize: vertical; padding: 14px; border: 1px solid #4c5956; border-radius: 3px; background: #0f1515; color: #f3f5f3; font: 400 14px/1.6 var(--font); caret-color: #c4ff4d; }
#ai-prompt::placeholder { color: #aeb7b9; }
.ai-prompt-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin: 9px 0 20px; color: #bfcac3; font-size: 12px; }
#ai-count { font-variant-numeric: tabular-nums; }
.ai-note { color: #c1cdc5; font-size: 13px; line-height: 1.6; }
.ai-form-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
.ai-form-actions .button { font-size: 14px; padding: 12px 16px; gap: 9px; }
#ai-progress, #ai-error { font-size: 13px; line-height: 1.6; margin-top: 16px; }
#ai-progress:empty, #ai-error:empty { display: none; }
#ai-progress { color: #d3e6cc; }
#ai-error { color: #ffb8b8; }
#ai-setup { margin-top: 24px; padding-top: 22px; border-top: 1px solid #35483b; }
#ai-setup h3 { font: 600 15px/1.4 var(--font); margin-bottom: 12px; }
#ai-setup a { display: inline-block; color: #d3ff7f; font-size: 13px; text-decoration: underline; text-underline-offset: 3px; }
#ai-setup code { display: block; padding: 12px 0; color: #f3f5f3; font: 13px/1.6 Consolas,monospace; overflow-wrap: anywhere; }
#ai-setup p { font-size: 13px; line-height: 1.6; color: #c1cdc5; }
#ai-restore { width: 100%; margin: 24px 0 0; }
.ai-result-panel { background: #0f1515; padding: 24px; min-width: 0; }
.ai-result-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 18px; }
.ai-result-heading h3 { font: 600 16px/1.4 var(--font); }
#ai-result-name { color: #bfcec4; font-size: 13px; overflow-wrap: anywhere; }
#ai-empty { min-height: 360px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px; color: #b9c5bf; text-align: center; }
#ai-empty svg { width: 40px; height: 40px; stroke-width: 1; }
#ai-empty p { font-size: 14px; }
#ai-preview { width: 100%; height: 380px; border: 1px solid #35483b; background: #fff; }
.ai-result-actions { margin-top: 18px; }
.ai-consent { display: flex; align-items: flex-start; gap: 10px; margin: 18px 0; font-size: 13px; line-height: 1.6; }
.ai-consent input { margin-top: 4px; flex: none; accent-color: #c4ff4d; }
.ai-result-actions .button { width: 100%; font-size: 14px; }
@media(max-width:850px) {
  .ai-workspace { grid-template-columns: minmax(0,1fr); }
  .ai-prompt-panel { border-right: 0; border-bottom: 1px solid #35483b; }
  #ai-empty { min-height: 140px; }
  .ai-result-panel { padding: 22px; }
}
@media(max-width:480px) {
  .ai-prompt-panel, .ai-result-panel { padding: 20px; }
  .template-ai-entry { width: calc(100% - 32px); margin: 16px 16px 0; }
  .ai-connection { gap: 7px; font-size: 12px; }
  .ai-result-heading { flex-wrap: wrap; gap: 6px; }
  #ai-preview { height: 360px; }
  .template-options img { height: auto; }
}
