/* ═══════════════════════════════════════
   Design System — Clarity Theme
   Fonts: Inter (sans) + Newsreader (serif)
   ═══════════════════════════════════════ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    outline: none;
}

:root {
    --bg-body: #F8FAFC;
    --bg-surface: #FFFFFF;
    --bg-surface-hover: #F3F4F6;

    --text-primary: #111827;
    --text-secondary: #6B7280;
    --text-tertiary: #94A3B8;

    --accent-black: #111827;

    --gradient-peach: linear-gradient(135deg, rgba(14, 165, 233, 0.16) 0%, rgba(91, 78, 230, 0.18) 100%);
    --gradient-purple: linear-gradient(135deg, rgba(91, 78, 230, 0.16) 0%, rgba(14, 165, 233, 0.16) 100%);
    --gradient-green: linear-gradient(135deg, rgba(14, 167, 101, 0.16) 0%, rgba(14, 165, 233, 0.12) 100%);
    --gradient-pro: linear-gradient(145deg, #1b2b4b, #153a5f 52%, #14524a);

    --success: #4CAF50;
    --warning: #F59E0B;
    --danger: #EF4444;
    --info: #3B82F6;

    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 8px;
    --radius-pill: 999px;

    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;

    --border-color: #F0F0F0;

    --font-serif: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-sans: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 12px 24px -4px rgba(0, 0, 0, 0.08);
}

body {
    font-family: var(--font-sans);
    background: var(--bg-body);
    min-height: 100vh;
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Custom Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #E5E5E5; border-radius: 3px; }

/* Typography */
h1, h2, h3 {
    font-family: var(--font-sans);
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text-primary);
}

/* Review Flow Container */
.review-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: var(--bg-body);
}

.review-card {
    background: var(--bg-body);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    max-width: 680px;
    width: 100%;
    padding: 40px;
    animation: slideUp 0.4s ease-out;
    border: 1px solid var(--border-color);
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Step Progress Indicator */
.step-progress {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 32px;
    padding-top: 4px;
}

.step-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--bg-surface-hover);
    transition: all 0.3s ease;
}

.step-dot.active {
    background: var(--text-tertiary);
}

.step-dot.current {
    background: var(--accent-black);
    transform: scale(1.25);
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: var(--accent-black);
    color: white;
    padding: 12px 24px;
    border-radius: var(--radius-pill);
    font-size: 14px;
    font-weight: 500;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.toast.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}

/* Back Button */
.step-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    color: var(--text-tertiary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    padding: 10px 0;
    min-height: 44px;
    margin-bottom: 8px;
    transition: color 0.2s;
    font-family: var(--font-sans);
}

.step-back-btn:hover {
    color: var(--text-primary);
}

/* Welcome Icon */
.welcome-icon {
    width: 64px;
    height: 64px;
    background: var(--gradient-pro);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: var(--text-primary);
    position: relative;
    overflow: hidden;
}

.welcome-icon::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0.3;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
    mix-blend-mode: overlay;
}

/* Steps */
.step {
    display: none;
    animation: stepFadeIn 0.35s ease-out;
}
.step.active { display: block; }

@keyframes stepFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.step-header {
    text-align: center;
    margin-bottom: 28px;
}

