/* ==========================================================================
   VoiceIQ — Create Model wizard layout (page-create-model.css)
   Loaded last. Turns the two-column creator into a stepped wizard: page header,
   account status line, sticky stepper, one centred column of numbered cards,
   a sticky bottom action bar and a slide-in "How it works" drawer.
   Tokens come from voiceiq-ui.css; primitives from voiceiq-minimal.css.
   ========================================================================== */

body[data-page="create-model"] { --cm-col: 760px; --cm-stick: 12px; }
body[data-page="create-model"] .cm-main { margin: 0; padding: 32px 0 56px; }
body[data-page="create-model"] .cm-shell { max-width: var(--cm-col); margin: 0 auto; }
body[data-page="create-model"] .member-toolbar.library-toolbar { max-width: var(--cm-col); margin: 4px auto 0 !important; padding-top: 0; border-top: 0; font-size: 13px; }
body[data-page="create-model"] .member-toolbar.library-toolbar a { min-height: 32px; }

/* --------------------------------------------------------------------------
   Page header + account status line
   -------------------------------------------------------------------------- */
body[data-page="create-model"] .cm-header { padding-bottom: 18px; }
body[data-page="create-model"] .cm-header h1 span { color: var(--muted); }
body[data-page="create-model"] .ph-actions .button { width: auto; min-height: 36px; padding: 0 12px 0 10px; gap: 7px; font-size: 13px; font-weight: 500; }
body[data-page="create-model"] .ph-actions .button svg { width: 16px; height: 16px; color: var(--muted); }
body[data-page="create-model"] .ph-actions .button:hover svg { color: var(--text); }

.cm-status { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 9px 10px 9px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); font-size: 13px; }
.cm-status-dot { flex: 0 0 auto; width: 8px; height: 8px; border-radius: 50%; background: var(--signal); box-shadow: 0 0 0 3px var(--signal-soft); }
.cm-status.is-loading .cm-status-dot { background: var(--faint); box-shadow: 0 0 0 3px var(--surface-2); animation: cm-pulse 1.4s ease-in-out infinite; }
.cm-status.is-error .cm-status-dot { background: var(--warn); box-shadow: 0 0 0 3px var(--warn-soft); animation: none; }
.cm-status-copy { flex: 1 1 220px; min-width: 0; }
.cm-status strong { display: block; font-size: 12px; font-weight: 500; line-height: 1.3; color: var(--faint); }
.cm-status #creatorAccountStatus { margin: 1px 0 0; color: var(--text); font-size: 13px; line-height: 1.45; }
.cm-status.is-loading #creatorAccountStatus { color: var(--muted); }
.cm-status .creator-inline-links { display: flex; gap: 6px; width: auto; margin: 0 0 0 auto; }
.cm-status .creator-inline-links a { min-height: 30px; padding: 0 10px; font-size: 12.5px; }
@keyframes cm-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

/* --------------------------------------------------------------------------
   Stepper (sticky)
   -------------------------------------------------------------------------- */
