/* ------------------ 黑色页面，单层深灰工具卡片 ------------------ */
.duo-page{width:100%;color:#fafafa;background:#000;min-height:75vh}
main:has(.duo-page){width:100%!important;background:#000}
.duo-shell{max-width:1240px;margin:auto;padding:24px 24px 40px}
.duo-heading{margin-bottom:16px}
.duo-title-row{display:flex;align-items:center;justify-content:space-between;gap:24px;margin-bottom:12px}
.duo-heading h1{font-size:clamp(28px,3.8vw,46px);line-height:1.12;letter-spacing:-.035em;margin:0;font-weight:650}
.duo-heading>p{color:#a3a3a3;font-size:15px;line-height:1.7;margin:0;text-wrap:pretty}
.duo-share{display:grid;place-items:center;flex:none;width:42px;height:42px;background:#000;color:#a3a3a3;border:1px solid #303030;border-radius:50%;cursor:pointer}
.duo-share img{width:19px;height:19px}
.duo-share:hover{color:#fff;border-color:#737373}
.duo-studio{display:grid;grid-template-columns:minmax(0,1fr);gap:10px;width:100%;padding:12px 24px 16px;background:#18181b;border:1px solid rgba(255,255,255,.08);border-radius:20px;box-sizing:border-box}
.duo-preview{background:transparent;width:100%;max-width:960px;margin-inline:auto;overflow:hidden;display:flex;flex-direction:column;min-width:0}
.duo-viewport{width:100%;height:clamp(260px,calc(100svh - 348px),480px);background:transparent;overflow:hidden}
.duo-viewport canvas{display:block;width:100%;height:100%;object-fit:contain}
.duo-controls{display:flex;align-items:center;gap:14px;padding:6px 0;color:#eee;background:transparent}
.duo-controls button{display:grid;place-items:center;width:36px;height:36px;flex:none;border:1px solid #404040;background:#27272a;border-radius:50%;cursor:pointer}
.duo-controls svg{width:16px;height:16px;fill:currentColor}
.duo-controls input{flex:1;min-width:0;accent-color:#eee;cursor:pointer;height:28px}
.duo-controls output{font-size:11px;font-variant-numeric:tabular-nums;white-space:nowrap}
.duo-actions{width:100%;max-width:960px;margin-inline:auto;min-width:0;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:8px 20px;background:transparent;padding:0 0 8px}
.duo-upload{text-align:center;padding:0;background:transparent;border-radius:8px}
.duo-upload.is-dragging{outline:2px dashed #d4d4d4;outline-offset:8px}
.duo-step{display:block;color:#737373;font-size:10px;letter-spacing:.12em}
.duo-primary,.duo-export{width:100%;padding:13px 12px;border-radius:8px;font-size:14px;font-weight:650;line-height:1.35;cursor:pointer;border:1px solid transparent}
.duo-primary{background:#fff;color:#000}
.duo-primary:hover:enabled{background:#e5e5e5}
.duo-upload p{margin:10px 0 0;font-size:11px;color:#737373;line-height:1.65}
.duo-file{display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#a3a3a3;font-size:11px;margin-top:6px}
.duo-file:empty{display:none}
.duo-output{min-width:0}
.duo-spec{font-size:11px;line-height:1.8;color:#737373;margin:10px 0 0;text-align:center;font-variant-numeric:tabular-nums}
.duo-export{background:#27272a;color:#fafafa;border-color:#525252}
.duo-export:hover:enabled{border-color:#eee}
.duo-export.is-exporting{display:flex;align-items:center;justify-content:center;gap:10px}
.duo-export.is-exporting::before{content:"";flex:none;width:16px;height:16px;box-sizing:border-box;border:2px solid rgb(255 255 255 / .25);border-top-color:currentColor;border-radius:50%;animation:duo-export-spin .8s linear infinite}
@keyframes duo-export-spin{to{transform:rotate(360deg)}}
@media(prefers-reduced-motion:reduce){.duo-export.is-exporting::before{animation-duration:2s}}
.duo-status{grid-column:1/-1;text-align:center;font-size:12px;line-height:1.6;color:#a3a3a3;margin:0;overflow-wrap:anywhere}
.duo-status:empty{display:none}
.duo-text-button{display:inline-block;font-size:12px;color:#eee;text-decoration:underline;background:none;border:0;margin-top:12px;cursor:pointer}
/* ------------------ 内容区：首页式大标题、宽幅介绍与独立 FAQ 卡片 ------------------ */
.duo-info{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:24px;margin-top:72px}
.duo-info article{min-width:0;display:flex;flex-direction:column;padding:36px;background:#18181b;border:1px solid #27272a;border-radius:20px}
.duo-example{display:block;order:-1;width:100%;height:auto;aspect-ratio:4/3;object-fit:contain;margin:0 0 28px}
.duo-info .duo-step{display:inline-grid;place-items:center;width:42px;height:42px;margin-bottom:24px;border:1px solid #3f3f46;border-radius:12px;color:#d4d4d8;font-size:14px;font-weight:600;letter-spacing:.04em}
.duo-info h2{font-size:clamp(26px,2.5vw,32px);line-height:1.3;letter-spacing:-.025em;margin:0 0 20px;font-weight:650;text-wrap:balance}
.duo-info p{font-size:18px;line-height:1.85;color:#d4d4d8;margin:0;overflow-wrap:anywhere}
.duo-info .duo-info-lead{grid-column:1/-1;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.2fr);align-items:start;column-gap:40px;row-gap:24px;padding:44px}
.duo-info-lead h2{font-size:clamp(30px,3.2vw,42px);margin-bottom:0}
.duo-info-lead p{font-size:20px;line-height:1.8}
.duo-info-lead .duo-info-heading{align-self:end}
.duo-info-lead p{grid-column:1;grid-row:2}
.duo-info-lead .duo-example{grid-column:2;grid-row:1/3;align-self:center;order:0;margin:0}
.duo-faq{max-width:960px;margin:88px auto 0}
.duo-faq h2{font-size:clamp(30px,3.5vw,42px);line-height:1.25;font-weight:650;letter-spacing:-.03em;text-align:center;margin:0 0 36px;text-wrap:balance}
.duo-faq-list{display:grid;gap:16px}
.duo-faq details{min-width:0;border:1px solid #27272a;border-radius:16px;background:#18181b;overflow:hidden}
.duo-faq summary{display:flex;align-items:center;justify-content:space-between;gap:24px;padding:24px 28px;font-size:20px;font-weight:550;cursor:pointer;line-height:1.5;list-style:none}
.duo-faq summary::-webkit-details-marker{display:none}
.duo-faq summary:hover{color:#d4d4d8}
.duo-faq-toggle{display:grid;place-items:center;flex:none;width:28px;height:28px;color:#a1a1aa;font-size:26px;font-weight:400;line-height:1}
.duo-faq details[open] .duo-faq-toggle{transform:rotate(45deg)}
.duo-faq details[open] summary{padding-bottom:14px}
.duo-faq p{font-size:18px;line-height:1.85;color:#d4d4d8;margin:0;padding:0 28px 28px;overflow-wrap:anywhere}
.duo-notice{max-width:960px;margin:48px auto 0;font-size:13px;line-height:1.8;color:#a1a1aa}
.duo-notice p{margin:0 0 10px}
.duo-notice a{color:#d4d4d8;text-decoration:underline;text-underline-offset:3px}
.duo-page [hidden]{display:none!important}
.duo-page button:disabled{opacity:.45;cursor:not-allowed}
.duo-page :is(button,a,input,summary):focus-visible{outline:2px solid #fff;outline-offset:4px}
@media(max-width:780px){.duo-shell{padding:24px 16px 32px}.duo-share{display:none}.duo-studio{grid-template-columns:1fr;gap:10px;padding:10px 16px 14px;border-radius:16px}.duo-actions{gap:8px 12px}.duo-status{grid-column:1/-1}}
@media(max-width:480px){.duo-controls{gap:8px;padding:6px 0}.duo-heading h1{font-size:30px}.duo-primary,.duo-export{font-size:13px;padding:12px 8px}}
/* ------------------ 裁剪弹窗：原生焦点约束，触摸拖动不滚动页面 ------------------ */
.duo-crop{width:min(640px,calc(100vw - 32px));max-height:calc(100dvh - 32px);margin:auto;padding:24px;background:#000;color:#fafafa;border:1px solid #404040;border-radius:12px;overflow:auto}
.duo-crop:not([open]){display:none}
.duo-crop::backdrop{background:rgb(0 0 0 / .8)}
.duo-crop h2{font-size:20px;font-weight:600;margin:0 0 8px}
.duo-crop p{font-size:13px;line-height:1.7;color:#a3a3a3;margin:0 0 18px}
.duo-crop canvas{display:block;width:100%;height:auto;aspect-ratio:64/45;background:#000;touch-action:none;cursor:grab;border:1px solid #525252;box-sizing:content-box}
.duo-crop canvas:active{cursor:grabbing}
.duo-crop canvas:focus-visible{outline:2px solid #fff;outline-offset:3px}
.duo-crop-zoom{display:flex;align-items:center;gap:16px;font-size:13px;margin:20px 0}
.duo-crop-zoom input{min-width:0;flex:1;accent-color:#fff}
.duo-crop-actions{display:flex;justify-content:flex-end;gap:12px}
.duo-crop-actions button{width:auto;min-width:100px}
@media(max-width:480px){.duo-crop{padding:16px}.duo-crop-actions button{flex:1;min-width:0}}

@media(max-width:780px){
  .duo-info{grid-template-columns:1fr;gap:16px;margin-top:48px}
  .duo-info article,.duo-info .duo-info-lead{display:flex;padding:24px;border-radius:16px}
  .duo-info-lead .duo-info-heading{align-self:auto}
  .duo-info .duo-example{order:-1;margin:0 0 24px}
  .duo-info .duo-step{margin-bottom:18px}
  .duo-info h2{font-size:26px;margin-bottom:16px}
  .duo-info p{font-size:17px;line-height:1.8}
  .duo-faq{margin-top:56px}
  .duo-faq h2{font-size:30px;margin-bottom:24px}
  .duo-faq summary{padding:20px;gap:16px;font-size:18px}
  .duo-faq p{padding:0 20px 22px;font-size:17px}
  .duo-notice{margin-top:32px}
}
