.placement-fields {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    column-gap: 1rem;
    row-gap: 1rem;
}

.placement-fields > .form-field,
.placement-fields > .form-field > div:first-child {
    display: contents;
}

.placement-fields > .form-field > div:first-child > label {
    align-self: center;
}

.placement-fields > .form-field > div:first-child > :last-child {
    max-width: none;
    width: 100%;
}

.placement-fields > .form-field > :not(:first-child) {
    grid-column: 2;
}

.campaign-launch-fullscreen .launch-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: .5rem 1.5rem;
    margin-bottom: 0;
    border-bottom: 1px solid var(--color-base-200);
}
.campaign-launch-fullscreen .launch-brand { display: flex; align-items: center; gap: .5rem; flex: 0 0 auto; }
.campaign-launch-fullscreen .launch-label { font-weight: 600; font-size: 1.125rem; white-space: nowrap; }
.campaign-launch-fullscreen .launch-progress { flex: 1 1 0; min-width: 0; }
.campaign-launch-fullscreen [data-launch-exit] { flex: 0 0 auto; white-space: nowrap; }
.campaign-launch-fullscreen #content > div { max-width: none; }
.dark .campaign-launch-fullscreen .launch-header { border-color: var(--color-base-700); }
@media (max-width: 640px) {
    .campaign-launch-fullscreen .launch-header { padding: .5rem 1rem; gap: .75rem; }
    .campaign-launch-fullscreen .launch-label { font-size: .875rem; }
}

/* The native component supplies segment sizing; these classes supply step states. */
.campaign-launch-fullscreen .launch-progress .launch-segment-complete { background-color: var(--color-primary-600); }
.campaign-launch-fullscreen .launch-progress .launch-segment-current { background-color: var(--color-primary-400); }
.campaign-launch-fullscreen .launch-progress .launch-segment-upcoming { background-color: var(--color-base-200); }
.campaign-launch-fullscreen .launch-progress [title] + [title] { border-left: 3px solid white; }
.dark .campaign-launch-fullscreen .launch-progress .launch-segment-upcoming { background-color: var(--color-base-700); }
.dark .campaign-launch-fullscreen .launch-progress [title] + [title] { border-color: var(--color-base-900); }

.campaign-launch-fullscreen .launch-info-bar {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem 2rem;
    padding: .625rem 1.5rem;
    margin-bottom: 0;
    border-bottom: 1px solid var(--color-base-200);
    background-color: var(--color-base-50);
}
.campaign-launch-fullscreen .launch-info-bar > span { overflow-wrap: anywhere; }
.campaign-launch-fullscreen .launch-info-label { color: var(--color-base-500); margin-right: .5rem; }
.campaign-launch-fullscreen .launch-info-bar strong { font-weight: 500; }
.dark .campaign-launch-fullscreen .launch-info-bar {
    background-color: var(--color-base-800);
    border-color: var(--color-base-700);
}
@media (max-width: 640px) {
    .campaign-launch-fullscreen .launch-info-bar { padding: .625rem 1rem; }
}

.visual-editor-help { color: var(--color-base-500); font-size: .8125rem; }
.visual-editor-layout { display: grid; grid-template-columns: minmax(300px, 2fr) minmax(0, 3fr); align-items: stretch; flex: 1 1 0; min-height: 0; }
.visual-editor-controls { min-width: 0; min-height: 0; overflow-y: auto; padding: 1.5rem; }
.visual-editor-controls [hidden] { display: none; }
.visual-preview-column { display: flex; flex-direction: column; min-height: 0; min-width: 0; background: var(--color-base-50); border-left: 1px solid var(--color-base-200); }
.visual-preview-column campaign-email-preview { display: block; flex: 1 1 0; min-height: 0; width: calc(100% - 3rem); overflow: auto; max-width: 680px; margin: 1.5rem auto 0; }
.visual-preview-template { display: flex; flex: 0 0 auto; align-items: center; gap: .75rem; width: 100%;
    margin: 0; padding: .75rem 1rem; text-align: left; border-bottom: 1px solid var(--color-base-200);
    background: white; }
