.et-ship-step.active,
.et-ship-step.is-active-step { font-weight: 600; }

.et-ship-export-theme-hint {
    font-size: 0.72rem;
    line-height: 1.4;
}

.et-export-layout-customize {
    border: 1px solid var(--et-border);
    border-radius: 10px;
    background: var(--et-bg-primary);
    padding: 0.65rem 0.85rem;
}

.et-export-layout-customize__toggle {
    cursor: pointer;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--et-text-primary);
    list-style: none;
}

.et-export-layout-customize__toggle::-webkit-details-marker {
    display: none;
}

.et-export-layout-customize__body {
    padding-top: 0.35rem;
}

.et-export-layout-check {
    font-size: 0.8125rem;
    color: var(--et-text-primary);
    cursor: pointer;
    user-select: none;
}

.export-action.is-exporting {
    pointer-events: none;
    opacity: 0.85;
}

.et-export-preview {
    border: 1px solid color-mix(in srgb, var(--et-border) 90%, rgba(255, 255, 255, 0.12));
    border-radius: 0;
    background: var(--et-bg-primary);
    overflow: hidden;
}

.et-export-preview__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.65rem 0.85rem;
    border-bottom: 1px solid var(--et-border);
    background: color-mix(in srgb, var(--et-bg-secondary) 70%, transparent);
}

.et-export-preview__title {
    margin: 0;
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1.3;
    color: var(--et-text-primary);
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.et-export-preview__title .et-dash-section-icon {
    font-size: 0.7rem;
    color: var(--et-accent-primary, #2dd4bf);
}

.et-export-preview__status {
    font-size: 0.72rem;
    white-space: nowrap;
    color: color-mix(in srgb, var(--et-text-primary) 72%, var(--et-text-muted));
}

.et-export-preview__mount {
    min-height: 16rem;
    max-height: 36rem;
    overflow: auto;
    background: #121218;
    padding: 1.25rem 1rem 1.35rem;
}

.et-export-preview__mount > p {
    color: var(--et-text-muted) !important;
}

.et-export-preview__iframe {
    display: block;
    width: 100%;
    min-height: 32rem;
    border: 0;
    background: #fff;
    border-radius: 2px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.et-ship-export-options .form-control {
    max-width: 100%;
}


.et-ship-platform-item__export {
    font-size: 0.7rem;
    line-height: 1.4;
    color: var(--et-accent-secondary);
}

.et-ship-platform-intro {
    font-size: 0.75rem;
    line-height: 1.45;
    color: var(--et-text-muted);
}

.et-ship-platform-item__steps {
    margin-top: 0.15rem;
}

.et-ship-platform-item__steps > summary {
    cursor: pointer;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--et-text-muted);
    list-style: none;
}

.et-ship-platform-item__steps > summary::-webkit-details-marker {
    display: none;
}

.et-ship-platform-item__steps-list {
    margin-top: 0.35rem;
    font-size: 0.72rem;
    line-height: 1.45;
    color: var(--et-text-muted);
}

.et-ship-platform-item__label {
    cursor: pointer;
}

.et-launch-kit-item,
.et-ship-platform-item {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    padding: 0.55rem 0;
    border-bottom: 1px solid var(--et-border);
}

.et-launch-kit-item:last-child,
.et-ship-platform-item:last-child {
    border-bottom: none;
}

.et-launch-kit-item__copy,
.et-ship-platform-item__copy {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.12rem;
}

.et-launch-kit-item__label,
.et-ship-platform-item__label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--et-text-primary);
}

.et-launch-kit-item__hint,
.et-ship-platform-item__hint {
    font-size: 0.72rem;
    line-height: 1.4;
    color: var(--et-text-muted);
}

.et-launch-kit-item__links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.72rem;
}

.et-ship-platform-item__link {
    font-size: 0.72rem;
}

.et-ship-platform-item__label i {
    margin-right: 0.25rem;
    color: var(--et-accent-primary);
    font-size: 0.7rem;
}

.et-manuscript-ops-card { border: 1px solid rgba(139, 92, 246, 0.2); }
.et-chapter-workflow-select { border-color: var(--et-border); background: var(--et-bg-secondary); color: var(--et-text-muted); }
.et-chapter-workflow-select option[value="final"] { color: var(--et-accent-success); }

.et-ship-readiness-list {
    padding-top: 0;
    border-top: none;
}
.et-ship-readiness-ok {
    font-size: 0.8125rem;
    color: var(--et-accent-success);
}
.et-ship-readiness-checks {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}
.et-ship-readiness-check {
    display: flex;
    align-items: flex-start;
    gap: 0.45rem;
    font-size: 0.8125rem;
    line-height: 1.45;
}
.et-ship-readiness-check__icon {
    flex-shrink: 0;
    margin-top: 0.15rem;
    color: var(--et-accent-danger);
    font-size: 0.72rem;
}

#etPreflightResults .et-pf-row { display:flex;gap:0.5rem;align-items:flex-start;padding:0.35rem 0;font-size:0.8125rem;border-bottom:1px solid var(--et-border); }
#etPreflightResults .et-pf-pass { color: var(--et-accent-success); }
#etPreflightResults .et-pf-fail { color: var(--et-accent-danger); }