.step-header h1 {
    font-family: var(--font-serif);
    font-size: 32px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.step-header h2 {
    font-family: var(--font-serif);
    font-size: 26px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 15px;
}

.location-name {
    font-family: var(--font-serif);
    font-size: 20px;
    font-weight: 500;
    color: var(--text-primary);
    text-align: center;
    margin-bottom: 24px;
}

/* Buttons */
.btn {
    height: 48px;
    padding: 0 32px;
    border: none;
    border-radius: var(--radius-pill);
    font-size: 14px;
    font-weight: 500;
    font-family: var(--font-sans);
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(140deg, #5b4ee6, #0ea5e9);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-large {
    height: 52px;
    padding: 0 40px;
    font-size: 16px;
    width: 100%;
}

/* Landing-like controls */
.btn {
    border-radius: 12px;
    font-weight: 700;
}

.review-card,
.platform-card,
.facts-card,
.instruction-card,
.final-gradient-card,
.final-soft-card {
    border-radius: 20px;
}

.facts-field select,
.facts-field input,
.context-edit-form select,
.context-edit-form input[type="text"],
.chip-slot-input,
.draft-textarea {
    border-radius: 12px;
}

.btn-sm {
    height: 36px;
    padding: 0 18px;
    font-size: 13px;
}

.btn-success {
    background-color: var(--accent-black);
    color: white;
}

.btn-secondary {
    background-color: var(--bg-surface);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background-color: var(--bg-surface-hover);
}

/* Platforms Grid */
.platforms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.platform-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.platform-card:hover {
    background-color: var(--bg-surface-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.platform-card.selected {
    background-color: var(--accent-black);
    border-color: var(--accent-black);
    transform: scale(0.97);
}

.platform-card.selected .platform-name {
    color: white;
}

.platform-icon {
    width: 36px;
    height: 36px;
    margin: 0 auto 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.platform-icon img,
.platform-icon svg {
    width: 28px;
    height: 28px;
    display: block;
    object-fit: contain;
}

.platform-name {
    font-weight: 500;
    color: var(--text-primary);
    font-size: 14px;
}

/* ═══════════════════════════════════════
   Zone A: Facts Card
   ═══════════════════════════════════════ */
.facts-card {
    background: #F9FAFB;
    border: 1.5px solid #F3F4F6;
    border-radius: 16px;
    padding: 14px 16px;
    margin-bottom: 20px;
}

.facts-body {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.facts-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    flex: 1;
}

.facts-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    border-radius: 100px;
    font-size: 13px;
    font-weight: 600;
    font-family: var(--font-sans);
}

.facts-pill-icon {
    font-size: 12px;
}

.facts-pill--blue {
    background: rgba(2,132,199,0.10);
    color: #0369A1;
}

.facts-pill--violet {
    background: rgba(109,40,217,0.08);
    color: #4C1D95;
}

.facts-pill--amber {
    background: rgba(245,158,11,0.10);
    color: #92400E;
}

.facts-edit-link {
    background: none;
    border: none;
    color: var(--text-tertiary);
    font-size: 13px;
    font-weight: 500;
    font-family: var(--font-sans);
    cursor: pointer;
    padding: 4px 0;
    white-space: nowrap;
    transition: color 0.2s;
}

.facts-edit-link:hover {
    color: var(--text-secondary);
}

/* Шаг подтверждения контекста (step-context) */
.context-summary { margin-bottom: var(--space-lg); }
.context-facts p { margin-bottom: 8px; font-size: 15px; }
.context-placeholder { color: var(--text-secondary); font-size: 14px; }
.context-edit-form .facts-field { margin-bottom: 14px; }
.context-edit-form label { display: block; margin-bottom: 6px; font-weight: 600; font-size: 14px; color: #111827; }
.context-edit-form input[type="text"] { width: 100%; padding: 10px 14px; border-radius: 12px; border: 1.5px solid #E5E7EB; font-size: 15px; font-family: var(--font-sans); font-weight: 500; color: #111827; transition: border-color .2s; }
.context-edit-form input[type="text"]:focus { border-color: #111827; }
.context-privacy-hint { font-size: 12px; color: var(--text-tertiary); margin-top: 8px; }
.context-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-top: 20px; }

.platform-link-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin: 16px 0; }
.copy-again-hint { font-size: 13px; color: var(--text-secondary); margin: 12px 0 8px; }
.step-hint { color: var(--text-secondary); margin-bottom: 12px; font-size: 14px; }
.journey-hints { margin-bottom: 16px; padding: 12px 16px; background: var(--bg-surface); border-radius: var(--radius-sm); font-size: 13px; }
.journey-hints-title { font-weight: 600; margin-bottom: 6px; }
.journey-hints-list { margin: 0; padding-left: 20px; }
.journey-hints-list li { margin-bottom: 4px; }

.facts-edit-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.facts-field { margin-bottom: 0; }

.facts-field label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 6px;
}

.facts-field input[type="text"] {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid #E5E7EB;
    border-radius: 12px;
    font-size: 15px;
    font-family: var(--font-sans);
    font-weight: 500;
    color: #111827;
    background: #fff;
    transition: border-color 0.2s;
}

.facts-field input[type="text"]:focus {
    outline: none;
    border-color: #111827;
}

.facts-edit-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-text-cancel {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    font-family: var(--font-sans);
    cursor: pointer;
    padding: 4px 0;
}

.btn-text-cancel:hover {
    color: var(--text-primary);
}

.facts-warning {
    background: rgba(255, 255, 255, 0.6);
    border: none;
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    font-size: 13px;
    color: var(--text-secondary);
}

/* ═══════════════════════════════════════
   Zone B: Dynamic Chips
   ═══════════════════════════════════════ */
.chip-zones {
    margin-bottom: 28px;
}

/* ── Writer stack: prompts above textarea on mobile while empty (GAP-2) ── */
.writer-stack {
    display: flex;
    flex-direction: column;
}
.writer-stack > .draft-zone { order: 1; }
.writer-stack > #prompt-cards { order: 2; }
@media (max-width: 600px) {
    .writer-stack.draft-empty > #prompt-cards {
        order: 0;
        margin-bottom: 12px;
    }
}

/* ── Prompt Tabs (Guided Writing) ── */
.prompt-tabs-wrap {
    margin-top: 16px;
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
}
.prompt-tabs {
    display: flex;
    overflow-x: auto;
    scrollbar-width: none;
    border-bottom: 1px solid var(--border);
    background: var(--bg-secondary, #f8f9fa);
}
.prompt-tabs::-webkit-scrollbar { display: none; }
.prompt-tab {
    flex: 0 0 auto;
    padding: 10px 20px 10px 12px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    white-space: nowrap;
    position: relative;
    transition: color 0.15s, border-color 0.15s;
    -webkit-tap-highlight-color: transparent;
    font-family: inherit;
    min-height: 44px;
}
.prompt-tab.active {
    color: var(--accent, #6366f1);
    border-bottom-color: var(--accent, #6366f1);
    background: white;
}
.prompt-tab:active { opacity: 0.75; }
.prompt-tab-dot {
    display: none;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--success, #22c55e);
    position: absolute;
    top: 8px;
    right: 8px;
}
.prompt-tab-dot.visible { display: inline-block; }
.prompt-panel {
    padding: 12px 16px;
    min-height: 80px;
    transition: min-height 0.15s ease;
}
.prompt-questions {
    margin: 0;
    padding: 0;
    list-style: none;
}
.prompt-questions li {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
    padding: 2px 0 2px 14px;
    position: relative;
}
.prompt-questions li::before {
    content: '·';
    position: absolute;
    left: 0;
    color: var(--accent, #6366f1);
    font-size: 18px;
    line-height: 1.2;
    font-weight: 700;
}
/* Inline prompt list (multifield) */
.prompt-list-inline {
    margin-top: 10px;
    margin-bottom: 8px;
    padding: 10px 14px 12px;
    background: var(--bg-secondary, #f8f9fa);
    border-radius: 8px;
    border: 1px solid var(--border);
}
.prompt-list-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-secondary);
    margin: 0 0 6px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.prompt-group-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-secondary);
    margin: 8px 0 4px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.prompt-group-label:first-of-type { margin-top: 0; }
/* Short mode examples */
.prompt-examples-wrap {
    margin-top: 16px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
}
.prompt-examples-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    margin: 0 0 6px;
}
.prompt-example-item {
    font-size: 13px;
    color: var(--text-secondary);
    font-style: italic;
    margin: 4px 0;
    line-height: 1.5;
}
.multifield-char-count {
    display: block;
    font-size: 11px;
    color: var(--text-secondary);
    text-align: right;
    margin-top: 4px;
    margin-bottom: 8px;
}

/* ── Pro: Style tip & LLM suggestion ── */
.style-tip {
    font-size: 12px;
    color: var(--text-secondary);
    background: var(--bg-secondary, #f8f9fa);
    border-left: 3px solid var(--accent, #6366f1);
    border-radius: 0 6px 6px 0;
    padding: 6px 10px;
    margin-bottom: 10px;
    line-height: 1.5;
    animation: fadeSlideIn 0.3s ease;
}
.llm-suggestion {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    background: rgba(99, 102, 241, 0.06);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 10px;
    padding: 10px 12px;
    margin-top: 12px;
    animation: fadeSlideIn 0.3s ease;
}
.llm-suggestion-text {
    flex: 1;
    font-size: 13px;
    color: var(--text-primary);
    line-height: 1.5;
}
.llm-suggestion-dismiss {
    flex-shrink: 0;
    background: none;
    border: none;
    font-size: 18px;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 8px 12px;
    margin: -8px -12px;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.6;
}
.llm-suggestion-dismiss:hover { opacity: 1; }
@keyframes fadeSlideIn {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}
.writing-nudge {
    font-size: 13px;
    color: var(--text-secondary);
    text-align: center;
    padding: 8px 12px;
    margin-bottom: 8px;
    animation: fadeSlideIn 0.4s ease;
    font-style: italic;
}

/* Fade-out подсказок при длинном тексте */
.prompt-tabs-wrap {
    transition: opacity 0.5s ease;
}
.prompt-tabs-wrap.prompt-faded {
    opacity: 0.35;
}
.show-hints-btn {
    display: block;
    width: 100%;
    margin-top: 8px;
    padding: 8px;
    background: none;
    border: 1px dashed var(--border);
    border-radius: 8px;
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
    text-align: center;
    font-family: inherit;
}
.show-hints-btn:hover { background: var(--bg-secondary); }
/* Nudge-анимация первой вкладки */
@keyframes promptNudge {
    0%, 100% { background: none; }
    40%, 60% { background: rgba(99, 102, 241, 0.12); }
}
.prompt-tab--nudge {
    animation: promptNudge 0.7s ease-in-out 2;
}

@media (max-width: 600px) {
    .prompt-tabs-wrap { border-radius: 10px; }
    .prompt-tab { padding: 10px 6px; font-size: 12px; }
}

.chip-zones-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 32px;
    color: var(--text-secondary);
    font-size: 14px;
}

.chip-zones-empty {
    text-align: center;
    color: var(--text-secondary);
    padding: 24px;
    font-size: 14px;
}

.chip-group {
    margin-bottom: 20px;
}

.chip-group-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    user-select: none;
}

.chip-group-title {
    font-family: var(--font-serif);
    font-weight: 500;
    font-size: 15px;
    color: var(--text-primary);
}

.chip-group-optional-badge {
    font-size: 11px;
    color: var(--text-tertiary);
    background: var(--bg-surface);
    padding: 2px 10px;
    border-radius: var(--radius-pill);
}

.chip-group--optional .chip-group-header {
    cursor: pointer;
}

.chip-group--optional .chip-group-header::after {
    content: '▾';
    margin-left: auto;
    color: var(--text-tertiary);
    transition: transform 0.2s;
}

.chip-group--collapsed .chip-group-header::after {
    transform: rotate(-90deg);
}

.chip-group--collapsed .chips-container {
    display: none !important;
}

.chips-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 4px;
}

/* Base chip */
.chip {
    padding: 8px 16px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-pill);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    user-select: none;
}

.chip:hover {
    background: var(--bg-surface-hover);
    color: var(--text-primary);
}

.chip.active {
    background: var(--accent-black);
    color: white;
    border-color: var(--accent-black);
}

.chip-arrow, .chip-slot-icon {
    font-size: 11px;
    opacity: 0.7;
}

/* Cascading chip */
.chip--cascading {
    border-style: dashed;
}

.chip--cascading.active {
    border-style: solid;
}

/* Slot chip */
.chip--slot {
    border-color: #D8B4FE;
    background: #F9F5FF;
}

.chip--slot:hover {
    background: #F3EAFF;
}

.chip--slot.active {
    background: var(--accent-black);
    border-color: var(--accent-black);
    color: white;
}

/* Service chip (dynamically injected) */
.chip--service {
    border-color: #D1C4E9;
    background: linear-gradient(135deg, #F3E5F5 0%, #EDE7F6 100%);
    font-weight: 500;
}

.chip--service:hover {
    background: linear-gradient(135deg, #E1BEE7 0%, #D1C4E9 100%);
}

.chip--service.active {
    background: var(--accent-black);
    border-color: var(--accent-black);
    color: white;
}

/* Service chip group */
.chip-group--service {
    background: var(--gradient-purple);
    border-radius: var(--radius-lg);
    padding: 16px 20px;
    margin-bottom: 20px;
    animation: stepFadeIn 0.35s ease-out;
}

.chip-group--service .chip-group-header {
    margin-bottom: 10px;
}

.chip-group-service-badge {
    font-size: 11px;
    color: var(--text-tertiary);
    background: rgba(255, 255, 255, 0.5);
    padding: 2px 10px;
    border-radius: var(--radius-pill);
    backdrop-filter: blur(10px);
}

/* Recommended chip badge */
.chip--recommended {
    position: relative;
}

.chip--recommended::after {
    content: '✦';
    position: absolute;
    top: -4px;
    right: -4px;
    width: 16px;
    height: 16px;
    font-size: 8px;
    background: var(--gradient-pro);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.chip--recommended:not(.active) {
    border-color: #D8B4FE;
    background: #FAF5FF;
}

/* Contrast chip */
.chip--contrast {
    border-color: #FDE68A;
    background: #FFFBEB;
}

.chip--contrast:hover {
    background: #FEF3C7;
}

.chip--contrast.active {
    background: var(--accent-black);
    border-color: var(--accent-black);
    color: white;
}

/* Sub-options panel */
.chip-suboptions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px 0 4px 16px;
    width: 100%;
}

.chip-sub-btn {
    padding: 6px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-pill);
    background: white;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-secondary);
}

.chip-sub-btn:hover {
    background: var(--bg-surface);
    color: var(--text-primary);
}

.chip-sub-btn.active {
    background: var(--accent-black);
    color: white;
    border-color: var(--accent-black);
}

/* Slot panel */
.chip-slot-panel {
    display: flex;
    gap: 6px;
    padding: 8px 0 4px 16px;
    width: 100%;
    align-items: center;
}

.chip-slot-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-family: var(--font-sans);
    transition: border-color 0.2s;
    color: var(--text-primary);
}

.chip-slot-input:focus {
    outline: none;
    border-color: var(--text-tertiary);
}

.chip-slot-ok {
    height: 44px;
    padding: 0 16px;
    border: none;
    border-radius: var(--radius-pill);
    background: var(--accent-black);
    color: white;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: opacity 0.2s;
}

.chip-slot-ok:hover {
    opacity: 0.85;
}

/* ═══════════════════════════════════════
   Zone C: Smart Draft
   ═══════════════════════════════════════ */
.draft-zone {
    border-top: 1px solid var(--border-color);
    padding-top: 24px;
}

.draft-header {
    margin-bottom: 16px;
}

.draft-title-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.draft-title {
    font-family: var(--font-serif);
    font-size: 17px;
    font-weight: 500;
    color: var(--text-primary);
}

.draft-badge {
    display: none;
    padding: 3px 10px;
    font-size: 12px;
    font-weight: 500;
    border-radius: var(--radius-pill);
    background: var(--gradient-pro);
    color: #fff;
}

.draft-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
}

.draft-control-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.draft-control-group label {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    letter-spacing: 0.02em;
}

.toggle-group {
    display: flex;
    background: var(--bg-surface);
    padding: 3px;
    border-radius: var(--radius-pill);
}

.toggle-btn {
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 500;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
    border-radius: var(--radius-pill);
}

.toggle-btn.active {
    background: white;
    color: var(--text-primary);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.toggle-btn:hover:not(.active) {
    color: var(--text-primary);
}

/* Progress bar */
.draft-progress-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.draft-progress {
    flex: 1;
    height: 4px;
    background: var(--bg-surface);
    border-radius: 2px;
    overflow: hidden;
}

.draft-progress-bar {
    height: 100%;
    border-radius: 2px;
    transition: width 0.3s ease, background 0.3s ease;
    width: 0%;
    background: var(--bg-surface-hover);
}

.draft-progress--short {
    background: var(--warning);
}

.draft-progress--good {
    background: var(--success);
}

.draft-progress--long {
    background: var(--danger);
}

.draft-progress-label {
    font-size: 12px;
    color: var(--text-tertiary);
    white-space: nowrap;
    min-width: 180px;
    text-align: right;
}

/* Draft textarea */
.draft-textarea {
    width: 100%;
    padding: 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 15px;
    font-family: var(--font-sans);
    min-height: 140px;
    background: var(--bg-surface);
    transition: border-color 0.2s ease;
    resize: vertical;
    color: var(--text-primary);
    line-height: 1.6;
}

.draft-textarea:focus {
    outline: none;
    border-color: var(--text-tertiary);
}

/* Hints */
.draft-hints {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-height: 20px;
}

.draft-hint {
    font-size: 13px;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    gap: 6px;
}

.draft-hint--success {
    color: #166534;
    background: #f0fdf4;
}

.draft-hint--warning {
    color: #92400e;
    background: #fffbeb;
}

.draft-hint--error {
    color: #991b1b;
    background: #fef2f2;
}

.draft-hint--info {
    color: #1e40af;
    background: #eff6ff;
}

/* Draft loading */
.draft-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px;
    color: var(--text-secondary);
    font-size: 14px;
}

/* Draft actions */
.draft-actions {
    margin-top: 20px;
}

/* Chip Counter */
.chip-counter {
    text-align: center;
    margin-bottom: 12px;
    font-size: 13px;
    color: var(--text-tertiary);
    font-weight: 500;
}

/* Instruction Card (Step 4) */
.instruction-card {
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    padding: 20px 24px;
    margin-bottom: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.instruction-step-row {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: var(--text-secondary);
}

.instruction-num {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--accent-black);
    color: white;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Final Screens */
.final-screen {
    text-align: center;
    padding: 20px 0;
}

.final-gradient-card {
    background: var(--gradient-pro);
    border-radius: 32px;
    padding: 48px 32px;
    position: relative;
    overflow: hidden;
}

.final-gradient-card::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0.3;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
    mix-blend-mode: overlay;
    pointer-events: none;
}

.final-gradient-card h2,
.final-gradient-card .subtitle {
    position: relative;
    z-index: 1;
}

.final-gradient-card h2 {
    color: #1a1a1a;
    margin-bottom: 8px;
}

.final-gradient-card .subtitle {
    color: rgba(26, 26, 26, 0.7);
    font-size: 15px;
}

.final-icon {
    width: 72px;
    height: 72px;
    background: var(--accent-black);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    position: relative;
    z-index: 1;
    animation: scaleIn 0.4s ease-out;
}

.final-soft-card {
    background: var(--bg-surface);
    border-radius: 32px;
    padding: 48px 32px;
}

.final-soft-card h2 {
    margin-bottom: 8px;
}

.final-soft-card .subtitle {
    color: var(--text-secondary);
    font-size: 15px;
}

/* Spinner */
.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-top-color: var(--text-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Success Icon */
.success-icon {
    width: 64px;
    height: 64px;
    background: var(--accent-black);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 32px;
    font-weight: bold;
    margin: 0 auto 24px;
    animation: scaleIn 0.4s ease-out;
}

.success-icon.large {
    width: 80px;
    height: 80px;
    font-size: 40px;
}

@keyframes scaleIn {
    from { transform: scale(0); }
    to { transform: scale(1); }
}

.instruction-text {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 24px;
    font-size: 16px;
}

.confirmation-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* ── Review Flow: Violet/Blue/Emerald palette ──────────── */
:root {
    --violet:      #6d28d9;
    --violet-lt:   #8b5cf6;
    --violet-dim:  rgba(109, 40, 217, 0.08);
    --violet-glow: rgba(109, 40, 217, 0.18);
    --blue:        #0284c7;
    --emerald:     #059669;
    --border-v:    rgba(109, 40, 217, 0.10);
    --border-vh:   rgba(109, 40, 217, 0.22);
    --bg-alt-v:    #f8f7ff;
    --shadow-v:    0 8px 28px rgba(109, 40, 217, 0.08), 0 2px 8px rgba(0,0,0,0.04);
}

.review-container {
    background:
        linear-gradient(rgba(109, 40, 217, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(109, 40, 217, 0.03) 1px, transparent 1px),
        linear-gradient(180deg, #f8f7ff 0%, #f2f0fb 100%);
    background-size: 64px 64px, 64px 64px, auto;
    padding: 28px;
}

.review-card {
    background: #ffffff;
    border: 1px solid var(--border-v);
    border-radius: 24px;
    box-shadow: 0 18px 36px rgba(109, 40, 217, 0.08), 0 4px 12px rgba(0,0,0,0.04);
}

.step-progress { gap: 10px; }

.step-dot {
    width: 10px;
    height: 10px;
    background: rgba(109, 40, 217, 0.12);
}

.step-dot.active { background: rgba(109, 40, 217, 0.35); }

.step-dot.current {
    transform: scale(1.12);
    background: linear-gradient(135deg, var(--violet), var(--blue));
}

.step-header h1,
.step-header h2 {
    font-family: "Bricolage Grotesque", "Manrope", sans-serif;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.15;
}

.subtitle { color: #667085; }

.welcome-icon,
.success-icon,
.final-icon,
.instruction-num {
    background: linear-gradient(130deg, var(--violet), var(--blue));
    color: #fff;
}

.btn {
    border-radius: 12px;
    font-weight: 700;
}

.btn-primary {
    background: linear-gradient(130deg, var(--violet), var(--blue));
    color: #fff;
    box-shadow: 0 4px 18px var(--violet-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(109, 40, 217, 0.28);
    filter: brightness(1.06);
}

.btn-secondary {
    background: #fff;
    border: 1px solid var(--border-v);
    color: #0f0a1e;
}

.btn-secondary:hover {
    border-color: var(--border-vh);
    background: var(--violet-dim);
}

.platform-card,
.facts-card,
.instruction-card,
.final-gradient-card,
.final-soft-card,
.chip-group--service {
    background: #fff;
    border: 1px solid var(--border-v);
    border-radius: 20px;
    box-shadow: 0 8px 24px rgba(109, 40, 217, 0.06), 0 2px 6px rgba(0,0,0,0.03);
}

.platform-card:hover {
    border-color: var(--border-vh);
    box-shadow: 0 12px 28px rgba(109, 40, 217, 0.10);
}

.platform-card.selected {
    background: #fff;
    border-color: var(--violet);
    box-shadow: 0 0 0 3px var(--violet-dim), 0 8px 24px rgba(109, 40, 217, 0.10);
    transform: none;
}

.platform-card.selected .platform-name {
    color: var(--violet);
    font-weight: 700;
}

.facts-card {
    background: linear-gradient(180deg, rgba(109, 40, 217, 0.05), rgba(255,255,255,0) 62%), #fff;
}

.draft-zone {
    border-top: 1px solid var(--border-v);
    padding-top: 24px;
    box-shadow: none;
    border-left: none;
    border-right: none;
    border-bottom: none;
    border-radius: 0;
}

.toggle-group {
    background: rgba(109, 40, 217, 0.06);
    border-radius: 12px;
}

.toggle-btn { border-radius: 10px; }

.toggle-btn.active {
    background: #ffffff;
    color: #0f0a1e;
    box-shadow: 0 4px 10px rgba(109, 40, 217, 0.10);
}

.chip,
.chip-sub-btn,
.chip-slot-ok {
    border-radius: 12px;
}

.chip {
    border-color: var(--border-v);
    background: #fff;
}

.chip:hover {
    border-color: var(--border-vh);
    background: var(--violet-dim);
    color: var(--violet);
}

.chip.active,
.chip-sub-btn.active,
.chip-slot-ok {
    background: linear-gradient(130deg, var(--violet), var(--blue));
    border-color: transparent;
    color: #fff;
}

.chip--slot {
    border-color: rgba(109, 40, 217, 0.25);
    background: rgba(109, 40, 217, 0.04);
}

.chip--slot:hover {
    background: rgba(109, 40, 217, 0.08);
}

.chip--service {
    border-color: rgba(109, 40, 217, 0.20);
    background: linear-gradient(135deg, rgba(109, 40, 217, 0.06) 0%, rgba(2, 132, 199, 0.04) 100%);
}

.chip--recommended:not(.active) {
    border-color: rgba(109, 40, 217, 0.30);
    background: rgba(109, 40, 217, 0.04);
}

.chip--contrast {
    border-color: rgba(5, 150, 105, 0.25);
    background: rgba(5, 150, 105, 0.04);
}

.chip--contrast:hover {
    background: rgba(5, 150, 105, 0.08);
}

.draft-textarea,
.facts-field select,
.facts-field input,
.context-edit-form select,
.context-edit-form input[type="text"],
.chip-slot-input {
    border: 1px solid var(--border-v);
    border-radius: 12px;
    background: #fff;
}

.draft-textarea:focus,
.facts-field select:focus,
.facts-field input:focus,
.context-edit-form select:focus,
.context-edit-form input[type="text"]:focus,
.chip-slot-input:focus {
    border-color: var(--violet);
    box-shadow: 0 0 0 3px var(--violet-dim);
}

.final-gradient-card {
    background: linear-gradient(148deg, #1a0a3d 0%, #0c1f5f 52%, #063b2f 100%);
    border: none;
    box-shadow: none;
}

.final-gradient-card h2,
.final-gradient-card .subtitle {
    color: #ffffff;
}

.final-soft-card { background: var(--bg-alt-v); }

.spinner {
    border-color: var(--border-v);
    border-top-color: var(--violet);
}

/* Responsive */
@media (max-width: 640px) {
    .review-card {
        padding: 20px;
        border-radius: var(--radius-md);
    }

    .step-header h1 { font-size: 24px; }
    .step-header h2 { font-size: 20px; }

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

    .draft-controls {
        flex-direction: column;
        align-items: flex-start;
    }

    .draft-progress-wrap {
        flex-direction: column;
        align-items: stretch;
    }

    .draft-progress-label {
        text-align: left;
        min-width: auto;
    }

}

/* ── Rating Stars ── */
.rating-stars {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin: 20px 0 12px;
}
.rating-star {
    font-size: 40px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--border, #e2e8f0);
    line-height: 1;
    transition: color 0.15s, transform 0.15s;
    padding: 4px;
}
.rating-star:hover,
.rating-star.active {
    color: #f59e0b;
    transform: scale(1.15);
}
.rating-hint {
    text-align: center;
    font-size: 14px;
    color: var(--text-2, #64748b);
    margin-top: 4px;
}

/* ── Final Promo Block ── */
.final-promo-block {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    background: var(--bg-surface, #f8fafc);
    border: 1.5px solid #d1fae5;
    border-radius: 14px;
    padding: 16px 18px;
    margin-top: 16px;
}
.final-promo-icon { font-size: 28px; flex-shrink: 0; }
.final-promo-body { flex: 1; min-width: 0; }
.final-promo-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: #059669; margin-bottom: 2px; }
.final-promo-desc { font-size: 13px; color: var(--text-2, #64748b); margin-bottom: 8px; }
.final-promo-code-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.final-promo-code {
    font-family: monospace;
    font-size: 18px;
    font-weight: 700;
    color: var(--text, #1e293b);
    background: #ecfdf5;
    border: 1px dashed #6ee7b7;
    border-radius: 8px;
    padding: 4px 12px;
    letter-spacing: .08em;
}
.final-promo-copy {
    font-size: 13px;
    font-weight: 600;
    color: #059669;
    background: none;
    border: 1.5px solid #059669;
    border-radius: 8px;
    padding: 4px 12px;
    cursor: pointer;
    transition: background .15s, color .15s;
}

/* ── Progress Bar (Фаза 3) ── */
.step-progress-bar-wrap {
    height: 4px;
    background: var(--border-color);
    border-radius: 2px;
    margin-bottom: 28px;
    overflow: hidden;
}
.step-progress-fill {
    height: 100%;
    background: var(--accent-black);
    border-radius: 2px;
    transition: width 0.4s ease;
}

/* ── Chip filter (hidden by service filter) ── */
.chip--hidden-by-filter {
    display: none;
}
.chip-show-all {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 13px;
    cursor: pointer;
    padding: 4px 0;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.chip-show-all:hover {
    color: var(--text-primary);
}

/* ── Draft title actions (regen btn) ── */
.draft-title-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}
.regen-btn {
    font-size: 12px;
    padding: 4px 10px;
    height: auto;
}

/* ── Progress label colors ── */
.progress-label--short { color: #ef4444; }
.progress-label--long  { color: #f59e0b; }
.progress-label--good  { color: #22c55e; }

/* ── Mobile-first (C1) ── */
@media (max-width: 600px) {
    .review-container {
        padding: 0;
        align-items: flex-start;
    }
    .review-card {
        border-radius: 0;
        box-shadow: none;
        border: none;
        border-bottom: 1px solid var(--border-color);
        padding: 20px 16px 32px;
        min-height: 100dvh;
    }
    .platforms-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
    .platform-card {
        padding: 16px 12px;
        min-height: 80px;
    }
    .chip {
        padding: 10px 14px;
        font-size: 14px;
        min-height: 40px;
    }
    .draft-textarea {
        font-size: 16px; /* prevent iOS zoom on focus */
    }
    .btn-large {
        height: 54px;
        font-size: 16px;
    }
    .btn {
        min-height: 44px;
    }
    .draft-controls {
        flex-direction: column;
        gap: 8px;
    }
    .draft-control-group {
        flex-direction: row;
        align-items: center;
        gap: 8px;
    }
    .toggle-group {
        flex-wrap: wrap;
    }
    /* iOS zoom prevention — all inputs must be ≥16px on mobile */
    .context-edit-form select,
    .context-edit-form input[type="text"],
    .chip-slot-input {
        font-size: 16px;
    }
    /* Platform cards — ensure 44px tap target */
    .platform-card {
        min-height: 88px;
    }
}
.final-promo-copy:hover { background: #059669; color: #fff; }

/* ═══════════════════════════════════════
   Review Flow v2 — Visual Polish
   ═══════════════════════════════════════ */

/* ── Flow Header ── */
.flow-header {
    margin: -40px -40px 28px;
    padding: 16px 20px 14px;
    border-bottom: 1px solid var(--border-v);
    background: rgba(109,40,217,0.02);
    border-radius: 23px 23px 0 0;
}
.review-card { overflow: hidden; }

@media (max-width: 600px) {
    .flow-header {
        margin: -20px -16px 24px;
        padding: 12px 16px 10px;
        border-radius: 0;
    }
}

.flow-header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    gap: 8px;
}

.flow-brand-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-tertiary);
    text-decoration: none;
    letter-spacing: 0.02em;
    white-space: nowrap;
    flex-shrink: 0;
    transition: color 0.2s;
}
.flow-brand-link:hover { color: var(--text-secondary); }
.flow-brand-link svg { opacity: 0.7; }

.flow-org-photo {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid rgba(0,0,0,0.06);
}

.flow-org-row {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.flow-org-badge {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: linear-gradient(130deg, var(--violet), var(--blue));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 800;
    color: #fff;
    flex-shrink: 0;
    text-transform: uppercase;
    letter-spacing: -0.02em;
}

.flow-org-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.flow-progress-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.flow-progress-row .step-progress-bar-wrap {
    flex: 1;
    margin-bottom: 0;
    height: 5px;
    background: rgba(109,40,217,0.08);
}

.flow-step-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-tertiary);
    white-space: nowrap;
    min-width: 28px;
    text-align: right;
    letter-spacing: 0.03em;
}

.step-progress-fill {
    background: linear-gradient(90deg, var(--violet), var(--blue));
}

/* ── Soft-ask contact banner ── */
.softask-banner {
    background: #F0F4FF;
    border: 1.5px solid #DBEAFE;
    border-radius: 14px;
    padding: 16px;
    margin-bottom: 16px;
    position: relative;
}
.softask-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    cursor: pointer;
    color: #9CA3AF;
    font-size: 18px;
    line-height: 1;
    padding: 4px;
}
.softask-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}
.softask-icon { font-size: 18px; }
.softask-title {
    font-size: 15px;
    font-weight: 600;
    color: #111827;
    font-family: var(--font-sans);
}
.softask-desc {
    font-size: 13px;
    color: #6B7280;
    margin: 0 0 10px;
    font-family: var(--font-sans);
}
.softask-input-row {
    display: flex;
    gap: 8px;
}
.softask-input-row input {
    flex: 1;
    padding: 10px 14px;
    border: 1.5px solid #E5E7EB;
    border-radius: 10px;
    font-size: 15px;
    font-family: var(--font-sans);
    color: #111827;
    background: #fff;
    transition: border-color 0.15s;
}
.softask-input-row input:focus {
    outline: none;
    border-color: var(--primary);
}
.softask-submit-btn {
    width: 44px;
    height: 44px;
    min-width: 44px;
    padding: 0;
    border-radius: 10px;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ── Step icon decoration ── */
.step-icon-wrap {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: linear-gradient(130deg, rgba(109,40,217,0.10), rgba(2,132,199,0.07));
    border: 1px solid var(--border-v);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 14px;
    color: var(--violet);
}

.step-icon-wrap--question {
    background: linear-gradient(130deg, rgba(2,132,199,0.10), rgba(109,40,217,0.07));
    color: var(--blue);
}

/* ── Platform card enhancements ── */
.platform-card { position: relative; }

.platform-check-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: linear-gradient(130deg, var(--violet), var(--blue));
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(109,40,217,0.35);
    animation: scaleIn 0.2s ease-out;
}

.platform-card.selected .platform-check-badge { display: flex; }

.platform-card .platform-icon {
    width: 52px;
    height: 52px;
    margin: 0 auto 10px;
}

.platform-card .platform-icon img,
.platform-card .platform-icon svg {
    width: 40px;
    height: 40px;
}

.platform-name { font-size: 13px; font-weight: 600; }

/* ── Rating stars — SVG version ── */
.rating-stars {
    gap: 10px;
    margin: 28px 0 16px;
}

.rating-star {
    width: 56px;
    height: 56px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    background: rgba(109,40,217,0.04);
    border: 1px solid var(--border-v);
    transition: all 0.15s ease;
    color: #d1d5db;
    font-size: 0;
}

.rating-star svg {
    width: 26px;
    height: 26px;
    fill: currentColor;
    transition: transform 0.15s;
}

.rating-star:hover,
.rating-star.hover {
    background: rgba(251,191,36,0.09);
    border-color: rgba(251,191,36,0.3);
    color: #f59e0b;
    transform: scale(1.1);
}

.rating-star.active {
    color: #f59e0b;
    background: rgba(251,191,36,0.09);
    border-color: rgba(251,191,36,0.3);
    transform: scale(1.0);
}

.rating-star.active svg { transform: scale(1.08); }

.rating-hint {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    animation: stepFadeIn 0.2s ease;
}

/* ── Feedback promise block ── */
.feedback-promise {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 14px;
    background: rgba(5,150,105,0.06);
    border: 1px solid rgba(5,150,105,0.15);
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
    color: #065f46;
    margin-bottom: 16px;
    line-height: 1.4;
}

.feedback-promise svg { flex-shrink: 0; color: var(--emerald); }

/* ── Facts card icon decorations ── */
.facts-icon { margin-right: 4px; font-size: 13px; }
/* ── Draft zone ── */
.draft-title-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.regen-btn {
    display: inline-flex !important;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    padding: 5px 11px;
    height: auto;
    border-radius: 8px !important;
}

.btn-copy-main {
    height: 56px;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -0.01em;
    box-shadow: 0 6px 24px rgba(109,40,217,0.25);
    position: relative;
    overflow: hidden;
}

.btn-copy-main:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 32px rgba(109,40,217,0.35) !important;
}
.btn-copy-main:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.btn-copy-main::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.12) 50%, transparent 100%);
    transform: translateX(-100%);
    animation: shimmer 2.5s infinite 1.5s;
}

@keyframes shimmer { to { transform: translateX(100%); } }

/* ── Step 5: Celebration ── */
.step-header--celebration { text-align: center; }

.celebration-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(130deg, var(--violet), var(--blue));
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    position: relative;
    animation: scaleIn 0.45s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 8px 32px rgba(109,40,217,0.32);
}

.celebration-ring {
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    border: 2px solid rgba(109,40,217,0.22);
    animation: ringPulse 2s ease-out infinite;
}

@keyframes ringPulse {
    0%   { transform: scale(1); opacity: 0.8; }
    100% { transform: scale(1.3); opacity: 0; }
}

/* ── Step 5: Instruction step cards ── */
.instruction-steps { margin-bottom: 24px; }

.instruction-step-card {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 16px;
    background: #fff;
    border: 1px solid var(--border-v);
    border-radius: 14px;
    box-shadow: 0 2px 8px rgba(109,40,217,0.04);
}

.instruction-step-body { flex: 1; }

.instruction-step-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.instruction-step-desc {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.4;
}

.instruction-step-arrow {
    text-align: center;
    color: var(--text-tertiary);
    font-size: 16px;
    padding: 3px 0;
    line-height: 1;
}

/* ── Step 5: Copy again row ── */
.copy-again-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
    flex-wrap: wrap;
    justify-content: center;
}

.copy-again-hint { font-size: 13px; color: var(--text-tertiary); }

.copy-again-link {
    background: none;
    border: none;
    font-size: 13px;
    font-weight: 500;
    color: var(--violet);
    cursor: pointer;
    padding: 0;
    font-family: var(--font-sans);
    text-decoration: underline;
    text-underline-offset: 2px;
    opacity: 0.8;
}
.copy-again-link:hover { opacity: 1; }

.copy-again-sep { color: var(--text-tertiary); font-size: 13px; }

.btn-open-platform { height: 56px; font-size: 16px; font-weight: 700; }

/* ── Step 6: Confirmation ── */
.btn-confirm-yes {
    background: linear-gradient(130deg, #059669, #0ea5e9);
    color: #fff;
    border: none;
    box-shadow: 0 4px 16px rgba(5,150,105,0.25);
    font-weight: 700;
    border-radius: 12px;
}

.btn-confirm-yes:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(5,150,105,0.38);
    filter: brightness(1.05);
}

.confirmation-hint {
    text-align: center;
    font-size: 12px;
    color: var(--text-tertiary);
    margin-top: 12px;
}

/* ── Final screens ── */
.final-stars-animation {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-bottom: 16px;
}

.final-star {
    font-size: 28px;
    color: #f59e0b;
    animation: starPop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
    animation-delay: calc(var(--d) * 80ms);
    display: inline-block;
}

@keyframes starPop {
    from { transform: scale(0) rotate(-15deg); opacity: 0; }
    to   { transform: scale(1) rotate(0deg);   opacity: 1; }
}

.final-icon--soft {
    background: linear-gradient(130deg, #059669, var(--blue));
}

/* ── Step transitions: direction-aware ── */
.step.slide-in-left  { animation: slideFromRight 0.32s ease-out; }
.step.slide-in-right { animation: slideFromLeft  0.32s ease-out; }

@keyframes slideFromRight {
    from { opacity: 0; transform: translateX(24px); }
    to   { opacity: 1; transform: translateX(0); }
}
@keyframes slideFromLeft {
    from { opacity: 0; transform: translateX(-24px); }
    to   { opacity: 1; transform: translateX(0); }
}

/* ═══════════════════════════════════════
   Visual Redesign v3 — Full Polish
   ═══════════════════════════════════════ */

/* ── 0. Foundation: Design tokens ── */
:root {
    --violet: #6D28D9;
    --violet-mid: #7C3AED;
    --blue: #0284C7;
    --emerald: #059669;
    --violet-glow: rgba(109,40,217,0.18);
    --violet-soft: rgba(109,40,217,0.07);
    --border-v: rgba(109,40,217,0.12);
    --font-display: 'Bricolage Grotesque', 'Manrope', sans-serif;
}

/* ── 0a. Container & card foundation ── */
.review-container {
    background:
        radial-gradient(ellipse at 15% 25%, rgba(109,40,217,0.08) 0%, transparent 55%),
        radial-gradient(ellipse at 85% 75%, rgba(2,132,199,0.07) 0%, transparent 55%),
        radial-gradient(ellipse at 50% 110%, rgba(5,150,105,0.05) 0%, transparent 50%),
        #ECEEF4;
    min-height: 100vh;
}

.review-card {
    background: #ffffff;
    box-shadow:
        0 0 0 1px rgba(0,0,0,0.04),
        0 4px 16px rgba(0,0,0,0.04),
        0 24px 64px -12px rgba(0,0,0,0.12);
}

/* ── 0b. Display typography ── */
.step-header h2 {
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1.1;
    margin-bottom: 10px;
}

/* ── 1. Flow Header ── */
.flow-header {
    padding: 20px 24px 16px;
    background: linear-gradient(135deg, rgba(109,40,217,0.05) 0%, rgba(2,132,199,0.03) 100%);
    border-bottom: 1px solid rgba(109,40,217,0.09);
}

.flow-org-badge {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    font-size: 16px;
    letter-spacing: -0.01em;
}

.flow-org-photo {
    width: 40px;
    height: 40px;
    border-radius: 12px;
}

.flow-org-name {
    font-size: 14px;
    font-weight: 700;
    color: #111827;
}

.flow-progress-row .step-progress-bar-wrap {
    height: 6px;
    border-radius: 3px;
    background: rgba(109,40,217,0.1);
}

.step-progress-fill {
    border-radius: 3px;
    box-shadow: 0 0 10px rgba(109,40,217,0.45);
}

/* ── 2. Step icon wrap ── */
.step-icon-wrap {
    width: 60px;
    height: 60px;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(109,40,217,0.1), rgba(2,132,199,0.07));
    border: 1.5px solid rgba(109,40,217,0.14);
    margin-bottom: 16px;
    color: var(--violet);
}

/* ── 3. Platform cards ── */
.platform-card {
    background: #ffffff;
    border: 1.5px solid #E5E7EB;
    border-radius: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    padding: 20px 16px 16px;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.22s cubic-bezier(.34,1.56,.64,1);
}

.platform-card:hover {
    border-color: var(--violet);
    box-shadow: 0 12px 32px rgba(109,40,217,0.13);
    transform: translateY(-5px) scale(1.02);
    background: #fff;
}

.platform-card.selected {
    background: rgba(109,40,217,0.04);
    border: 2px solid var(--violet);
    box-shadow: 0 0 0 4px rgba(109,40,217,0.1), 0 8px 24px rgba(109,40,217,0.12);
    transform: translateY(-2px) scale(1.01);
}

.platform-card.selected .platform-name {
    color: var(--violet);
    font-weight: 700;
}

.platform-check-badge {
    top: 12px;
    right: 12px;
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, var(--violet), var(--blue));
    box-shadow: 0 2px 8px rgba(109,40,217,0.4);
}

.platform-card .platform-icon {
    width: 56px;
    height: 56px;
}

.platform-card .platform-icon img,
.platform-card .platform-icon svg {
    width: 44px;
    height: 44px;
}

.platform-name {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-top: 2px;
}

/* staggered card entrance */
.platform-card:nth-child(1) { animation-delay: 0ms; }
.platform-card:nth-child(2) { animation-delay: 60ms; }
.platform-card:nth-child(3) { animation-delay: 120ms; }
.platform-card:nth-child(4) { animation-delay: 180ms; }
.platform-card:nth-child(5) { animation-delay: 240ms; }
.platform-card:nth-child(6) { animation-delay: 300ms; }

/* ── 4. Rating stars ── */
.rating-stars {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 32px 0 8px;
}

.rating-star {
    width: 56px;
    height: 64px;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    border-radius: 0;
    background: transparent;
    border: none;
    color: #D1D5DB;
    transition: color 0.15s, transform 0.18s cubic-bezier(.34,1.56,.64,1);
    font-size: 0;
}

.rating-star svg {
    width: 40px;
    height: 40px;
    fill: currentColor;
    filter: drop-shadow(0 0 0 transparent);
    transition: filter 0.15s, transform 0.15s;
}

.rating-star::after {
    content: attr(data-label);
    font-size: 10px;
    font-weight: 600;
    color: #9CA3AF;
    letter-spacing: 0.01em;
    opacity: 0;
    transition: opacity 0.15s;
    font-family: var(--font-sans);
}

.rating-star:hover::after,
.rating-star.hover::after,
.rating-star.active::after {
    opacity: 1;
}

.rating-star:hover,
.rating-star.hover {
    color: #F59E0B;
    transform: scale(1.2) translateY(-5px);
    background: transparent;
    border-color: transparent;
}

.rating-star:hover svg,
.rating-star.hover svg {
    filter: drop-shadow(0 4px 12px rgba(245,158,11,0.5));
}

.rating-star.active {
    color: #F59E0B;
    transform: scale(1.05);
    background: transparent;
    border-color: transparent;
}

.rating-star.active svg {
    filter: drop-shadow(0 2px 8px rgba(245,158,11,0.4));
}

@keyframes shake {
    0%,100% { transform: translateX(0); }
    20% { transform: translateX(-7px); }
    40% { transform: translateX(7px); }
    60% { transform: translateX(-5px); }
    80% { transform: translateX(5px); }
}

.rating-shake { animation: shake 0.45s ease; }

/* ── 5. Context step ── */
.context-summary {
    border: 1.5px solid #F3F4F6;
    border-radius: 20px;
    padding: 18px 20px;
    background: #FAFAFA;
    margin-bottom: 20px;
}

.context-facts-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.context-facts-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    flex: 1;
}

.context-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    background: rgba(109,40,217,0.07);
    border-radius: 100px;
    font-size: 13px;
    font-weight: 600;
    color: #4C1D95;
}

.context-pill-icon {
    font-size: 13px;
}

.context-service-select {
    width: 100%;
    padding: 10px 14px;
    padding-right: 36px;
    border: 1.5px solid #E5E7EB;
    border-radius: 12px;
    font-size: 15px;
    font-family: var(--font-sans);
    font-weight: 500;
    color: #111827;
    background-color: #fff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23999' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
    transition: border-color 0.2s;
}

.context-service-select:focus {
    border-color: #111827;
}

.context-service-custom {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid #E5E7EB;
    border-radius: 12px;
    font-size: 15px;
    font-family: var(--font-sans);
    font-weight: 500;
    color: #111827;
    background: #fff;
    margin-top: 8px;
    transition: border-color 0.2s;
}

.context-service-custom:focus {
    border-color: #111827;
}

.context-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-top: 20px;
}
.context-actions .btn { width: 100%; }


