@import url('https://fonts.googleapis.com/css2?family=Gaegu:wght@400;700&family=Nanum+Gothic:wght@400;700&family=Nanum+Myeongjo:wght@400;700&display=swap');

@font-face {
    font-family: 'Cafe24SuperMagic';
    src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/noonfonts_2307-2@1.0/Cafe24Supermagic-Regular-v1.0.woff2') format('woff2');
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: 'Cafe24SuperMagic';
    src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/noonfonts_2307-2@1.0/Cafe24Supermagic-Bold-v1.0.woff2') format('woff2');
    font-weight: 700;
    font-display: swap;
}

@font-face {
    font-family: 'omyu_pretty';
    src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/noonfonts_2304-01@1.0/omyu_pretty.woff2') format('woff2');
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: 'KccMurukMuruk';
    src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/noonfonts_2302@1.0/KCCMurukmuruk.woff2') format('woff2');
    font-weight: 400;
    font-display: swap;
}

.youtube-menu-page {
    max-width: 1460px;
    margin: 0 auto;
    padding: 52px 0px 60px;
}

.youtube-menu-layout {
    position: relative;
    display: block;
    min-height: auto;
}

.youtube-step-sidebar {
    position: fixed;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 8;
    display: flex;
    justify-content: center;
    align-self: center;
}

.youtube-step-list {
    display: grid;
    gap: 18px;
    justify-items: center;
}

.youtube-step-item {
    position: relative;
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    color: #9aa8b8;
    border-radius: 14px;
    transition: transform .24s ease, color .24s ease, background-color .24s ease, box-shadow .24s ease;
}

.youtube-step-item iconify-icon {
    font-size: 21px;
}

.youtube-step-item.active {
    color: #202938;
    background: rgba(255, 255, 255, .68);
    box-shadow: 0 8px 20px rgba(113, 128, 150, .08);
}

.youtube-step-item:disabled,
.youtube-step-item.disabled {
    cursor: not-allowed;
    opacity: .32;
    pointer-events: none;
}

.youtube-menu-main {
    width: min(100%, 960px);
    margin: 0 auto;
    display: grid;
    gap: 38px;
    justify-items: center;
}

.youtube-step-screen {
    width: 100%;
    display: grid;
    gap: 38px;
    justify-items: center;
    align-content: start;
}

.youtube-step-screen[hidden] {
    display: none !important;
}

.youtube-menu-copy {
    display: grid;
    gap: 12px;
    justify-items: center;
    text-align: center;
}

.youtube-menu-subtitle {
    max-width: 620px;
    margin: 0;
    font-size: 16px;
    line-height: 1.45;
    color: #6f7c8d;
}

.youtube-menu-title {
    margin: 0;
    font-size: 38px;
    line-height: 1.04;
    letter-spacing: -.06em;
    font-weight: 800;
    background-image:
              linear-gradient(90deg, #1e293b 0%, #7c5cff 34%, #65dff0 68%, #0f172a 100%),
              repeating-linear-gradient(120deg, rgba(255, 255, 255, 0) 0 16px, rgba(255, 255, 255, .24) 16px 32px);
    background-size: 220% 100%, 240% 100%;
    background-position: 0% 50%, 0% 50%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    animation: titleFlow 14s linear infinite;
    filter: drop-shadow(0 10px 22px rgba(108, 117, 235, .08));
}

.youtube-stage-controls {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    width: min(100%, 1120px);
    align-items: center;
}

.youtube-stage-arrow {
    position: absolute;
    top: 50%;
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: #758398;
    background: rgba(255, 255, 255, .72);
    border: 1px solid rgba(219, 227, 237, .95);
    box-shadow: 0 10px 20px rgba(134, 148, 167, .08);
    transition: transform .2s ease, color .2s ease, background-color .2s ease;
    z-index: 2;
}

.youtube-stage-arrow#youtube-stage-prev {
    left: -5px;
    transform: translateY(-50%);
}

.youtube-stage-arrow#youtube-stage-next {
    right: -5px;
    transform: translateY(-50%);
}

.youtube-stage-arrow:hover {
    transform: translateY(-1px);
    color: #243246;
}

.youtube-stage-shell {
    width: 100%;
    display: grid;
    justify-items: center;
    padding: 10px 0 28px;
}

.youtube-stage-shell.single {
    padding-top: 0;
}

.youtube-stage-card {
    --stage-width: 920px;
    --stage-height: 518px;
    width: min(100%, var(--stage-width));
    height: var(--stage-height);
    position: relative;
    display: grid;
    place-items: center;
    border-radius: 28px;
    background: rgba(255, 255, 255, .9);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .92);
    transition: width .45s cubic-bezier(.22, .61, .36, 1), height .45s cubic-bezier(.22, .61, .36, 1), border-radius .45s cubic-bezier(.22, .61, .36, 1), transform .45s cubic-bezier(.22, .61, .36, 1);
    overflow: hidden;
}

.youtube-stage-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, .82), rgba(255, 255, 255, .94));
}

.youtube-stage-card.ratio-16-9 {
    --stage-width: 920px;
    --stage-height: 518px;
}

.youtube-stage-card.ratio-1-1 {
    --stage-width: 620px;
    --stage-height: 620px;
}

.youtube-stage-card.ratio-9-16 {
    --stage-width: 430px;
    --stage-height: 764px;
}

.youtube-stage-badge {
    position: absolute;
    top: 18px;
    right: 22px;
    z-index: 1;
    min-width: 58px;
    height: 28px;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #eff3f8;
    color: #778294;
    font-size: 14px;
    font-weight: 700;
}

.youtube-stage-brand {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: rgba(126, 133, 146, .3);
    font-size: 20px;
    font-weight: 700;
    user-select: none;
}

.youtube-stage-brand iconify-icon {
    font-size: 28px;
}

.youtube-ratio-row {
    width: min(100%, 920px);
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
}

.youtube-ratio-group-wrap {
    display: grid;
    gap: 12px;
}

.youtube-ratio-label {
    font-size: 18px;
    line-height: 1;
    color: #515a66;
}

.youtube-ratio-group {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    flex-wrap: wrap;
}

.youtube-ratio-option {
    min-width: 38px;
    display: grid;
    justify-items: center;
    gap: 8px;
    color: #9ba7b5;
}

.youtube-ratio-card-btn {
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    border: 1.5px solid transparent;
    background: #f4f7fb;
    color: #6b7fff;
    transition: border-color .2s ease, background-color .2s ease, color .2s ease, transform .2s ease;
}

.youtube-ratio-card-btn iconify-icon {
    font-size: 22px;
}

.youtube-ratio-choice-card {
    min-width: 0;
    width: 100%;
}

.youtube-ratio-choice-card .youtube-ratio-card-btn {
    width: 100%;
    height: auto;
    min-height: 340px;
    padding: 30px;
    display: grid;
    grid-template-rows: auto auto auto minmax(0, 1fr) auto;
    place-items: center;
    align-content: stretch;
    gap: 15px;
    border-radius: 20px;
    border-color: rgba(82, 116, 255, .10);
    background: #ffffff;
    color: #111827;
    box-shadow: 0 12px 28px rgba(66, 84, 128, .07);
}

.youtube-ratio-choice-card.active .youtube-ratio-card-btn {
    border-color: rgba(82, 116, 255, .48);
    background: #ffffff;
    box-shadow: 0 16px 34px rgba(82, 116, 255, .13);
}

.youtube-ratio-choice-card .youtube-ratio-card-btn > span:not(.youtube-ratio-flat-icon):not(.youtube-ratio-select-pill) {
    color: #6c7888;
}

