/* YouTube 缩略图下载器 / 封面制作器 — 作用域限制在 .yt-page；基础样式沿用站内工具页（在线音频工具）设计 */
.yt-page {
    --yt-primary: #2563eb;
    --yt-primary-dark: #1d4ed8;
    --yt-primary-soft: #eef3fe;
    --yt-ink: #0f1c2e;
    --yt-muted: #5a6b80;
    --yt-line: #e4eaf2;
    --yt-bg: #f6f8fc;
    --yt-panel: #fbfcfe;
    --yt-warn: #8a5a12;
    --yt-warn-soft: #fdf3e2;
    --yt-danger: #b42318;
    --yt-wave-bg: #f8fafd;
    --yt-wave-muted: #c3cedd;
    --yt-sel: rgba(37, 99, 235, .10);
    --yt-remove: rgba(220, 38, 38, .12);
    --yt-playhead: #f97316;
    --yt-radius-card: 16px;
    --yt-radius-ctl: 12px;
    --yt-shadow: 0 10px 26px rgba(19, 44, 79, .05);

    color: var(--yt-ink);
    font-family: Arial, "Microsoft YaHei", "PingFang SC", sans-serif;
    background: #fff;
    margin: 0;
    padding: 0 0 88px;
    overflow-x: hidden;
}
.yt-page * { box-sizing: border-box; }
.yt-page button,
.yt-page input,
.yt-page select { color: inherit; font: inherit; }
.yt-page button { -webkit-tap-highlight-color: transparent; }
.yt-page [hidden] { display: none !important; }

.yt-page .page-shell {
    width: min(1128px, calc(100% - 64px));
    margin: 0 auto;
    padding: 36px 0 0;
}