.visual-preview-template > span:nth-child(2) { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.visual-preview-template-label { font-size: .75rem; color: var(--color-base-500); }
.visual-preview-template:hover, .visual-preview-template[aria-pressed="true"] { border-color: var(--color-primary-600); }
.dark .visual-preview-template { background: var(--color-base-900); border-color: var(--color-base-700); }
.visual-editor-help { margin-top: 1rem; }
.dark .visual-preview-column { background: var(--color-base-800); border-color: var(--color-base-700); }

/* The header and footer fit their contents; only the middle consumes free space. */
.campaign-launch-fullscreen { overflow: hidden; }
.launch-screen { height: 100vh; height: 100dvh; overflow: hidden; }
.launch-screen-main { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.launch-top, .launch-footer { flex: 0 0 auto; }
.launch-middle { flex: 1 1 0; min-height: 0; overflow-y: auto; padding: 1rem; }
.launch-footer { display: flex; justify-content: flex-end; align-items: center; flex-wrap: wrap; gap: .75rem;
    padding: 1rem 1.5rem; border-top: 1px solid var(--color-base-200); background: white; }
.launch-footer button, .launch-footer a { flex: 0 0 auto; }
.launch-action-group { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: .75rem; width: 100%; }
.launch-review-actions { justify-content: space-between; }
.launch-review-layout { display: grid; grid-template-columns: minmax(300px, 2fr) minmax(0, 3fr); flex: 1 1 0; min-height: 0; }
.launch-review-list { min-height: 0; overflow-y: auto; padding: 1.5rem; }
.launch-review-campaign { display: flex; flex-direction: column; gap: .5rem; width: 100%; text-align: left; padding: 1rem; margin-bottom: .75rem; border: 1px solid var(--color-base-200); border-radius: 8px; }
.launch-review-campaign strong { font-weight: 600; }
.launch-review-selection { display: flex; flex-direction: column; gap: .5rem; width: 100%; text-align: left; }
.launch-review-summary { display: flex; flex-direction: column; gap: .125rem; margin-top: .25rem; color: var(--color-base-500); }
.launch-review-selection span { color: var(--color-base-500); font-size: .875rem; }
.launch-review-card-actions { align-self: flex-end; margin-top: auto; }
.launch-review-campaign:has([aria-pressed="true"]) { border-color: var(--color-primary-600); background: var(--color-primary-50); }
.launch-review-preview { display: flex; min-width: 0; min-height: 0; padding: 1.5rem; border-left: 1px solid var(--color-base-200); background: var(--color-base-50); }
.launch-review-message { display: flex; flex-direction: column; width: 100%; max-width: 680px; margin: 0 auto; overflow: hidden; border: 1px solid var(--color-base-200); border-radius: 8px; background: white; color: #202124; }
.launch-review-message-header { padding: 1rem 1.25rem; border-bottom: 1px solid var(--color-base-200); overflow-wrap: anywhere; }
.launch-review-message-header h2 { font-weight: 600; }
.launch-review-audiences { display: flex; align-items: baseline; gap: 8px; padding-bottom: 14px; margin-bottom: 14px; border-bottom: 1px solid #e5e7eb; }
.launch-review-audience-label { flex-shrink: 0; color: #5f6368; font-size: 12px; }
.launch-review-audience-pills { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.launch-review-audience-pill { display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; border-radius: 999px;
    border: 1px solid #bfdbfe; background: #eff6ff; color: #1e40af; font-size: 12px; }
.launch-review-audience-pill.excluded { border-color: #d1d5db; background: #f3f4f6; color: #4b5563; }
.launch-review-audience-pill svg { width: 14px; height: 14px; flex-shrink: 0; }
.launch-review-audience-empty { color: #5f6368; font-size: 13px; }
.launch-review-message-header p { margin-top: .375rem; color: #5f6368; font-size: .8125rem; }
.launch-review-message iframe { flex: 1 1 0; min-height: 0; width: 100%; border: 0; background: white; }
.launch-review-message [hidden] { display: none; }
.dark .launch-review-campaign, .dark .launch-review-preview { border-color: var(--color-base-700); }
.dark .launch-review-preview { background: var(--color-base-800); }
.dark .launch-review-campaign:has([aria-pressed="true"]) { border-color: var(--color-primary-600); background: var(--color-base-800); }
.dark .launch-footer { background: var(--color-base-900); border-color: var(--color-base-700); }
.launch-add-campaign { align-self: flex-start; }
.launch-editor-screen .launch-middle { display: flex; flex-direction: column; overflow: hidden; padding: 0; }
.launch-editor-screen #content { display: flex; flex-direction: column; flex: 1 1 0; min-height: 0; }
#visual-editor-form { display: flex; flex-direction: column; flex: 1 1 0; min-height: 0; }
#visual-editor-form > .visual-editor-note { flex: 0 0 auto; margin: 0; padding: .75rem 1.5rem 0; }  /* follow-up 59 */
.visual-preview-column > .visual-editor-help { flex: 0 0 auto; padding: 0 1.5rem 1.5rem; }
@media (max-width: 900px) {
    .launch-editor-screen .launch-middle { overflow-y: auto; }
    .visual-editor-layout { flex: 0 0 auto; grid-template-columns: minmax(0, 1fr); }
    .visual-editor-controls { overflow: visible; }
    .visual-preview-column { height: 65dvh; }
    .launch-review-layout { flex: 0 0 auto; grid-template-columns: minmax(0, 1fr); }
    .launch-review-list { overflow: visible; }
    .launch-review-preview { height: 65dvh; }
    .visual-preview-column, .launch-review-preview { border-left: 0; border-top: 1px solid var(--color-base-200); }
}
@media (max-width: 640px) {
    .launch-footer { padding: .75rem 1rem; }
    .visual-editor-controls, .launch-review-list, .launch-review-preview { padding: 1rem; }
    .visual-preview-column campaign-email-preview { width: calc(100% - 2rem); margin-top: 1rem; }
    .visual-preview-column > .visual-editor-help { padding: 0 1rem 1rem; }
}
/* Both documents opt in; the head script skips every navigation except launch entry. */
@view-transition { navigation: auto; }

:root:active-view-transition-type(launch-enter)::view-transition-group(root) {
    animation-duration: 260ms;
}
:root:active-view-transition-type(launch-enter)::view-transition-old(root) {
    animation: launch-exit-fade 180ms ease-out both;
    mix-blend-mode: normal;
}
:root:active-view-transition-type(launch-enter)::view-transition-new(root) {
    animation: launch-enter-fade-scale 260ms cubic-bezier(.2, .8, .2, 1) both;
    mix-blend-mode: normal;
}
@keyframes launch-exit-fade { to { opacity: 0; } }
@keyframes launch-enter-fade-scale {
    from { opacity: 0; transform: scale(.98); }
    to { opacity: 1; transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) {
    @view-transition { navigation: none; }
}