.youtube-ratio-choice-card .youtube-ratio-select-pill {
    align-self: end;
    margin-top: 18px;
    min-width: 132px;
    height: 44px;
    padding: 0 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: #5274ff;
    color: #ffffff !important;
    font-size: 14px;
    font-weight: 800;
    line-height: 1;
}

.youtube-ratio-text {
    font-size: 13px;
    font-weight: 700;
    color: #6c7888;
}

.youtube-ratio-option.active {
    color: #2940ff;
}

.youtube-ratio-option.active .youtube-ratio-card-btn {
    border-color: #6b7fff;
    background: #ffffff;
    box-shadow: 0 10px 20px rgba(103, 119, 255, .14);
}

.youtube-action-btn {
    min-width: 168px;
    height: 46px;
    padding: 0 16px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    transition: transform .2s ease, background-color .2s ease, color .2s ease;
}

.youtube-action-btn iconify-icon {
    margin-right: 6px;
    font-size: 18px;
}

.youtube-temp-save-btn {
    margin-left: auto;
}

.youtube-action-btn:hover {
    transform: translateY(-1px);
}

.youtube-action-btn:disabled,
.youtube-action-btn.disabled,
.youtube-generate-btn:disabled,
.youtube-generate-btn.disabled {
    cursor: not-allowed;
    opacity: .38;
    transform: none;
}

.youtube-action-btn-primary {
    background: #575f6a;
    color: #ffffff;
    box-shadow: 0 12px 24px rgba(66, 73, 82, .12);
}

.youtube-action-btn-primary:hover {
    background: #49505a;
}

.youtube-action-btn-secondary {
    background: #d6dde6;
    color: #1f2937;
}

.youtube-script-shell {
    width: min(100%, 920px);
    display: grid;
    gap: 16px;
}

.youtube-voice-shell {
    width: min(100%, 920px);
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 22px;
    align-items: start;
}

.youtube-cut-shell {
    width: 100%;
    max-width: 920px;
    margin: 0 auto;
    display: grid;
    gap: 18px;
    justify-self: center;
}

.youtube-video-shell {
    width: 100%;
    max-width: 920px;
    margin: 0 auto;
    display: grid;
    gap: 18px;
    justify-self: center;
}

.youtube-subtitle-shell {
    width: 100%;
    max-width: 920px;
    margin: 0 auto;
    display: grid;
    gap: 18px;
    justify-self: center;
}

.youtube-render-shell {
    width: 100%;
    max-width: 920px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    align-items: start;
}

.youtube-render-card {
    padding: 24px;
    border-radius: 20px;
    border: 1px solid rgba(226, 232, 240, .95);
    box-shadow: 0 8px 24px rgba(135, 148, 167, .08);
    background: rgba(255, 255, 255, .92);
    display: grid;
    gap: 14px;
    align-self: start;
    height: auto;
}

.youtube-render-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.youtube-render-icon-btn {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: #6177ff;
    color: #ffffff;
    box-shadow: 0 10px 20px rgba(97, 119, 255, .22);
}

.youtube-render-icon-btn iconify-icon {
    font-size: 18px;
    color: #ffffff;
}

.youtube-render-icon-btn-download {
    border: 1px solid rgba(226, 232, 240, .95);
    background: #ffffff;
    box-shadow: none;
}

.youtube-render-icon-btn-download iconify-icon {
    color: #6177ff;
}

.youtube-render-preview {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    min-height: 0;
    border-radius: 20px;
    overflow: hidden;
    border: 0px solid rgba(226, 232, 240, .95);
    background: #f4f7fb;
    display: grid;
    place-items: center;
}

.youtube-render-preview.ratio-1-1 {
    aspect-ratio: 1 / 1;
}

.youtube-render-preview.ratio-9-16 {
    aspect-ratio: 9 / 16;
}

.youtube-render-preview img,
.youtube-render-preview video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.youtube-render-preview img[hidden],
.youtube-render-preview video[hidden] {
    display: none !important;
}

.youtube-thumb-cycle-btn {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    margin: auto;
    border: 1px solid rgba(255, 255, 255, .72);
    border-radius: 8px;
    background: rgba(15, 23, 42, .72);
    color: #ffffff;
    opacity: 0;
    cursor: pointer;
    transition: opacity .18s ease, transform .18s ease;
}

.youtube-render-preview:hover .youtube-thumb-cycle-btn {
    opacity: 1;
    transform: scale(1.04);
}

.youtube-thumb-cycle-btn[hidden] {
    display: none !important;
}

.youtube-thumb-style-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.youtube-thumb-style-row .youtube-mini-btn.active {
    border-color: #6b7fff;
    color: #3950ff;
    background: #ffffff;
    box-shadow: 0 8px 18px rgba(107, 127, 255, .16);
}

.youtube-render-empty {
    color: #7b8798;
    font-size: 14px;
    font-weight: 700;
    text-align: center;
    padding: 20px;
}

.youtube-render-metrics {
    display: grid;
    gap: 10px;
}

.youtube-render-metric {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 14px;
    border-radius: 10px;
    background: #f8fafc;
    border: 0px solid rgba(226, 232, 240, .95);
}

.youtube-render-metric span {
    font-size: 13px;
    color: #697586;
}

.youtube-render-metric strong {
    max-width: 68%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 14px;
    color: #364152;
    text-align: right;
}

.youtube-render-progress {
    display: grid;
    gap: 8px;
}

.youtube-render-progress-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.youtube-render-progress-head span {
    font-size: 13px;
    color: #697586;
    font-weight: 700;
}

.youtube-render-progress-head strong {
    font-size: 14px;
    color: #364152;
}

.youtube-render-progress-bar {
    height: 10px;
    border-radius: 999px;
    background: #e5eaf2;
    overflow: hidden;
}

.youtube-render-progress-bar span {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: inherit;
    background: #6177ff;
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform .12s linear;
}

.youtube-render-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: flex-start;
}

.youtube-field-block {
    display: grid;
    gap: 10px;
}

.youtube-field-label {
    font-size: 18px;
    font-weight: 800;
    color: #535d69;
}

.youtube-confirmed-script,
.youtube-voice-panel {
    display: grid;
    gap: 10px;
}

.youtube-confirmed-script-box {
    min-height: 164px;
    padding: 16px 18px;
    border-radius: 16px;
    background: #ffffff;
    border: 0px solid rgba(226, 232, 240, .95);
    box-shadow: 0 4px 14px rgba(135, 148, 167, .06);
    font-size: 13px;
    line-height: 1.72;
    color: #5b6472;
    white-space: pre-wrap;
}

.youtube-selected-voice-list {
    display: grid;
    gap: 10px;
}

.youtube-voice-list {
    display: grid;
    gap: 10px;
}