.cm-stepper {
  position: sticky; top: var(--cm-stick); z-index: 30; margin: 14px 0 18px; padding: 7px 8px;
  border: 1px solid transparent; border-radius: 12px; background: color-mix(in srgb, var(--bg) 84%, transparent);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  transition: border-color var(--t) var(--ease), box-shadow var(--t) var(--ease), background var(--t) var(--ease);
}
.cm-stepper.is-stuck { border-color: var(--line); background: color-mix(in srgb, var(--surface) 90%, transparent); box-shadow: var(--shadow-1); }
.cm-steps { display: flex; align-items: center; gap: 2px; margin: 0; padding: 0; list-style: none; }
.cm-steps li { display: flex; align-items: center; flex: 1 1 0; min-width: 0; }
.cm-steps li:last-child { flex: 0 0 auto; }
.cm-steps li:not(:last-child)::after { content: ""; flex: 1 1 10px; min-width: 6px; height: 1px; margin: 0 6px; background: var(--line-strong); }
.cm-step {
  display: inline-flex; align-items: center; gap: 8px; min-height: 32px; padding: 0 10px 0 4px; border-radius: 6px;
  color: var(--muted); font-size: 13px; font-weight: 450; text-decoration: none; white-space: nowrap;
  transition: background var(--t) var(--ease), color var(--t) var(--ease);
}
.cm-step:hover { background: var(--surface-2); color: var(--text); }
.cm-step-num {
  position: relative; display: grid; place-items: center; flex: 0 0 auto; width: 24px; height: 24px;
  border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface); color: var(--muted);
  font-size: 11.5px; font-weight: 600; font-variant-numeric: tabular-nums;
  transition: background var(--t) var(--ease), border-color var(--t) var(--ease), color var(--t) var(--ease), box-shadow var(--t) var(--ease);
}
.cm-step-digit { transition: opacity var(--t) var(--ease); }
.cm-step-check { position: absolute; inset: 0; width: 13px; height: 13px; margin: auto; opacity: 0; transform: scale(.6); transition: opacity var(--t) var(--ease), transform var(--t) var(--ease); }
.cm-step.is-done .cm-step-digit { opacity: 0; }
.cm-step.is-done .cm-step-check { opacity: 1; transform: none; }
.cm-step.is-done .cm-step-num { border-color: transparent; background: var(--success-soft); color: var(--success); }
.cm-step.is-active { color: var(--text); font-weight: 500; }
.cm-step.is-active .cm-step-num { border-color: var(--ink); background: var(--ink); color: var(--ink-text); box-shadow: 0 0 0 3px var(--surface-3); }

/* --------------------------------------------------------------------------
   Cards column
   -------------------------------------------------------------------------- */
body[data-page="create-model"] .creator-main { display: flex; flex-direction: column; gap: 12px; padding: 0; border: 0; border-radius: 0 !important; background: transparent; box-shadow: none; }
body[data-page="create-model"] .creator-section.cm-card {
  margin: 0; padding: 22px 24px 24px; border: 1px solid var(--line); border-radius: var(--radius-l); background: var(--surface);
  scroll-margin-top: 84px; transition: border-color var(--t) var(--ease), box-shadow var(--t) var(--ease);
}
body[data-page="create-model"] .cm-card.is-current { border-color: var(--line-strong); box-shadow: var(--shadow-1); }
.cm-card-head { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 18px; }
.cm-num {
  flex: 0 0 auto; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px;
  background: var(--surface-2); color: var(--text); font-size: 12px; font-weight: 600; letter-spacing: .02em; font-variant-numeric: tabular-nums;
  transition: background var(--t) var(--ease), color var(--t) var(--ease);
}
.cm-card.is-current .cm-num { background: var(--ink); color: var(--ink-text); }
.cm-card-copy { flex: 1 1 auto; min-width: 0; }
.cm-card-copy h2 { margin: 4px 0 0; font-size: 16px; font-weight: 600; letter-spacing: -.02em; line-height: 1.25; }
.cm-card-copy p { margin: 4px 0 0; max-width: 56ch; font-size: 13px; line-height: 1.5; color: var(--muted); }
.cm-chip { display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto; min-height: 24px; padding: 0 9px; border-radius: 6px; background: var(--surface-2); color: var(--muted); font-size: 12px; font-weight: 500; font-variant-numeric: tabular-nums; }
.cm-card-head .cm-chip { margin-top: 3px; }

/* Step 1 — method cards */
body[data-page="create-model"] .creation-methods { gap: 10px; }
body[data-page="create-model"] .creation-methods button { min-height: 76px; }

