/* Canvas Editor — home screen, Canvas Learn, Settings
   8px spacing scale; 24–32px between sections. Desktop ≥1100px: collapsible sidebar · Tablet 701–1099px: icon rail ·
   Phone ≤700px: bottom navigation. Colours come from the theme variables in js/display.js. */
#dash { display: none; }
body.home #dash { display: grid; }
body.home #app { display: none; }
#dash {
  --d-bg: var(--bg0); --d-surface: var(--bg1); --d-surface2: var(--bg2); --d-line: var(--line); --d-text: var(--ink); --d-muted: var(--ink2); --d-faint: var(--ink3); --d-red: #fa4946;
  --s1: 8px; --s2: 16px; --s3: 24px; --s4: 32px; --s5: 40px; --r: 12px; --side: 232px;
  position: fixed; inset: 0; overflow-y: auto; overflow-x: hidden; background: var(--d-bg); color: var(--d-text);
  grid-template-columns: var(--side) minmax(0, 1fr); grid-template-rows: 64px minmax(0, 1fr); align-content: start;
  font: 15px/1.55 Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; -webkit-font-smoothing: antialiased;
  transition: grid-template-columns .2s ease;
}
#dash.collapsed { --side: 76px; }
#dash button { border: 0; cursor: pointer; color: inherit; font: inherit; background: none; }
#dash button:disabled { cursor: default; opacity: .5; }
#dash :focus-visible { outline: 2px solid #ff827d; outline-offset: 2px; }
#dash [tabindex="-1"]:focus { outline: none; }
#dash svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
#dash svg.sm { width: 16px; height: 16px; }
#dash svg.flip { transform: scaleX(-1); }
#dash .hide { display: none !important; }
#dash h1, #dash h2, #dash h3 { font-family: Manrope, Inter, system-ui, sans-serif; color: var(--d-text); margin: 0; }