.youtube-voice-card {
    padding: 10px 12px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    border-radius: 14px;
    background: #ffffff;
    border: 0px solid rgba(226, 232, 240, .95);
    box-shadow: 0 4px 14px rgba(135, 148, 167, .06);
    cursor: pointer;
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.youtube-voice-card:hover {
    transform: translateY(-1px);
}

.youtube-voice-card.selected {
    border-color: #6b7fff;
    box-shadow: 0 10px 18px rgba(107, 127, 255, .12);
}

.youtube-voice-card.generated {
    background: linear-gradient(90deg, #6177ff 0%, #7185ff 100%);
    border-color: transparent;
    color: #ffffff;
}

.youtube-voice-card.generated .youtube-voice-meta span,
.youtube-voice-card.generated .youtube-voice-name strong,
.youtube-voice-card.generated .youtube-voice-name small {
    color: #ffffff;
}


.youtube-voice-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.youtube-voice-avatar {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    object-fit: cover;
    background: #dbe5f5;
}

.youtube-voice-name {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.youtube-voice-name strong {
    font-size: 14px;
    color: #364152;
}

.youtube-voice-name small {
    font-size: 11px;
    color: #7b8798;
}

.youtube-voice-action {
    min-width: 74px;
    height: 34px;
    padding: 0 12px;
    border-radius: 10px;
    background: #f4f7fb;
    color: #556070;
    font-size: 12px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.youtube-voice-card.generated .youtube-voice-action {
    background: rgba(255, 255, 255, .16);
    color: #ffffff;
}

.youtube-voice-action.playing {
    color: #6177ff;
}

.youtube-voice-card.generated .youtube-voice-action.playing {
    color: #ffffff;
}

.youtube-voice-generate-box {
    display: grid;
    gap: 14px;
    padding: 0px;
    border-radius: 10px;
    background: #ffffff;
}

.youtube-voice-option-grid {
    display: grid;
    gap: 8px;
}

.youtube-voice-radio-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.youtube-voice-option {
    width: calc((100% - 16px) / 3);
    box-sizing: border-box;
}

.youtube-voice-option .youtube-ratio-card-btn {
    width: 100%;
    height: 42px;
    font-size: 13px;
    font-weight: 800;
    color: #6c7888;
}

.youtube-voice-option.active .youtube-ratio-card-btn {
    color: #2940ff;
}

.youtube-selected-voice-card {
    padding: 10px 12px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    border-radius: 14px;
    background: #ffffff;
    border: 0px solid rgba(226, 232, 240, .95);
    box-shadow: 0 4px 14px rgba(135, 148, 167, .06);
}

.youtube-selected-voice-remove {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: #f4f7fb;
    color: #596271;
}

.youtube-selected-voice-remove iconify-icon {
    font-size: 18px;
}

.youtube-cut-stage-card {
    background: #ffffff;
}

.youtube-cut-stage-media,
.youtube-stage-skeleton {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: block;
}

.youtube-cut-stage-media {
    overflow: hidden;
    border-radius: inherit;
}

.youtube-cut-stage-media img,
.youtube-cut-stage-media video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.youtube-cut-stage-media .youtube-stage-brand {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.youtube-cut-stage-media img[hidden],
.youtube-cut-stage-media video[hidden],
.youtube-stage-skeleton[hidden] {
    display: none !important;
}

.youtube-stage-skeleton .skeleton-shell,
.youtube-stage-skeleton .skeleton-card,
.youtube-stage-skeleton .youtube-stage-skeleton-block {
    width: 100%;
    height: 100%;
}

.youtube-stage-skeleton-block {
    border-radius: 20px;
}

.youtube-style-panel,
.youtube-cut-editor,
.youtube-confirmed-script {
    width: 100%;
    min-width: 0;
    display: grid;
    gap: 12px;
}

.youtube-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.youtube-style-count {
    min-width: 42px;
    height: 24px;
    padding: 0 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #6b7fff;
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
}

.youtube-style-slider {
    position: relative;
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.youtube-style-arrow {
    position: absolute;
    top: 30px;
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, .95);
    color: #5d6978;
    box-shadow: 0 4px 14px rgba(135, 148, 167, .08);
    z-index: 2;
}

.youtube-style-arrow#youtube-style-prev {
    left: -19px;
}

.youtube-style-arrow#youtube-style-next {
    right: -19px;
}

.youtube-style-track-shell {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
}

.youtube-style-track {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
    padding: 0 0 4px;
}

.youtube-style-track .swiper-wrapper {
    align-items: flex-start;
    min-width: 0;
}

.youtube-style-track .swiper-slide {
    width: auto;
    min-width: 0;
}

.youtube-style-card {
    width: 100%;
    min-width: 0;
    display: grid;
    gap: 10px;
    justify-items: center;
    color: #4f5967;
    padding-left: 0px;
    padding-right: 0px;
}

.youtube-style-card img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 14px;
    border: 3px solid transparent;
    box-shadow: 0 6px 16px rgba(135, 148, 167, .08);
}

.youtube-style-card span {
    font-size: 12px;
    font-weight: 700;
}

.youtube-style-card.active img {
    border-color: #6b7fff;
    box-shadow: 0 10px 18px rgba(107, 127, 255, .18);
}

.youtube-style-card.active span {
    color: #3950ff;
}

.youtube-cut-tools {
    display: flex;
    align-items: center;
    gap: 8px;
}

.youtube-mini-btn {
    height: 34px;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border-radius: 10px;
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, .95);
    color: #556070;
    font-size: 12px;
    font-weight: 700;
    box-shadow: 0 4px 14px rgba(135, 148, 167, .06);
}

.youtube-mini-btn iconify-icon {
    font-size: 15px;
}

.youtube-cut-list {
    display: grid;
    gap: 10px;
    margin-top: 16px;
    margin-bottom: 16px;
}

.youtube-cut-card {
    padding: 18px 20px;
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr) 88px;
    gap: 12px;
    align-items: start;
    border-radius: 16px;
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, .0);
    box-shadow: 0 4px 14px rgba(135, 148, 167, .06);
    text-align: left;
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.youtube-cut-card:hover {
    transform: translateY(-1px);
}

.youtube-cut-card.active {
    border-color: #6b7fff;
    box-shadow: 0 10px 18px rgba(107, 127, 255, .12);
}

.youtube-cut-index {
    font-size: 13px;
    font-weight: 800;
    color: #536071;
}

.youtube-cut-copy {
    display: grid;
    gap: 10px;
}

.youtube-cut-copy p {
    margin: 0;
    font-size: 13px;
    line-height: 1.6;
    color: #4f5967;
}

.youtube-cut-meta {
    display: flex;
    align-items: center;
    gap: 8px;
}

.youtube-cut-meta span {
    min-width: 46px;
    height: 24px;
    padding: 0 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #eef3f9;
    color: #677384;
    font-size: 11px;
    font-weight: 700;
}

.youtube-cut-thumb {
    position: relative;
    width: 88px;
    height: 66px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: #f5f7fb;
    color: #9aa7b6;
    font-size: 12px;
    font-weight: 700;
    overflow: hidden;
}

.youtube-cut-thumb.ready img,
.youtube-cut-thumb.ready video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.youtube-cut-thumb img[hidden],
.youtube-cut-thumb video[hidden] {
    display: none !important;
}

.youtube-cut-thumb span {
    position: relative;
    z-index: 1;
}

.youtube-cut-download {
    position: absolute;
    right: 6px;
    bottom: 6px;
    z-index: 3;
    width: 30px;
    height: 30px;
    display: inline-grid;
    place-items: center;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, .72);
    background: rgba(15, 23, 42, .72);
    color: #ffffff;
    text-decoration: none;
}

.youtube-cut-download[hidden] {
    display: none !important;
}

.youtube-cut-download iconify-icon {
    font-size: 17px;
}

.youtube-cut-thumb.loading::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, #eef2f7 0%, #f8fafc 50%, #eef2f7 100%);
    background-size: 200% 100%;
    animation: youtube-thumb-skeleton 1.1s linear infinite;
}

@keyframes youtube-thumb-skeleton {
    to {
        background-position: -200% 0;
    }
}

.youtube-cut-audio-play {
    position: absolute;
    right: 8px;
    bottom: 8px;
    z-index: 2;
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 8px;
    background: rgba(15, 23, 42, .82);
    color: #ffffff;
    font-size: 18px;
}

