.is-script-editor .editor-cover-summary .script-cover-pick {
    display: grid; place-content: center; justify-items: center; gap: 8px;
    min-height: 154px; width: 100%; margin: 0; overflow: hidden;
    border-style: dashed; color: var(--creator-muted);
}
.editor-cover-summary .script-image-field { min-width: 0; }
.editor-cover-summary .script-cover-preview {
    display: block; width: 100%; padding: 0; margin: 0; border: 0;
    border-radius: 12px; overflow: hidden; background: transparent; cursor: pointer;
    container-type: inline-size;
}
.script-cover-preview img {
    display: block; width: 100%; height: auto; max-height: 150cqi;
    aspect-ratio: auto 4 / 3; object-fit: cover;
}
.script-cover-actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.editor-cover-summary .script-cover-actions > .but { width: 100%; min-width: 0; min-height: 44px; margin: 0; }
.mivo-creation-design #script-dialog[open]:has(.script-cover-sheet) {
    display: flex; flex-direction: column; box-sizing: border-box;
    width: min(500px,calc(100% - 32px)); height: fit-content; max-height: calc(100dvh - 32px);
    inset: 0; transform: none; margin: auto; padding: 0; overflow: hidden;
    background: var(--creator-solid); border: 1px solid var(--builder-line); border-radius: 18px;
}
.mivo-creation-design #script-dialog:has(.script-cover-sheet) .script-dialog-head {
    position: relative; flex: none; padding: 9px 16px; min-height: 52px; box-sizing: border-box;
    border-bottom: 1px solid var(--builder-line); background: var(--creator-solid);
}
.mivo-creation-design #script-dialog:has(.script-cover-sheet) .script-dialog-head h2 { font-size: 17px; margin: 0; }
.mivo-creation-design #script-dialog:has(.script-cover-sheet) .script-dialog-head>[data-dialog-close] {
    width: 44px; height: 44px; min-height: 44px; border: 0; margin: -5px -6px -5px 0;
    box-shadow: none; background: transparent; color: var(--creator-muted);
}
.mivo-creation-design #script-dialog-content:has(>.script-cover-sheet) {
    flex: 0 1 auto; min-height: 0; display: flex; padding: 0;
}
.script-cover-sheet { position: relative; display: flex; flex-direction: column; min-width: 0; min-height: 0; width: 100%; }
.cover-tabs {
    flex: none; display: flex; padding: 6px 8px 0; gap: 2px;
    border-bottom: 1px solid var(--builder-line);
}
.mivo-creation-design #script-dialog .cover-tabs .but {
    flex: 1; min-width: 0; margin: 0; min-height: 42px; padding: 8px; border: 0;
    border-bottom: 2px solid transparent; border-radius: 9px 9px 0 0;
    background: transparent; box-shadow: none; color: var(--creator-muted);
}
.mivo-creation-design #script-dialog .cover-tabs .but[aria-pressed=true] {
    background: var(--focus-color-opacity1); color: var(--builder-primary);
    border-bottom-color: var(--creator-accent); font-weight: 600;
}
.cover-panel { min-height: 0; flex: 0 1 auto; overflow: auto; overscroll-behavior: contain; padding: 14px 16px; }
.cover-local { display: grid; min-width: 0; gap: 12px; }
.script-cover-sheet small { color: var(--creator-muted); font-size: 13px; line-height: 1.5; }
.cover-drop {
    display: grid; place-content: center; justify-items: center; gap: 4px;
    color: var(--creator-text); background: var(--muted-bg-color); cursor: pointer;
    border: 1.5px dashed var(--builder-line); border-radius: 12px;
}
.cover-drop { width: 100%; min-height: 116px; padding: 10px; }
.cover-drop.is-over,.cover-drop:focus-visible { border-color: var(--creator-accent); }
.cover-drop .cover-upload-icon { width: 26px; height: 26px; transform: rotate(-90deg); color: var(--builder-primary); }
.cover-drop img { max-width: 100%; height: 88px; object-fit: contain; border-radius: 6px; }
.cover-drop span { font-size: 13px; color: var(--builder-primary); }
.cover-footer { flex: none; padding: 10px 16px 14px; border-top: 1px solid var(--builder-line); }
.mivo-creation-design #script-dialog .cover-footer>.but {
    display: block; width: 100%; margin: 0; min-height: 44px; border-radius: 12px; font-weight: 600;
}
.mivo-creation-design #script-dialog .cover-footer>.but:disabled { opacity: .55; box-shadow: none; }
.cover-error:not([hidden]) { padding: 6px 16px; color: var(--bad-color,#b33b50); font-size: 14px; }
@media (max-width:768px), (pointer:coarse) and (orientation:landscape) and (max-height:500px) {
    .mivo-creation-design #script-dialog[open]:has(.script-cover-sheet) {
        position: fixed; inset: auto 0 0; margin: 0;
        width: 100%; max-width: none;
        max-height: min(88dvh,calc(100dvh - var(--mivo-cutout-top, env(safe-area-inset-top,0px))));
        padding: 0 var(--mivo-cutout-right, env(safe-area-inset-right,0px)) var(--mivo-cutout-bottom, env(safe-area-inset-bottom,0px)) var(--mivo-cutout-left, env(safe-area-inset-left,0px));
        border-width: 1px 0 0; border-radius: 16px 16px 0 0;
        animation: cover-sheet-appear .22s ease-out;
    }
}
@keyframes cover-sheet-appear { from { transform: translateY(100%); } to { transform: translateY(0); } }
@media(prefers-reduced-motion:reduce) { .mivo-creation-design #script-dialog[open]:has(.script-cover-sheet) { animation: none; } }


.script-cover-sheet [hidden] { display: none !important; }
.script-dialog-head .cover-price { margin-inline-start: auto; color: var(--creator-muted); font-size: 13px; }
.cover-form { display: grid; gap: 16px; min-width: 0; }
.cover-form-label { display: grid; align-content: start; gap: 7px; min-width: 0; margin: 0; }
.cover-form-label>span,.cover-form-field legend { color: var(--creator-text); font-weight: 600; font-size: 14px; }
.cover-form textarea.script-input { width: 100%; min-height: 74px; padding: 9px 12px; margin: 0; font: inherit; font-size: 16px; line-height: 1.45; resize: vertical; }
.cover-form-field { min-width: 0; border: 0; margin: 0; padding: 0; }
.cover-form-field legend { margin: 0 0 7px; padding: 0; border: 0; line-height: 1.5; }
.cover-choices { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 6px; }
.cover-choices button { min-height: 38px; padding: 5px 3px; font: inherit; font-size: 13px; color: var(--creator-text); background: var(--creator-solid); border: 1px solid var(--builder-line); border-radius: 9px; box-shadow: 0 2px 0 var(--main-shadow); }
.cover-choices button[aria-pressed=true] { color: var(--builder-primary); background: var(--focus-color-opacity1); border-color: var(--creator-accent); font-weight: 600; }
.cover-choices button:disabled { opacity: .5; }
.cover-settings-row { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.cover-choice-trigger {
    display: flex; align-items: center; justify-content: space-between; gap: 6px; width: 100%; min-height: 44px;
    padding: 8px 12px; border: 1px solid var(--builder-line); border-radius: 10px; cursor: pointer;
    background: var(--muted-bg-color); color: var(--creator-text); font: inherit; text-align: start;
}
.cover-choice-trigger strong { font-size: 14px; font-weight: 500; }
.cover-choice-trigger svg { flex: none; width: 16px; height: 16px; color: var(--creator-muted); }
.cover-choice-trigger[aria-expanded=true] { border-color: var(--creator-accent); }
.cover-choice-trigger[aria-expanded=true] svg { transform: rotate(180deg); }
.cover-choice-popup {
    position: absolute; z-index: 5; box-sizing: border-box; margin: 0; padding: 5px;
    overflow: auto; overscroll-behavior: contain; scrollbar-width: none;
    border: 1px solid var(--builder-line); border-radius: 12px; box-shadow: 0 3px 12px var(--main-shadow);
    background: var(--creator-solid); color: var(--creator-text);
}
.dark-theme .cover-choice-popup { background: #1d1d21; border-color: #38383d; }
.cover-choice-popup::-webkit-scrollbar,.cover-panel::-webkit-scrollbar { display: none; }
.cover-panel { scrollbar-width: none; }
.cover-choice-popup legend { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; white-space: nowrap; }
.cover-choice-popup .cover-choices { grid-template-columns: 1fr; gap: 2px; }
.cover-choice-popup.is-style .cover-choices { grid-template-columns: repeat(2,minmax(0,1fr)); }
.cover-choice-popup .cover-choices button {
    min-height: 40px; padding: 6px 9px; font: inherit; font-size: 14px; text-align: start; cursor: pointer;
    border: 0; border-radius: 7px; box-shadow: none; background: transparent;
}
.cover-choice-popup .cover-choices button[aria-pressed=true] { background: var(--focus-color-opacity1); color: var(--builder-primary); }
@media (hover:hover) {
    .cover-choice-popup .cover-choices button:enabled:hover { background: var(--muted-bg-color); }
}
.cover-ref-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.cover-ref-tile {
    display: grid; place-items: center; width: 76px; height: 76px; padding: 0; overflow: hidden; cursor: pointer;
    border: 1.5px dashed var(--builder-line); border-radius: 12px; background: var(--muted-bg-color); color: var(--creator-muted);
}
.cover-ref-tile:hover,.cover-choice-trigger:hover { border-color: var(--creator-accent); }
.cover-ref-tile:focus-visible,.cover-choice-trigger:focus-visible,.cover-choice-popup button:focus-visible { outline: 2px solid var(--creator-accent); outline-offset: 2px; }
.cover-ref-plus { position: relative; display: block; width: 24px; height: 24px; }
.cover-ref-plus::before,.cover-ref-plus::after { content: ''; position: absolute; inset: 0; margin: auto; width: 22px; height: 2px; border-radius: 1px; background: currentColor; }
.cover-ref-plus::after { transform: rotate(90deg); }
.cover-ref-preview:not(:empty) { width: 100%; height: 100%; }
.cover-ref-preview:not(:empty)+.cover-ref-plus { display: none; }
.cover-ref-preview:empty { display: none; }
.cover-ref-preview img { display: block; width: 100%; height: 100%; object-fit: cover; }
.cover-pending,.cover-recovery { display: grid; place-content: center; justify-items: center; gap: 6px; }
.is-script-editor .editor-cover-summary .cover-pending,.is-script-editor .editor-cover-summary .cover-recovery { border: 1px dashed var(--builder-line); border-radius: 12px; }
.is-script-editor .editor-cover-summary .cover-pending .mivo-route-mascot { width: 60px; height: 60px; object-fit: contain; }
.cover-pending>span { display: inline-flex; align-items: baseline; gap: 4px; }
.cover-inline-error { color: var(--creator-muted); }
@media(max-width:768px) {
    .mivo-creation-design #script-dialog:has(.script-cover-sheet) .script-dialog-head { touch-action: none; }
    .cover-form { gap: 13px; }
    .cover-choices button { min-height: 42px; }
    .script-cover-sheet .cover-panel { -webkit-overflow-scrolling: touch; }
}