/* Step 2 — identity */
.cm-field { display: grid; gap: 8px; }
.cm-field .field-label { margin: 0; }
body[data-page="create-model"] .creator-name { min-height: 42px; font-size: 14.5px; }
.cm-hint { font-size: 12px; color: var(--faint); }
body[data-page="create-model"] .voice-tags { margin: 18px 0 0; padding: 0; border-top: 1px solid var(--line); }
body[data-page="create-model"] .voice-tags:not([open]) { padding-bottom: 0; }
body[data-page="create-model"] .voice-tags summary { gap: 10px; padding: 14px 0 0; }
body[data-page="create-model"] .voice-tags[open] summary { padding-bottom: 2px; }
body[data-page="create-model"] .voice-tags summary strong { font-size: 14px; font-weight: 500; }
body[data-page="create-model"] .voice-tags summary span { display: inline-flex; align-items: center; min-height: 24px; max-width: 100%; padding: 0 9px; border-radius: 6px; background: var(--surface-2); color: var(--muted); font-size: 12px; font-weight: 500; }
body[data-page="create-model"] .voice-tags summary::after {
  content: ""; flex: 0 0 auto; width: 16px; height: 16px; margin-left: auto; background: var(--muted);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") center / contain no-repeat;
  transition: transform var(--t) var(--ease);
}
body[data-page="create-model"] .voice-tags .tag-help { margin: 10px 0 0; font-size: 12.5px; line-height: 1.5; }
body[data-page="create-model"] .voice-tags fieldset { margin: 12px 0 0; }
body[data-page="create-model"] .voice-tags fieldset:last-child { margin-bottom: 2px; }
body[data-page="create-model"] .voice-tags legend { margin-bottom: 8px; font-size: 12px; }
body[data-page="create-model"] .voice-tags fieldset > div { gap: 6px; }

/* Step 3 — visibility */
body[data-page="create-model"] .visibility-grid { gap: 10px; }
body[data-page="create-model"] .visibility-card { position: relative; padding: 16px 44px 16px 16px; border-radius: 10px; }
body[data-page="create-model"] .visibility-card::before { content: ""; position: absolute; top: 14px; right: 14px; width: 18px; height: 18px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface); transition: background var(--t) var(--ease), border-color var(--t) var(--ease); }
body[data-page="create-model"] .visibility-card::after {
  content: ""; position: absolute; top: 18px; right: 18px; width: 10px; height: 10px; background: var(--ink-text); opacity: 0; transform: scale(.6);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / contain no-repeat;
  transition: opacity var(--t) var(--ease), transform var(--t) var(--ease);
}
body[data-page="create-model"] .visibility-card.active::before { border-color: var(--ink); background: var(--ink); }
body[data-page="create-model"] .visibility-card.active::after { opacity: 1; transform: none; }
body[data-page="create-model"] .visibility-icon { display: grid; place-items: center; width: 32px; height: 32px; margin-bottom: 12px; border: 0; border-radius: 8px; background: var(--surface-2); color: var(--text); font-size: 0; }
body[data-page="create-model"] .visibility-icon::after { display: none; content: none; }
body[data-page="create-model"] .visibility-icon svg { width: 16px; height: 16px; }
body[data-page="create-model"] .visibility-card.active .visibility-icon { background: var(--ink); color: var(--ink-text); }
body[data-page="create-model"] .visibility-card strong { font-size: 14px; font-weight: 500; }
body[data-page="create-model"] .visibility-card p { margin-top: 4px; font-size: 12.5px; line-height: 1.5; color: var(--muted); }

/* Step 4a — voice design */
body[data-page="create-model"] #designSection .field-label { margin-bottom: 8px; }
body[data-page="create-model"] .creator-main #designPrompt { min-height: 150px; margin-top: 0; font-size: 14.5px; line-height: 1.6; }
body[data-page="create-model"] #designSection .tag-help { margin: 10px 0 0; font-size: 12.5px; line-height: 1.5; }
body[data-page="create-model"] .design-examples { gap: 6px; margin: 12px 0 0; }