.youtube-cut-audio-play[hidden] {
    display: none !important;
}

.youtube-cut-image-dialog {
    width: min(860px, calc(100vw - 60px));
    padding: 24px;
}

.youtube-cut-image-dialog img {
    width: 100%;
    max-height: 72vh;
    display: block;
    object-fit: contain;
    border-radius: 14px;
}

.youtube-history-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.youtube-library-history.youtube-history-grid {
    grid-template-columns: repeat(2, minmax(320px, 1fr));
}

.youtube-history-card,
.youtube-history-empty {
    min-height: 176px;
    padding: 24px;
    border-radius: 20px;
    text-align: left;
}

.youtube-history-card {
    border: 1px solid rgba(82, 116, 255, .18);
    background: #ffffff;
}

.youtube-history-card {
    display: grid;
    gap: 10px;
    position: relative;
    width: 100%;
}

.youtube-history-thumb {
    width: 100%;
    aspect-ratio: 16 / 9;
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 1px solid rgba(82, 116, 255, .18);
    border-radius: 8px;
    background: #f4f7fb;
    color: #8b95a5;
    font-size: 14px;
    font-weight: 700;
    text-align: center;
}

.youtube-history-thumb img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.youtube-history-thumb span {
    width: 100%;
    display: grid;
    place-items: center;
    padding: 0 12px;
    text-align: center;
}

.youtube-history-card strong {
    font-size: 18px;
    color: #111827;
    padding-right: 34px;
}

.youtube-history-card span,
.youtube-history-card p,
.youtube-history-empty {
    margin: 0;
    color: #8b95a5;
    font-size: 14px;
}

.youtube-history-empty {
    min-height: 220px;
    grid-column: 1 / -1;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 10px;
    padding: 32px 0;
    border: 0;
    background: transparent;
    color: #b8c2d2;
    text-align: center;
}

.youtube-history-empty iconify-icon {
    font-size: 42px;
    color: #c6ceda;
}

.youtube-history-empty span {
    color: #b8c2d2;
    font-size: 16px;
    font-weight: 700;
}

.youtube-history-prompt {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.55;
}

.youtube-history-delete {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 30px;
    height: 30px;
    display: inline-grid;
    place-items: center;
    border: 1px solid rgba(226, 232, 240, .95);
    border-radius: 8px;
    background: #fff;
    color: #8b95a5;
    cursor: pointer;
}

.youtube-history-delete:hover {
    color: #e5484d;
    border-color: rgba(229, 72, 77, .32);
}

.youtube-history-actions {
    margin-top: 28px;
    display: flex;
    gap: 10px;
    justify-content: center;
}

.youtube-cut-generate-row {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.youtube-cut-empty {
    min-height: 120px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    background: #ffffff;
    border: 1px dashed rgba(190, 201, 214, .92);
    color: #758398;
    font-size: 14px;
    font-weight: 700;
}

.youtube-cut-shell > .youtube-confirmed-script {
    display: none;
}

.youtube-subtitle-chip-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.youtube-subtitle-shell .yt-subtitle-top {
    display: block;
}

.yt-subtitle-options {
    display: none;
}

.youtube-subtitle-dropdown-bar {
    position: relative;
    z-index: 12;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin: 0px;
}

.youtube-subtitle-dropdown-left,
.youtube-subtitle-dropdown-right {
    display: flex;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 8px;
    min-width: 0;
}

.youtube-subtitle-dropdown-left {
    flex: 1 1 auto;
}

.youtube-subtitle-dropdown-right {
    flex: 0 0 auto;
    margin-left: auto;
}

.youtube-subtitle-dropdown {
    position: relative;
    flex: 0 0 auto;
}

.youtube-subtitle-dropdown summary {
    height: 38px;
    min-width: 118px;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border: 1px solid rgba(207, 216, 228, .95);
    border-radius: 8px;
    background: #ffffff;
    color: #364152;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    list-style: none;
}

.youtube-subtitle-dropdown summary::-webkit-details-marker {
    display: none;
}

.youtube-subtitle-dropdown summary svg {
    width: 16px;
    height: 16px;
    transition: transform .18s ease;
}

.youtube-subtitle-dropdown[open] summary svg {
    transform: rotate(180deg);
}

.youtube-subtitle-dropdown-panel {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    width: 260px;
    max-height: 280px;
    overflow-y: auto;
    padding: 12px;
    border: 1px solid rgba(207, 216, 228, .95);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 16px 34px rgba(15, 23, 42, .14);
}

.youtube-subtitle-dropdown.wide .youtube-subtitle-dropdown-panel {
    width: 180px;
}

.youtube-subtitle-dropdown.compact .youtube-subtitle-dropdown-panel {
    width: 150px;
}

.youtube-subtitle-dropdown.bgm .youtube-subtitle-dropdown-panel {
    left: auto;
    right: 0;
    width: 320px;
}

.youtube-subtitle-dropdown-panel .youtube-subtitle-chip-group,
.youtube-subtitle-dropdown-panel .youtube-bgm-controls,
.youtube-subtitle-dropdown-panel .youtube-volume-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}

.youtube-subtitle-dropdown-panel .youtube-subtitle-chip-group .yt-toolbar-btn {
    width: 100%;
    justify-content: flex-start;
    min-width: 0;
    padding: 0 10px;
}

.youtube-subtitle-dropdown-panel .youtube-subtitle-chip-group {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.youtube-subtitle-dropdown-panel .youtube-subtitle-slider-grid,
.youtube-subtitle-dropdown-panel .youtube-subtitle-color-grid {
    grid-template-columns: 1fr;
}

.youtube-subtitle-dropdown.wide .youtube-subtitle-dropdown-panel,
.youtube-subtitle-dropdown.compact .youtube-subtitle-dropdown-panel {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.youtube-subtitle-dropdown.compact .youtube-volume-grid {
    grid-template-columns: 1fr;
}

.youtube-subtitle-dropdown-panel .youtube-subtitle-color-grid {
    margin: 0 0 10px;
}

.youtube-subtitle-dropdown-panel .youtube-bgm-mood-select.radio-mode .custom-select-trigger {
    display: none;
}

.youtube-subtitle-dropdown-panel .youtube-bgm-mood-select.radio-mode .custom-select-menu {
    position: static;
    width: 100%;
    max-height: none;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    transform: none;
}

.youtube-subtitle-dropdown-panel .youtube-bgm-mood-select.radio-mode .custom-option {
    height: auto;
    min-height: 38px;
    display: grid;
    align-items: center;
    gap: 4px;
    padding: 10px 12px;
    border: 1px solid rgba(226, 232, 240, .95);
    border-radius: 8px;
    background: #ffffff;
    color: #4f5967;
    text-align: left;
}

.youtube-subtitle-dropdown-panel .youtube-bgm-mood-select.radio-mode .custom-option strong {
    color: inherit;
    font-size: 14px;
    font-weight: 800;
}

.youtube-subtitle-dropdown-panel .youtube-bgm-mood-select.radio-mode .custom-option span {
    color: #8b95a5;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.45;
}

.youtube-subtitle-dropdown-panel .youtube-bgm-mood-select.radio-mode .custom-option.active {
    border-color: #6b7fff;
    color: #3950ff;
    background: #ffffff;
}

.youtube-bgm-panel.is-moved {
    display: none;
}

body.dark-mode .youtube-subtitle-dropdown summary,
body.dark-mode .youtube-subtitle-dropdown-panel {
    background: #182235;
    border-color: #2b3b52;
    color: #e5eefc;
}

.yt-subtitle-top .yt-process-card > * + * {
    margin-top: 4px;
}

.youtube-subtitle-chip-group + .youtube-subtitle-chip-group {
    margin-top: 10px;
}

.youtube-subtitle-chip-group + .yt-range-field,
.youtube-subtitle-slider-grid + .yt-range-field,
.yt-range-field + .yt-range-field,
.yt-range-field + .youtube-subtitle-slider-grid {
    margin-top: 10px;
}

.youtube-subtitle-slider-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    align-items: start;
}

.youtube-subtitle-color-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 10px;
}