/* ---------- top bar ---------- */
.d-top { grid-column: 1 / -1; display: flex; align-items: center; gap: var(--s1); padding: 0 var(--s3) 0 var(--s2); border-bottom: 1px solid var(--d-line); background: var(--top); position: sticky; top: 0; z-index: 6; min-width: 0; }
.d-brand { display: flex; gap: 10px; align-items: center; min-width: 0; padding: 4px; border-radius: 8px; }
.d-mark { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: var(--d-red); color: #fff; flex: none; }
#dash .d-mark svg, .app .d-mark svg { width: 22px; height: 22px; stroke-width: 2.4; }
.d-word { font: 750 21px/1 Manrope, Inter, sans-serif; letter-spacing: -0.8px; white-space: nowrap; }
.d-word em { font-style: normal; font-weight: 500; color: var(--d-muted); margin-left: 4px; }
.d-word i { font-style: normal; color: var(--d-red, #fa4946); margin-left: 1px; }
.d-topright { display: flex; gap: var(--s1); align-items: center; margin-left: auto; flex: none; }
#dash .d-iconbtn { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; color: var(--d-muted); font-weight: 650; font-size: 13px; }
#dash .d-iconbtn:hover { background: var(--d-surface2); color: var(--d-text); }

/* buttons */
#dash .d-primary, #dash .d-secondary { display: inline-flex; align-items: center; justify-content: center; gap: var(--s1); height: 44px; padding: 0 var(--s2); border-radius: 10px; font-weight: 650; white-space: nowrap; transition: background .15s; }
#dash .d-primary { background: var(--d-red); color: #fff; }
#dash .d-primary:hover:not(:disabled) { background: #ff5d59; }
#dash .d-secondary { background: var(--d-surface2); color: var(--d-text); }
#dash .d-secondary:hover:not(:disabled) { background: var(--bg3); }
#dash .d-primary.sm, #dash .d-secondary.sm { height: 36px; padding: 0 12px; font-size: 13px; border-radius: 9px; }
#dash .d-top .d-createbtn { height: 40px; padding: 0 14px; }
#dash .d-textbtn { color: var(--d-muted); font-size: 13px; font-weight: 600; padding: 8px 4px; display: inline-flex; gap: 6px; align-items: center; min-height: 36px; }
#dash .d-textbtn:hover { color: var(--d-text); }
#dash .d-more { color: var(--accText); font-size: 13.5px; font-weight: 650; display: inline-flex; gap: 6px; align-items: center; min-height: 40px; padding: 0 4px; white-space: nowrap; }
#dash .d-more:hover { text-decoration: underline; }
#dash .d-ghost { background: var(--d-surface2); border: 0; border-radius: 9px; padding: 0 12px; height: 36px; display: inline-flex; gap: 6px; align-items: center; justify-content: center; font-weight: 600; }
#dash .d-ghost:hover:not(:disabled) { background: var(--bg3); }
#dash .d-ghost.sm, #dash .d-primary.sm { font-size: 12.5px; }
#dash .d-link { color: var(--accText); font-size: 13px; font-weight: 600; display: inline-flex; gap: 5px; align-items: center; min-height: 36px; }

/* ---------- sidebar ---------- */
.d-side { padding: var(--s2) 12px; display: flex; flex-direction: column; gap: 4px; position: sticky; top: 64px; height: calc(100dvh - 64px); overflow-y: auto; scrollbar-width: none; border-right: 1px solid var(--d-line); }
#dash .d-nav { display: flex; align-items: center; gap: 12px; text-align: left; border-radius: 10px; color: var(--d-muted); padding: 0 12px; font-weight: 550; width: 100%; min-height: 44px; white-space: nowrap; overflow: hidden; }
#dash .d-nav:hover { background: var(--d-surface2); color: var(--d-text); }
#dash .d-nav.active { background: #fa494616; color: var(--accText); }
#dash .d-nav.active svg { color: var(--d-red); }
#dash.collapsed .d-nav { justify-content: center; padding: 0; }
#dash.collapsed .d-nav span { display: none; }

/* ---------- main ---------- */
.d-main { max-width: 1240px; width: 100%; margin: 0 auto; padding: var(--s4) var(--s5) var(--s4); min-width: 0; }
.d-section { margin-top: var(--s5); }
.d-sechead { display: flex; justify-content: space-between; align-items: flex-end; gap: var(--s2); margin-bottom: var(--s2); }
.d-sechead h2 { font-size: 20px; letter-spacing: -.3px; }
.d-sechead p { margin: 2px 0 0; color: var(--d-muted); font-size: 14px; }
.d-cathead { font-size: 13px !important; letter-spacing: .08em; text-transform: uppercase; color: var(--d-faint) !important; font-family: Inter, sans-serif !important; font-weight: 700; margin-bottom: var(--s2) !important; }
.d-pagehead { margin-bottom: var(--s4); }
.d-pagehead h1 { font-size: 32px; letter-spacing: -1px; line-height: 1.15; }
.d-pagehead p { margin: var(--s1) 0 0; color: var(--d-muted); max-width: 640px; }
.d-pagerow { display: flex; justify-content: space-between; align-items: flex-end; gap: var(--s2); flex-wrap: wrap; }
#dash .d-backlink { display: inline-flex; align-items: center; gap: 6px; color: var(--d-muted); font-size: 13.5px; font-weight: 600; min-height: 40px; margin: -8px 0 var(--s1) -4px; padding: 0 4px; border-radius: 8px; }
#dash .d-backlink:hover { color: var(--d-text); }
.d-note { display: flex; gap: var(--s1); align-items: flex-start; color: var(--d-faint); font-size: 13px; margin: var(--s2) 0 0; }
#dash .d-note svg { margin-top: 2px; }
.d-muted { color: var(--d-muted); }
.d-tip { display: flex; align-items: center; gap: 12px; padding: 12px var(--s2); margin-bottom: var(--s3); border-radius: var(--r); background: var(--accSoft); font-size: 14px; }
#dash .d-tip svg { color: var(--accText); }
#dash .d-tip .d-iconbtn { margin-left: auto; flex: none; }

/* hero */
.d-hero { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: var(--s5); align-items: center; }
.d-herotext { min-width: 0; }
.d-hero h1 { font-size: clamp(36px, 4.2vw, 56px); letter-spacing: -2px; line-height: 1.02; font-weight: 800; }
.d-hero p { color: var(--d-muted); margin: var(--s2) 0 var(--s4); font-size: 18px; }
.d-heroaction { display: flex; gap: 12px; flex-wrap: wrap; }
#dash .d-heroaction > * { height: 48px; padding: 0 20px; font-size: 15px; }

/* before / after */
.d-ba { margin: 0; min-width: 0; }
.d-bastage { --ba: 50%; position: relative; aspect-ratio: 3 / 2; border-radius: 16px; overflow: hidden; background: var(--bg3); cursor: ew-resize; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.d-babefore, .d-baafter { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; opacity: 0; transition: opacity .3s; }
.d-ba.ready .d-babefore, .d-ba.ready .d-baafter { opacity: 1; }
.d-baafter { clip-path: inset(0 0 0 var(--ba)); }
.d-baline { position: absolute; top: 0; bottom: 0; left: var(--ba); width: 2px; margin-left: -1px; background: #fff; pointer-events: none; }
.d-baknob { position: absolute; top: 50%; left: 50%; width: 44px; height: 44px; margin: -22px 0 0 -22px; border-radius: 50%; background: #fff; color: #16171b; display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 10px rgba(0,0,0,.25); transition: transform .15s; }
#dash .d-baknob svg { width: 14px; height: 14px; stroke-width: 2.4; margin: 0 -2px; }
#dash .d-baknob svg:first-child { transform: scaleX(-1); }
#dash .d-baknob svg.flip { transform: none; }
.d-bastage.dragging .d-baknob, .d-bastage:focus-visible .d-baknob { transform: scale(1.08); }
.d-batag { position: absolute; top: 12px; padding: 3px 8px; border-radius: 6px; background: rgba(15, 16, 20, .6); color: #f4f4f5; font-size: 11.5px; font-weight: 600; pointer-events: none; }
.d-batag.before { left: 12px; } .d-batag.after { right: 12px; }
.d-ba.noimg .d-bastage { display: none; }

/* tools */
.d-tools { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.d-tool { position: relative; min-width: 0; }
#dash .d-toolbtn { display: flex; align-items: center; gap: var(--s2); width: 100%; min-height: 72px; padding: 12px var(--s2); border-radius: var(--r); background: var(--d-surface); text-align: left; transition: background .15s; }
#dash .d-toolbtn:hover { background: var(--d-surface2); }
.d-tools.all .d-toolbtn { padding-right: 52px; }
.d-ico { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; background: #fa494614; color: var(--accText); flex: none; }
.d-tooltext { display: flex; flex-direction: column; min-width: 0; }
.d-tooltext b { font-size: 14.5px; font-weight: 650; line-height: 1.3; }
.d-tooltext small { color: var(--d-muted); font-size: 12.5px; line-height: 1.4; }
#dash .d-howto { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; color: var(--d-faint); }
#dash .d-howto:hover { color: var(--d-text); background: var(--bg3); }

/* presets */
.d-presets { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s2); }
#dash .d-preset { display: flex; flex-direction: column; gap: var(--s1); text-align: left; min-width: 0; padding: 0; border-radius: var(--r); }
.d-pimg { display: block; width: 100%; aspect-ratio: 4 / 5; border-radius: var(--r); overflow: hidden; background: var(--bg2); transition: transform .2s ease; }
.d-pimg canvas, .d-pvthumb canvas { width: 100%; height: 100%; display: block; opacity: 0; transition: opacity .3s; }
.ready > canvas { opacity: 1 !important; }
#dash .d-preset:hover .d-pimg { transform: translateY(-2px); }
.d-preset b { font-size: 14px; font-weight: 600; }

/* projects */
.d-projectgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s2); }
.d-projectgrid:empty { display: none; }
.d-projectgrid.big { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.d-project { position: relative; min-width: 0; }
#dash .d-projopen { display: flex; flex-direction: column; width: 100%; text-align: left; padding: 0; gap: 2px; }
.d-thumb { display: block; aspect-ratio: 4 / 3; border-radius: var(--r); overflow: hidden; margin-bottom: 6px; background: repeating-conic-gradient(var(--chk1) 0% 25%, var(--chk2) 0% 50%) 0 0 / 16px 16px; transition: transform .2s ease; }
#dash .d-projopen:hover .d-thumb { transform: translateY(-2px); }
.d-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.d-pname { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-right: 36px; }
.d-pmeta { color: var(--d-muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#dash .d-pmore { position: absolute; right: 0; bottom: 14px; width: 36px; height: 36px; border-radius: 9px; display: grid; place-items: center; color: var(--d-muted); }
#dash .d-pmore:hover { background: var(--d-surface2); color: var(--d-text); }
.d-empty { display: flex; align-items: center; gap: var(--s2); padding: var(--s3); border-radius: var(--r); background: var(--d-surface); color: var(--d-muted); flex-wrap: wrap; }
.d-empty p { margin: 0; flex: 1; min-width: 180px; }
.d-emptyico { color: var(--d-faint); display: grid; }
.d-projbar { display: flex; gap: 12px; margin-bottom: var(--s3); flex-wrap: wrap; }
.d-search { flex: 1; min-width: 200px; display: flex; align-items: center; gap: var(--s1); height: 44px; padding: 0 12px; border-radius: 10px; background: var(--d-surface); border: 1px solid var(--d-line); }
.d-search:focus-within { border-color: var(--d-red); }
#dash .d-search svg { color: var(--d-faint); }
#dash .d-search input { flex: 1; min-width: 0; background: none; border: 0; outline: none; color: var(--d-text); font: inherit; height: 100%; }
#dash .d-projbar select { height: 44px; padding: 0 12px; border-radius: 10px; background: var(--d-surface); border: 1px solid var(--d-line); color: var(--d-text); font: inherit; }
.d-storage { color: var(--d-faint); font-size: 13px; margin: var(--s3) 0 0; max-width: 720px; }
.d-projfoot { margin-top: var(--s1); }

/* Canvas Learn */
.d-learnlist { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s2); }
.l-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: var(--s3) var(--s2); }
#dash .l-card { display: flex; flex-direction: row; align-items: flex-start; gap: 12px; text-align: left; padding: 14px; min-width: 0; background: var(--d-surface); border-radius: var(--r); min-height: 44px; }
#dash .l-card:hover { background: var(--d-surface2); }
.l-icon { position: relative; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: var(--d-redsoft, rgba(255,90,80,.12)); color: var(--d-red); flex: none; }
#dash .l-icon svg { width: 20px; height: 20px; }
.l-done { position: absolute; right: -6px; top: -6px; width: 24px; height: 24px; border-radius: 50%; background: #1f9d5c; color: #fff; font-size: 13px; font-weight: 800; display: grid; place-items: center; }
.l-ctext { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.l-ctext b { font-size: 14.5px; font-weight: 650; line-height: 1.35; }
.l-ctext small { color: var(--d-muted); font-size: 12.5px; }
.l-csum { color: var(--d-muted); font-size: 13px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.l-bar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: var(--s2); }
.l-cats { display: flex; gap: var(--s1); overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; margin-bottom: var(--s1); }
.l-cats::-webkit-scrollbar { display: none; }
#dash .l-cat { flex: none; height: 40px; padding: 0 var(--s2); border-radius: 99px; background: var(--d-surface); color: var(--d-muted); font-size: 13.5px; font-weight: 600; white-space: nowrap; }
#dash .l-cat.on { background: var(--d-text); color: var(--d-bg); }
.l-eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accText); margin-bottom: 6px; }
.l-meta { color: var(--d-muted); font-size: 14px; }
.l-detail { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: var(--s5); align-items: start; }
.l-main { min-width: 0; }
.l-summary { font-size: 16px; margin: 0 0 var(--s3); }
.l-sec { margin-bottom: var(--s3); }
.l-sec h3 { font-size: 15px; margin-bottom: var(--s1); }
.l-list { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 6px; }
.l-dl { display: grid; grid-template-columns: minmax(110px, auto) 1fr; gap: 6px var(--s2); margin: 0; }
.l-dl dt { font-weight: 600; }
.l-dl dd { margin: 0; color: var(--d-muted); }
.l-dl kbd, .helpbox kbd { display: inline-block; min-width: 22px; padding: 1px 6px; border-radius: 5px; border: 1px solid var(--line2); background: var(--bg2); font: 600 12px/1.6 Inter, sans-serif; text-align: center; }
.l-aside { display: flex; flex-direction: column; gap: 12px; position: sticky; top: 88px; }
#dash .l-aside .d-primary, #dash .l-aside .d-secondary { width: 100%; }
#dash .l-donebtn.on { background: #1f9d5c22; color: #1f9d5c; }
.l-related { margin-top: var(--s2); display: flex; flex-direction: column; gap: var(--s2); }
.l-related h3 { font-size: 14px; }
.l-related .l-card { flex-direction: row !important; align-items: center; }

/* Settings page */
.d-settings { max-width: 760px; }
.set-sec { padding: var(--s3) 0; border-top: 1px solid var(--d-line); }
.set-sec:first-child { border-top: 0; padding-top: 0; }
.set-sec h2 { font-size: 18px; margin-bottom: var(--s2) !important; }
/* ---------- AI studio ---------- */
.d-ai { display: grid; grid-template-columns: minmax(0, 420px) minmax(0, 1fr); gap: 18px; align-items: start; }
.d-card { background: var(--d-surface); border-radius: var(--r); padding: var(--s3); min-width: 0; }
.d-card h3 { font-size: 14px; margin: 0; }
.d-aiform { display: flex; flex-direction: column; gap: 11px; position: sticky; top: 84px; }
.d-lbl { color: var(--d-muted); font-size: 12.5px; font-weight: 600; }
#dash textarea, #dash select, #dash .t-input { background: var(--input); border: 1px solid var(--line2); border-radius: 9px; color: var(--d-text); font: inherit; max-width: 100%; }
#dash textarea { width: 100%; padding: 11px 12px; resize: vertical; min-height: 110px; line-height: 1.45; }
#dash select { height: 38px; padding: 0 8px; }
#dash .t-input { height: 38px; padding: 0 10px; width: 100%; }
#dash textarea:focus, #dash select:focus, #dash .t-input:focus { border-color: var(--d-red); outline: none; }
.d-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.d-chips { display: flex; flex-wrap: wrap; gap: 6px; }
#dash .d-chip { padding: 6px 11px; border-radius: 99px; background: var(--card); border: 1px solid var(--chipB); color: var(--chipT); font-size: 12.5px; }
#dash .d-chip:hover { border-color: var(--d-faint); }
#dash .d-chip.on { background: #fa494622; border-color: var(--d-red); color: var(--hi); }
#dash .d-gen { width: 100%; margin-top: 4px; padding: 13px 16px; font-size: 15px; }
.d-status { min-height: 1em; margin: 0; color: var(--d-muted); font-size: 12.5px; }
.d-note { margin: 0; color: var(--d-faint); font-size: 11.5px; line-height: 1.5; }
.d-aigrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.d-aicard { background: var(--d-surface); border: 1px solid var(--d-line); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; }
.d-aicard.loading { aspect-ratio: 1; display: grid; place-items: center; background: linear-gradient(100deg, var(--bg2) 30%, var(--bg3) 50%, var(--bg2) 70%) 0 0 / 300% 100%; animation: shimmer 1.4s linear infinite; }
.d-aimedia img, .d-aimedia canvas { width: 100%; height: auto; display: block; }
.d-aiprompt { margin: 10px 12px 4px; color: var(--d-muted); font-size: 12px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.d-aicard .d-row { padding: 6px 12px 12px; justify-content: flex-start; }
.d-aiempty { grid-column: 1 / -1; border: 1px dashed var(--d-line); border-radius: 13px; padding: 40px 20px; display: flex; flex-direction: column; align-items: center; gap: 10px; color: var(--d-muted); text-align: center; }
.d-aiempty p { margin: 0; }

/* ---------- tool pages (compressor, batch, product studio) ---------- */
/* ---------- tool pages (compressor, batch, product studio) ---------- */
.t-layout { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 18px; align-items: start; }
.t-settings { display: flex; flex-direction: column; gap: 12px; position: sticky; top: 84px; }
.t-settings h3 + * { margin-top: -2px; }
.t-settings .srow { padding: 0; }
.t-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.t-field .seg { align-self: flex-start; max-width: 100%; flex-wrap: wrap; }
.t-off { opacity: .45; pointer-events: none; }
.t-local { display: flex; gap: 8px; align-items: center; margin: 2px 0 0; font-size: 12px; color: var(--d-muted); }
.t-dot { width: 7px; height: 7px; border-radius: 50%; background: #3fae74; flex: none; }
.t-main { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.t-drop { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 6px; padding: var(--s4) var(--s3); border: 1.5px dashed var(--line2); border-radius: var(--r); background: transparent; transition: border-color .15s, background .15s; }
.t-drop.over { border-color: var(--d-red); background: var(--accSoft); }
.t-dropico { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: #fa494618; color: var(--accText); margin-bottom: 4px; }
.t-drop small { max-width: 420px; }
.t-drop .d-primary { margin-top: 8px; }
.t-summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.t-summary:empty { display: none; }
.t-sumtext { display: flex; flex-direction: column; min-width: 0; }
.t-sumtext .d-muted { font-size: 12.5px; }
.t-sumacts { display: flex; gap: 8px; flex-wrap: wrap; }
.t-files { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.t-file { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 8px 10px 8px 8px; border-radius: 12px; background: var(--d-surface); }
.t-thumb { width: 56px; height: 56px; border-radius: 8px; object-fit: cover; background: var(--bg3); display: block; }
.t-info { display: flex; flex-direction: column; min-width: 0; }
.t-info small { font-size: 11.5px; font-variant-numeric: tabular-nums; }
.t-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.t-save { font-weight: 750; font-size: 13px; color: #1f9d5c; font-variant-numeric: tabular-nums; }
.t-save.neutral { color: var(--d-faint); }
.t-acts { display: flex; gap: 6px; }
#dash .t-acts .d-ghost { width: 34px; height: 34px; padding: 0; }
.t-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.t-card { margin: 0; border-radius: 12px; overflow: hidden; background: var(--d-surface); min-width: 0; }
.t-prev { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; background: var(--bg3); }
.t-card figcaption { display: flex; align-items: center; gap: 6px; padding: 6px 6px 6px 10px; font-size: 12px; }
.t-card figcaption .t-name { flex: 1; font-size: 12px; }
#dash .t-card .d-ghost { width: 30px; height: 30px; padding: 0; }
#dash .t-go { width: 100%; height: 46px; }
.p-layout { grid-template-columns: minmax(0, 1fr) 330px; }
.p-stage { border-radius: var(--r); overflow: hidden; background: var(--d-surface); display: grid; place-items: center; padding: 14px; }
.p-stage.transparent { background: repeating-conic-gradient(var(--chk1) 0% 25%, var(--chk2) 0% 50%) 0 0 / 16px 16px; }
.p-canvas { max-width: 100%; max-height: 70vh; height: auto; display: block; border-radius: 6px; box-shadow: 0 8px 26px rgba(0,0,0,.16); }
.p-empty { display: flex; flex-direction: column; gap: 10px; align-items: center; }
.p-swatches { display: flex; flex-wrap: wrap; gap: 8px; }
#dash .p-sw { position: relative; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line2); box-shadow: inset 0 0 0 2px var(--d-surface); flex: none; }
#dash .p-sw.on { box-shadow: inset 0 0 0 2px var(--d-surface), 0 0 0 2px var(--d-red); }
#dash .p-sw-white { background: #fff; } #dash .p-sw-soft { background: #f1f1f3; } #dash .p-sw-cream { background: #f6efe6; }
#dash .p-sw-studio { background: radial-gradient(circle at 50% 40%, #fff, #d9dade); } #dash .p-sw-warm { background: linear-gradient(#fff1e4, #f3d9c4); } #dash .p-sw-cool { background: linear-gradient(#eef3fb, #d6e0ee); }
#dash .p-sw-dark { background: radial-gradient(circle at 50% 40%, #4a4d55, #16171b); }
#dash .p-sw-none { background: repeating-conic-gradient(#d4d4d8 0% 25%, #fff 0% 50%) 0 0 / 10px 10px; }
.p-sw input[type=color] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; border: 0; padding: 0; }
.p-sw-custom::after { content: "+"; position: absolute; inset: 0; display: grid; place-items: center; font-weight: 700; color: rgba(0,0,0,.55); pointer-events: none; }
.p-actions { display: flex; flex-direction: column; gap: 8px; }
#dash .p-actions > * { width: 100%; height: 44px; }
.p-stage[hidden], .p-empty[hidden] { display: none; }


/* presets page */
.d-pv { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: var(--s4); align-items: start; }
.d-pvview .d-bastage { aspect-ratio: 4 / 5; max-height: calc(100dvh - 200px); margin: 0 auto; }
.d-pvside { display: flex; flex-direction: column; gap: var(--s2); position: sticky; top: 88px; }
.d-pvlist { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s1); }
#dash .d-pvitem { display: flex; align-items: center; gap: 10px; padding: 6px; border-radius: 10px; text-align: left; min-height: 56px; background: var(--d-surface); border: 1px solid transparent; }
#dash .d-pvitem:hover { background: var(--d-surface2); }
#dash .d-pvitem.on { border-color: var(--d-red); background: var(--accSoft); }
.d-pvthumb { width: 40px; height: 50px; border-radius: 6px; overflow: hidden; flex: none; background: var(--bg3); }
.d-pvitem b { display: block; font-size: 13px; font-weight: 650; line-height: 1.25; }
.d-pvitem small { display: none; }
.d-pvctl { display: flex; flex-direction: column; gap: var(--s1); padding: var(--s2); border-radius: var(--r); background: var(--d-surface); }
.d-pvctl .srow { padding: 0; }
.d-pvctl .d-textbtn { align-self: flex-start; }
.d-pvbtns { display: flex; flex-direction: column; gap: var(--s1); }
#dash .d-pvbtns > * { width: 100%; }

/* settings page lives in #dash: wider rows */
#dash .set-row { min-height: 52px; }
#dash .d-settings .disp-profiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* footer */
.d-footer { display: flex; justify-content: space-between; align-items: center; gap: var(--s1) var(--s2); margin-top: var(--s5); padding-top: var(--s2); border-top: 1px solid var(--d-line); font-size: 13px; color: var(--d-faint); flex-wrap: wrap; }

/* bottom navigation is for phones only */
.d-mnav { display: none; }
body.dragging .d-hero { outline: 2px dashed var(--d-red); outline-offset: 6px; border-radius: 16px; }

/* editor top bar uses the same mark */
.app .brand { cursor: pointer; border-radius: 8px; padding: 3px 6px 3px 3px; margin-left: -3px; }
.app .brand:hover { background: var(--bg3); }
.app .d-mark { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: #fa4946; color: #fff; }
.app .d-mark svg { width: 19px !important; height: 19px !important; stroke: currentColor; fill: none; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.app .d-word { font-size: 19px; }

/* ---------- tablet: icon rail ---------- */
@media (max-width: 1099px) {
  #dash, #dash.collapsed { --side: 84px; }
  #dash .d-collapse { display: none; }
  .d-side { padding: 12px 8px; }
  #dash .d-nav, #dash.collapsed .d-nav { flex-direction: column; justify-content: center; gap: 4px; padding: 8px 2px; min-height: 60px; font-size: 11px; text-align: center; line-height: 1.2; }
  #dash .d-nav span, #dash.collapsed .d-nav span { display: block; max-width: 100%; overflow-wrap: break-word; }
  .d-main { padding: var(--s3) var(--s3) var(--s4); }
  .d-hero { grid-template-columns: minmax(0, 1fr); gap: var(--s3); }
  .d-hero p { margin-bottom: var(--s3); }
  .d-tools { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .d-learnlist { grid-template-columns: minmax(0, 1fr); }
  .d-ai, .t-layout, .p-layout, .d-pv, .l-detail { grid-template-columns: minmax(0, 1fr); }
  .d-aiform, .t-settings, .d-pvside, .l-aside { position: static; }
  .t-layout:not(.p-layout) > .t-settings { order: 2; }
  .d-pvview .d-bastage { max-height: none; max-width: 520px; }
  .d-pvlist { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (pointer: coarse) {
  #dash .d-textbtn, #dash .d-link, #dash .d-more { min-height: 44px; }
  #dash .d-pmore, #dash .d-ghost.sm, #dash .t-acts .d-ghost, #dash .t-card .d-ghost { min-width: 44px; min-height: 44px; }
}
/* ---------- phone: bottom navigation ---------- */
@media (max-width: 700px), (pointer: coarse) and (max-width: 1100px) and (orientation: portrait) {
  #dash { display: none; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto; font-size: 15px; }
  body.home #dash { display: block; }
  .d-top { height: 56px; padding: 0 8px 0 12px; }
  .d-word { font-size: 19px; letter-spacing: -.6px; }
  .d-mark { width: 30px; height: 30px; }
  #dash .d-top .d-createbtn { display: none; }
  .d-side { display: none; }
  .d-main { padding: var(--s2) var(--s2) calc(104px + env(safe-area-inset-bottom, 0px)); }
  .d-section { margin-top: var(--s4); }
  .d-pagehead { margin-bottom: var(--s3); }
  .d-pagehead h1 { font-size: 26px; }
  .d-hero h1 { font-size: 38px; letter-spacing: -1.4px; }
  .d-hero p { font-size: 16px; margin: var(--s1) 0 var(--s2); }
  #dash .d-heroaction > * { flex: 1; padding: 0 12px; }
  .d-bastage { border-radius: 12px; }
  .d-sechead h2 { font-size: 18px; }
  .d-tools { grid-template-columns: minmax(0, 1fr); gap: var(--s1); }
  #dash .d-toolbtn { min-height: 64px; }
  .d-presets { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 12px; margin: 0 calc(var(--s2) * -1); padding: 0 var(--s2) 4px; scrollbar-width: none; overscroll-behavior-x: contain; }
  .d-presets::-webkit-scrollbar { display: none; }
  #dash .d-preset { flex: 0 0 40%; scroll-snap-align: start; }
  .d-projectgrid, .d-projectgrid.big { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .l-grid { grid-template-columns: minmax(0, 1fr); gap: var(--s2); }
  .l-grid .l-card { flex-direction: row !important; align-items: center; }
  .l-dl { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .l-dl dd { margin-bottom: 8px; }
  .d-pvlist { display: flex; overflow-x: auto; gap: var(--s1); scrollbar-width: none; margin: 0 calc(var(--s2) * -1); padding: 0 var(--s2); }
  #dash .d-pvitem { flex: none; }
  #dash .d-settings .disp-profiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .t-file { grid-template-columns: 48px minmax(0, 1fr) auto; gap: 10px; }
  .t-thumb { width: 48px; height: 48px; }
  .t-file .t-acts { grid-column: 2 / -1; justify-content: flex-start; }
  .t-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .d-mnav { position: fixed; bottom: 0; left: 0; right: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); align-items: end; background: var(--navGlass); border-top: 1px solid var(--d-line); padding: 4px 4px max(8px, env(safe-area-inset-bottom)); z-index: 5; backdrop-filter: blur(12px); }
  #dash .d-mnav button { color: var(--d-muted); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 11px; font-weight: 600; min-height: 52px; min-width: 0; }
  #dash .d-mnav button span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  #dash .d-mnav button.active { color: var(--accText); }
  #dash .d-mnav .d-mnav-main svg { width: 24px; height: 24px; padding: 10px; box-sizing: content-box; border-radius: 16px; background: var(--d-red); color: #fff; margin-top: -16px; stroke-width: 2.2; }
  .app .d-word { display: none; }
}
@media (max-width: 360px) {
  .d-hero h1 { font-size: 33px; }
  .d-word em { display: none; }
}

/* light theme touches */
[data-theme=light] #dash .l-cat.on { background: #16171b; color: #fff; }
[data-theme=light] .t-save { color: #13814a; }

/* Netlify's free-plan badge (fixed, bottom-right, ~62px tall): keep controls out from under it */
body:has(> #nl-badge-frame) .d-main { padding-bottom: 96px; }
@media (max-width: 700px), (pointer: coarse) and (max-width: 1100px) and (orientation: portrait) {
  body:has(> #nl-badge-frame) .d-mnav { padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px)); }
  body:has(> #nl-badge-frame) .d-main { padding-bottom: calc(168px + env(safe-area-inset-bottom, 0px)); }
}

/* V2: calm dashboard; full tool catalogue remains unchanged. */
.d-footerlinks { display:flex; flex-wrap:wrap; gap: 8px 18px; }
.d-footerlinks a { color:var(--d-muted); text-decoration:none; display:inline-flex; align-items:center; min-height:44px; }
.d-footerlinks a:hover { color:var(--d-text); text-decoration:underline; }
#dash .d-iconbtn, #dash .d-howto { min-width:44px; min-height:44px; }
#dash .d-howto { width:44px; height:44px; }
.d-tools.all .d-toolbtn { padding-right:58px; }
#dash .d-toolbtn { min-height:76px; }
#dash .d-preset .d-pimg { aspect-ratio:4/3; }
#dash .d-preset .d-pimg canvas { object-fit:cover; }
@media (min-width:1100px) { .d-main { max-width:1200px; } .d-hero { gap:32px; } }
@media (max-width:700px), (pointer: coarse) and (max-width: 1100px) and (orientation: portrait) {
  .d-main { padding:24px 20px calc(112px + env(safe-area-inset-bottom,0px)); }
  .d-top { padding:0 12px 0 16px; height:60px; }
  .d-section { margin-top:32px; }
  .d-hero { gap:20px; }
  .d-hero h1 { font-size:clamp(30px,8.8vw,40px); line-height:1.1; }
  .d-hero p { margin:8px 0 20px; }
  .d-home-tools { grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
  #dash .d-home-tools .d-toolbtn { min-height:94px; flex-direction:column; align-items:flex-start; justify-content:center; gap:8px; padding:12px; }
  .d-home-tools .d-ico { width:32px;height:32px;border-radius:8px; }
  .d-home-tools .d-tooltext b { font-size:14px; }
  .d-home-tools .d-tooltext small { display:none; }
  .d-presets { margin:0 -20px; padding:0 20px 4px; }
  #dash .d-preset { flex-basis:46%; }
  .d-sechead { gap:8px; align-items:center; }
  #dash .d-more { font-size:12px; white-space:normal; text-align:right; justify-content:flex-end; }
  .d-sechead h2 { line-height:1.25; }
  .d-footerlinks { gap:0 16px; }
  #dash .d-mnav .d-mnav-main svg { margin-top:0; padding:8px; border-radius:12px; }
}
@media (max-width:350px) { .d-main { padding-left:14px;padding-right:14px; } .d-presets { margin:0 -14px;padding-left:14px;padding-right:14px; } }
@media (prefers-reduced-motion:reduce) { #dash, #dash * { scroll-behavior:auto !important; transition:none !important; animation:none !important; } }

/* V10 AI Creative Studio — dashboard only; the V9 editor is unchanged. */
#dash, #dash.studio-dark{--v-accent:#a66bff;--v-accent2:#ec67ba;--v-line:#292940;--v-card:#141725;--v-muted:#a9aec0;--v-deep:#0b0d17;--v-hover:#202339;--v-shadow:rgba(113,63,255,.26);--side:248px;--d-red:#9b56f5;--accText:#b98bff;--accSoft:#9b56f526;--d-bg:#0b0d17;--d-surface:#141725;--d-surface2:#1d2131;--d-line:#292b3c;--d-text:#f5f5fa;--d-muted:#b6bbcc;--d-faint:#959bb0;background:radial-gradient(ellipse at 74% 8%,#201333 0,transparent 37%),var(--d-bg)}
:is([data-theme=light] #dash:not(.studio-dark), #dash.studio-light){--v-accent:#7136c6;--v-accent2:#ba388e;--v-line:#e2dbea;--v-card:#fff;--v-muted:#666477;--v-deep:#f8f6fc;--v-hover:#eee8f9;--v-shadow:rgba(113,63,255,.13);--d-red:#773ad0;--accText:#7136c6;--accSoft:#773ad014;--d-bg:#f8f7fc;--d-surface:#fff;--d-surface2:#f0edf7;--d-line:#e4dfec;--d-text:#201a2d;--d-muted:#655f74;--d-faint:#777186;background:radial-gradient(ellipse at 74% 8%,#efe2fc 0,transparent 43%),var(--d-bg)}
#dash .d-top{background:var(--v-deep);height:64px;border-color:var(--v-line);gap:12px;padding-right:24px}
#dash .d-mark{background:linear-gradient(145deg,#ff4b55,#db253e);width:36px;height:36px;box-shadow:0 4px 16px #e73e3b22}
#dash .d-word{font-size:21px;letter-spacing:-.8px;font-weight:800}#dash .d-word em{color:var(--d-text);font-weight:700}
#dash .d-side{background:radial-gradient(ellipse at 0% 95%,#7536d02b,transparent 48%);padding:24px 16px;gap:9px}
#dash .d-nav{min-height:54px;font-size:16px;border:1px solid transparent;border-radius:13px;gap:14px}#dash .d-nav.active{background:linear-gradient(110deg,#8b45e8,#4c2990);color:white;box-shadow:inset 0 0 0 1px #c097ff30,0 5px 24px #6737d224}#dash .d-nav.active svg{color:white}
#dash .d-primary{background:linear-gradient(115deg,#a763f4,#753ce7);box-shadow:0 5px 18px var(--v-shadow);color:#fff}#dash .d-primary:hover:not(:disabled){background:#8e4ce8}
#dash .d-secondary{background:transparent;border:1px solid var(--v-accent);color:var(--d-text)}#dash .d-secondary:hover:not(:disabled){background:var(--accSoft)}
#dash .d-main{max-width:1500px;padding:32px clamp(20px,3vw,46px) 28px}
.v10-searchwrap{position:relative;flex:1;min-width:0;max-width:580px;margin-left:clamp(8px,4vw,64px)}.v10-search{display:flex;align-items:center;gap:10px;padding:0 12px;height:44px;border:1px solid var(--v-line);border-radius:13px;background:var(--d-surface);color:var(--d-muted)}.v10-search input{width:100%;min-width:0;background:transparent;border:0;outline:none;color:var(--d-text);font:inherit;font-size:14px}.v10-search input::placeholder{color:var(--d-muted)}.v10-search kbd{font-size:11px;white-space:nowrap;color:var(--d-faint)}.v10-results{position:absolute;inset:50px 0 auto;background:var(--d-surface);border:1px solid var(--v-line);border-radius:12px;box-shadow:0 15px 40px #0005;max-height:60vh;overflow:auto;padding:6px;z-index:10}.v10-results[hidden]{display:none}#dash .v10-results button{display:flex;align-items:center;gap:10px;padding:12px;width:100%;text-align:left;border-radius:8px}#dash .v10-results button:hover,#dash .v10-results button:focus-visible{background:var(--v-hover)}.v10-results button span{flex:1}.v10-results p{padding:10px}
.v10-home{display:grid;grid-template-columns:minmax(0,1fr) minmax(240px, .37fr);gap:28px;align-items:start}.v10-primary,.v10-aside{min-width:0}.v10-aside{display:grid;gap:20px}.v10-hero{min-height:300px;grid-template-columns:minmax(0,1.06fr) minmax(0,.94fr);gap:22px;padding:14px 4px 25px}.v10-hero h1{font-size:clamp(34px,3.25vw,55px);line-height:1.08;letter-spacing:-1.8px}.v10-hero h1 span{background:linear-gradient(110deg,var(--v-accent),var(--v-accent2));background-clip:text;-webkit-background-clip:text;color:transparent;white-space:normal}.v10-hero p{font-size:16px;line-height:1.55;margin:14px 0 24px}.v10-hero .d-heroaction{gap:10px}#dash .v10-hero .d-heroaction>button{font-size:13px;padding:0 13px;min-height:46px;height:auto;white-space:normal;text-align:center}
.v10-art{position:relative;isolation:isolate;padding:20px 9px 14px 0}.v10-art:before,.v10-art:after{content:'';position:absolute;inset:14px 3px 25px 12px;border:1px solid #915bfa80;border-radius:20px;background:linear-gradient(130deg,#493eb248,#a529bd30);transform:rotate(6deg);z-index:-1;box-shadow:0 0 30px #8439fb40}.v10-art:after{inset:4px 9px 34px 20px;transform:rotate(-5deg);border-color:#5361fa80}.v10-art .d-ba{transform:rotate(3deg);border:2px solid #d5d3f0;border-radius:16px;box-shadow:0 12px 30px #0a071966,0 0 28px #a246ff55}.v10-art .d-bastage{border-radius:13px}.v10-ai-mark{position:absolute;right:-3px;top:0;transform:rotate(8deg);font:800 24px/1 Manrope,sans-serif;display:flex;align-items:center;gap:2px;color:white;background:linear-gradient(140deg,#6264ff,#b23cde);padding:13px;border:1px solid #dbc0ff;border-radius:16px;box-shadow:0 0 25px #aa4dff80;pointer-events:none}.v10-ai-mark svg{width:14px!important;height:14px!important}
.v10-title{display:flex;align-items:flex-start;gap:12px}.v10-title>.d-sechead{flex:1;min-width:0}.v10-title>svg{color:var(--v-accent2);width:27px!important;height:27px!important;margin-top:3px}.v10-bolt{color:#ffc34a;font-size:42px;font-weight:800;line-height:.9}.v10-home .d-section{margin-top:26px}.v10-home .d-sechead h2{font-size:23px}.v10-home .d-sechead p{font-size:13px}.v10-home .d-home-tools{grid-template-columns:repeat(6,minmax(0,1fr));gap:10px}.v10-home .d-tool{--tool:#bb7dff}.v10-home .d-tool:nth-child(2){--tool:#66bfff}.v10-home .d-tool:nth-child(3){--tool:#ff79a9}.v10-home .d-tool:nth-child(4){--tool:#51dfd8}.v10-home .d-tool:nth-child(5){--tool:#ffbf59}.v10-home .d-tool:nth-child(6){--tool:#c991ff}#dash .v10-home .d-home-tools .d-toolbtn{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;min-height:116px;text-align:center;padding:12px 5px;border:1px solid color-mix(in srgb,var(--tool) 32%,var(--v-line));background:radial-gradient(ellipse at 50% 0%,color-mix(in srgb,var(--tool) 18%,transparent),transparent 80%),var(--v-card);border-radius:14px}#dash .v10-home .d-home-tools .d-toolbtn:hover{border-color:var(--tool);transform:translateY(-2px)}.v10-home .d-home-tools .d-ico{color:var(--tool);width:38px;height:38px;background:transparent}.v10-home .d-home-tools .d-ico svg{width:32px!important;height:32px!important;filter:drop-shadow(0 0 8px color-mix(in srgb,var(--tool) 38%,transparent))}.v10-home .d-home-tools .d-tooltext b{font-size:13px;overflow-wrap:anywhere}.v10-home .d-home-tools small{display:none}
:is([data-theme=light] #dash:not(.studio-dark),#dash.studio-light) .v10-home .d-tool{--tool:#7942be}:is([data-theme=light] #dash:not(.studio-dark),#dash.studio-light) .v10-home .d-tool:nth-child(2){--tool:#2169a3}:is([data-theme=light] #dash:not(.studio-dark),#dash.studio-light) .v10-home .d-tool:nth-child(3){--tool:#be376c}:is([data-theme=light] #dash:not(.studio-dark),#dash.studio-light) .v10-home .d-tool:nth-child(4){--tool:#147d7c}:is([data-theme=light] #dash:not(.studio-dark),#dash.studio-light) .v10-home .d-tool:nth-child(5){--tool:#a36b13}:is([data-theme=light] #dash:not(.studio-dark),#dash.studio-light) .v10-home .d-tool:nth-child(6){--tool:#7942be}
.v10-card{border:1px solid var(--v-line);border-radius:20px;background:linear-gradient(150deg,var(--v-card),var(--d-surface));padding:20px;min-width:0}.v10-cardhead{display:flex;align-items:flex-start;gap:12px;margin-bottom:15px}.v10-cardhead>svg{color:var(--v-accent2);width:33px!important;height:33px!important;margin-top:4px}.v10-cardhead h2{font-size:22px;line-height:1.2}.v10-cardhead p{font-size:12px;color:var(--d-muted);margin:4px 0 0}.v10-ailist{display:grid}#dash .v10-ailist button{display:flex;align-items:center;gap:10px;min-height:58px;padding:8px 0;text-align:left;border-top:1px solid var(--v-line)}#dash .v10-ailist button:hover{color:var(--v-accent)}.v10-ailist b{flex:1;font-size:13px;font-weight:650}.v10-aiicon{width:36px;height:36px;border-radius:10px;display:grid;place-items:center;background:#9b56f51a;color:var(--v-accent)}.v10-aiicon svg{width:24px!important;height:24px!important}.v10-ailist button:nth-child(2) .v10-aiicon{color:#59aaff}.v10-ailist button:nth-child(3) .v10-aiicon{color:#f86ba7}.v10-ailist button:nth-child(4) .v10-aiicon{color:#52c9be}#dash .v10-guide-preview{display:flex;align-items:center;gap:12px;width:100%;padding:0;margin:10px 0 20px}.v10-guide-preview img{width:75%;border:1px solid var(--v-line);border-radius:9px}.v10-guide-preview>span{display:grid;gap:12px;flex:1}.v10-guide-preview i{font-style:normal;font-size:12px;background:var(--d-surface2);border-radius:50%;width:25px;height:25px;display:grid;place-items:center}.v10-browse{width:100%;justify-content:center}#dash .v10-projects .d-empty{border:1px dashed var(--v-line);padding:18px;background:var(--v-card)}.v10-projects .d-project{border:1px solid var(--v-line);border-radius:14px;background:var(--v-card);overflow:hidden}.v10-projects .d-projopen{padding:0 0 10px}.v10-projects .d-pname,.v10-projects .d-pmeta{padding-left:10px}.v10-presets .d-pimg{border:1px solid var(--v-line)}
@media(min-width:1450px){.v10-hero{min-height:330px}.v10-aside{gap:20px}.v10-card{padding:24px}.v10-home .d-home-tools .d-toolbtn{min-height:130px!important}}
@media(max-width:1250px){#dash{--side:208px}.v10-home{grid-template-columns:minmax(0,1fr) minmax(225px,.40fr);gap:20px}.v10-home .d-home-tools{grid-template-columns:repeat(3,minmax(0,1fr))}.v10-hero{grid-template-columns:minmax(0,1fr);gap:10px}.v10-art{max-width:460px;margin:auto;width:90%}.v10-hero h1{font-size:43px}.v10-card{padding:16px}}
@media(max-width:1050px){#dash{--side:76px}#dash .d-nav{justify-content:center;padding:0}#dash .d-nav span{display:none}.v10-home{grid-template-columns:minmax(0,1fr)}.v10-hero{grid-template-columns:minmax(0,1fr) minmax(0,1fr);min-height:0}.v10-home .d-home-tools{grid-template-columns:repeat(3,minmax(0,1fr))}.v10-aside{grid-template-columns:repeat(2,minmax(0,1fr))}.v10-searchwrap{margin-left:8px}.v10-search kbd{display:none}}
@media(max-width:700px),(pointer:coarse) and (max-width:1100px) and (orientation:portrait){#dash{--side:0}#dash .d-top{height:auto;min-height:60px;flex-wrap:wrap;padding:8px 16px;gap:8px}.v10-searchwrap{order:3;flex:1 0 100%;max-width:none;margin:0}.v10-search{height:44px}#dash .d-main{padding:22px 18px 120px}.v10-home{display:flex;flex-direction:column;gap:24px}.v10-primary,.v10-aside{width:100%}.v10-hero{grid-template-columns:1fr;gap:18px;padding:6px 0 12px}.v10-hero h1{font-size:clamp(34px,9vw,46px)}.v10-hero p{font-size:15px}.v10-art{width:94%;max-width:420px}.v10-home .d-home-tools{grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}#dash .v10-home .d-home-tools .d-toolbtn{min-height:106px}.v10-home .d-sechead h2{font-size:20px}.v10-aside{grid-template-columns:1fr}.v10-home .d-section{margin-top:28px}.v10-projects .d-empty p{min-width:120px}.v10-card{padding:18px}.v10-hero .d-heroaction{flex-wrap:wrap}.v10-hero .d-heroaction>button{flex:1 1 130px}.v10-presets .d-presets{margin:0;padding:0}.v10-guide-preview img{max-width:230px}#dash .d-word{font-size:19px}#dash .d-topright{gap:0}#dash .d-topright .d-iconbtn{width:40px;min-width:40px}.v10-home .d-tooltext b{font-size:12px}}
@media(max-width:350px){.v10-home .d-home-tools{grid-template-columns:repeat(2,minmax(0,1fr))}#dash .d-main{padding-left:14px;padding-right:14px}}
.v10-bolt{display:grid;place-items:center;width:28px;flex:none;margin-top:1px}#dash .v10-bolt svg{width:32px;height:32px;filter:drop-shadow(0 0 8px #ffc34a45)}
@media(min-width:1251px){.v10-hero h1{font-size:clamp(36px,3.05vw,51px)}.v10-hero h1 span{white-space:nowrap}.v10-hero .d-herotext{padding-right:3px}}

/* V11 — reference studio dashboard. Keep a full left / centre / right layout at every size in Studio view. */
#dash.studio-dark{color-scheme:dark;--d-bg:#090c15;--v-deep:#090c15;--v-card:#131724;--d-surface:#141825;--v-line:#292c3d;background:radial-gradient(ellipse at 70% 16%,#19102a 0,transparent 31%),#090c15}
#dash.studio-light{color-scheme:light}
#dash .studio-layoutbar{display:none}
#dash.studio-wide{display:none;--side:248px;overflow:auto}
body.home #dash.studio-wide{display:block}
#dash.studio-wide .studio-shell{display:grid;grid-template-columns:248px minmax(0,1fr);grid-template-rows:82px auto;min-height:100%;width:100%;min-width:1360px;zoom:var(--studio-scale,1);align-content:start}
#dash.studio-wide .d-top{position:relative;grid-column:1/-1;grid-row:1;display:grid;grid-template-columns:248px minmax(0,1fr) auto;gap:0;height:82px;min-height:82px;padding:0 24px 0 0;flex-wrap:nowrap;background:transparent;border:0;align-items:center}
#dash.studio-wide .d-collapse,#dash.studio-wide .d-mnav{display:none}
#dash.studio-wide .d-brand{align-self:stretch;display:flex;align-items:center;gap:12px;padding:0 20px;margin:0;border-radius:0;border-right:1px solid var(--v-line);border-bottom:1px solid var(--v-line);text-align:left}
#dash .studio-brandtext{display:flex;flex-direction:column;gap:4px;min-width:0;white-space:nowrap}
#dash .studio-brandtext b{font:800 20px/1.15 Manrope,Inter,sans-serif;letter-spacing:-.65px}
#dash .studio-brandtext small{font-size:12px;color:var(--d-muted);font-weight:400}
#dash.studio-wide .d-mark{width:47px;height:47px;border-radius:13px}
#dash.studio-wide .d-mark svg{width:31px;height:31px}
#dash.studio-wide .v10-searchwrap{order:0;flex:initial;width:min(100%,540px);max-width:none;margin:0 0 0 44px}
#dash.studio-wide .v10-search{height:44px;border-radius:13px;background:var(--d-surface)}
#dash.studio-wide .v10-search kbd{display:block}
#dash.studio-wide .d-topright{gap:9px;justify-content:flex-end;margin-left:20px}
#dash.studio-wide .d-top .d-createbtn{display:none}
#dash.studio-wide .d-topright .d-iconbtn{width:42px;height:42px}
#dash.studio-wide .d-side{display:flex;grid-row:2;position:relative;top:auto;align-self:stretch;min-height:690px;height:auto;padding:20px 16px 100px;gap:8px;overflow:hidden;border-right:1px solid var(--v-line);background:radial-gradient(ellipse at 5% 88%,#6e25982c,transparent 47%)}
#dash.studio-wide .d-side:after{content:'';position:absolute;left:0;right:0;bottom:0;height:370px;background:url('../assets/studio-ribbon.svg') center bottom/100% auto no-repeat;pointer-events:none;z-index:0;opacity:.85}
#dash.studio-wide .d-nav{position:relative;z-index:1;display:flex;flex-direction:row;justify-content:flex-start;gap:13px;padding:0 18px;min-height:54px;font-size:16px;line-height:1.25;white-space:normal;text-align:left;border-radius:13px}
#dash.studio-wide .d-nav span{display:block;max-width:100%;overflow-wrap:normal}
#dash .studio-ai-pill{font-size:11px!important;color:white;background:linear-gradient(120deg,#ad62f6,#7440ed);padding:3px 11px;border-radius:30px;margin-left:auto;line-height:1.3;display:none}
#dash.studio-wide .studio-ai-pill{display:block}
#dash.studio-wide .d-main{grid-column:2;grid-row:2;max-width:none;width:100%;padding:5px 24px 28px 40px;margin:0}
#dash.studio-wide .v10-home{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:22px;align-items:start}
#dash.studio-wide .v10-primary,#dash.studio-wide .v10-aside{width:auto;min-width:0}
#dash.studio-wide .v10-aside{display:grid;grid-template-columns:1fr;gap:17px}
#dash.studio-wide .v10-hero{display:grid;grid-template-columns:minmax(0,1.12fr) minmax(0,.88fr);gap:17px;min-height:270px;padding:12px 6px 10px 0;align-items:center}
#dash.studio-wide .v10-hero h1{font-size:clamp(35px,3.15vw,52px);font-weight:800;letter-spacing:-1.6px;line-height:1.1}
#dash.studio-wide .v10-hero h1 span{white-space:nowrap}
#dash.studio-wide .v10-hero p{font-size:16px;line-height:1.45;margin:10px 0 24px}
#dash.studio-wide .v10-hero .d-heroaction{flex-wrap:nowrap;gap:12px}
#dash.studio-wide .v10-hero .d-heroaction>button{flex:0 1 auto;min-height:48px;padding:0 12px;font-size:14px;white-space:nowrap;border-radius:11px}
#dash.studio-wide .v10-art{max-width:none;width:100%;margin:0;padding:12px 4px 15px 0}
#dash.studio-wide .v10-art .d-ba{transform:perspective(900px) rotateY(-10deg) rotate(-6deg);border-radius:18px;box-shadow:0 18px 30px #0a0719aa,0 0 30px #7438ff69}
#dash.studio-wide .v10-art .d-bastage{aspect-ratio:1.3;border-radius:15px}
#dash.studio-wide .v10-art:before{transform:rotate(-8deg);inset:2px 4px 20px 12px;box-shadow:0 0 32px #394dff65}
#dash.studio-wide .v10-art:after{transform:rotate(5deg);inset:6px 4px 14px 15px;box-shadow:0 0 30px #a53bff56}
#dash.studio-wide .v10-ai-mark{top:-12px;right:-5px;font-size:29px;padding:15px;border-radius:16px;transform:rotate(9deg);box-shadow:0 0 32px #a34cffb0}
#dash.studio-wide .v10-home .d-section{margin-top:24px}
#dash.studio-wide .v10-home .d-home-tools{grid-template-columns:repeat(7,minmax(0,1fr));gap:11px}
#dash .v10-home .d-tool:nth-child(7){--tool:#72bcff}
#dash.studio-light .v10-home .d-tool:nth-child(7){--tool:#2169a3}
#dash.studio-wide .v10-home .d-home-tools .d-toolbtn{height:108px;min-height:108px!important;padding:10px 5px;gap:8px;border-radius:15px;background:radial-gradient(ellipse at 45% 12%,color-mix(in srgb,var(--tool) 25%,transparent),transparent 76%),linear-gradient(155deg,var(--v-card),var(--d-bg))}
#dash.studio-wide .v10-home .d-home-tools .d-ico{width:36px;height:36px}
#dash.studio-wide .v10-home .d-home-tools .d-ico svg{width:32px!important;height:32px!important}
#dash.studio-wide .v10-home .d-tooltext b{font-size:12px;line-height:1.25;font-weight:600;overflow-wrap:normal}
#dash.studio-wide .v10-home .d-sechead h2{font-size:23px}
#dash.studio-wide .v10-home .d-sechead p{font-size:13px}
#dash.studio-wide .v10-home .d-sechead{margin-bottom:12px}
#dash.studio-wide .v10-card{padding:20px;border-radius:18px;background:linear-gradient(145deg,var(--v-card),var(--d-surface));box-shadow:0 8px 24px #0001}
#dash.studio-wide .v10-cardhead{margin-bottom:11px;gap:11px}
#dash.studio-wide .v10-cardhead h2{font-size:22px}
#dash.studio-wide .v10-ailist button{min-height:55px;border-top:0;border-bottom:1px solid var(--v-line)}
#dash.studio-wide .v10-ailist button:last-child{border:0}
#dash.studio-wide .v10-aiicon{width:34px;height:34px}
#dash.studio-wide .v10-guide-preview img{width:72%;max-width:none}
#dash .studio-guide-lines i{position:relative;width:20px;height:20px;font-size:11px;background:var(--d-text);color:var(--d-bg)}
#dash .studio-guide-lines i:after{content:'';position:absolute;left:25px;top:5px;width:25px;height:4px;border-radius:3px;background:var(--d-muted);opacity:.55;box-shadow:0 8px 0 -1px var(--d-muted)}
#dash .studio-guide-lines{min-width:53px}
#dash.studio-wide .v10-projects .d-projectgrid{grid-template-columns:repeat(4,minmax(0,1fr));gap:13px}
#dash .studio-samples{margin-top:10px}
#dash .studio-samples>p{font-size:12px;color:var(--d-muted);margin:0 0 8px}
#dash .studio-samplegrid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:13px}
#dash .studio-sample{display:flex;flex-direction:column;min-width:0;text-align:left;background:var(--v-card);border:1px solid var(--v-line);border-radius:12px;overflow:hidden;padding:0 0 10px;gap:3px}
#dash .studio-sample:hover{border-color:var(--v-accent)}
#dash .studio-sample img{display:block;width:100%;aspect-ratio:1.85;object-fit:cover;margin-bottom:5px}
#dash .studio-sample b,#dash .studio-sample small{padding:0 10px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:100%}
#dash .studio-sample b{font-size:13px;font-weight:600}#dash .studio-sample small{font-size:11px;color:var(--d-muted)}
#dash.studio-wide .v10-projects .d-empty{padding:9px 12px;gap:10px;border:0;background:transparent;font-size:12px}
#dash.studio-wide .v10-projects .d-empty .d-secondary{height:32px;font-size:12px}
#dash.studio-wide .d-footer{margin-top:32px}
#dash.studio-wide .d-tip{display:none}
@media(min-width:1600px){#dash.studio-wide .studio-shell{grid-template-columns:270px minmax(0,1fr)}#dash.studio-wide .d-top{grid-template-columns:270px minmax(0,1fr) auto}#dash.studio-wide .v10-home{grid-template-columns:minmax(0,1fr) 330px;gap:25px}#dash.studio-wide .v10-hero{min-height:296px}#dash.studio-wide .v10-home .d-home-tools .d-toolbtn{min-height:120px!important}#dash.studio-wide .d-main{padding-left:44px}}
@media(max-width:1359px){#dash.v10-home-page .studio-layoutbar{position:sticky;top:0;z-index:12;display:flex;align-items:center;justify-content:space-between;gap:7px;padding:6px 10px;background:var(--v-deep);border-bottom:1px solid var(--v-line);font-size:12px;min-height:48px}#dash .studio-layoutbar>div{display:flex;gap:3px;align-items:center}#dash .studio-layoutbar button{min-height:36px;min-width:36px;padding:6px 10px;border:1px solid transparent;border-radius:8px;font-size:12px;color:var(--d-muted)}#dash .studio-layoutbar button[aria-pressed=true]{background:var(--accSoft);border-color:var(--v-accent);color:var(--accText)}#dash .studio-layoutbar button svg{width:18px;height:18px}#dash.studio-wide .studio-shell{width:1360px;min-height:0}#dash.studio-wide .v10-hero h1{font-size:43px}#dash.studio-wide .d-top .studio-theme{display:none}}
@media(max-width:700px),(pointer:coarse) and (max-width:1100px) and (orientation:portrait){#dash.studio-readable .d-top{top:48px}#dash.studio-readable .studio-samplegrid{grid-template-columns:repeat(2,minmax(0,1fr))}#dash.studio-readable .v10-home .d-home-tools{grid-template-columns:repeat(3,minmax(0,1fr))}#dash.studio-readable .d-main{padding-top:20px}#dash.studio-readable .studio-brandtext b{font-size:17px}#dash.studio-readable .studio-brandtext small{font-size:11px}#dash.studio-readable .d-topright .studio-theme{display:none}}

#dash.studio-wide .v10-hero{min-height:270px}
#dash.studio-wide .v10-art{max-width:335px;justify-self:center;margin:0 auto}
#dash.studio-wide .v10-art .d-bastage{aspect-ratio:1.38}
#dash.studio-wide .d-side:after{top:460px;bottom:auto;height:375px}
#dash.studio-wide .v10-projects .d-empty{padding:4px 0 6px}
#dash.studio-wide .v10-projects .d-empty p{min-width:0}
#dash.studio-wide .v10-guide-preview{margin-top:10px;margin-bottom:19px}
#dash.studio-zoom{overflow-x:auto;overscroll-behavior-x:contain}
#dash.studio-zoom .studio-layoutbar{left:0;width:100%;box-sizing:border-box}
@media(max-width:520px){#dash.v10-home-page .studio-layoutbar{padding:5px 8px;gap:4px}#dash .studio-layoutbar>span{font-size:11px;max-width:85px;line-height:1.2}#dash .studio-layoutbar button{padding:6px 8px;font-size:11px;min-height:40px}#dash .studio-layoutbar>div{gap:2px}}