.et-cover-thumb-btn {
    display: block;
    padding: 0;
    border: 1px solid var(--et-border);
    border-radius: 8px;
    background: var(--et-bg-primary);
    cursor: zoom-in;
    overflow: hidden;
    max-width: 120px;
    transition: box-shadow 0.15s ease, border-color 0.15s ease;
}
.et-cover-thumb-btn:hover {
    border-color: var(--et-accent-primary);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}
.et-cover-thumb {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 5 / 8;
    object-fit: cover;
}
.et-cover-lightbox {
    position: fixed;
    inset: 0;
    z-index: 1080;
    background: rgba(0, 0, 0, 0.88);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}
.et-cover-lightbox-img {
    max-width: min(420px, 92vw);
    max-height: min(88vh, 680px);
    width: auto;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
    object-fit: contain;
}
.et-cover-lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 1;
}
body.et-cover-lightbox-open {
    overflow: hidden;
}

.et-cover-studio {
    border: 1px solid var(--et-border);
    border-radius: 0;
    padding: 1rem;
    background: color-mix(in srgb, var(--et-bg-secondary) 65%, transparent);
}

.et-cover-studio__layout {
    display: grid;
    grid-template-columns: minmax(9rem, 11rem) minmax(0, 1fr);
    gap: 1.15rem;
    align-items: start;
}

@media (max-width: 575.98px) {
    .et-cover-studio__layout {
        grid-template-columns: 1fr;
    }
}