/* Step 4b — samples */
body[data-page="create-model"] .audio-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cm-tile { position: relative; border: 1px dashed var(--line-strong); border-radius: 12px; background: var(--surface-2); transition: border-color var(--t) var(--ease), background var(--t) var(--ease), transform var(--t) var(--ease), box-shadow var(--t) var(--ease); }
.cm-tile:hover { border-color: var(--text); transform: translateY(-1px); box-shadow: var(--shadow-1); }
.cm-tile:has(.audio-action:disabled), .cm-tile:has(.is-disabled) { opacity: .55; transform: none; box-shadow: none; border-color: var(--line-strong); }
.cm-tile:has(.dragging) { border-style: solid; border-color: var(--text); background: var(--surface-3); }
.cm-tile:has(.recording) { border-style: solid; border-color: var(--danger); background: var(--danger-soft); transform: none; box-shadow: none; }
body[data-page="create-model"] .cm-tile .audio-action {
  width: 100%; min-height: 132px; margin: 0; padding: 18px 16px; gap: 6px;
  border: 0 !important; border-radius: 12px !important; background: transparent !important; color: var(--text); box-shadow: none !important; transform: none !important;
}
body[data-page="create-model"] .cm-tile .audio-action.recording { color: var(--danger); }
body[data-page="create-model"] .audio-action .icon { display: grid; place-items: center; width: 36px; height: 36px; margin-bottom: 4px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--text); font-size: 0; transition: background var(--t) var(--ease), color var(--t) var(--ease), border-color var(--t) var(--ease); }
body[data-page="create-model"] .audio-action .icon svg { width: 17px; height: 17px; }
.cm-tile:hover .audio-action:not(:disabled) .icon { border-color: transparent; background: var(--ink); color: var(--ink-text); }
body[data-page="create-model"] .audio-action.recording .icon, .cm-tile:hover .audio-action.recording .icon { border-color: transparent; background: var(--danger); color: var(--bg); animation: cm-rec 1.2s ease-in-out infinite; }
body[data-page="create-model"] .audio-action > span:nth-child(2) { font-size: 14px; font-weight: 500; }
body[data-page="create-model"] .audio-action .record-clock { max-width: 240px; font-size: 12px; font-weight: 450; line-height: 1.45; color: var(--muted); }
body[data-page="create-model"] .audio-action.recording .record-clock { color: inherit; font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
@keyframes cm-rec { 0%, 100% { box-shadow: 0 0 0 0 var(--danger-soft); } 50% { box-shadow: 0 0 0 6px var(--danger-soft); } }

body[data-page="create-model"] .clip-list { display: grid; gap: 8px; margin-top: 12px; }
body[data-page="create-model"] .clip-list:empty { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 10px 14px; border: 1px dashed var(--line); border-radius: 10px; color: var(--muted); font-size: 12.5px; line-height: 1.45; }
body[data-page="create-model"] .clip-list:empty::before {
  content: ""; flex: 0 0 auto; width: 18px; height: 18px; background: var(--faint);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round'%3E%3Cpath d='M4 12v2M8 8v8M12 5v14M16 9v6M20 11v2'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round'%3E%3Cpath d='M4 12v2M8 8v8M12 5v14M16 9v6M20 11v2'/%3E%3C/svg%3E") center / contain no-repeat;
}
body[data-page="create-model"] .clip-list:empty::after { content: "No samples yet. Record or upload one to three clips to continue."; }
body[data-page="create-model"] .clip-row { grid-template-columns: 32px 1fr auto; gap: 12px; padding: 12px 12px 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
body[data-page="create-model"] .clip-number { width: 32px; height: 32px; border-radius: 8px; background: var(--surface-2); color: var(--text); font-size: 12px; font-weight: 600; }
body[data-page="create-model"] .clip-info strong { font-size: 13.5px; font-weight: 500; }
body[data-page="create-model"] .clip-info small { margin-top: 2px; font-size: 12px; color: var(--muted); }
body[data-page="create-model"] .clip-audio { height: 34px; margin-top: 8px; }
body[data-page="create-model"] .clip-remove { position: relative; width: 30px; height: 30px; color: var(--muted); font-size: 0; }
body[data-page="create-model"] .clip-remove::before {
  content: ""; position: absolute; inset: 0; width: 14px; height: 14px; margin: auto; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 6l12 12M18 6 6 18'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 6l12 12M18 6 6 18'/%3E%3C/svg%3E") center / contain no-repeat;
}
body[data-page="create-model"] .clip-remove:hover { background: var(--danger-soft); color: var(--danger); }

/* Recording prompt card (inside step 4) */
body[data-page="create-model"] .creator-prompt { margin: 14px 0 0; padding: 14px 16px 16px; line-height: 1.5; }
.cm-prompt-head { display: flex; align-items: flex-start; gap: 12px; }
.cm-prompt-icon { flex: 0 0 auto; display: grid; place-items: center; width: 32px; height: 32px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--text); }
.cm-prompt-icon svg { width: 16px; height: 16px; }
.cm-prompt-copy { flex: 1 1 auto; min-width: 0; }
body[data-page="create-model"] .creator-prompt .cm-prompt-copy b { display: block; font-size: 13.5px; font-weight: 500; line-height: 1.3; }
.cm-prompt-copy small { display: block; margin-top: 3px; font-size: 12px; line-height: 1.45; color: var(--muted); }
body[data-page="create-model"] .cm-copy-prompt { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 32px; padding: 0 12px; margin-top: 1px; font-size: 12.5px; }
.cm-copy-prompt svg { width: 14px; height: 14px; }
body[data-page="create-model"] .cm-copy-prompt.is-copied { border-color: var(--success); background: var(--success-soft); color: var(--success); }
.cm-prompt-text { margin: 12px 0 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--text); font-size: 13.5px; line-height: 1.65; }

