#creator {
  width: min(520px, calc(100% - 24px));
  max-height: min(92dvh, 840px);
  overflow: hidden;
  background: var(--surface);
}
.creator-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 20px 22px 10px;
}
.creator-head h2 {
  margin: 0;
  font-size: clamp(1.5rem, 5vw, 1.9rem);
  font-weight: 800;
  letter-spacing: -0.03em;
}
.creator-head h2:focus { outline: none; }
.creator-close {
  flex: 0 0 38px;
  height: 38px;
  border: 1px solid var(--rule);
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 1.4rem;
  line-height: 1;
}
.creator-position { display: flex; align-items: center; gap: 12px; margin: 0 22px 14px; }
.creator-position span { flex: 0 0 auto; color: var(--muted); font-size: 0.76rem; font-weight: 600; }
.creator-position progress {
  width: 100%;
  height: 4px;
  border: 0;
  border-radius: 999px;
  background: var(--rule);
  appearance: none;
}
.creator-position progress::-webkit-progress-bar { border-radius: 999px; background: var(--rule); }
.creator-position progress::-webkit-progress-value { border-radius: 999px; background: var(--grad); }
.creator-form, .creator-scroll { min-height: 0; }
.creator-form { display: flex; flex-direction: column; }
.creator-scroll { overflow: auto; overscroll-behavior: contain; padding: 2px 22px 18px; }
.creator-form fieldset { display: grid; gap: 12px; min-width: 0; border: 0; margin: 0; padding: 0; }
.creator-form label { display: block; min-width: 0; font-size: 0.84rem; font-weight: 700; }
.creator-optional { color: var(--muted); font-weight: 500; font-size: 0.72rem; }
.creator-form :is(input:not([type=radio]), textarea, select) {
  display: block;
  width: 100%;
  margin: 5px 0 0;
  border: 1px solid var(--rule);
  border-radius: 12px;
  background: var(--bg);
  color: var(--text);
  padding: 10px 12px;
  font-size: 0.92rem;
}
.creator-form input::placeholder, .creator-form textarea::placeholder { color: #8c7b99; }
.creator-form [aria-invalid=true] { border-color: #ff6b8b; }
.creator-pair { display: grid; grid-template-columns: minmax(85px, 1fr) minmax(120px, 2fr); gap: 10px; }
.creator-hint { margin: 0; color: var(--muted); font-size: 0.78rem; }
.creator-hint-gap { margin: 0 0 6px; }
.creator-presets-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 6px; }
.creator-rand-btn {
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid rgba(255, 156, 110, 0.45);
  background: rgba(255, 156, 110, 0.14);
  color: #ffd9c2;
  font-size: 0.74rem;
  font-weight: 700;
}
.creator-rand-btn:hover { border-color: var(--peach); }
.creator-presets { display: flex; flex-wrap: wrap; gap: 6px; }
.creator-preset-btn {
  padding: 6px 11px;
  border-radius: 999px;
  border: 1px solid var(--rule);
  background: var(--surface-2);
  color: #f3e4f5;
  font-size: 0.75rem;
  font-weight: 600;
}
.creator-preset-btn:hover { border-color: var(--peach); }
.creator-ai-box {
  display: grid;
  gap: 8px;
  padding: 12px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(255, 94, 132, 0.12), rgba(255, 156, 110, 0.08));
  border: 1px solid rgba(255, 107, 139, 0.35);
}
.creator-ai-row { display: flex; gap: 8px; align-items: center; }
.creator-ai-row select { margin: 0; flex: 0 0 130px; }
.creator-ai-btn {
  flex: 1;
  min-height: 40px;
  border: 0;
  border-radius: 999px;
  background: var(--grad);
  color: #170912;
  font-weight: 800;
  font-size: 0.84rem;
  padding: 8px 14px;
}
.creator-upload { display: flex; align-items: center; gap: 12px; }
.creator-upload > div { min-width: 0; flex: 1; }
.creator-thumbnail, .creator-card img { width: 72px; height: 96px; object-fit: cover; object-position: center 15%; border-radius: 12px; border: 1px solid var(--rule); }
.creator-form input[type=file] { min-height: 44px; padding: 7px; color: var(--muted); font-size: 0.78rem; }
.creator-form input::file-selector-button { border: 0; border-radius: 8px; padding: 6px 10px; margin-right: 8px; background: var(--surface-2); color: var(--text); font-weight: 600; }
.creator-remove { border: 0; background: transparent; padding: 6px 0; color: var(--peach-2); font-size: 0.78rem; font-weight: 600; }
.creator-card { display: flex; gap: 12px; align-items: start; padding: 12px; border-left: 3px solid var(--peach); background: var(--surface-2); border-radius: 0 12px 12px 0; }
.creator-card > div { min-width: 0; }
.creator-card strong { display: block; font-size: 1.2rem; font-weight: 800; }
.creator-card span { font-size: 0.78rem; color: var(--peach-2); }
.creator-card p { margin: 6px 0 0; font-size: 0.85rem; color: #e2d6ea; }
.creator-form .creator-option {
  display: flex; gap: 12px; align-items: start; border: 1px solid var(--rule); border-radius: 14px;
  padding: 12px; cursor: pointer; background: var(--surface-2);
}
.creator-option:has(input:checked) { background: rgba(255, 107, 139, 0.14); border-color: var(--peach); }
.creator-option input { margin: 4px 0 0; width: 18px; height: 18px; flex-shrink: 0; accent-color: var(--peach); }
.creator-option small { display: block; margin-top: 2px; font-size: 0.78rem; font-weight: 400; color: var(--muted); }
.creator-message { margin: 10px 0 0; color: #ff9cb0; font-size: 0.84rem; font-weight: 600; }
.creator-message:empty { display: none; }
.creator-actions {
  flex: 0 0 auto;
  display: flex;
  gap: 10px;
  padding: 12px 22px max(16px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--rule);
}
.creator-actions button { min-height: 44px; padding: 8px 16px; border-radius: 999px; font-weight: 800; }
.creator-back { border: 1px solid var(--rule); background: transparent; color: var(--muted); }
.creator-next { flex: 1; border: 0; background: var(--grad); color: #170912; }
@media (max-width: 560px) {
  #creator { width: 100%; max-height: calc(100dvh - 12px); margin: auto auto 0; border-radius: 22px 22px 0 0; }
}