.et-cover-studio__preview-col {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.et-cover-studio__frame-wrap {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.et-cover-studio__frame {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    aspect-ratio: 5 / 8;
    max-width: 10.5rem;
    margin: 0 auto;
    padding: 0;
    border: 1px dashed color-mix(in srgb, var(--et-accent-primary) 22%, rgba(255, 255, 255, 0.2));
    border-radius: 4px;
    background: color-mix(in srgb, var(--et-bg-primary) 90%, transparent);
    cursor: zoom-in;
    overflow: hidden;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.et-cover-studio__frame.has-cover {
    border-style: solid;
    border-color: color-mix(in srgb, var(--et-accent-primary) 35%, var(--et-border));
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}

.et-cover-studio__frame:hover.has-cover {
    border-color: var(--et-accent-primary);
}

.et-cover-studio__empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    padding: 0.75rem;
    font-size: 0.72rem;
    color: color-mix(in srgb, var(--et-text-muted) 80%, var(--et-text-primary));
    text-align: center;
}

.et-cover-studio__empty i {
    font-size: 1.25rem;
    opacity: 0.45;
}

.et-cover-studio__frame.has-cover .et-cover-studio__empty {
    display: none;
}

.et-cover-studio__img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.et-cover-studio__specs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    justify-content: center;
    font-size: 0.68rem;
    color: color-mix(in srgb, var(--et-text-muted) 82%, var(--et-text-primary));
    text-align: center;
}

.et-cover-studio__spec-badge {
    display: inline-flex;
    padding: 0.1rem 0.4rem;
    border-radius: 999px;
    font-size: 0.625rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--et-accent-success, #22c55e);
    background: color-mix(in srgb, var(--et-accent-success, #22c55e) 12%, transparent);
    border: 1px solid color-mix(in srgb, var(--et-accent-success, #22c55e) 28%, transparent);
}

.et-cover-studio__spec-badge.is-warn {
    color: var(--et-accent-warm, #e1b144);
    background: color-mix(in srgb, var(--et-accent-warm, #e1b144) 10%, transparent);
    border-color: color-mix(in srgb, var(--et-accent-warm, #e1b144) 30%, transparent);
}

.et-cover-studio__status {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
    justify-content: center;
}

.et-cover-studio__status.d-none {
    display: none !important;
}

.et-cover-studio__remove {
    font-size: 0.72rem !important;
    padding: 0.15rem 0.45rem !important;
    /* 59x22 measured on the Ship cover step — the one control left under the
       24px floor WCAG 2.5.8 sets for a tap target. The type stays btn-sm. */
    min-height: 1.75rem;
}

.et-cover-studio__actions-col {
    min-width: 0;
}

.et-cover-studio__dropzone {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    position: relative;
    margin: 0;
    padding: 0.85rem 0.75rem;
    border: 1px dashed color-mix(in srgb, var(--et-accent-primary) 22%, rgba(255, 255, 255, 0.18));
    border-radius: 0;
    background: color-mix(in srgb, var(--et-bg-primary) 85%, transparent);
    cursor: pointer;
    text-align: center;
    transition: border-color 0.12s ease, background 0.12s ease;
}

.et-cover-studio__dropzone:hover,
.et-cover-studio__dropzone.is-dragover {
    border-color: color-mix(in srgb, var(--et-accent-primary) 45%, var(--et-border));
    background: color-mix(in srgb, var(--et-accent-primary) 6%, transparent);
}

.et-cover-studio__dropzone-icon {
    font-size: 1.1rem;
    color: var(--et-text-muted);
}

.et-cover-studio__dropzone-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--et-text-primary);
}

.et-cover-studio__dropzone-hint {
    font-size: 0.68rem;
    color: var(--et-text-muted);
}

.et-cover-studio__file-input {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.et-cover-studio__url-details {
    font-size: 0.8125rem;
}

.et-cover-studio__url-toggle {
    cursor: pointer;
    font-weight: 600;
    color: var(--et-text-muted);
    list-style: none;
}

.et-cover-studio__url-toggle::-webkit-details-marker {
    display: none;
}

.et-cover-studio__url-toggle:hover {
    color: var(--et-text-primary);
}

.et-cover-studio__ai {
    margin-bottom: 0.85rem;
    padding-bottom: 0.85rem;
    border-bottom: 1px solid var(--et-border);
}
.et-cover-studio__desc {
    font-size: 0.8125rem;
    line-height: 1.5;
}
.et-cover-studio__provider {
    max-width: 11rem;
}
.et-cover-studio__progress {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
    font-size: 0.8125rem;
    color: var(--et-accent-secondary, var(--et-text-muted));
}
.et-cover-studio__spinner {
    width: 1rem;
    height: 1rem;
    border: 2px solid var(--et-border);
    border-top-color: var(--et-accent-primary);
    border-radius: 50%;
    animation: et-cover-spin 0.8s linear infinite;
    flex-shrink: 0;
}
@keyframes et-cover-spin {
    to { transform: rotate(360deg); }
}
#btnGenerateCoverAi.is-loading {
    opacity: 0.85;
    pointer-events: none;
}
.et-cover-studio__preview-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: flex-start;
}
.et-cover-studio__upload {
    flex: 1 1 220px;
    min-width: 0;
}
.et-cover-studio__file {
    padding: 0.5rem;
}
.et-cover-studio__thumb-wrap {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
}
.et-cover-studio__badge-wrap {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}
.et-cover-studio__library-link {
    font-size: 0.8125rem;
}

.et-book-details-autosave {
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    border: 1px solid transparent;
    color: var(--et-text-muted);
}
.et-ship-form-save-bar--status-only {
    justify-content: flex-start;
}
.et-ship-step-complete-hint {
    font-size: 0.875rem;
    line-height: 1.45;
    color: var(--et-text-muted);
}
.et-ship-step-complete-hint__go {
    background: none;
    border: 0;
    padding: 0;
    font: inherit;
    cursor: pointer;
    color: var(--et-link, #3b82f6);
    text-decoration: underline;
    text-underline-offset: 2px;
}
.et-book-details-autosave.is-saved {
    color: #52d4a3;
    border-color: rgba(82, 212, 163, 0.35);
    background: rgba(82, 212, 163, 0.08);
}
.et-book-details-autosave.is-unsaved {
    color: #d8b544;
    border-color: rgba(216, 181, 68, 0.35);
    background: rgba(216, 181, 68, 0.08);
}
.et-book-details-autosave.is-saving {
    color: #93c5fd;
    border-color: rgba(147, 197, 253, 0.35);
    background: rgba(147, 197, 253, 0.1);
}
.et-book-details-autosave.is-error {
    color: #ff9798;
    border-color: rgba(255, 151, 152, 0.4);
    background: rgba(255, 151, 152, 0.1);
}

/*
 * The preview caption must wrap on a phone.
 *
 * `white-space: nowrap` keeps "KDP / Kindle · Fantasy · Classic serif · sample"
 * tidily on one line where there is room, but it cannot shrink: measured at a
 * 360px viewport it ran to x=373, so the last 13px — the end of the word
 * "sample" — was cut off by the page edge, with no horizontal scroll to reach
 * it. The caption is how an author confirms which preset and theme the preview
 * is showing, so losing its tail is losing the point of it.
 *
 * Only the narrow case changes; wider viewports keep the single line.
 */
@media (max-width: 600px) {
    .et-export-preview__status {
        white-space: normal;
    }
}

/*
 * The drop-caps toggle is the only tappable target left under 24px on the
 * Export step. Its label wraps the checkbox, so the label IS the target: it
 * measured 208x20 at 390px — wide enough, four pixels short.
 *
 * align-items: center keeps the checkbox and its text centred in the taller
 * box rather than sitting at the top of it.
 */
@media (pointer: coarse) {
    .et-export-layout-check {
        display: flex;
        align-items: center;
        min-height: 24px;
    }
}

/*
 * A past-export row's Download link is the row, not a word in it.
 *
 * app.css deliberately exempts inline .form-link from the 24px target minimum
 * — WCAG 2.2 excludes links inside running text, and most of the 98 uses are
 * exactly that. "EPUB · 9,573 words  Download" is not running text: it is a
 * list row with a trailing control, and the control is the only reason the row
 * exists. Measured 56x16 at 390px, which is a target a thumb misses.
 *
 * The row becomes a flex line so the link can take its height without pushing
 * the label around, and the two stay on one baseline.
 */
.et-export-version__row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0 0.25rem;
}

.et-export-version__dl {
    display: inline-flex;
    align-items: center;
    min-height: 1.5rem;
}
