/**
 * Contentosapp Studio Brand Voice — Wizard styles.
 *
 * @since 3.2.0
 */

#fos-modal-brand-voice.fos-voice-modal {
    align-items: center;
    justify-content: center;
}

#fos-modal-brand-voice .fos-voice-modal__box {
    width: min(1180px, calc(100vw - 16px));
    max-width: none;
    height: min(760px, calc(100vh - 32px));
    display: grid;
    grid-template-rows: auto 1fr auto;
    border-radius: 14px;
    overflow: hidden;
}

.fos-voice-modal__header {
    min-height: 76px;
    padding: 16px 22px;
    background: #fff;
}

.fos-voice-modal__brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.fos-voice-modal__icon {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    color: #6b7280;
    background: #f6f3ff;
    border: 1px solid #dcd4ff;
    border-radius: 10px;
}

.fos-voice-modal__icon.dashicons {
    width: 36px;
    height: 36px;
    font-size: 16px;
    line-height: 36px;
}

.fos-voice-modal__title-row {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.fos-voice-modal__title-row .fos-modal__title {
    margin: 0;
    line-height: 1.2;
}

.fos-voice-site-pill {
    min-height: 21px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    max-width: 180px;
    padding: 3px 9px;
    border-radius: 7px;
    border: 1px solid var(--fos-primary-border, rgba(108, 71, 255, 0.22));
    background: var(--fos-primary-light, #EAE6FF);
    color: var(--fos-primary, #6C47FF);
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fos-voice-site-pill:empty {
    display: none;
}

.fos-voice-site-pill::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    flex-shrink: 0;
}

.fos-voice-modal__subtitle {
    margin: 3px 0 0;
    color: var(--fos-text-dim, #6b7280);
    font-size: 13px;
}

.fos-voice-modal__header-actions {
    display: inline-flex;
    align-items: center;
    gap: 14px;
}

.fos-voice-plan-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-width: auto;
    min-height: auto;
    padding: 3px 9px;
    border: 1px solid rgba(108, 71, 255, 0.35);
    border-radius: 5px;
    background: var(--fos-primary-light, #EAE6FF);
    color: var(--fos-primary, #6C47FF);
    font-size: 10px;
    font-weight: 700;
    line-height: 1.5;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    white-space: nowrap;
}

.fos-voice-modal__close {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border-radius: 7px;
}

.fos-voice-modal__close .dashicons {
    width: 18px;
    height: 18px;
    font-size: 18px;
}

.fos-voice-modal__body {
    display: grid;
    grid-template-columns: 246px minmax(0, 1fr);
    padding: 0;
    min-height: 0;
    background: #fff;
}

.fos-voice-sidebar {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 20px 16px;
    background: var(--fos-bg-soft, #f8fafc);
    border-right: 1px solid var(--fos-border, #e5e7eb);
}

.fos-voice-sidebar__label,
.fos-voice-section__label,
.fos-voice-impact-card__label,
.fos-voice-dna-card__label {
    margin: 0 0 12px;
    color: var(--fos-text-dim, #6b7280);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.fos-voice-steps {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.fos-voice-steps__item {
    position: relative;
}

.fos-voice-steps__item:not(:last-child)::after {
    display: none;
}

.fos-voice-step-nav {
    width: 100%;
    min-height: 56px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border: 1px solid transparent;
    border-radius: 9px;
    background: transparent;
    color: var(--fos-text-dim, #6b7280);
    cursor: pointer;
    text-align: left;
    transition: background 0.14s, border-color 0.14s, box-shadow 0.14s, color 0.14s;
}

.fos-voice-step-nav:hover,
.fos-voice-step-nav.is-active {
    background: #fff;
    border-color: var(--fos-primary-border, rgba(108, 71, 255, 0.22));
    box-shadow: 0 4px 12px rgba(17, 24, 39, 0.05);
    color: var(--fos-text, #1d2327);
}

.fos-voice-step-nav__icon {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    border-radius: 8px;
    background: #fff;
    border: 1px solid #e7eaf0;
    color: #7b8798;
}

.fos-voice-step-nav__icon.dashicons {
    width: 28px;
    height: 28px;
    font-size: 16px;
    line-height: 28px;
}

.fos-voice-step-nav.is-active .fos-voice-step-nav__icon {
    background: #f6f3ff;
    border-color: #d7ccff;
}

.fos-voice-step-nav.is-complete .fos-voice-step-nav__icon {
    background: var(--fos-primary, #6C47FF);
    border-color: var(--fos-primary, #6C47FF);
    color: #fff;
}

.fos-voice-steps__item:nth-child(1) .fos-voice-step-nav:not(.is-complete) .fos-voice-step-nav__icon {
    color: #ec4899;
}

.fos-voice-steps__item:nth-child(2) .fos-voice-step-nav:not(.is-complete) .fos-voice-step-nav__icon {
    color: #64748b;
}

.fos-voice-steps__item:nth-child(3) .fos-voice-step-nav:not(.is-complete) .fos-voice-step-nav__icon {
    color: #22c55e;
}

.fos-voice-steps__item:nth-child(4) .fos-voice-step-nav:not(.is-complete) .fos-voice-step-nav__icon {
    color: #f59e0b;
}

.fos-voice-step-nav.is-complete .fos-voice-step-nav__icon::before {
    content: "\f147";
}

.fos-voice-step-nav__text {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}

.fos-voice-step-nav__text strong {
    color: var(--fos-text, #1d2327);
    font-size: 13px;
    line-height: 1.2;
}

.fos-voice-step-nav__text small {
    color: var(--fos-text-dim, #6b7280);
    font-size: 11px;
    line-height: 1.25;
}

.fos-voice-progress-card {
    margin-top: auto;
    padding: 14px;
    border-radius: 9px;
    border: 1px solid #e5eaf1;
    background: #fff;
}

.fos-voice-progress-card__title {
    margin: 0 0 10px;
    color: var(--fos-text-dim, #6b7280);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.fos-voice-progress-card dl,
.fos-voice-review-list {
    margin: 0;
}

.fos-voice-progress-card dl div,
.fos-voice-review-list div {
    display: grid;
    grid-template-columns: 68px 1fr;
    gap: 8px;
    align-items: baseline;
    margin-top: 7px;
}

.fos-voice-progress-card dt,
.fos-voice-review-list dt {
    color: var(--fos-text-dim, #6b7280);
    font-size: 11px;
    font-weight: 700;
}

.fos-voice-progress-card dd,
.fos-voice-review-list dd {
    margin: 0;
    min-width: 0;
    color: var(--fos-text, #1d2327);
    font-size: 12px;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.fos-voice-main {
    min-width: 0;
    min-height: 0;
    overflow: auto;
}

.fos-voice-step-panel {
    display: none;
}

.fos-voice-step-panel.is-active {
    display: block;
}

.fos-voice-step-heading {
    padding: 20px 24px 16px;
    border-bottom: 1px solid var(--fos-border, #e5e7eb);
}

.fos-voice-step-heading__eyebrow {
    margin: 0 0 3px;
    color: var(--fos-primary, #6C47FF);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.fos-voice-step-heading h3 {
    margin: 0;
    color: var(--fos-text, #1d2327);
    font-size: 21px;
    line-height: 1.18;
}

.fos-voice-step-heading p:not(.fos-voice-step-heading__eyebrow) {
    max-width: 720px;
    margin: 6px 0 0;
    color: var(--fos-text-dim, #6b7280);
    font-size: 13px;
    line-height: 1.45;
}

.fos-voice-section,
.fos-voice-form-grid,
.fos-voice-tone-layout,
.fos-voice-vocab-layout,
.fos-voice-review-layout {
    padding: 22px 24px;
}

.fos-voice-preset-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
}

.fos-voice-preset-card {
    min-height: 72px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 16px;
    border: 1px solid #e5eaf1;
    border-radius: 9px;
    background: #fff;
    color: var(--fos-text, #1d2327);
    cursor: pointer;
    text-align: left;
    transition: border-color 0.14s, background 0.14s, box-shadow 0.14s;
}

.fos-voice-preset-card:hover,
.fos-voice-preset-card.is-active {
    border-color: #dcd4ff;
    background: var(--fos-primary-faint, rgba(108, 71, 255, 0.06));
    box-shadow: 0 4px 12px rgba(108, 71, 255, 0.08);
}

.fos-voice-preset-card__icon {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    color: #7b8798;
}

.fos-voice-preset-card[data-preset="professional"] .fos-voice-preset-card__icon {
    color: #8a4b2a;
}

.fos-voice-preset-card[data-preset="conversational"] .fos-voice-preset-card__icon {
    color: #8b5a44;
}

.fos-voice-preset-card[data-preset="academic"] .fos-voice-preset-card__icon {
    color: #312e81;
}

.fos-voice-preset-card[data-preset="journalistic"] .fos-voice-preset-card__icon {
    color: #9b8fa8;
}

.fos-voice-preset-card strong,
.fos-voice-vocab-card h4,
.fos-voice-review-card h4,
.fos-voice-preview-card h4 {
    display: block;
    margin: 0;
    color: var(--fos-text, #1d2327);
    font-size: 14px;
    line-height: 1.25;
}

.fos-voice-preset-card small {
    display: block;
    margin-top: 2px;
    color: var(--fos-text-dim, #6b7280);
    font-size: 12px;
    line-height: 1.3;
}

.fos-voice-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 10px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--fos-text-dim, #6b7280);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.fos-voice-link-btn:hover {
    color: var(--fos-primary, #6C47FF);
}

.fos-voice-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    padding-top: 0;
}

.fos-voice-field {
    min-width: 0;
}

.fos-voice-field--full {
    grid-column: 1 / -1;
}

.fos-voice-field label {
    display: block;
    margin-bottom: 7px;
    color: var(--fos-text, #1d2327);
    font-size: 13px;
    font-weight: 700;
}

.fos-voice-field p {
    margin: 6px 0 0;
    color: var(--fos-text-dim, #6b7280);
    font-size: 12px;
}

.fos-voice-required {
    color: var(--fos-danger, #dc2626);
}

.fos-voice-input {
    width: 100%;
    max-width: 100%;
    min-height: 38px;
    padding: 8px 12px;
    border: 1px solid var(--fos-border-input, #d1d5db);
    border-radius: 8px;
    background: #fff;
    color: var(--fos-text, #1d2327);
    font-size: 13px;
    line-height: 1.45;
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.14s, box-shadow 0.14s, background 0.14s;
}

#fos-modal-brand-voice .fos-voice-input {
    border-color: #e1e7ef !important;
    border-radius: 8px !important;
    box-shadow: none !important;
    outline: none !important;
}

textarea.fos-voice-input {
    min-height: 76px;
    resize: vertical;
}

.fos-voice-input:focus {
    border-color: var(--fos-primary, #6C47FF) !important;
    box-shadow: 0 0 0 3px var(--fos-primary-faint, rgba(108, 71, 255, 0.08)) !important;
}

.fos-voice-input.is-invalid {
    border-color: var(--fos-danger, #dc2626);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.08);
}

.fos-voice-switch-row {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
}

.fos-voice-switch {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: var(--fos-text, #1d2327);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.fos-voice-tone-layout,
.fos-voice-vocab-layout,
.fos-voice-review-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 268px;
    gap: 22px;
    align-items: start;
}

.fos-voice-tone-controls {
    display: flex;
    flex-direction: column;
    gap: 21px;
}

.fos-voice-slider-group {
    min-width: 0;
}

.fos-voice-slider-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.fos-voice-slider-label {
    color: var(--fos-text, #1d2327);
    font-size: 13px;
    font-weight: 800;
}

.fos-voice-slider-scale {
    color: var(--fos-text-dim, #6b7280);
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
}

.fos-voice-slider-wrap {
    position: relative;
    padding-right: 0;
}

.fos-voice-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 7px;
    border-radius: 999px;
    outline: none;
    cursor: pointer;
}

.fos-voice-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: transparent;
    border: 0;
    box-shadow: none;
}

.fos-voice-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: transparent;
    border: 0;
    box-shadow: none;
}

.fos-voice-slider-value {
    position: absolute;
    top: 50%;
    left: calc(var(--range-value, 50) * 1%);
    transform: translate(-50%, -50%);
    min-width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--fos-primary, #6C47FF);
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    pointer-events: none;
}

.fos-voice-slider-anchors {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 10px;
    color: var(--fos-text-dim, #6b7280);
    font-size: 11px;
    font-weight: 600;
}

.fos-voice-slider-anchors span:nth-child(2) {
    text-align: center;
}

.fos-voice-slider-anchors span:nth-child(3) {
    text-align: right;
}

.fos-voice-slider-desc {
    margin: 5px 0 0;
    color: var(--fos-primary, #6C47FF);
    font-size: 12px;
    font-weight: 800;
}

.fos-voice-dna-card,
.fos-voice-impact-card,
.fos-voice-preview-card {
    border: 1px solid var(--fos-primary-border, rgba(108, 71, 255, 0.22));
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(108, 71, 255, 0.045), #fff);
}

.fos-voice-dna-card,
.fos-voice-impact-card {
    padding: 16px;
}

.fos-voice-radar {
    width: 100%;
    max-width: 220px;
    margin: 0 auto;
}

.fos-voice-radar svg {
    width: 100%;
    height: auto;
    display: block;
}

.fos-voice-radar__grid polygon,
.fos-voice-radar__grid line {
    fill: none;
    stroke: #e5e7eb;
    stroke-width: 1;
}

.fos-voice-radar__area {
    fill: rgba(108, 71, 255, 0.18);
    stroke: none;
}

.fos-voice-radar__line {
    fill: none;
    stroke: var(--fos-primary, #6C47FF);
    stroke-width: 2.4;
}

.fos-voice-radar__dots circle {
    fill: var(--fos-primary, #6C47FF);
    stroke: #fff;
    stroke-width: 2;
}

.fos-voice-radar__labels text {
    fill: var(--fos-text-dim, #6b7280);
    font-size: 9px;
    font-weight: 700;
    text-anchor: middle;
    dominant-baseline: middle;
}

.fos-voice-dna-card blockquote {
    margin: 14px 0 0;
    padding: 14px;
    border: 1px solid var(--fos-border, #e5e7eb);
    border-radius: 8px;
    background: #fff;
    color: var(--fos-text-sub, #4b5563);
    font-size: 12px;
    font-style: italic;
    line-height: 1.55;
}

.fos-voice-dna-card__hint {
    margin: 8px 0 0;
    color: var(--fos-text-dim, #6b7280);
    font-size: 10px;
    font-weight: 700;
}

.fos-voice-vocab-stack {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.fos-voice-vocab-card,
.fos-voice-pack-row,
.fos-voice-review-card {
    border: 1px solid var(--fos-border, #e5e7eb);
    border-radius: 10px;
    background: #fff;
}

.fos-voice-vocab-card {
    padding: 16px;
}

.fos-voice-vocab-card__header {
    display: flex;
    gap: 11px;
    align-items: flex-start;
    margin-bottom: 13px;
}

.fos-voice-vocab-card__icon {
    width: 27px;
    height: 27px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    border-radius: 8px;
    border: 1px solid var(--fos-primary-border, rgba(108, 71, 255, 0.22));
    background: var(--fos-primary-faint, rgba(108, 71, 255, 0.06));
    color: var(--fos-primary, #6C47FF);
}

.fos-voice-vocab-card--avoid .fos-voice-vocab-card__icon {
    border-color: rgba(220, 38, 38, 0.2);
    background: rgba(220, 38, 38, 0.06);
    color: var(--fos-danger, #dc2626);
}

.fos-voice-vocab-card--signatures .fos-voice-vocab-card__icon {
    border-color: rgba(217, 119, 6, 0.22);
    background: rgba(217, 119, 6, 0.08);
    color: #d97706;
}

.fos-voice-vocab-card--replacements .fos-voice-vocab-card__icon {
    border-color: rgba(59, 130, 246, 0.22);
    background: rgba(59, 130, 246, 0.08);
    color: #2563eb;
}

.fos-voice-vocab-card--rules .fos-voice-vocab-card__icon {
    border-color: rgba(5, 150, 105, 0.22);
    background: rgba(5, 150, 105, 0.08);
    color: var(--fos-success, #059669);
}

.fos-voice-vocab-card h4 {
    display: flex;
    align-items: center;
    gap: 8px;
}

.fos-voice-vocab-card p {
    margin: 3px 0 0;
    color: var(--fos-text-dim, #6b7280);
    font-size: 12px;
    line-height: 1.4;
}

.fos-voice-count-pill {
    display: inline-flex;
    align-items: center;
    min-height: 20px;
    padding: 3px 8px;
    border-radius: 999px;
    background: var(--fos-primary-light, #EAE6FF);
    color: var(--fos-primary, #6C47FF);
    font-size: 11px;
    font-weight: 800;
}

.fos-voice-vocab-card--avoid .fos-voice-count-pill {
    background: #fee2e2;
    color: #dc2626;
}

.fos-voice-vocab-card--signatures .fos-voice-count-pill {
    background: #ffedd5;
    color: #c2410c;
}

.fos-voice-vocab-card--replacements .fos-voice-count-pill {
    background: #dbeafe;
    color: #2563eb;
}

.fos-voice-vocab-card--rules .fos-voice-count-pill {
    background: #dcfce7;
    color: #047857;
}

.fos-chip-input-container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    min-height: 58px;
    padding: 9px;
    border: 1px solid var(--fos-border-input, #d1d5db);
    border-radius: 8px;
    background: #fff;
}

.fos-chip-input-container:focus-within {
    border-color: var(--fos-primary, #6C47FF);
    box-shadow: 0 0 0 3px var(--fos-primary-faint, rgba(108, 71, 255, 0.08));
}

.fos-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 100%;
    padding: 5px 9px;
    border-radius: 999px;
    border: 1px solid var(--fos-primary-border, rgba(108, 71, 255, 0.22));
    background: var(--fos-primary-light, #EAE6FF);
    color: var(--fos-primary, #6C47FF);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
}

.fos-chip--avoid {
    border-color: rgba(220, 38, 38, 0.22);
    background: #fef2f2;
    color: #dc2626;
}

.fos-chip--signatures {
    border-color: rgba(217, 119, 6, 0.24);
    background: #fff7ed;
    color: #c2410c;
}

.fos-chip--dos {
    border-color: rgba(5, 150, 105, 0.24);
    background: #ecfdf5;
    color: #047857;
}

.fos-chip--donts {
    border-color: rgba(220, 38, 38, 0.22);
    background: #fef2f2;
    color: #dc2626;
}

.fos-chip-remove {
    width: 15px;
    height: 15px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: currentColor;
    font-size: 14px;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
}

.fos-chip-input {
    flex: 1;
    min-width: 140px;
    height: 28px;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    outline: none !important;
    padding: 0 !important;
    margin: 0 !important;
    color: var(--fos-text, #1d2327);
    font-size: 13px;
}

.fos-voice-suggestions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-top: 9px;
}

.fos-voice-suggestions span {
    color: var(--fos-text-dim, #6b7280);
    font-size: 11px;
    font-weight: 700;
}

.fos-voice-suggestion,
.fos-voice-pack-btn,
.fos-voice-edit-step,
.fos-voice-delete-btn,
.fos-voice-preview-btn {
    border: 1px solid var(--fos-border, #e5e7eb);
    background: #fff;
    color: var(--fos-text-sub, #4b5563);
    cursor: pointer;
    transition: border-color 0.14s, background 0.14s, color 0.14s, box-shadow 0.14s;
}

.fos-voice-suggestion {
    min-height: 23px;
    padding: 2px 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
}

.fos-voice-suggestion:hover,
.fos-voice-pack-btn:hover,
.fos-voice-edit-step:hover,
.fos-voice-preview-btn:hover {
    border-color: var(--fos-primary-border, rgba(108, 71, 255, 0.28));
    color: var(--fos-primary, #6C47FF);
    background: var(--fos-primary-faint, rgba(108, 71, 255, 0.06));
}

.fos-voice-pack-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 13px 16px;
}

.fos-voice-replacements-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 10px;
}

.fos-voice-replacements-empty {
    padding: 10px 12px;
    border: 1px dashed var(--fos-border, #e5e7eb);
    border-radius: 8px;
    color: var(--fos-text-dim, #6b7280);
    font-size: 12px;
}

.fos-voice-replacement-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 20px minmax(0, 1fr) 24px;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border: 1px solid var(--fos-border, #e5e7eb);
    border-radius: 8px;
    background: var(--fos-bg-soft, #f8fafc);
}

.fos-voice-replacement-item__from,
.fos-voice-replacement-item__to {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px;
    font-weight: 700;
}

.fos-voice-replacement-item__from {
    color: var(--fos-danger, #dc2626);
}

.fos-voice-replacement-item__to {
    color: var(--fos-primary, #6C47FF);
}

.fos-voice-replacement-item .dashicons {
    width: 18px;
    height: 18px;
    color: var(--fos-text-dim, #6b7280);
    font-size: 18px;
}

.fos-voice-replacement-remove {
    width: 22px;
    height: 22px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--fos-text-dim, #6b7280);
    cursor: pointer;
    font-size: 17px;
    font-weight: 800;
    line-height: 1;
}

.fos-voice-replacement-remove:hover {
    color: var(--fos-danger, #dc2626);
    background: #fef2f2;
}

.fos-voice-replacement-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 18px minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
}

.fos-voice-replacement-form > span {
    color: var(--fos-text-dim, #6b7280);
    font-weight: 800;
    text-align: center;
}

.fos-voice-mini-btn {
    min-height: 38px;
    padding: 7px 11px;
    border: 1px solid var(--fos-border, #e5e7eb);
    border-radius: 8px;
    background: #fff;
    color: var(--fos-primary, #6C47FF);
    cursor: pointer;
    font-size: 12px;
    font-weight: 800;
}

.fos-voice-mini-btn:hover {
    border-color: var(--fos-primary-border, rgba(108, 71, 255, 0.28));
    background: var(--fos-primary-faint, rgba(108, 71, 255, 0.06));
}

.fos-voice-rules-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.fos-voice-rules-grid label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    color: var(--fos-text, #1d2327);
    font-size: 12px;
    font-weight: 800;
}

.fos-voice-pack-row strong {
    display: block;
    color: var(--fos-text, #1d2327);
    font-size: 12px;
    text-transform: uppercase;
}

.fos-voice-pack-row small {
    display: block;
    margin-top: 2px;
    color: var(--fos-text-dim, #6b7280);
    font-size: 11px;
}

.fos-voice-pack-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    justify-content: flex-end;
}

.fos-voice-pack-btn {
    min-height: 30px;
    padding: 5px 10px;
    border-radius: 7px;
    font-size: 12px;
    font-weight: 800;
}

.fos-voice-impact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.fos-voice-impact-grid div {
    min-height: 58px;
    padding: 10px;
    border: 1px solid var(--fos-border, #e5e7eb);
    border-radius: 8px;
    background: #fff;
}

.fos-voice-impact-grid span {
    display: block;
    color: var(--fos-text-dim, #6b7280);
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
}

.fos-voice-impact-grid strong {
    display: block;
    margin-top: 2px;
    color: var(--fos-text, #1d2327);
    font-size: 22px;
    line-height: 1;
}

.fos-voice-impact-grid .is-preferred {
    border-color: var(--fos-primary-border, rgba(108, 71, 255, 0.22));
    background: var(--fos-primary-faint, rgba(108, 71, 255, 0.06));
}

.fos-voice-impact-grid .is-preferred strong,
.fos-voice-impact-grid .is-preferred span {
    color: var(--fos-primary, #6C47FF);
}

.fos-voice-impact-grid .is-avoid {
    border-color: rgba(220, 38, 38, 0.22);
    background: #fef2f2;
}

.fos-voice-impact-grid .is-avoid strong,
.fos-voice-impact-grid .is-avoid span {
    color: #dc2626;
}

.fos-voice-impact-grid .is-signature {
    border-color: rgba(217, 119, 6, 0.22);
    background: #fff7ed;
}

.fos-voice-impact-grid .is-signature strong,
.fos-voice-impact-grid .is-signature span {
    color: #c2410c;
}

.fos-voice-prompt-snippet {
    margin-top: 12px;
    padding: 13px;
    border-radius: 9px;
    background: #111827;
    color: #e5e7eb;
}

.fos-voice-prompt-snippet span {
    display: block;
    margin-bottom: 8px;
    color: #9ca3af;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
}

.fos-voice-prompt-snippet code {
    display: block;
    color: #e5e7eb;
    font-size: 11px;
    line-height: 1.6;
    white-space: normal;
}

.fos-voice-conflict-status {
    display: flex;
    gap: 9px;
    align-items: flex-start;
    margin-top: 12px;
    padding: 12px;
    border: 1px solid var(--fos-border, #e5e7eb);
    border-radius: 8px;
    background: #fff;
}

.fos-voice-conflict-status .dashicons {
    color: var(--fos-success, #059669);
}

.fos-voice-conflict-status.is-error .dashicons {
    color: var(--fos-danger, #dc2626);
}

.fos-voice-conflict-status p {
    margin: 0;
    color: var(--fos-text-sub, #4b5563);
    font-size: 12px;
    line-height: 1.4;
}

.fos-voice-review-layout {
    grid-template-columns: minmax(0, 1fr) minmax(300px, 342px);
}

.fos-voice-review-card {
    overflow: hidden;
}

.fos-voice-review-card__header,
.fos-voice-preview-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--fos-border, #e5e7eb);
    background: #fff;
}

.fos-voice-review-card__header h4,
.fos-voice-preview-card__header h4 {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.fos-voice-preview-card__header h4 {
    color: var(--fos-primary, #6C47FF);
}

.fos-voice-preview-card__header span {
    color: var(--fos-text-dim, #6b7280);
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.fos-voice-edit-step {
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--fos-primary, #6C47FF);
    font-size: 12px;
    font-weight: 800;
}

.fos-voice-review-list {
    padding: 16px;
}

.fos-voice-review-list div {
    grid-template-columns: 112px 1fr;
    align-items: start;
    margin-top: 10px;
}

.fos-voice-review-list dt {
    text-transform: uppercase;
}

.fos-voice-review-list dd {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.35;
}

.fos-voice-samples-section {
    padding: 0 16px 16px;
}

.fos-voice-samples-section__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding-top: 14px;
    border-top: 1px solid var(--fos-border, #e5e7eb);
}

.fos-voice-samples-section h5 {
    margin: 0;
    color: var(--fos-text, #1d2327);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.fos-voice-samples-section p {
    margin: 4px 0 0;
    color: var(--fos-text-dim, #6b7280);
    font-size: 12px;
    line-height: 1.35;
}

.fos-voice-samples-count {
    flex: 0 0 auto;
    min-width: 34px;
    padding: 3px 8px;
    border: 1px solid var(--fos-primary-border, rgba(108, 71, 255, 0.22));
    border-radius: 999px;
    background: var(--fos-primary-faint, rgba(108, 71, 255, 0.06));
    color: var(--fos-primary, #6C47FF);
    font-size: 11px;
    font-weight: 800;
    text-align: center;
}

.fos-voice-samples-grid {
    display: grid;
    gap: 10px;
    margin-top: 12px;
}

.fos-voice-sample-field {
    display: grid;
    gap: 6px;
}

.fos-voice-sample-field span {
    color: var(--fos-text-dim, #6b7280);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.fos-voice-sample-input {
    min-height: 74px;
    line-height: 1.45;
    resize: vertical;
}

.fos-voice-review-radar {
    margin: 0 16px 16px;
    padding: 14px;
    border: 1px solid var(--fos-border, #e5e7eb);
    border-radius: 9px;
    background: var(--fos-bg-soft, #f8fafc);
}

.fos-voice-review-radar p {
    margin: 0 0 8px;
    color: var(--fos-text-dim, #6b7280);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.fos-voice-radar--compact {
    max-width: 190px;
}

.fos-voice-preview-card {
    display: flex;
    flex-direction: column;
    min-height: 430px;
    overflow: hidden;
}

.fos-voice-preview-content {
    flex: 1;
    min-height: 280px;
    padding: 20px 18px;
    color: var(--fos-text-sub, #4b5563);
    font-size: 14px;
    line-height: 1.65;
    white-space: pre-line;
    overflow: auto;
    background: #fff;
}

.fos-voice-preview-empty,
.fos-voice-preview-loading {
    min-height: 220px;
    display: grid;
    place-items: center;
    text-align: center;
    color: var(--fos-text-dim, #6b7280);
    font-size: 13px;
    font-style: italic;
}

.fos-voice-preview-loading {
    align-content: center;
    gap: 8px;
}

.fos-voice-preview-error {
    color: var(--fos-danger, #dc2626);
    font-weight: 700;
}

.fos-voice-preview-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 40px;
    margin: 0 16px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 800;
}

.fos-voice-preview-btn:disabled,
.fos-voice-modal__footer button:disabled {
    cursor: not-allowed;
    opacity: 0.65;
}

.fos-voice-modal__footer {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    min-height: 66px;
    padding: 14px 22px;
    background: #fff;
}

.fos-voice-modal__footer-left,
.fos-voice-modal__footer-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.fos-voice-modal__footer-right {
    margin-left: auto;
}

.fos-voice-modal__footer .cts-btn {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 800;
}

.fos-voice-modal__footer .fos-modal__close.cts-btn--ghost {
    appearance: none;
    min-width: auto;
    min-height: 38px;
    padding: 0 4px;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--fos-text-sub, #4b5563);
    box-shadow: none;
    line-height: 1;
    text-decoration: none;
}

.fos-voice-modal__footer .fos-modal__close.cts-btn--ghost:hover,
.fos-voice-modal__footer .fos-modal__close.cts-btn--ghost:focus {
    border: 0;
    background: transparent;
    color: var(--fos-primary, #6C47FF);
    box-shadow: none;
    outline: none;
    text-decoration: none;
}

#fos-voice-prev-btn.cts-btn--ghost {
    padding: 0 16px;
    border: 1px solid var(--fos-border, #e5e7eb);
    background: #fff;
    color: var(--fos-text-sub, #4b5563);
}

#fos-voice-prev-btn.cts-btn--ghost:hover,
#fos-voice-prev-btn.cts-btn--ghost:focus {
    border-color: var(--fos-primary-border, rgba(108, 71, 255, 0.28));
    background: var(--fos-primary-faint, rgba(108, 71, 255, 0.06));
    color: var(--fos-primary, #6C47FF);
    box-shadow: none;
}

.fos-voice-delete-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 34px;
    padding: 6px 10px;
    border-radius: 7px;
    color: var(--fos-danger, #dc2626);
    font-size: 12px;
    font-weight: 800;
}

.fos-voice-delete-btn:hover {
    border-color: rgba(220, 38, 38, 0.28);
    background: #fef2f2;
}

.fos-spin {
    animation: fos-voice-spin 0.8s linear infinite;
}

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

@media (max-width: 900px) {
    #fos-modal-brand-voice .fos-voice-modal__box {
        height: min(860px, calc(100vh - 20px));
        width: calc(100vw - 20px);
    }

    .fos-voice-modal__body {
        grid-template-columns: 1fr;
    }

    .fos-voice-sidebar {
        padding: 12px 14px;
        border-right: 0;
        border-bottom: 1px solid var(--fos-border, #e5e7eb);
    }

    .fos-voice-sidebar__label,
    .fos-voice-progress-card {
        display: none;
    }

    .fos-voice-steps {
        flex-direction: row;
        overflow: auto;
        padding-bottom: 2px;
    }

    .fos-voice-steps__item {
        min-width: 180px;
    }

    .fos-voice-steps__item::after {
        display: none;
    }

    .fos-voice-tone-layout,
    .fos-voice-vocab-layout,
    .fos-voice-review-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    #fos-modal-brand-voice .fos-voice-modal__box {
        height: calc(100vh - 12px);
        width: calc(100vw - 12px);
        margin: 6px;
        border-radius: 10px;
    }

    .fos-voice-modal__header {
        align-items: flex-start;
        padding: 14px;
    }

    .fos-voice-modal__title-row {
        align-items: flex-start;
        flex-direction: column;
        gap: 6px;
    }

    .fos-voice-plan-badge {
        display: none;
    }

    .fos-voice-step-heading,
    .fos-voice-section,
    .fos-voice-form-grid,
    .fos-voice-tone-layout,
    .fos-voice-vocab-layout,
    .fos-voice-review-layout {
        padding-left: 16px;
        padding-right: 16px;
    }

    .fos-voice-preset-grid,
    .fos-voice-form-grid,
    .fos-voice-impact-grid,
    .fos-voice-rules-grid,
    .fos-voice-replacement-form {
        grid-template-columns: 1fr;
    }

    .fos-voice-replacement-form > span {
        display: none;
    }

    .fos-voice-switch-row,
    .fos-voice-pack-row,
    .fos-voice-modal__footer {
        align-items: stretch;
        flex-direction: column;
    }

    .fos-voice-modal__footer-left,
    .fos-voice-modal__footer-right {
        width: 100%;
        justify-content: stretch;
    }

    .fos-voice-modal__footer-right {
        flex-wrap: wrap;
    }

    .fos-voice-modal__footer .cts-btn,
    .fos-voice-delete-btn {
        flex: 1 1 auto;
    }
}
