/* The creation picker shows a source and its result at both screen sizes. */
.juzi-home.creation-home {
 --home-gutter:clamp(24px,6.67vw,110px);
 width:100%; max-width:1668px; padding:0 var(--home-gutter) 24px;
}
.creation-intro { display:flex; align-items:center; justify-content:space-between; gap:24px; margin:40px 0 27px; }
.creation-title p { margin:0 0 6px; font:700 18px/1.5 var(--font); color:var(--primary); }
.creation-title h1 { margin:0; font:700 clamp(32px,3.2vw,48px)/1.45 var(--font); letter-spacing:-.035em; color:var(--ink); }
#home-continuation{width:min(35%,375px)}
#home-continuation:empty{display:none}
.creation-intro .juzi-resume {
 display:flex; width:100%; padding:9px 12px; margin:0; gap:12px;
 align-items:center; border-radius:16px; min-width:0;
}
.creation-intro .juzi-resume-preview { width:52px; height:52px; flex:0 0 52px; border-radius:9px; }
.creation-intro .juzi-resume-copy { min-width:0; }
.creation-intro .juzi-resume-copy p { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; line-height:1.3; }
.creation-intro .juzi-resume-copy h2 { margin:0; font:650 16px/1.45 var(--font); }
.creation-intro .juzi-resume>.btn { color:var(--primary); background:transparent; padding:6px; border:0; }
.creation-sources,.creation-tool-grid { display:grid; gap:clamp(12px,1.667vw,24px); }
.creation-sources { grid-template-columns:repeat(4,minmax(0,1fr)); }
@media (min-width:700px) and (max-width:1050px) {
 .creation-sources { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
.creation-home.juzi-create-home .creation-sources .source-card {
 display:flex; flex-direction:column; align-items:stretch; justify-content:flex-start; position:relative;
 width:100%; min-width:0; min-height:0; gap:0; padding:clamp(12px,1.1vw,16px) clamp(12px,1.1vw,16px) 0;
 margin:0; border:1px solid var(--line); border-radius:22px; box-shadow:none; background:var(--surface);
 transition:border-color var(--motion-fast);
}
.creation-home.juzi-create-home .source-card .source-comparison {
 --scene-bg:#f8e9ee;
 display:grid; grid-template-columns:minmax(0,1fr) 18px minmax(0,1fr);
 align-items:center; justify-content:normal; gap:clamp(4px,1vw,16px); margin:0; padding:14px clamp(9px,1.6vw,24px); min-width:0;
 width:100%; height:clamp(152px,12.7vw,190px); border:0; border-radius:14px;
 background-color:var(--scene-bg); position:relative;
}
.creation-home .source-card[data-source=direct] .source-comparison { --scene-bg:#e9f0e8; }
.creation-home .source-card[data-source=chart] .source-comparison { --scene-bg:#f7eedc; }
.creation-home.juzi-create-home .source-card[data-source=cartoon] .source-comparison {
 --scene-bg:#f3e8dc;
 display:grid;
 grid-template-columns:minmax(0,1fr);
 place-items:center;
}
.creation-home .source-card[data-source=cartoon] .source-figure {
 position:static;
 width:min(100%,144px);
 padding:0;
 background:transparent;
 box-shadow:none;
}
.creation-home .source-card[data-source=cartoon] .source-figure img {
 height:clamp(85px,10vw,144px);
 image-rendering:pixelated;
}
.creation-home .source-card[data-source=cartoon] .source-figure figcaption { display:none; }
.source-comparison::before,.source-comparison::after { content:""; position:absolute; width:36px; height:20px; background:radial-gradient(circle,currentColor 1px,transparent 1.3px) 0 0 / 7px 7px; color:var(--muted); opacity:.22; pointer-events:none; }
.source-comparison::before { top:10px; left:10px; }
.source-comparison::after { bottom:10px; right:10px; }
.source-figure,.chart-import-example figure { min-width:0; margin:0; display:grid; justify-items:center; align-content:center; }
.source-figure { position:relative; z-index:1; padding:8px 4px; border-radius:11px; background:var(--surface); }
.source-figure img { display:block; width:100%; height:clamp(85px,7.5vw,112px); object-fit:contain; }
.source-figure figcaption,.chart-import-example figcaption { margin:4px 0 0; color:var(--muted); font:500 12px/1.5 var(--font); text-align:center; }
.source-transform { display:grid; place-items:center; color:var(--muted); }
.source-transform svg,.source-action svg,.creation-tool>svg { width:18px; height:18px; flex:none; }
@media(min-width:700px) {
 .creation-home.juzi-create-home .source-card .source-comparison { grid-template-columns:minmax(0,1fr) 26px minmax(0,1fr); gap:clamp(4px,.7vw,10px); padding-inline:clamp(12px,2vw,31px); }
 .source-figure { box-shadow:2px 3px 0 #e0d0d7; }
 .source-card[data-source=direct] .source-figure { box-shadow:2px 3px 0 #cddccf; }
 .source-card[data-source=direct] .source-figure img { height:clamp(90px,8.1vw,117px); }
 .source-transform { border-radius:50%; width:26px; height:26px; color:var(--primary); background:var(--surface); }
 .source-card[data-source=direct] .source-transform { color:#53675a; }
 .creation-home.juzi-create-home .source-card[data-source=chart] .source-comparison { grid-template-columns:minmax(0,1fr) 13% minmax(0,1.28fr); gap:0; }
 .source-card[data-source=chart] .source-figure { padding:4px; border-radius:6px; box-shadow:2px 3px 0 #e3d3b1; }
 .source-card[data-source=chart] .source-figure:first-child img { height:clamp(103px,9.5vw,137px); }
 .source-card[data-source=chart] .source-figure:first-child figcaption { display:none; }
 .source-card[data-source=chart] .source-transform { width:100%; height:21px; background:transparent; color:#927856; }
 .source-card[data-source=chart] .source-transform svg { width:100%; height:21px; }
 .source-card[data-source=chart] .source-figure:last-child { transform:translateY(-9px); }
 .source-card[data-source=chart] .source-figure:last-child figcaption { position:absolute; top:100%; white-space:nowrap; color:#765d37; }
}
.source-copy { flex:1; padding:16px 7px 13px; }
.source-copy h2 { color:var(--ink); margin:0 0 6px; font:700 clamp(21px,1.8vw,26px)/1.45 var(--font); letter-spacing:-.02em; }
.source-copy p { color:var(--muted); margin:0; font:400 14px/1.6 var(--font); }
.source-copy .source-short { display:none; }
.source-copy .source-cost { margin-top:4px; color:var(--ink); font-size:12px; line-height:1.5; }
.source-photo-class { position:relative; z-index:2; display:grid; gap:4px; margin-top:8px; color:var(--muted); font:500 12px/1.5 var(--font); }
.source-photo-class select {
 width:100%; min-width:0; min-height:44px; padding:5px 8px;
 color:var(--ink); background:var(--surface); font:500 16px/1.5 var(--font);
}
.source-action {
 appearance:none; display:flex; align-items:center; justify-content:space-between;
 gap:8px; margin:0 7px; padding:10px 0; min-height:49px; text-align:left;
 background:transparent; border:0; border-top:1px solid var(--line); color:var(--primary); cursor:pointer; font:700 15px/1.5 var(--font);
}
.source-action::after { content:""; position:absolute; inset:0; border-radius:22px; }
.source-action:focus-visible { outline:0; }
.source-action:focus-visible::after { outline:3px solid var(--primary); outline-offset:2px; }
@media(hover:hover) {
 .creation-home .creation-sources .source-card:has(.source-action:hover),.creation-tool:hover { border-color:var(--primary); }
}
.creation-other { margin:31px 0 0; }
.creation-other h2 { color:var(--ink); margin:0 0 18px; font:700 25px/1.55 var(--font); }
.creation-tool-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
.creation-tool { display:flex; align-items:center; gap:18px; padding:16px 22px; min-height:92px; border-radius:18px; border:1px solid var(--line); background:var(--surface); color:var(--ink); text-decoration:none; }
.creation-tool-icon { display:grid; place-items:center; width:42px; height:42px; border-radius:12px; background:#f8eaf1; color:var(--primary); font:700 22px/1 var(--font); flex:none; }
.creation-tool--qr .creation-tool-icon { color:#48634f; background:#eaf0e6; }
.creation-tool-icon svg { width:24px; height:24px; }
.creation-tool-copy { display:grid; gap:2px; flex:1; min-width:0; }
.creation-tool-copy strong { font:650 20px/1.5 var(--font); }
.creation-tool-copy small { color:var(--muted); font:400 14px/1.5 var(--font); }
.creation-tool>svg { color:var(--muted); }
.creation-drafts { display:flex; gap:16px; flex-wrap:wrap; }
.creation-home .juzi-recent,.creation-home .juzi-footer { margin-top:38px; }
.creation-home .juzi-footer { justify-content:flex-start; }
.creation-home .juzi-footer a { display:inline-flex; align-items:center; min-height:44px; }

#modal:has(.chart-import-sheet) { width:min(500px,calc(100% - 32px)); padding:24px; }
.chart-import-sheet header { display:flex; justify-content:space-between; align-items:center; gap:12px; }
.chart-import-sheet #dialog-title { margin:0; color:var(--ink); font:700 24px/1.5 var(--font); }
.chart-import-sheet header button { width:44px; height:44px; border:0; border-radius:50%; color:var(--ink); background:#f6f1f4; }
.chart-import-sheet>p { color:var(--muted); margin:7px 0 16px; }
.chart-import-example { display:grid; grid-template-columns:minmax(0,1fr) auto minmax(0,1fr); align-items:center; padding:14px; border-radius:14px; background:#f6edda; }
.chart-import-example img { display:block; width:100%; height:90px; object-fit:contain; }
.chart-import-example figure:last-child img { width:80%; }
.chart-import-example>span svg { width:18px; height:18px; color:var(--muted); }
.chart-import-sheet>#chart-import-image { display:flex; width:100%; min-height:50px; border-radius:13px; margin-top:18px; }
.chart-import-sheet>small { display:block; text-align:center; color:var(--muted); margin:6px 0 18px; }
.chart-import-sheet>#chart-import-project { display:flex; width:100%; align-items:center; text-align:left; justify-content:start; padding:14px 0 4px; border:0; border-top:1px solid var(--line); border-radius:0; gap:12px; }
.chart-import-sheet #chart-import-project>svg:first-child { box-sizing:border-box; width:43px; height:43px; padding:11px; border-radius:12px; color:var(--primary); background:var(--studio-soft); }
.chart-import-sheet #chart-import-project span { display:grid; flex:1; }
.chart-import-sheet #chart-import-project small { color:var(--muted); font-weight:400; }
@media(max-width:999px) {
 .juzi-home.creation-home { --home-gutter:clamp(16px,4vw,32px); padding-bottom:calc(85px + env(safe-area-inset-bottom,0px)); }
}
@media(max-width:699px) {
 .creation-intro { flex-direction:column-reverse; align-items:stretch; gap:17px; margin:16px 0 12px; }
 .creation-title p { display:none; }
 .creation-title h1 { font-size:clamp(25px,7.1vw,32px); line-height:1.55; letter-spacing:-.03em; }
 #home-continuation { width:100%; }
 .creation-intro .juzi-resume { gap:9px; padding:5px 8px; min-height:51px; border-radius:12px; }
 .creation-intro .juzi-resume-preview { width:36px; height:36px; flex-basis:36px; }
 .creation-intro .juzi-resume-copy { display:flex; gap:7px; align-items:center; }
 .creation-intro .juzi-resume-copy h2 { font-size:14px; }
 .creation-intro .juzi-resume-copy p { display:none; }
 .creation-intro .juzi-resume-label { white-space:nowrap; font-size:11px; }
 .creation-intro .juzi-resume>.btn { min-height:40px; padding:4px; font-size:12px; gap:2px; }
 .creation-sources { grid-template-columns:minmax(0,1fr); gap:10px; }
 .creation-home.juzi-create-home .creation-sources .source-card {
  display:grid; grid-template-columns:80px minmax(0,1fr) 17px; align-items:center;
  gap:11px; min-height:102px; padding:10px; border-radius:17px;
 }
 .creation-home.juzi-create-home .source-card .source-comparison {
  display:flex; align-items:center; justify-content:center; gap:4px; align-self:center; padding:5px; width:80px; height:80px; border-radius:11px;
 }
 .creation-home .source-card[data-source=ai] .source-comparison { --scene-bg:#f6e6ec; }
 .creation-home .source-card[data-source=direct] .source-comparison { --scene-bg:#e4eee5; }
 .creation-home .source-card[data-source=chart] .source-comparison { --scene-bg:#f4e9d1; }
 .source-comparison::before,.source-comparison::after,.source-figure figcaption,.source-transform { display:none; }
 .source-figure { display:block; width:calc(50% - 2px); padding:0; border-radius:4px; overflow:hidden; }
 .source-figure img { height:62px; }
 .source-card:not([data-source=direct]) .source-comparison { position:relative; }
 .source-card:not([data-source=direct],[data-source=cartoon]) .source-figure:first-child { position:absolute; top:8px; left:7px; width:35px; }
 .source-card:not([data-source=direct],[data-source=cartoon]) .source-figure:last-child { position:absolute; bottom:7px; right:7px; width:38px; }
 .source-card:not([data-source=direct]) .source-figure img { height:45px; }
 .source-card[data-source=chart] .source-figure:first-child img { height:56px; }
 .source-card[data-source=chart] .source-figure:last-child img { height:34px; }
 .creation-home .source-card[data-source=cartoon] .source-figure { width:100%; }
 .creation-home .source-card[data-source=cartoon] .source-figure img { height:70px; }
 .source-copy { padding:0; }
 .source-copy h2 { margin:0 0 3px; font-size:clamp(17px,5vw,20px); }
 .source-copy .source-long { display:none; }
 .source-copy .source-short { display:block; font-size:13px; line-height:1.5; }
 .source-action { min-height:44px; margin:0; padding:0; border:0; }
 .source-action span,.source-action svg { display:none; }
 .source-action::before { content:""; width:8px; height:8px; border:solid var(--muted); border-width:0 1.5px 1.5px 0; transform:rotate(-45deg); }
 .source-action::after { border-radius:17px; }
 .creation-other { margin-top:18px; }
 .creation-other h2 { font-size:19px; margin-bottom:12px; }
 .creation-tool-grid { gap:12px; }
 .creation-tool { display:grid; position:relative; gap:4px; min-height:80px; padding:9px 12px; border-radius:14px; }
 .creation-tool-icon { width:29px; height:29px; font-size:18px; border-radius:8px; }
 .creation-tool-icon svg { width:19px; height:19px; }
 .creation-tool-copy strong { font-size:14px; }
 .creation-tool-copy small { display:none; }
 .creation-tool>svg { position:absolute; right:12px; top:15px; width:15px; height:15px; }
 .creation-home .juzi-recent,.creation-home .juzi-footer { margin-top:30px; }
 .chart-import-sheet::before { content:""; display:block; width:38px; height:4px; background:var(--line); border-radius:4px; margin:-9px auto 10px; }
 #modal:has(.chart-import-sheet) { position:fixed; inset:auto 0 0; margin:0; width:100%; max-width:none; max-height:calc(100dvh - 16px); padding:18px 16px calc(18px + env(safe-area-inset-bottom,0px)); border-radius:22px 22px 0 0; }
}
@media(max-width:350px) {
 .creation-home.juzi-create-home .creation-sources .source-card { grid-template-columns:70px minmax(0,1fr) 16px; gap:9px; }
 .creation-home.juzi-create-home .source-card .source-comparison { width:70px; height:72px; }
 .creation-intro .juzi-resume-label { display:none; }
}