/* Step 5 — consent + result */
body[data-page="create-model"] .creator-consent { grid-template-columns: 18px 1fr; gap: 12px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); color: var(--muted); font-size: 13px; line-height: 1.55; cursor: pointer; transition: border-color var(--t) var(--ease), background var(--t) var(--ease), color var(--t) var(--ease); }
body[data-page="create-model"] .creator-consent:hover { border-color: var(--line-strong); }
body[data-page="create-model"] .creator-consent:has(input:checked) { border-color: color-mix(in srgb, var(--success) 45%, transparent); background: var(--success-soft); color: var(--text); }
body[data-page="create-model"] .creator-consent input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--text); cursor: pointer; }
body[data-page="create-model"] .creator-result { position: relative; margin-top: 16px; padding: 20px 20px 20px 64px; border: 1px solid color-mix(in srgb, var(--success) 35%, transparent); border-radius: 12px; background: var(--success-soft); color: var(--text); }
.cm-result-icon { position: absolute; top: 20px; left: 20px; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 999px; background: var(--success); color: var(--bg); }
.cm-result-icon svg { width: 15px; height: 15px; }
body[data-page="create-model"] .creator-result > strong { font-size: 16px; font-weight: 600; letter-spacing: -.02em; }
body[data-page="create-model"] .creator-result p { font-size: 13px; line-height: 1.55; color: var(--muted); }
body[data-page="create-model"] .creator-result-actions { margin-top: 14px; gap: 8px; }
body[data-page="create-model"] .creator-result-actions a { min-height: 36px; padding: 0 14px; font-size: 13px; }
body[data-page="create-model"] #creationFeedback { margin-top: 16px; padding-top: 14px; border-top: 1px solid color-mix(in srgb, var(--success) 25%, transparent); }
body[data-page="create-model"] .creation-quality { border-top-color: color-mix(in srgb, var(--success) 25%, transparent); }
body[data-page="create-model"] .creation-quality summary { display: flex; align-items: center; gap: 8px; list-style: none; font-weight: 500; }
body[data-page="create-model"] .creation-quality summary::-webkit-details-marker { display: none; }
body[data-page="create-model"] .creation-quality summary::before {
  content: ""; flex: 0 0 auto; width: 14px; height: 14px; background: var(--muted); transform: rotate(-90deg); transition: transform var(--t) var(--ease);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") center / contain no-repeat;
}
body[data-page="create-model"] .creation-quality[open] summary::before { transform: none; }
body[data-page="create-model"] .quality-row { border-top-color: color-mix(in srgb, var(--success) 20%, transparent); }
body[data-page="create-model"] .access-key-box code { background: var(--surface); }