.youtube-subtitle-color-field {
    display: grid;
    gap: 8px;
}

.youtube-subtitle-color-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.youtube-subtitle-color-head .youtube-field-label {font-size: 14px !important;}

.yt-subtitle-options,
.yt-subtitle-previewpane {
    padding: 24px;
    border-radius: 14px;
    border: 1px solid rgba(226, 232, 240, .95);
    box-shadow: 0 8px 24px rgba(135, 148, 167, .08);
    background: rgba(255, 255, 255, .92);
}

.youtube-subtitle-color-chip {
    width: 20px;
    height: 20px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    padding: 0px;
    background: #eef3f9;
    border: 1px solid rgba(226, 232, 240, .95);
    box-shadow: 0 4px 12px rgba(135, 148, 167, .08);
    cursor: pointer;
}

.youtube-subtitle-color-chip input[type="color"] {
    width: 100%;
    height: 100%;
    border: 0;
    padding: 0;
    background: transparent;
    border-radius: 999px;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
}

.youtube-subtitle-color-chip input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
    border-radius: 999px;
}

.youtube-subtitle-color-chip input[type="color"]::-webkit-color-swatch {
    border: 0;
    border-radius: 999px;
}

.youtube-subtitle-color-chip input[type="color"]::-moz-color-swatch {
    border: 0;
    border-radius: 999px;
}

.youtube-subtitle-script-input {
    min-height: 120px;
}

.youtube-subtitle-summary {
    display: grid;
    gap: 10px;
}

.youtube-subtitle-summary-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 13px;
    color: #697586;
}

.youtube-subtitle-summary-row strong {
    color: #364152;
    font-size: 14px;
}

.youtube-subtitle-summary-copy {
    margin: 4px 0 0;
    padding: 14px 16px;
    border-radius: 10px;
    background: #f4f7fb;
    color: #556070;
    font-size: 13px;
    line-height: 1.65;
    border: 0px solid rgba(226, 232, 240, .95);
}

.youtube-subtitle-timeline {
    width: 100%;
}

.youtube-subtitle-timeline .yt-timeline-shell.editor {
    padding: 24px;
}

.youtube-subtitle-timeline .yt-editor-board {
    overflow-x: auto;
}

.youtube-subtitle-timeline .yt-track-grid {
    min-width: 760px;
}

.youtube-subtitle-timeline .yt-track-clip-main {
    border: 0;
}

.youtube-subtitle-timeline .yt-track-clip.subtitle .yt-track-clip-main,
.youtube-subtitle-timeline .yt-track-clip.visual .yt-track-clip-main {
    color: inherit;
}

.youtube-subtitle-timeline .yt-track-media-icon {
    flex: 0 0 auto;
    margin-right: 4px;
    font-size: 13px;
}

.youtube-subtitle-timeline .yt-track-clip.audio.playing {
    outline: 2px solid #0f766e;
    z-index: 4;
}

.youtube-subtitle-timeline .yt-track-clip.bgm.playing {
    outline: 2px solid #92400e;
    z-index: 4;
}

.youtube-subtitle-timeline .yt-track-clip.audio.playing .yt-track-clip-main,
.youtube-subtitle-timeline .yt-track-clip.bgm.playing .yt-track-clip-main {
    position: relative;
    filter: saturate(1.25);
}

.youtube-subtitle-timeline .yt-track-clip.audio.playing .yt-track-clip-main canvas,
.youtube-subtitle-timeline .yt-track-clip.bgm.playing .yt-track-clip-main canvas {
    z-index: 0;
}

.youtube-subtitle-timeline .yt-track-clip.audio.playing .yt-track-clip-main::after,
.youtube-subtitle-timeline .yt-track-clip.bgm.playing .yt-track-clip-main::after {
    content: "재생중";
    position: relative;
    z-index: 1;
    margin-left: auto;
    padding: 2px 6px;
    border-radius: 6px;
    color: #ffffff;
    font-size: 10px;
    line-height: 1.2;
}

.youtube-subtitle-timeline .yt-track-clip.audio.playing .yt-track-clip-main::after {
    background: #0f766e;
}

.youtube-subtitle-timeline .yt-track-clip.bgm.playing .yt-track-clip-main::after {
    background: #92400e;
}

.yt-subtitle-top .yt-process-card {
    padding: 0;
    border: 0;
    box-shadow: none;
    background: transparent;
    border-radius: 0;
}

.yt-subtitle-top .yt-toolbar-btn {
    min-height: 38px;
    padding: 0 14px;
    border-radius: 12px;
    border: 1px solid rgba(226, 232, 240, .95);
    background: #ffffff;
    color: #4f5967;
    box-shadow: 0 4px 12px rgba(135, 148, 167, .06);
}

.yt-toolbar-btn span {font-size: 14px;}

.yt-subtitle-top .yt-toolbar-btn.active {
    border-color: #6b7fff;
    color: #3950ff;
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(135, 148, 167, .06);
}

.yt-subtitle-top #youtube-subtitle-toggle-btn {
    gap: 10px;
}

.yt-subtitle-top #youtube-subtitle-toggle-btn.active {
    background: #ffffff;
}

.yt-subtitle-top .yt-toolbar-switch.on {
    background: #6177ff;
}

.yt-subtitle-top .yt-time-readout {
    width: 100%;
    text-align: right;
    margin: 0 0 10px;
}

.yt-subtitle-top .yt-range-field {
    display: grid;
    gap: 10px;
    align-content: start;
}

.yt-subtitle-top .yt-range-field div {
    min-height: 40px;
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: end;
    gap: 10px;
}

.yt-subtitle-top .yt-range-field strong {
    font-size: 16px;
    color: #364152;
}

.yt-subtitle-top .yt-range-field span {
    color: #7b8798;
    justify-self: end;
    text-align: right;
    line-height: 1.2;
}

.yt-subtitle-top .yt-range-field input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 4px;
    border-radius: 999px;
    background: #d9dee7;
    outline: none;
    accent-color: auto;
}

.yt-subtitle-top .yt-range-field input[type="range"]::-webkit-slider-runnable-track {
    height: 4px;
    border-radius: 999px;
    background: #d9dee7;
}

.yt-subtitle-top .yt-range-field input[type="range"]::-moz-range-track {
    height: 4px;
    border-radius: 999px;
    background: #d9dee7;
    border: 0;
}

.yt-subtitle-top .yt-range-field input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    margin-top: -7px;
    border-radius: 999px;
    border: 1px solid #cdd6e3;
    background: #ffffff;
    box-shadow: 0 4px 10px rgba(135, 148, 167, .16);
}

.yt-subtitle-top .yt-range-field input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 999px;
    border: 1px solid #cdd6e3;
    background: #ffffff;
    box-shadow: 0 4px 10px rgba(135, 148, 167, .16);
}