/* 面包屑 */
.yt-page .yt-breadcrumb { margin: 0 0 18px; font-size: 13px; color: var(--yt-muted); }
.yt-page .yt-breadcrumb ol { display: flex; flex-wrap: wrap; gap: 6px 8px; list-style: none; margin: 0; padding: 0; align-items: center; }
.yt-page .yt-breadcrumb li { display: inline-flex; align-items: center; gap: 8px; }
.yt-page .yt-breadcrumb li:not(:last-child)::after { content: "/"; color: #b0b6bd; margin-left: 2px; }
.yt-page .yt-breadcrumb a { color: var(--yt-primary); text-decoration: none; }
.yt-page .yt-breadcrumb a:hover { text-decoration: underline; }
.yt-page .yt-breadcrumb [aria-current="page"] { color: var(--yt-ink); font-weight: 600; }

/* 页头 */
.yt-page .page-title { margin-bottom: 24px; }
.yt-page .page-title .eyebrow {
    display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .08em;
    color: var(--yt-primary); background: var(--yt-primary-soft);
    border-radius: 999px; padding: 4px 12px; margin-bottom: 12px;
}
.yt-page .page-title h1 { margin: 0 0 10px; font-size: 30px; line-height: 1.25; letter-spacing: -.01em; }
.yt-page .page-title p { margin: 0; color: var(--yt-muted); font-size: 15px; line-height: 1.7; max-width: 820px; }

/* 工具卡 */
.yt-page .yt-tool {
    border: 1px solid var(--yt-line);
    border-radius: var(--yt-radius-card);
    background: #fff;
    box-shadow: var(--yt-shadow);
    padding: 24px;
    margin-bottom: 18px;
}
.yt-page .yt-file-input { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; clip: rect(0 0 0 0); }
.yt-page .yt-status { margin: 10px 0 0; font-size: 13px; color: var(--yt-muted); min-height: 0; }
.yt-page .yt-status:empty { display: none; }
.yt-page .yt-loading .yt-status::before {
    content: ""; display: inline-block; width: 12px; height: 12px; margin-right: 8px; vertical-align: -1px;
    border: 2px solid var(--yt-line); border-top-color: var(--yt-primary); border-radius: 50%;
    animation: yt-spin .8s linear infinite;
}
@keyframes yt-spin { to { transform: rotate(360deg); } }

/* 按钮 */
.yt-page .yt-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 9px 15px; border: 1px solid var(--yt-line); border-radius: 999px;
    background: #fff; color: var(--yt-ink); font-size: 14px; font-weight: 600;
    cursor: pointer; text-decoration: none; line-height: 1.2; white-space: nowrap;
}
.yt-page .yt-btn:hover { border-color: #c9d6ea; background: #f8fbff; }
.yt-page .yt-btn:focus-visible { outline: 3px solid rgba(37, 99, 235, .25); outline-offset: 1px; }
.yt-page .yt-btn:disabled { opacity: .45; cursor: not-allowed; }
.yt-page .yt-btn-primary { background: var(--yt-primary); border-color: var(--yt-primary); color: #fff; }
.yt-page .yt-btn-primary:hover { background: var(--yt-primary-dark); border-color: var(--yt-primary-dark); }
.yt-page .yt-btn-sm { padding: 6px 11px; font-size: 12.5px; }

/* 标签页 */
.yt-page .yt-tabs {
    display: flex; gap: 6px; margin: 20px 0 0; padding: 4px;
    border: 1px solid var(--yt-line); border-radius: 999px; background: var(--yt-panel);
    overflow-x: auto; scrollbar-width: none;
}
.yt-page .yt-tabs::-webkit-scrollbar { display: none; }
.yt-page .yt-tab {
    flex: 1 0 auto; padding: 8px 14px; border: 0; border-radius: 999px; background: transparent;
    font-size: 13.5px; font-weight: 700; color: var(--yt-muted); cursor: pointer; white-space: nowrap;
}
.yt-page .yt-tab:hover { color: var(--yt-primary); }
.yt-page .yt-tab[aria-selected="true"] { background: var(--yt-primary); color: #fff; }
.yt-page .yt-tab:focus-visible { outline: 3px solid rgba(37, 99, 235, .25); outline-offset: 1px; }
.yt-page .yt-opt { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.yt-page .yt-opt > span,
.yt-page .yt-opt-label { font-size: 12.5px; font-weight: 700; color: var(--yt-muted); }
.yt-page .yt-opt select,
.yt-page .yt-opt input[type="text"] {
    width: 100%; padding: 8px 10px; border: 1px solid var(--yt-line);
    border-radius: 10px; background: #fff; font-size: 14px;
}
.yt-page .yt-opt input[type="text"] { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-variant-numeric: tabular-nums; }
.yt-page .yt-opt input.is-invalid { border-color: var(--yt-danger); box-shadow: 0 0 0 3px rgba(180, 35, 24, .12); }
.yt-page .yt-opt select:disabled,
.yt-page .yt-opt input:disabled { opacity: .5; }
.yt-page .yt-opt input[type="range"] { width: 100%; accent-color: var(--yt-primary); }
.yt-page .yt-val { font-weight: 700; color: var(--yt-ink); font-variant-numeric: tabular-nums; }
.yt-page .yt-radio { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 14px; }
.yt-page .yt-radio label,
.yt-page .yt-check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 14px; }
.yt-page .yt-radio input,
.yt-page .yt-check input { width: 16px; height: 16px; accent-color: var(--yt-primary); }
.yt-page .yt-panel-hint { margin: 12px 0 0; font-size: 12.5px; color: var(--yt-muted); line-height: 1.7; }
.yt-page .yt-panel-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 12px; }
.yt-page .yt-error {
    margin: 14px 0 0; padding: 12px 14px; border-radius: var(--yt-radius-ctl);
    border: 1px solid #f3d6cf; background: #fdf6f5; color: var(--yt-danger);
    font-size: 13.5px; line-height: 1.7;
}

/* 隐私 */
.yt-page .yt-privacy {
    margin: 18px 0 0; padding: 12px 14px; border: 1px solid var(--yt-line);
    border-radius: var(--yt-radius-ctl); background: var(--yt-panel); color: var(--yt-muted); font-size: 13px; line-height: 1.7;
}

/* 说明区 */
.yt-page .info-section { margin: 36px 0 0; }
.yt-page .info-section > h2 { margin: 0 0 16px; font-size: 21px; line-height: 1.4; }
.yt-page .info-content { color: var(--yt-ink); font-size: 15px; line-height: 1.8; }
.yt-page .info-content p { margin: 0 0 12px; }
.yt-page .info-content ol,
.yt-page .info-content ul { margin: 0 0 12px; padding-left: 22px; }
.yt-page .info-content li { margin-bottom: 8px; }
.yt-page .yt-table { width: 100%; border-collapse: collapse; margin: 0 0 12px; font-size: 14px; }
.yt-page .yt-table th,
.yt-page .yt-table td { padding: 10px 12px; border-bottom: 1px solid var(--yt-line); text-align: left; vertical-align: top; }
.yt-page .yt-table th { background: var(--yt-panel); font-weight: 700; }
.yt-page .yt-ok { color: #12804b; font-weight: 700; }
.yt-page .yt-no { color: var(--yt-warn); font-weight: 700; }

.yt-page .yt-faq-item { border: 1px solid var(--yt-line); border-radius: var(--yt-radius-ctl); margin-bottom: 10px; background: #fff; }
.yt-page .yt-faq-item > summary { padding: 13px 16px; cursor: pointer; font-weight: 700; font-size: 15px; }
.yt-page .yt-faq-item > summary::marker { color: var(--yt-primary); }
.yt-page .yt-faq-a { padding: 0 16px 14px; color: var(--yt-muted); font-size: 14px; line-height: 1.8; }
.yt-page .yt-faq-a p { margin: 0; }

.yt-page .yt-related { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.yt-page .yt-related a {
    display: block; padding: 16px; border: 1px solid var(--yt-line); border-radius: var(--yt-radius-ctl);
    background: #fff; text-decoration: none; color: inherit;
}
.yt-page .yt-related a:hover { border-color: #c9d6ea; background: #f8fbff; }
.yt-page .yt-related .rel-title { font-weight: 700; margin-bottom: 6px; }
.yt-page .yt-related .rel-desc { font-size: 13px; color: var(--yt-muted); line-height: 1.6; }

/* 答案优先摘要 + 关键信息 */
.yt-page .page-title .yt-answer { max-width: 860px; }
.yt-page .yt-facts-wrap > h2 { margin: 0 0 14px; font-size: 21px; line-height: 1.4; }
.yt-page .yt-facts {
    margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 28px;
    border: 1px solid var(--yt-line); border-radius: var(--yt-radius-card); background: #fff;
    padding: 6px 20px; box-shadow: var(--yt-shadow);
}
.yt-page .yt-fact { display: grid; grid-template-columns: 8.5em minmax(0, 1fr); gap: 12px; padding: 11px 0; border-bottom: 1px dashed var(--yt-line); }
.yt-page .yt-fact:nth-last-child(-n+2) { border-bottom: 0; }
.yt-page .yt-fact dt { margin: 0; font-size: 13px; font-weight: 700; color: var(--yt-primary); line-height: 1.6; }
.yt-page .yt-fact dd { margin: 0; font-size: 14px; color: var(--yt-ink); line-height: 1.6; overflow-wrap: anywhere; }
@media (max-width: 767.98px) {
   .yt-page .yt-facts { grid-template-columns: 1fr; padding: 4px 16px; }
   .yt-page .yt-fact:nth-last-child(2) { border-bottom: 1px dashed var(--yt-line); }
}
@media (max-width: 575.98px) {
   .yt-page .yt-fact { grid-template-columns: 1fr; gap: 2px; }
   .yt-page .yt-facts-wrap > h2 { font-size: 19px; }
}

/* 使用步骤卡片（4 列桌面 / 2 列平板 / 1 列手机，断点对齐 Bootstrap 4 lg/sm） */
.yt-page .yt-howto-head { margin: 0 0 18px; }
.yt-page .yt-howto-head > h2 { margin: 0 0 6px; font-size: 21px; line-height: 1.4; }
.yt-page .yt-howto-lead { margin: 0; color: var(--yt-muted); font-size: 14.5px; line-height: 1.7; max-width: 820px; }
.yt-page .yt-steps {
    list-style: none; margin: 0; padding: 0; counter-reset: none;
    display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px;
}
.yt-page .yt-step {
    position: relative; display: flex; flex-direction: column; margin: 0;
    border: 1px solid var(--yt-line); border-radius: var(--yt-radius-card);
    background: #fff; box-shadow: var(--yt-shadow); overflow: hidden;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.yt-page .yt-step:hover { transform: translateY(-3px); border-color: #c9d6ea; box-shadow: 0 16px 34px rgba(19, 44, 79, .10); }
.yt-page .yt-step:target { border-color: var(--yt-primary); box-shadow: 0 0 0 3px rgba(37, 99, 235, .18), var(--yt-shadow); }
.yt-page .yt-step-shot {
    position: relative; margin: 0; aspect-ratio: 16 / 10;
    background: var(--yt-wave-bg); border-bottom: 1px solid var(--yt-line); overflow: hidden;
}
.yt-page .yt-step-shot img { display: block; width: 100%; height: 100%; object-fit: cover; }
.yt-page .yt-step-num {
    position: absolute; top: 10px; left: 10px; width: 32px; height: 32px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 50%; background: var(--yt-primary); color: #fff;
    font-size: 15px; font-weight: 800; line-height: 1;
    box-shadow: 0 0 0 3px #fff, 0 6px 14px rgba(37, 99, 235, .35);
}
.yt-page .yt-step-body { padding: 14px 16px 16px; flex: 1 1 auto; }
.yt-page .yt-step-meta { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; }
.yt-page .yt-step-icon {
    width: 30px; height: 30px; flex: 0 0 30px; border-radius: 9px;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--yt-primary-soft); color: var(--yt-primary); font-size: 14px;
}
.yt-page .yt-step-kicker { font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--yt-primary); }
.yt-page .yt-step-title { margin: 0 0 6px; font-size: 16px; font-weight: 700; line-height: 1.45; color: var(--yt-ink); }
.yt-page .yt-step-text { margin: 0; font-size: 13.5px; line-height: 1.7; color: var(--yt-muted); }
.yt-page .yt-howto-cta { margin: 18px 0 0; text-align: center; }
.yt-page .yt-howto-cta .yt-btn { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; }
.yt-page .yt-howto-cta .yt-btn:hover { color: #fff; text-decoration: none; }
@media (max-width: 991.98px) {
   .yt-page .yt-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
}
@media (max-width: 575.98px) {
   .yt-page .yt-steps { grid-template-columns: 1fr; gap: 14px; }
   .yt-page .yt-howto-head > h2 { font-size: 19px; }
   .yt-page .yt-step-title { font-size: 15.5px; }
}
@media (prefers-reduced-motion: reduce) {
   .yt-page .yt-step { transition: none; }
   .yt-page .yt-step:hover { transform: none; }
}

/* 响应式 */
@media (max-width: 900px) {
   .yt-page .page-shell { width: calc(100% - 40px); padding-top: 24px; }
   .yt-page .yt-related { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
   .yt-page { padding-bottom: 64px; }
   .yt-page .page-shell { width: calc(100% - 28px); padding-top: 18px; }
   .yt-page .page-title h1 { font-size: 24px; }
   .yt-page .page-title p { font-size: 14px; }
   .yt-page .yt-tool { padding: 16px; }
   .yt-page .yt-tabs { border-radius: 14px; flex-wrap: wrap; overflow: visible; }
   .yt-page .yt-tab { flex: 1 1 calc(33.333% - 6px); padding: 8px 6px; font-size: 13px; }
   .yt-page .info-section > h2 { font-size: 19px; }
}

/* 深色模式 */
html[data-theme="dark"] .yt-page {
    --yt-ink: #e8eef5;
    --yt-muted: #b7c3d0;
    --yt-line: rgba(255, 255, 255, 0.14);
    --yt-bg: #141c28;
    --yt-panel: #141c28;
    --yt-primary-soft: #1a2a44;
    --yt-wave-bg: #101722;
    --yt-wave-muted: #3a4658;
    --yt-sel: rgba(96, 165, 250, .14);
    --yt-warn-soft: #2b2312;
    --yt-warn: #f0c27a;
    background: transparent;
}
html[data-theme="dark"] .yt-page .yt-tool,
html[data-theme="dark"] .yt-page .yt-btn,
html[data-theme="dark"] .yt-page .yt-faq-item,
html[data-theme="dark"] .yt-page .yt-related a,
html[data-theme="dark"] .yt-page .yt-opt select,
html[data-theme="dark"] .yt-page .yt-opt input[type="text"] {
    background-color: #182231;
    color: #e8eef5;
    border-color: rgba(255, 255, 255, 0.14);
}
html[data-theme="dark"] .yt-page .yt-btn-primary,
html[data-theme="dark"] .yt-page .yt-tab[aria-selected="true"] { background: var(--yt-primary); border-color: var(--yt-primary); color: #fff; }
html[data-theme="dark"] .yt-page .yt-error { background: #2a1513; border-color: #5c2a24; color: #f3a99f; }
html[data-theme="dark"] .yt-page .yt-ok { color: #6ad49b; }
html[data-theme="dark"] .yt-page .yt-step { background: #182231; border-color: rgba(255, 255, 255, 0.14); box-shadow: none; }
html[data-theme="dark"] .yt-page .yt-step:hover { border-color: rgba(96, 165, 250, .45); box-shadow: 0 12px 28px rgba(0, 0, 0, .35); }
html[data-theme="dark"] .yt-page .yt-step-num { box-shadow: 0 0 0 3px #182231, 0 6px 14px rgba(0, 0, 0, .4); }
html[data-theme="dark"] .yt-page .yt-step-icon { color: #93c5fd; }
html[data-theme="dark"] .yt-page .yt-step-kicker { color: #93c5fd; }
html[data-theme="dark"] .yt-page .yt-facts { background: #182231; border-color: rgba(255, 255, 255, 0.14); box-shadow: none; }
html[data-theme="dark"] .yt-page .yt-fact dt { color: #93c5fd; }

/* ================= 通用补充 ================= */
.yt-page .yt-hint { margin: 8px 0 0; font-size: 12.5px; color: var(--yt-muted); line-height: 1.7; }
.yt-page .yt-btn-lg { padding: 12px 20px; font-size: 15px; }
.yt-page .yt-btn-icon { padding: 6px 9px; }
.yt-page .yt-btn-danger:hover:not(:disabled) { color: var(--yt-danger); border-color: #f3c7c0; background: #fdf6f5; }
.yt-page .yt-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.yt-page .yt-nowrap { white-space: nowrap; }
.yt-page .yt-table code { font-size: 13px; white-space: nowrap; }
.yt-page .yt-table td.yt-ok,
.yt-page .yt-table td.yt-no { white-space: nowrap; }
.yt-page .yt-noscript { border-color: #f3d6cf; background: #fdf6f5; color: #b42318; }
.yt-page .yt-steps-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.yt-page .yt-cross { margin: 14px 0 0; font-size: 14px; }
.yt-page .yt-cross a, .yt-page .yt-card-tip a { color: var(--yt-primary); font-weight: 600; }
.yt-page .yt-status { overflow-wrap: anywhere; }

/* ================= 下载器 ================= */
.yt-page .yt-form-label { display: block; margin: 0 0 8px; font-size: 14px; font-weight: 700; }
.yt-page .yt-input-row { display: flex; gap: 10px; align-items: stretch; }
.yt-page .yt-input-wrap {
    position: relative; flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 6px;
    border: 1px solid var(--yt-line); border-radius: 14px; background: #fff; padding: 0 6px 0 42px;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.yt-page .yt-input-wrap:focus-within { border-color: var(--yt-primary); box-shadow: 0 0 0 3px rgba(37, 99, 235, .15); }
.yt-page .yt-input-ico { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: #ff0033; font-size: 20px; pointer-events: none; }
.yt-page .yt-input { flex: 1 1 auto; min-width: 0; border: 0; outline: 0; background: transparent; padding: 13px 4px; font-size: 15px; color: var(--yt-ink); }
.yt-page .yt-input.is-invalid { color: var(--yt-danger); }
.yt-page .yt-input-wrap:has(.yt-input.is-invalid) { border-color: var(--yt-danger); box-shadow: 0 0 0 3px rgba(180, 35, 24, .12); }
.yt-page .yt-paste { flex: none; }
.yt-page .yt-examples { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 12px 0 0; font-size: 13px; color: var(--yt-muted); }
.yt-page .yt-chip {
    border: 1px solid var(--yt-line); border-radius: 999px; background: var(--yt-panel); color: var(--yt-ink);
    padding: 5px 12px; font-size: 12.5px; font-weight: 600; cursor: pointer; line-height: 1.3;
}
.yt-page .yt-chip:hover { border-color: var(--yt-primary); color: var(--yt-primary); }
.yt-page .yt-chip:focus-visible { outline: 3px solid rgba(37, 99, 235, .25); outline-offset: 1px; }
.yt-page .yt-results { margin: 18px 0 0; }
.yt-page .yt-result-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin: 0 0 14px; }
.yt-page .yt-video { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 320px; }
.yt-page .yt-video-title { font-size: 16px; font-weight: 700; color: var(--yt-ink); text-decoration: none; overflow-wrap: anywhere; }
.yt-page .yt-video-title:hover { color: var(--yt-primary); text-decoration: underline; }
.yt-page .yt-video-author { font-size: 13px; color: var(--yt-muted); }
.yt-page .yt-result-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; font-size: 13px; color: var(--yt-muted); margin-left: auto; }
.yt-page .yt-result-meta code { padding: 2px 7px; border-radius: 6px; background: var(--yt-bg); border: 1px solid var(--yt-line); color: var(--yt-ink); font-size: 13px; }
.yt-page .yt-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.yt-page .yt-card { display: flex; flex-direction: column; min-width: 0; border: 1px solid var(--yt-line); border-radius: 14px; overflow: hidden; background: #fff; }
.yt-page .yt-card-img {
    position: relative; width: 100%; aspect-ratio: 16 / 9; overflow: hidden;
    background: #0f172a repeating-conic-gradient(#1e293b 0 25%, #0f172a 0 50%) 0 0 / 16px 16px;
}
.yt-page .yt-card-img img { display: block; width: 100%; height: 100%; object-fit: contain; }
.yt-page .yt-badge { position: absolute; top: 10px; left: 10px; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; line-height: 1.4; }
.yt-page .yt-badge-best { background: #16a34a; color: #fff; box-shadow: 0 4px 10px rgba(0, 0, 0, .25); }
.yt-page .yt-card-body { padding: 12px 14px 14px; display: flex; flex-direction: column; flex: 1 1 auto; }
.yt-page .yt-card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.yt-page .yt-card-title { margin: 0; font-size: 15px; font-weight: 700; line-height: 1.4; min-width: 0; }
.yt-page .yt-dims { flex: none; font-size: 13px; font-weight: 700; color: var(--yt-primary); font-variant-numeric: tabular-nums; }
.yt-page .yt-card-key { display: block; margin: 4px 0 10px; font-size: 12px; color: var(--yt-muted); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; overflow-wrap: anywhere; }
.yt-page .yt-card-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }
.yt-page .yt-card-tip { margin: 10px 0 0; padding: 8px 10px; border-radius: 8px; background: var(--yt-warn-soft); color: var(--yt-warn); font-size: 12.5px; line-height: 1.6; }
.yt-page .yt-card.is-missing .yt-card-img img { opacity: .35; filter: grayscale(1); }
.yt-page .yt-card.is-missing .yt-dims { color: var(--yt-muted); text-decoration: line-through; }
.yt-page .yt-card-missing { margin: auto 0 0; font-size: 13px; color: var(--yt-warn); line-height: 1.6; }

/* ================= 封面制作器 ================= */
.yt-page .yt-mk-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.yt-page .yt-mk-main { min-width: 0; }
.yt-page .yt-stage {
    position: relative; border-radius: 12px; overflow: hidden; line-height: 0;
    background: #e9edf3 repeating-conic-gradient(#dfe5ee 0 25%, #eef2f7 0 50%) 0 0 / 20px 20px;
    box-shadow: 0 6px 20px rgba(19, 44, 79, .12);
}
.yt-page .yt-stage.is-over { outline: 3px dashed var(--yt-primary); outline-offset: -3px; }
.yt-page .yt-canvas { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; touch-action: none; -webkit-user-select: none; user-select: none; }
.yt-page .yt-canvas:focus { outline: none; }
.yt-page .yt-canvas:focus-visible { outline: 3px solid rgba(37, 99, 235, .45); outline-offset: -3px; }
.yt-page .yt-canvas.is-dragging { cursor: grabbing !important; }
.yt-page .yt-mk-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; margin: 12px 0 0; }
.yt-page .yt-check { font-size: 13.5px; }
.yt-page .yt-layers { margin: 14px 0 0; padding: 12px 14px; border: 1px solid var(--yt-line); border-radius: 12px; background: var(--yt-panel); }
.yt-page .yt-layers-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.yt-page .yt-layers-title { margin: 0; font-size: 14px; font-weight: 700; display: flex; align-items: center; gap: 6px; }
.yt-page .yt-count { display: inline-block; min-width: 22px; padding: 0 7px; border-radius: 999px; background: var(--yt-primary-soft); color: var(--yt-primary); font-size: 12px; line-height: 20px; text-align: center; }
.yt-page .yt-layer-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.yt-page .yt-layer-list { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.yt-page .yt-layer-list:empty { display: none; }
.yt-page .yt-layer-list li { min-width: 0; max-width: 100%; }
.yt-page .yt-layer {
    display: inline-flex; align-items: center; gap: 6px; max-width: 100%;
    padding: 5px 12px; border: 1px solid var(--yt-line); border-radius: 999px; background: #fff;
    font-size: 13px; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--yt-ink);
}
.yt-page .yt-layer i { color: var(--yt-muted); }
.yt-page .yt-layer.is-active { border-color: var(--yt-primary); background: var(--yt-primary-soft); color: var(--yt-primary-dark); font-weight: 600; }
.yt-page .yt-layer.is-active i { color: var(--yt-primary); }
.yt-page .yt-mk-side { min-width: 0; }
.yt-page .yt-mk-side .yt-tabs { margin: 0; border-radius: 14px; overflow: visible; flex-wrap: nowrap; }
.yt-page .yt-mk-side .yt-tab { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 7px 4px; font-size: 12.5px; border-radius: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.yt-page .yt-mk-side .yt-tab i { font-size: 15px; }
.yt-page .yt-mk-panel { margin: 12px 0 0; padding: 14px; border: 1px solid var(--yt-line); border-radius: 12px; background: var(--yt-panel); display: flex; flex-direction: column; gap: 14px; }
.yt-page .yt-mk-panel > .yt-panel-hint:first-child { margin-top: 0; }
.yt-page .yt-mk-panel .yt-panel-hint { margin: 0; }
.yt-page #yt-text-editor, .yt-page #yt-img-editor, .yt-page #yt-bg-img-opts, .yt-page #yt-bg-grad-opts, .yt-page #yt-bg-color-opts { display: flex; flex-direction: column; gap: 14px; }
.yt-page .yt-tpl-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.yt-page .yt-tpl { display: block; padding: 6px; border: 1px solid var(--yt-line); border-radius: 10px; background: #fff; cursor: pointer; text-align: center; color: var(--yt-ink); }
.yt-page .yt-tpl:hover { border-color: #c9d6ea; }
.yt-page .yt-tpl.is-active { border-color: var(--yt-primary); box-shadow: 0 0 0 2px rgba(37, 99, 235, .2); }
.yt-page .yt-tpl:focus-visible { outline: 3px solid rgba(37, 99, 235, .3); outline-offset: 1px; }
.yt-page .yt-tpl-name { display: block; margin-top: 6px; font-size: 12.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.yt-page .yt-tpl-thumb { position: relative; display: block; aspect-ratio: 16 / 9; border-radius: 6px; overflow: hidden; }
.yt-page .yt-tpl-thumb i, .yt-page .yt-tpl-thumb b, .yt-page .yt-tpl-thumb em { position: absolute; display: block; border-radius: 2px; }
.yt-page .yt-tpl-bold { background: linear-gradient(135deg, #0f172a, #7c3aed); }
.yt-page .yt-tpl-bold i { left: 18%; right: 18%; top: 30%; height: 20%; background: #facc15; box-shadow: 0 0 0 2px #000; }
.yt-page .yt-tpl-bold b { left: 28%; right: 28%; top: 60%; height: 9%; background: #fff; }
.yt-page .yt-tpl-split { background: linear-gradient(90deg, #111827, #334155); }
.yt-page .yt-tpl-split em { left: 8%; top: 14%; width: 22%; height: 13%; background: #facc15; }
.yt-page .yt-tpl-split i { left: 8%; top: 38%; width: 46%; height: 16%; background: #fff; box-shadow: 0 0 0 2px #000; }
.yt-page .yt-tpl-split b { left: 8%; top: 60%; width: 38%; height: 16%; background: #fff; box-shadow: 0 0 0 2px #000; }
.yt-page .yt-tpl-banner { background: linear-gradient(120deg, #0ea5e9, #22c55e); }
.yt-page .yt-tpl-banner b { left: 32%; right: 32%; top: 12%; height: 10%; background: #fff; }
.yt-page .yt-tpl-banner i { left: 12%; right: 12%; bottom: 14%; height: 20%; background: #dc2626; border-radius: 4px; }
.yt-page .yt-tpl-vs { background: linear-gradient(90deg, #dc2626, #2563eb); }
.yt-page .yt-tpl-vs i { left: 10%; top: 42%; width: 26%; height: 16%; background: #fff; box-shadow: 0 0 0 2px #000; }
.yt-page .yt-tpl-vs b { right: 10%; top: 42%; width: 26%; height: 16%; background: #fff; box-shadow: 0 0 0 2px #000; }
.yt-page .yt-tpl-vs em { left: 42%; top: 34%; width: 16%; height: 30%; background: #facc15; box-shadow: 0 0 0 2px #000; border-radius: 4px; }
.yt-page .yt-tpl-tutorial { background: linear-gradient(160deg, #f59e0b, #ef4444); }
.yt-page .yt-tpl-tutorial em { left: 8%; top: 12%; width: 28%; height: 13%; background: #111827; }
.yt-page .yt-tpl-tutorial i { left: 10%; top: 40%; width: 50%; height: 17%; background: #fff; box-shadow: 0 0 0 2px #000; }
.yt-page .yt-tpl-tutorial b { right: 10%; top: 30%; width: 18%; height: 32%; background: #22c55e; border-radius: 6px; }
.yt-page .yt-seg { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px; border: 1px solid var(--yt-line); border-radius: 999px; background: #fff; align-self: flex-start; max-width: 100%; }
.yt-page .yt-seg label { position: relative; cursor: pointer; margin: 0; }
.yt-page .yt-seg input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.yt-page .yt-seg span { display: block; padding: 5px 14px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--yt-muted); white-space: nowrap; }
.yt-page .yt-seg input:checked + span { background: var(--yt-primary); color: #fff; }
.yt-page .yt-seg input:focus-visible + span { outline: 3px solid rgba(37, 99, 235, .3); outline-offset: 1px; }
.yt-page .yt-upload { align-self: flex-start; }
.yt-page .yt-file-input { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; clip: rect(0 0 0 0); }
.yt-page .yt-file-name { font-size: 12.5px; color: var(--yt-muted); overflow-wrap: anywhere; }
.yt-page .yt-import-row { display: flex; gap: 8px; }
.yt-page .yt-input-sm { flex: 1 1 auto; min-width: 0; padding: 8px 10px; border: 1px solid var(--yt-line); border-radius: 10px; background: #fff; font-size: 13.5px; }
.yt-page .yt-input-sm:focus { outline: 0; border-color: var(--yt-primary); box-shadow: 0 0 0 3px rgba(37, 99, 235, .15); }
.yt-page .yt-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.yt-page .yt-grid3 { display: grid; grid-template-columns: auto auto minmax(0, 1fr); gap: 12px; align-items: end; }
.yt-page input[type="color"] { width: 46px; height: 34px; padding: 2px; border: 1px solid var(--yt-line); border-radius: 8px; background: #fff; cursor: pointer; flex: none; }
.yt-page input[type="color"]:disabled { opacity: .4; cursor: not-allowed; }
.yt-page .yt-opt textarea { width: 100%; min-height: 64px; padding: 8px 10px; border: 1px solid var(--yt-line); border-radius: 10px; background: #fff; font-size: 15px; line-height: 1.5; resize: vertical; color: var(--yt-ink); }
.yt-page .yt-opt textarea:focus { outline: 0; border-color: var(--yt-primary); box-shadow: 0 0 0 3px rgba(37, 99, 235, .15); }
.yt-page .yt-fx { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 0 0; border-top: 1px dashed var(--yt-line); }
.yt-page .yt-fx-range { display: flex; flex-direction: column; gap: 4px; flex: 1 1 140px; min-width: 0; margin: 0; }
.yt-page .yt-fx-range input[type="range"], .yt-page .yt-export input[type="range"] { width: 100%; accent-color: var(--yt-primary); }
.yt-page .yt-fx-range input:disabled { opacity: .4; }
.yt-page .yt-emojis { display: flex; flex-wrap: wrap; gap: 6px; }
.yt-page .yt-emoji { width: 42px; height: 42px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--yt-line); border-radius: 10px; background: #fff; font-size: 22px; cursor: pointer; line-height: 1; padding: 0; }
.yt-page .yt-emoji:hover { border-color: var(--yt-primary); transform: translateY(-1px); }
.yt-page .yt-export { margin: 18px 0 0; padding: 16px 0 0; border-top: 1px solid var(--yt-line); }
.yt-page .yt-export-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.yt-page .yt-export-controls .yt-opt-inline { flex-direction: row; align-items: center; gap: 10px; }
.yt-page .yt-export-controls select { width: auto; min-width: 84px; }
.yt-page #yt-q-wrap input[type="range"] { width: 140px; }
.yt-page #yt-export { margin-left: auto; }
.yt-page .yt-export-info { margin: 12px 0 0; padding: 10px 12px; border-radius: 10px; font-size: 13.5px; line-height: 1.6; border: 1px solid; overflow-wrap: anywhere; }
.yt-page .yt-export-info.is-ok { background: #f3faf5; border-color: #cfe3d6; color: #12804b; }
.yt-page .yt-export-info.is-warn { background: var(--yt-warn-soft); border-color: #f1dcb5; color: var(--yt-warn); }

/* ================= 响应式 ================= */
@media (max-width: 991.98px) {
    .yt-page .yt-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .yt-page .yt-mk-layout { grid-template-columns: minmax(0, 1fr); }
    .yt-page .yt-tpl-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
@media (max-width: 767.98px) {
    .yt-page .yt-tpl-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 575.98px) {
    .yt-page .yt-input-row { flex-direction: column; }
    .yt-page .yt-input-row #yt-go { width: 100%; }
    .yt-page .yt-cards { grid-template-columns: minmax(0, 1fr); }
    .yt-page .yt-result-meta { margin-left: 0; }
    .yt-page .yt-steps-3 { grid-template-columns: minmax(0, 1fr); }
    .yt-page .yt-mk-side .yt-tabs { flex-wrap: nowrap; }
    .yt-page .yt-mk-side .yt-tab { flex: 1 1 0; padding: 7px 2px; font-size: 12px; }
    .yt-page .yt-grid3 { grid-template-columns: auto auto; }
    .yt-page .yt-grid3 > :last-child { grid-column: 1 / -1; }
    .yt-page .yt-export-controls .yt-opt-inline { flex: 1 1 auto; }
    .yt-page #yt-q-wrap input[type="range"] { width: auto; flex: 1 1 auto; }
    .yt-page #yt-export { width: 100%; margin-left: 0; }
    .yt-page .yt-layers-head { align-items: flex-start; }
}

/* ================= 深色模式 ================= */
html[data-theme="dark"] .yt-page .yt-input-wrap,
html[data-theme="dark"] .yt-page .yt-card,
html[data-theme="dark"] .yt-page .yt-layer,
html[data-theme="dark"] .yt-page .yt-tpl,
html[data-theme="dark"] .yt-page .yt-seg,
html[data-theme="dark"] .yt-page .yt-emoji,
html[data-theme="dark"] .yt-page .yt-input-sm,
html[data-theme="dark"] .yt-page .yt-opt textarea,
html[data-theme="dark"] .yt-page input[type="color"],
html[data-theme="dark"] .yt-page .yt-chip,
html[data-theme="dark"] .yt-page .yt-export select {
    background-color: #182231; color: #e8eef5; border-color: rgba(255, 255, 255, 0.14);
}
html[data-theme="dark"] .yt-page .yt-layer.is-active { background: #1a2a44; color: #bfdbfe; border-color: #3b82f6; }
html[data-theme="dark"] .yt-page .yt-export-info.is-ok { background: #13241a; border-color: #23523a; color: #6ad49b; }
html[data-theme="dark"] .yt-page .yt-export-info.is-warn { border-color: #5a4720; }
html[data-theme="dark"] .yt-page .yt-dims { color: #93c5fd; }
html[data-theme="dark"] .yt-page .yt-stage { box-shadow: none; }

/* 移动端表格：尺寸表改为卡片行，避免文件名逐字换行 */
@media (max-width: 600px) {
  .yt-page .yt-table { font-size: 13px; }
  .yt-page .yt-table th,
  .yt-page .yt-table td { padding: 8px; }
  .yt-page .yt-size-table thead { display: none; }
  .yt-page .yt-size-table,
  .yt-page .yt-size-table tbody { display: block; }
  .yt-page .yt-size-table tr { display: grid; grid-template-columns: auto auto 1fr; gap: 4px 12px; align-items: baseline; padding: 10px 2px; border-bottom: 1px solid var(--yt-line); }
  .yt-page .yt-size-table td { padding: 0; border: 0; }
  .yt-page .yt-size-table td:nth-child(2) { font-weight: 600; }
  .yt-page .yt-size-table td:nth-child(3) { color: var(--yt-muted); }
  .yt-page .yt-size-table td:last-child { grid-column: 1 / -1; color: var(--yt-muted); line-height: 1.6; }
}