/* --------------------------------------------------------------------------
   Sticky action bar
   -------------------------------------------------------------------------- */
.cm-actionbar {
  position: sticky; bottom: 16px; z-index: 40; margin-top: 16px; padding: 10px 10px 10px 14px;
  border: 1px solid var(--line); border-radius: 14px; background: color-mix(in srgb, var(--surface) 90%, transparent);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: var(--shadow-2);
}
.cm-actionbar-row { display: flex; align-items: center; gap: 12px; }
.cm-consent-state { display: inline-flex; align-items: center; gap: 8px; min-width: 0; color: var(--muted); font-size: 13px; transition: color var(--t) var(--ease); }
.cm-consent-icon { flex: 0 0 auto; display: grid; place-items: center; width: 22px; height: 22px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface); color: transparent; transition: background var(--t) var(--ease), border-color var(--t) var(--ease), color var(--t) var(--ease); }
.cm-consent-icon svg { width: 12px; height: 12px; }
.cm-consent-state[data-state="ok"] { color: var(--text); }
.cm-consent-state[data-state="ok"] .cm-consent-icon { border-color: transparent; background: var(--success); color: var(--bg); }
.cm-consent-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cm-cost { display: flex; flex-direction: column; margin-left: auto; padding-right: 14px; border-right: 1px solid var(--line); text-align: right; line-height: 1.2; }
.cm-cost-label { font-size: 11.5px; color: var(--faint); }
.cm-cost-value { margin-top: 2px; font-size: 14px; font-weight: 600; letter-spacing: -.01em; font-variant-numeric: tabular-nums; white-space: nowrap; }
body[data-page="create-model"] .create-model-button { flex: 0 0 auto; width: auto; min-width: 232px; margin: 0; padding: 0 18px; }
body[data-page="create-model"] .create-model-button:disabled { opacity: .45; }
.cm-actionbar .creator-message { min-height: 0; margin: 8px 2px 2px; font-size: 12.5px; line-height: 1.5; color: var(--muted); }
.cm-actionbar .creator-message:empty { display: none; }
.cm-actionbar .creator-message.error { color: var(--danger); }
.cm-actionbar .creator-message.success { color: var(--success); }

/* --------------------------------------------------------------------------
   "How it works" drawer
   -------------------------------------------------------------------------- */