.youtube-cut-stage-media .yt-caption-overlay {
    position: absolute;
    z-index: 2;
    width: fit-content;
    min-width: 0;
    max-width: calc(100% - 32px);
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    padding: 8px 14px;
    border-radius: 18px;
    text-align: center;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .18);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: normal;
}

.youtube-cut-stage-media .yt-caption-overlay.top {
    top: 20px;
}

.youtube-cut-stage-media .yt-caption-overlay.middle {
    top: 50%;
    transform: translate(-50%, -50%);
}

.youtube-cut-stage-media .yt-caption-overlay.bottom {
    bottom: 20px;
}

.youtube-cut-stage-media .yt-caption-overlay span {
    display: inline;
    width: auto;
    max-width: 100%;
    line-height: 1.45;
    word-break: keep-all;
}

.youtube-action-row.voice-actions {
    width: min(100%, 920px);
    margin: 0 auto;
    justify-self: center;
}

.youtube-action-row.youtube-cut-actions {
    width: 100%;
    max-width: 920px;
    margin: 0 auto;
    justify-self: center;
}

.youtube-title-row {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
    align-items: center;
}

.youtube-text-input,
.youtube-script-input {
    width: 100%;
    border: 1px solid rgba(226, 232, 240, .95);
    background: #ffffff;
    color: #374151;
    border-radius: 10px;
    box-shadow: 0 4px 14px rgba(135, 148, 167, .06);
}

.youtube-text-input {
    height: 46px;
    padding: 0 56px 0 20px;
    font-size: 15px;
}

.youtube-ai-script-block {
    display: grid;
    gap: 14px;
    padding: 18px 20px;
    border-radius: 10px;
    background: #ffffff;
    box-shadow: 0 4px 14px rgba(135, 148, 167, .06);
}

.youtube-ai-script-head {
    display: grid;
    gap: 6px;
}

.youtube-ai-script-head p {
    margin: 0;
    color: #7b8796;
    font-size: 14px;
    font-weight: 600;
}

.youtube-ai-script-controls {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
}

.youtube-duration-group {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    flex-wrap: wrap;
}

.youtube-duration-option {
    min-width: 74px;
}

.youtube-duration-option .youtube-ratio-card-btn {
    width: 74px;
    height: 46px;
    font-size: 13px;
    font-weight: 800;
    color: #6c7888;
}

.youtube-duration-option.active .youtube-ratio-card-btn {
    color: #2940ff;
}

.youtube-duration-option .youtube-ratio-card-btn.disabled,
.youtube-duration-option .youtube-ratio-card-btn[disabled] {
    opacity: .3;
}

.youtube-script-input {
    min-height: 200px;
    padding: 16px 20px;
    font-size: 15px;
    line-height: 1.6;
    border: 1px solid rgba(226, 232, 240, .95);
}

.youtube-script-input.youtube-subtitle-script-input {
    border: 1px solid rgba(226, 232, 240, .95);
}

.youtube-preset-anchor {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    display: grid;
    place-items: center;
}

.youtube-preset-trigger {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: #6c80ff;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.youtube-preset-trigger iconify-icon {
    font-size: 24px;
}

.youtube-preset-tooltip {
    position: absolute;
    right: -3px;
    bottom: calc(100% + 0px);
    min-height: 40px;
    padding: 0 16px;
    display: flex;
    align-items: center;
    border-radius: 6px;
    background: #4c545e;
    color: #ffffff;
    white-space: nowrap;
    font-size: 13px;
    font-weight: 300;
    opacity: 0;
    visibility: hidden;
    transition: opacity .25s ease, visibility .25s ease;
}

.youtube-preset-tooltip::before {
    content: "";
    position: absolute;
    right: 16px;
    bottom: -4px;
    width: 12px;
    height: 12px;
    background: #4c545e;
    transform: rotate(45deg);
    border-radius: 2px;
}

.youtube-preset-anchor:hover .youtube-preset-tooltip {
    opacity: 1;
    visibility: visible;
}

.youtube-preset-tooltip.show {
    opacity: 1;
    visibility: visible;
    animation: youtubeTooltipIntro 3s ease forwards;
}

@keyframes youtubeTooltipIntro {
    0% {
        opacity: 0;
        visibility: visible;
    }

    12% {
        opacity: 1;
        visibility: visible;
    }

    72% {
        opacity: 1;
        visibility: visible;
    }

    100% {
        opacity: 0;
        visibility: hidden;
    }
}

.youtube-action-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.youtube-step-buttons {
    display: flex;
    align-items: center;
    gap: 8px;
}

.youtube-generate-btn {
    height: 46px;
    padding: 0 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border-radius: 12px;
    background: #6177ff;
    color: #ffffff;
    font-size: 16px;
    font-weight: 700;
    box-shadow: 0 12px 24px rgba(97, 119, 255, .22);
}

.youtube-generate-btn.loading {
    opacity: .92;
}

.youtube-generate-btn .button-spinner {
    width: 16px;
    height: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    animation: buttonSpin .8s linear infinite;
    transform-origin: center;
}

.youtube-generate-btn .button-spinner iconify-icon {
    font-size: 16px;
}

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

.youtube-credit-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    font-weight: 800;
}

.youtube-credit-pill iconify-icon {
    font-size: 14px;
}

.youtube-preset-modal {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: none;
}

.youtube-preset-modal.open {
    display: block;
}

.youtube-preset-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(71, 79, 90, .34);
    backdrop-filter: blur(2px);
}

.youtube-preset-dialog {
    position: relative;
    width: min(830px, calc(100vw - 60px));
    max-height: 70vh;
    overflow: auto;
    margin: 18vh auto 0;
    padding: 28px 34px 30px;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 28px 50px rgba(56, 67, 83, .18);
    display: grid;
    gap: 22px;
}

.youtube-modal-head h2 {
    margin: 0;
    font-size: 18px;
    letter-spacing: -.03em;
}

.youtube-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: transparent;
    color: #4b5563;
}

.youtube-modal-actions {
    display: flex;
    justify-content: flex-end;
}

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

.youtube-preset-card {
    min-height: 68px;
    padding: 16px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border-radius: 14px;
    text-align: left;
    background: #eef3f9;
    border: 1.5px solid transparent;
    color: #4b5563;
}

.youtube-preset-card strong {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.35;
}

.youtube-preset-card span {
    min-width: 62px;
    height: 28px;
    padding: 0 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #ffffff;
    color: #7c8696;
    font-size: 12px;
    font-weight: 700;
}

.youtube-preset-card.active {
    border-color: #6b7fff;
    background: #fff;
}