/* ── 6b. Chip zones ── */
.chip-group-title {
    font-size: 14px;
    font-weight: 800;
    color: #111827;
    border-left: 3px solid var(--violet);
    padding-left: 10px;
    letter-spacing: -0.02em;
}

.chip {
    padding: 9px 18px;
    border-radius: 100px;
    border: 1.5px solid #E5E7EB;
    background: #fff;
    font-weight: 600;
    font-size: 13px;
    transition: border-color 0.15s, background 0.15s, color 0.15s, transform 0.15s;
}

.chip:hover {
    border-color: var(--violet);
    color: var(--violet);
    background: rgba(109,40,217,0.04);
}

.chip.active {
    background: linear-gradient(135deg, #6D28D9, #0284C7);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 3px 12px rgba(109,40,217,0.3);
}

@keyframes chipPop {
    0%   { transform: scale(1); }
    40%  { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.chip.active { animation: chipPop 0.22s cubic-bezier(.34,1.56,.64,1); }

/* ── 6c. Draft zone ── */
.draft-zone {
    border-top: none;
    border: 1.5px solid #E5E7EB;
    border-radius: 20px;
    padding: 20px;
    margin-top: 20px;
    background: #fff;
}

.draft-progress {
    height: 6px;
    background: #F3F4F6;
    border-radius: 3px;
}

.draft-progress-bar {
    height: 6px;
    border-radius: 3px;
}

.draft-textarea:focus {
    border-color: var(--violet);
    box-shadow: 0 0 0 3px rgba(109,40,217,0.09);
}

.toggle-group {
    background: #F3F4F6;
    border-radius: 12px;
    padding: 3px;
}

.toggle-btn.active {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.09);
    font-weight: 700;
    color: #111827;
}

@keyframes spinOnce {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

.regen-spinning svg { animation: spinOnce 0.5s ease; }

/* copy btn success state */
.btn-copy-main.copied {
    background: linear-gradient(135deg, #059669, #10B981);
    box-shadow: 0 6px 24px rgba(5,150,105,0.3);
}

/* ── 7. Step 5 — Celebration ── */
.celebration-icon {
    width: 96px;
    height: 96px;
    margin: 0 auto 20px;
}

.h2-gradient {
    background: linear-gradient(135deg, var(--violet), var(--blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.instruction-steps {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin: 24px 0;
}

.instruction-step-card {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 16px;
    background: #FAFAFA;
    border: 1.5px solid #F3F4F6;
    border-radius: 14px;
}

.instruction-num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--violet), var(--blue));
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-family: var(--font-display);
}

.instruction-step-title {
    font-weight: 700;
    font-size: 14px;
    color: #111827;
    margin-bottom: 2px;
}

.instruction-step-desc {
    font-size: 13px;
    color: #6B7280;
    line-height: 1.4;
}

.instruction-step-arrow {
    text-align: center;
    color: #D1D5DB;
    font-size: 16px;
    line-height: 1;
    padding: 4px 0;
}

/* ── 8. Step 6 — Confirmation ── */
.confirmation-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.btn-confirm-yes {
    background: linear-gradient(135deg, #059669, #10B981);
    box-shadow: 0 6px 20px rgba(5,150,105,0.28);
    border-radius: 14px;
    font-size: 17px;
    font-family: var(--font-display);
    letter-spacing: -0.02em;
}

.btn-confirm-yes:hover {
    box-shadow: 0 10px 28px rgba(5,150,105,0.4);
    transform: translateY(-2px);
    filter: brightness(1.04);
}

.btn-confirm-no {
    background: transparent;
    border: 1.5px dashed #D1D5DB;
    color: #9CA3AF;
    font-weight: 600;
    border-radius: 14px;
    height: 52px;
    font-size: 15px;
    cursor: pointer;
    width: 100%;
    font-family: var(--font-sans);
    transition: border-color 0.2s, color 0.2s;
}

.btn-confirm-no:hover {
    border-color: #9CA3AF;
    color: #6B7280;
}

/* ── Mobile overrides ── */
@media (max-width: 600px) {
    .flow-header { padding: 16px 16px 12px; }
    .step-header h2 { font-size: 24px; }
    .rating-star { width: 48px; height: 56px; }
    .rating-star svg { width: 34px; height: 34px; }
    .draft-zone { padding: 16px; }
    .instruction-step-card { padding: 12px 14px; }
}

/* ═══════════════════════════════════════
   Mobile Fixes v3 — patch cascade conflicts
   ═══════════════════════════════════════ */
@media (max-width: 600px) {

    /* review-card: restore no-shadow, no-border on mobile */
    .review-card {
        box-shadow: none;
        border: none;
        border-bottom: 1px solid var(--border-color);
    }

    /* flow-header: compact */
    .flow-header {
        padding: 14px 16px 12px;
    }

    .flow-org-badge,
    .flow-org-photo {
        width: 34px;
        height: 34px;
        border-radius: 10px;
    }

    /* platform-card: restore compact mobile padding */
    .platform-card {
        padding: 16px 10px 12px;
        min-height: 78px;
        border-radius: 16px;
    }

    .platform-card .platform-icon {
        width: 44px;
        height: 44px;
    }

    .platform-card .platform-icon img,
    .platform-card .platform-icon svg {
        width: 34px;
        height: 34px;
    }

    /* chips: narrower horizontal padding on mobile */
    .chip {
        padding: 9px 13px;
        font-size: 13px;
        min-height: 40px;
    }

    /* rating stars: tighter gap + smaller labels */
    .rating-stars {
        gap: 4px;
        margin: 24px 0 6px;
    }

    .rating-star {
        width: 44px;
        height: 54px;
    }

    .rating-star svg {
        width: 32px;
        height: 32px;
    }

    .rating-star::after {
        font-size: 8px;
        letter-spacing: 0;
    }

    /* draft-zone: flat separator instead of nested card */
    .draft-zone {
        border: none;
        border-top: 1.5px solid #F3F4F6;
        border-radius: 0;
        padding: 16px 0 0;
        margin-top: 16px;
    }

    /* step icon: slightly smaller */
    .step-icon-wrap {
        width: 48px;
        height: 48px;
        border-radius: 14px;
    }

    /* celebration icon: compact */
    .celebration-icon {
        width: 76px;
        height: 76px;
    }

    /* context pill: compact */
    .context-pill {
        padding: 6px 12px;
        font-size: 12px;
        gap: 5px;
    }

    /* btn-confirm-no: touch-friendly */
    .btn-confirm-no {
        height: 50px;
        font-size: 14px;
    }

    /* instruction steps: compact */
    .instruction-step-card {
        padding: 12px 12px;
        gap: 12px;
        border-radius: 12px;
    }

    /* drag zone progress label: shorter */
    .draft-progress-label {
        min-width: 120px;
        font-size: 11px;
    }

    /* chip-group-title: smaller */
    .chip-group-title {
        font-size: 13px;
    }
}

/* ═══════════════════════════════════════
   Multi-field draft (ПроДокторов, Отзовик)
   ═══════════════════════════════════════ */
.multifield-block {
    margin-bottom: 16px;
}
.multifield-block:last-child {
    margin-bottom: 0;
}
.multifield-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}
.multifield-label {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    letter-spacing: 0.01em;
}
.btn-copy-field {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    font-weight: 500;
    color: #6D28D9;
    background: none;
    border: 1px solid #DDD6FE;
    border-radius: 8px;
    padding: 4px 10px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.btn-copy-field:hover {
    background: #F5F3FF;
}
.multifield-textarea {
    width: 100%;
    resize: vertical;
    min-height: 72px;
}

/* Promo banner — шаг 1 */
.promo-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, #F5F3FF 0%, #EFF6FF 100%);
    border: 1.5px solid #DDD6FE;
    border-radius: 14px;
    padding: 14px 16px;
    margin-bottom: 16px;
}
.promo-banner-icon { font-size: 22px; flex-shrink: 0; }
.promo-banner-body { display: flex; flex-direction: column; gap: 2px; }
.promo-banner-desc { font-size: 13px; color: #374151; }
.promo-banner-label { font-size: 14px; color: #6D28D9; font-weight: 500; }

/* Promo reminder — шаг 4 */
.promo-reminder {
    margin-top: 10px;
    font-size: 13px;
    color: #6B7280;
    text-align: center;
    line-height: 1.4;
}
.promo-reminder strong { color: #374151; }

/* Attachment notice — шаг 3 */
.attachment-notice {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #FFFBEB;
    border: 1.5px solid #FDE68A;
    border-radius: 14px;
    padding: 14px 16px;
    margin-bottom: 16px;
}
.attachment-notice-icon { font-size: 20px; flex-shrink: 0; }
.attachment-notice-body { display: flex; flex-direction: column; gap: 4px; }
.attachment-notice-text { font-size: 13px; color: #374151; font-weight: 500; }
.attachment-notice-link {
    font-size: 13px;
    color: #D97706;
    font-weight: 600;
    text-decoration: none;
}
.attachment-notice-link:hover { text-decoration: underline; }

/* ── Review flow: grid background + corner logo ── */
.review-container {
    background:
        linear-gradient(rgba(109, 40, 217, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(109, 40, 217, 0.035) 1px, transparent 1px),
        radial-gradient(ellipse at 15% 0%, rgba(109,40,217,0.07), transparent 55%),
        radial-gradient(ellipse at 85% 100%, rgba(5,150,105,0.05), transparent 55%),
        linear-gradient(180deg, #f8f7ff 0%, #f2f0fb 100%);
    background-size: 64px 64px, 64px 64px, auto, auto, auto;
}

.flow-corner-logo {
    position: fixed;
    top: 22px;
    left: 26px;
    display: flex;
    align-items: center;
    gap: 9px;
    text-decoration: none;
    z-index: 100;
}

.flow-corner-mark {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: linear-gradient(130deg, #6d28d9, #0284c7);
    display: grid;
    place-items: center;
    font-size: 11px;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.02em;
    box-shadow: 0 2px 8px rgba(109,40,217,0.25);
    font-family: "Bricolage Grotesque", "Manrope", sans-serif;
}

.flow-corner-name {
    font-size: 14px;
    font-weight: 700;
    color: #0f0a1e;
    letter-spacing: -0.02em;
    font-family: "Manrope", sans-serif;
}

@media (max-width: 480px) {
    .flow-corner-logo { display: none; }
}

/* ═══════════════════════════════════════
   Mobile-first polish — review flow
   ═══════════════════════════════════════ */

/* "Показать все" — заметная кнопка вместо ссылки */
.chip-show-all {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 2px;
    padding: 6px 14px;
    border-radius: 100px;
    border: 1.5px dashed var(--border-color);
    background: transparent;
    color: var(--text-secondary);
    font-size: 13px;
    cursor: pointer;
    text-decoration: none;
    transition: border-color 0.15s, color 0.15s, background 0.15s;
    text-decoration: none;
}
.chip-show-all:hover {
    border-color: var(--violet);
    color: var(--violet);
    background: rgba(109,40,217,0.04);
}
.chip-show-all::before {
    content: '＋';
    font-size: 12px;
    opacity: 0.6;
}

/* Slot panel — полная ширина на мобильном */
@media (max-width: 600px) {
    .chip-slot-panel {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        padding: 8px 0 4px 0;
    }
    .chip-slot-input {
        font-size: 16px; /* prevent iOS zoom */
        min-height: 44px;
    }
    .chip-slot-ok {
        min-height: 44px;
        align-self: flex-end;
        padding: 10px 20px;
    }

    /* Sub-options — крупнее для тача */
    .chip-suboptions {
        gap: 8px;
        padding: 10px 0 6px 0;
    }
    .chip-sub-btn {
        min-height: 40px;
        padding: 8px 16px;
        font-size: 14px;
    }

    /* Chip group — меньше отступы */
    .chip-group {
        margin-bottom: 16px;
    }
    .chip-group-header {
        margin-bottom: 10px;
    }

    /* Chips container — чуть меньше gap */
    .chips-container {
        gap: 7px;
    }

    /* Service chip group — выделен */
    .chip-group--service .chips-container {
        gap: 7px;
    }

    /* Writer step title меньше */
    .step-title {
        font-size: 18px;
    }


    /* Chip counter badge */
    .chip-counter {
        font-size: 12px;
    }
}

/* ═══════════════════════════════════════
   Step Contact
   ═══════════════════════════════════════ */

.contact-input {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid #E5E7EB;
    border-radius: 12px;
    font-size: 15px;
    font-family: var(--font-sans);
    font-weight: 500;
    color: #111827;
    background: #fff;
    margin-bottom: 12px;
    transition: border-color .2s;
}
.contact-input:focus {
    border-color: #111827;
}

.contact-type-toggle {
    display: inline-flex;
    gap: 0;
    background: #F3F4F6;
    border-radius: 10px;
    padding: 3px;
    margin-bottom: 14px;
}
.contact-type-toggle .toggle-btn {
    padding: 7px 16px;
    font-size: 14px;
    font-weight: 600;
    font-family: var(--font-sans);
    border: none;
    background: transparent;
    color: var(--text-secondary);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}
.contact-type-toggle .toggle-btn.active {
    background: #fff;
    color: #111827;
    box-shadow: 0 1px 4px rgba(0,0,0,0.09);
}

.contact-consent-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 16px;
    cursor: pointer;
}
.contact-consent-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--accent-black);
}

.contact-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
}

.btn-text-link {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 14px;
    cursor: pointer;
    text-decoration: underline;
    padding: 4px;
    font-family: var(--font-sans);
}
.btn-text-link:hover {
    color: var(--text-primary);
}

.contact-promo-hint {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 14px;
    background: var(--gradient-green);
    border-radius: var(--radius-sm);
    font-size: 14px;
    margin-bottom: 16px;
}

.context-contact-block {
    margin-top: 8px;
}
.context-contact-divider {
    height: 1px;
    background: var(--border-color);
    margin: 16px 0;
}
.context-contact-heading {
    font-size: 14px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 14px;
}