.cm-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 95; width: min(400px, calc(100% - 20px)); overflow-y: auto; padding: 22px 24px 28px;
  border-left: 1px solid var(--line); background: var(--surface); color: var(--text); box-shadow: var(--shadow-2);
  transform: translateX(104%); visibility: hidden; transition: transform .28s var(--ease), visibility 0s linear .28s;
}
.cm-drawer.is-open { transform: none; visibility: visible; transition: transform .28s var(--ease), visibility 0s; }
.cm-drawer-backdrop { position: fixed; inset: 0; z-index: 94; background: color-mix(in srgb, var(--bg) 55%, transparent); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); opacity: 0; pointer-events: none; transition: opacity .28s var(--ease); }
.cm-drawer-backdrop.is-open { opacity: 1; pointer-events: auto; }
.cm-drawer-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.cm-drawer-head h2 { margin: 2px 0 0; font-size: 20px; letter-spacing: -.03em; }
body[data-page="create-model"] .cm-drawer-close { flex: 0 0 auto; display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 1px solid var(--line); background: var(--surface); color: var(--muted); transition: background var(--t) var(--ease), color var(--t) var(--ease); }
.cm-drawer-close svg { width: 16px; height: 16px; }
body[data-page="create-model"] .cm-drawer-close:hover { background: var(--surface-2); color: var(--text); }
.cm-guide { margin: 0; padding: 0; list-style: none; }
.cm-guide li { display: flex; gap: 14px; padding: 14px 0; border-top: 1px solid var(--line); }
.cm-guide li:first-child { padding-top: 0; border-top: 0; }
.cm-guide-num { flex: 0 0 auto; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 999px; background: var(--ink); color: var(--ink-text); font-size: 11.5px; font-weight: 600; }
.cm-guide strong { display: block; font-size: 14px; font-weight: 500; }
.cm-guide p { margin: 4px 0 0; font-size: 13px; line-height: 1.55; color: var(--muted); }
.cm-pricing { margin-top: 16px; padding: 14px 16px; border-radius: 10px; background: var(--surface-2); }
.cm-pricing-head { display: block; margin-bottom: 8px; font-size: 12.5px; color: var(--muted); }
.cm-pricing dl { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: 0; font-size: 13px; }
.cm-pricing dt { color: var(--text); font-weight: 500; }
.cm-pricing dd { margin: 0; color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.cm-drawer-foot { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.cm-drawer-foot .button { width: auto; min-height: 36px; padding: 0 14px; font-size: 13px; }

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1000px) {
  body[data-page="create-model"] { --cm-stick: 68px; }
  body[data-page="create-model"] .cm-main { padding-top: 12px; }
}
@media (max-width: 640px) {
  body[data-page="create-model"] .cm-main { padding-bottom: 32px; }
  body[data-page="create-model"] .cm-header { gap: 12px; padding-bottom: 14px; }
  .cm-status { padding: 10px 12px; }
  .cm-status .creator-inline-links { width: 100%; margin: 2px 0 0; }
  .cm-status .creator-inline-links a { flex: 1 1 auto; }
  body[data-page="create-model"] .creator-section.cm-card { padding: 18px 16px 20px; }
  .cm-card-head { gap: 12px; margin-bottom: 16px; }
  body[data-page="create-model"] .creation-methods { grid-template-columns: 1fr; }
  body[data-page="create-model"] .visibility-grid { grid-template-columns: 1fr; }
  body[data-page="create-model"] .audio-actions { grid-template-columns: 1fr; }
  body[data-page="create-model"] .cm-tile .audio-action { min-height: 112px; }
  .cm-prompt-head { flex-wrap: wrap; }
  body[data-page="create-model"] .cm-copy-prompt { width: 100%; margin-top: 2px; }
  body[data-page="create-model"] .creator-result { padding: 18px 16px 18px 16px; }
  .cm-result-icon { position: static; margin-bottom: 12px; }
  .cm-actionbar { bottom: 10px; padding: 10px; }
  .cm-actionbar-row { flex-wrap: wrap; gap: 10px; }
  .cm-cost { padding-right: 0; border-right: 0; }
  body[data-page="create-model"] .create-model-button { flex-basis: 100%; width: 100%; min-width: 0; }
}
@media (max-width: 560px) {
  .cm-stepper { padding: 6px; }
  .cm-steps li:not(:last-child)::after { margin: 0 4px; }
  .cm-step { gap: 6px; padding: 0 6px 0 3px; }
  .cm-step:not(.is-active) .cm-step-label { display: none; }
  .cm-step:not(.is-active) { padding-right: 3px; }
}
@media (prefers-reduced-motion: reduce) {
  .cm-drawer, .cm-drawer-backdrop, .cm-tile, .cm-step-num, .cm-step-check, .cm-step-digit, .cm-status-dot, .cm-stepper, .cm-card, .cm-num, .cm-consent-icon { transition: none !important; animation: none !important; }
  .cm-tile:hover { transform: none; }
}