.youtube-preset-card.active span {background-color: #f0f5f9;}

.youtube-preset-preview {
    display: grid;
    gap: 14px;
}

.youtube-preset-inline {
    width: 100%;
    max-height: none;
    overflow: visible;
    margin: 0;
    padding: 20px;
    box-shadow: none;
}

.youtube-preset-inline .youtube-modal-head h2 {
    margin: 0;
}

.youtube-preset-inline-copy {
    margin: 10px 0 0;
    font-size: 14px;
    line-height: 1.7;
    color: #5b6472;
    word-break: keep-all;
}

.youtube-custom-style-box {
    margin-top: 14px;
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.75fr);
    gap: 16px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.youtube-custom-style-box .upload-slot {
    grid-column: auto;
    width: 100%;
    padding: 18px 20px;
    border-radius: 14px;
    background: #ffffff;
    min-height: 178px;
}

.youtube-custom-style-box .upload-slot-head strong {
    font-size: 16px;
    font-weight: 800;
    color: #111827;
}

.youtube-custom-style-box .upload-slot p {
    font-size: 14px;
    line-height: 1.65;
    color: #8b95a5;
}

.youtube-custom-style-box .upload-actions {
    margin-top: 18px;
}

.youtube-custom-style-box .youtube-style-prompt-input {
    width: 100%;
    min-height: 70px;
    margin-top: 8px;
    padding: 16px 20px;
    background: transparent;
    border: 1px solid rgba(226, 232, 240, .95);
    
}

.youtube-custom-style-box .youtube-style-prompt-slot {
    cursor: default;
}

@media (max-width: 980px) {
    .youtube-custom-style-box {
        grid-template-columns: 1fr;
    }

    .youtube-history-grid {
        grid-template-columns: 1fr;
    }
}

.youtube-preset-preview strong {
    font-size: 16px;
    color: #374151;
}

.youtube-preset-preview p {
    margin: 0;
    font-size: 14px;
    line-height: 1.62;
    color: #5b6472;
}

.youtube-preview-meta {
    display: flex;
    align-items: center;
    gap: 8px;
}

.youtube-preview-meta span {
    min-width: 68px;
    height: 28px;
    padding: 0 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #eef3f9;
    color: #596271;
    font-size: 12px;
    font-weight: 700;
}

.page-view.is-active .youtube-menu-page {
    opacity: 1;
}

.page-view.is-active .youtube-menu-main {
    animation: riseFadeLarge .62s cubic-bezier(.22, .61, .36, 1) forwards;
    opacity: 0;
}

body.dark-mode .youtube-step-item {
    color: #7f8ca1;
}

body.dark-mode .youtube-step-item.active {
    color: #e6eefb;
    background: #182235;
    box-shadow: none;
}

body.dark-mode .youtube-menu-subtitle {
    color: #94a3b8;
}

body.dark-mode .youtube-stage-arrow {
    background: #182235;
    border-color: #2b3b52;
    color: #b2bdd0;
    box-shadow: none;
}

body.dark-mode .youtube-stage-arrow:hover {
    color: #eef5ff;
}

body.dark-mode .youtube-stage-card {
    background: #ffffff;
}

body.dark-mode .youtube-stage-badge {
    background: #eef2f7;
    color: #738095;
}

body.dark-mode .youtube-ratio-label {
    color: #ffffff;
}

body.dark-mode .youtube-ratio-text {
    color: #94a3b8;
}

body.dark-mode .youtube-ratio-option.active .youtube-ratio-card-btn {
    background: #182235;
    border-color: #6b7fff;
}

body.dark-mode .youtube-action-btn-primary {
    background: #4d5561;
    color: #ffffff;
}

body.dark-mode .youtube-action-btn-primary:hover {
    background: #424954;
}

body.dark-mode .youtube-action-btn-secondary {
    background: #2a3546;
    color: #e5eefc;
}

body.dark-mode .youtube-field-label {
    color: #c7d1e0;
}

body.dark-mode .youtube-text-input,
body.dark-mode .youtube-script-input,
body.dark-mode .youtube-modal-close,
body.dark-mode .youtube-confirmed-script-box,
body.dark-mode .youtube-voice-card,
body.dark-mode .youtube-voice-generate-box,
body.dark-mode .youtube-selected-voice-card,
body.dark-mode .youtube-style-arrow,
body.dark-mode .youtube-mini-btn,
body.dark-mode .youtube-cut-card,
body.dark-mode .youtube-cut-empty {
    background: #182235;
    border-color: #2b3b52;
    color: #e5eefc;
    box-shadow: none;
}

body.dark-mode .youtube-thumb-style-row .youtube-mini-btn.active {
    border-color: #6b7fff;
    color: #8fa3ff;
    background: #182235;
}

body.dark-mode .youtube-cut-card {border-color:transparent;}
body.dark-mode .youtube-preset-trigger {
    background: transparent;
    border-color: transparent;
    color: #8fa3ff;
}

body.dark-mode .youtube-preset-tooltip,
body.dark-mode .youtube-preset-tooltip::before {
    background: #0f172a;
}

body.dark-mode .youtube-generate-btn {
    background: #6177ff;
    color: #ffffff;
}

body.dark-mode .youtube-ai-script-head p {
    color: #94a3b8;
}

body.dark-mode .youtube-ai-script-block {
    background: #111827;
}

body.dark-mode .youtube-duration-option .youtube-ratio-card-btn {
    color: #94a3b8;
}

body.dark-mode .youtube-duration-option.active .youtube-ratio-card-btn {
    color: #e6eefb;
}

body.dark-mode .youtube-voice-option .youtube-ratio-card-btn {
    color: #94a3b8;
}

body.dark-mode .youtube-voice-option.active .youtube-ratio-card-btn {
    color: #e6eefb;
}

body.dark-mode .youtube-preset-dialog {
    background: #111827;
}

body.dark-mode .youtube-preset-card {
    background: #182235;
    color: #e5eefc;
}

body.dark-mode .youtube-preset-card span,
body.dark-mode .youtube-preview-meta span {
    background: #243247;
    color: #c3cfdf;
}

body.dark-mode .youtube-preset-preview strong {
    color: #f3f6fb;
}

body.dark-mode .youtube-preset-preview p {
    color: #c0cada;
}

body.dark-mode .youtube-voice-name strong,
body.dark-mode .youtube-voice-name small,
body.dark-mode .youtube-confirmed-script-box {
    color: #c0cada;
}

body.dark-mode .youtube-voice-action {
    background: #243247;
    color: #dbe7ff;
}

body.dark-mode .youtube-selected-voice-remove {
    background: #243247;
    color: #dbe7ff;
}

body.dark-mode .youtube-cut-copy p,
body.dark-mode .youtube-cut-index,
body.dark-mode .youtube-style-card span {
    color: #c0cada;
}

body.dark-mode .youtube-cut-meta span,
body.dark-mode .youtube-cut-thumb {
    background: #243247;
    color: #dbe7ff;
}

body.dark-mode .youtube-subtitle-summary-row,
body.dark-mode .youtube-subtitle-summary-copy {
    color: #c0cada;
}

body.dark-mode .youtube-subtitle-summary-row strong {
    color: #f3f6fb;
}

body.dark-mode .youtube-subtitle-summary-copy {
    background: #182235;
}

body.dark-mode .youtube-render-preview {border:1px solid #2b3b52;}
body.dark-mode .youtube-render-metric {border:1px solid #2b3b52;}
body.dark-mode #youtube-render-thumb-text {border-color: #2b3b52;}
body.dark-mode .youtube-stage-card {background: #182235;}
body.dark-mode .youtube-cut-stage-media {background: #182235;}
body.dark-mode .youtube-stage-card::before {background: #182235;}
body.dark-mode .youtube-stage-card {box-shadow:none;}
body.dark-mode .youtube-render-card,
body.dark-mode .youtube-render-preview,
body.dark-mode .youtube-render-metric {
    background: #182235;
    border-color: #2b3b52;
    box-shadow: none;
}

body.dark-mode .youtube-preset-tooltip {background: #2a3546;}
body.dark-mode .youtube-preset-tooltip::before {background: #2a3546;}

body.dark-mode .youtube-render-icon-btn {
    background: #6b7fff;
    color: #ffffff;
    box-shadow: none;
}

body.dark-mode .youtube-render-icon-btn-download {
    background: #182235;
    border-color: #2b3b52;
}

body.dark-mode .youtube-render-icon-btn-download iconify-icon {
    color: #8fa3ff;
}

body.dark-mode .youtube-history-delete {
    background: #101827;
    border-color: #2b3b52;
    color: #b8c2d2;
}

body.dark-mode .youtube-render-empty,
body.dark-mode .youtube-render-metric span,
body.dark-mode .youtube-render-progress-head span {
    color: #c0cada;
}

body.dark-mode .youtube-render-metric strong {
    color: #f3f6fb;
}

body.dark-mode .youtube-render-progress-head strong {
    color: #f3f6fb;
}

body.dark-mode .youtube-render-progress-bar {
    background: #243246;
}

body.dark-mode .yt-subtitle-options,
body.dark-mode .yt-subtitle-previewpane {
    background: #182235;
    border-color: #2b3b52;
    box-shadow: none;
}

body.dark-mode .youtube-subtitle-color-chip,
body.dark-mode .yt-subtitle-top .yt-toolbar-btn,
body.dark-mode .yt-subtitle-top .yt-process-card {
    background: #182235;
    border-color: #2b3b52;
    box-shadow: none;
    color: #e5eefc;
}


body.dark-mode .yt-subtitle-top .yt-toolbar-switch.on {
    background: #6177ff;
}

body.dark-mode .youtube-menu-title {
    background-image: linear-gradient(90deg, #f5f9ff 0%, #8b7dff 36%, #63e2ff 72%, #d8e7ff 100%);
    background-size: 220% 100%;
    background-position: 0% 50%;
}


#youtube-render-thumb-text {border: 1px solid rgba(226, 232, 240, .95);}

body.dark-mode .yt-subtitle-top .yt-toolbar-btn.active {
    border-color: #6b7fff !important;
    color: #8fa3ff !important;
    background: #182235 !important;
}

@media (max-width:1024px) {
    .youtube-menu-page {
        padding: 48px 0 84px;
    }

    .youtube-menu-layout {
        min-height: auto;
    }

    .youtube-step-sidebar {
        position: fixed;
        left: 20px;
        top: 50%;
        transform: translateY(-50%);
        justify-content: center;
        margin-bottom: 0;
    }


    .youtube-stage-controls {
        width: min(100%, 1040px);
    }

    .youtube-ratio-row {
        width: min(100%, 920px);
    }
}

@media (max-width:780px) {
    .youtube-menu-title {
        font-size: 34px;
    }

    .youtube-menu-subtitle {
        font-size: 14px;
    }

    .youtube-menu-main {
        width: 100%;
    }

    .youtube-step-screen {
        width: 100%;
    }

    .youtube-step-sidebar {
        display: none !important;
    }

    .youtube-stage-controls {
        grid-template-columns: minmax(0, 1fr);
    }

    .youtube-subtitle-dropdown-bar,
    .youtube-subtitle-dropdown-left,
    .youtube-subtitle-dropdown-right {
        width: 100%;
    }

    .youtube-subtitle-dropdown-right {
        margin-left: 0;
    }

    .youtube-subtitle-dropdown {
        flex: 1 1 calc(50% - 8px);
        min-width: 0;
    }

    .youtube-subtitle-dropdown.bgm {
        flex-basis: 100%;
    }

    .youtube-subtitle-dropdown summary {
        width: 100%;
        min-width: 0;
    }

    .youtube-subtitle-dropdown .youtube-subtitle-dropdown-panel,
    .youtube-subtitle-dropdown.wide .youtube-subtitle-dropdown-panel,
    .youtube-subtitle-dropdown.compact .youtube-subtitle-dropdown-panel,
    .youtube-subtitle-dropdown.bgm .youtube-subtitle-dropdown-panel {
        left: 0;
        right: auto;
        width: min(260px, calc(100vw - 48px));
    }

    .youtube-stage-shell {
        order: 1;
    }

    .youtube-stage-arrow {
        width: 48px;
        height: 48px;
    }

    .youtube-stage-arrow#youtube-stage-prev {
        left: 0;
        top: auto;
        bottom: -8px;
        transform: none;
    }

    .youtube-stage-arrow#youtube-stage-next {
        right: 0;
        top: auto;
        bottom: -8px;
        transform: none;
    }

    .youtube-stage-card.ratio-16-9 {
        --stage-width: min(100%, 640px);
        --stage-height: 360px;
    }

    .youtube-stage-card.ratio-1-1 {
        --stage-width: min(100%, 420px);
        --stage-height: 420px;
    }

    .youtube-stage-card.ratio-9-16 {
        --stage-width: min(100%, 300px);
        --stage-height: 534px;
    }

    .youtube-ratio-row {
        width: 100%;
        display: grid;
        gap: 24px;
    }

    .youtube-action-btn {
        width: 100%;
        min-width: 0;
        height: 52px;
        font-size: 16px;
    }

    .youtube-title-row,
    .youtube-ai-script-controls,
    .youtube-action-row,
    .youtube-step-buttons {
        grid-template-columns: 1fr;
        display: grid;
    }

    .youtube-voice-shell {
        grid-template-columns: 1fr;
    }

    .youtube-cut-shell,
    .youtube-subtitle-shell,
    .youtube-video-shell,
    .youtube-render-shell,
    .youtube-script-shell,
    .youtube-voice-shell,
    .youtube-action-row.voice-actions,
    .youtube-action-row.youtube-cut-actions {
        width: 100%;
        max-width: 100%;
    }

    .youtube-style-panel,
    .youtube-cut-editor,
    .youtube-cut-list,
    .youtube-cut-card,
    .youtube-confirmed-script-box {
        width: 100%;
        min-width: 0;
    }

    .youtube-style-slider {
        width: 100%;
        padding: 0 18px;
    }

    .youtube-style-arrow {
        top: 14px;
    }

    .youtube-style-arrow#youtube-style-prev {
        left: 0;
    }

    .youtube-style-arrow#youtube-style-next {
        right: 0;
    }

    .youtube-style-track {
        width: 100%;
        max-width: 100%;
        overflow: hidden;
    }

    .youtube-style-track .swiper-slide {
        width: auto;
    }

    .youtube-style-card {
        width: 100%;
    }

    .youtube-style-card img {
        width: 100%;
        aspect-ratio: 16 / 9;
    }

    .youtube-cut-panel-head {
        display: grid;
        gap: 10px;
    }

    .youtube-cut-tools {
        flex-wrap: wrap;
        justify-content: flex-start;
    }

    .youtube-cut-card {
        grid-template-columns: 1fr;
    }

    .youtube-cut-thumb {
        width: 100%;
        height: 160px;
    }

    .youtube-cut-generate-row {
        display: grid;
        grid-template-columns: 1fr;
    }

    .youtube-preset-anchor {
        justify-self: end;
        right: 10px;
    }

    .youtube-action-btn,
    .youtube-generate-btn {
        width: 100%;
        min-width: 0;
    }

    .youtube-preset-dialog {
        width: calc(100vw - 60px);
        margin-top: 12vh;
        padding: 24px 18px 22px;
    }

    .youtube-preset-grid {
        grid-template-columns: 1fr;
    }

    .youtube-preset-tooltip {
        right: -2px;
        bottom: calc(100% + 10px);
        top: auto;
        transform: none;
    }

    .youtube-preset-tooltip::before {
        right: 14px;
        bottom: -6px;
        top: auto;
        transform: rotate(45deg);
    }

    .youtube-subtitle-color-grid {
        grid-template-columns: 1fr;
    }

    .youtube-subtitle-shell .yt-subtitle-top {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .youtube-render-shell {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .youtube-subtitle-slider-grid {
        grid-template-columns: 1fr;
    }

    .youtube-subtitle-timeline .yt-track-grid {
        min-width: 680px;
    }
}
