/* ═════════ Estúdio v2 — layout de ecrã inteiro dentro da loja ═════════ */
.sx{display:grid;grid-template-columns:minmax(0,1fr) 420px;height:calc(100vh - var(--top) - 34px);min-height:600px;background:var(--surface)}
.kmain:has(.sx) .ftr{display:none}
.sx-stage{display:flex;flex-direction:column;min-width:0;background:radial-gradient(ellipse at 50% 38%,var(--stage-a) 0%,var(--stage-b) 78%);border-right:1px solid var(--line);position:relative}
.sx-stage::before{content:'';position:absolute;inset:0;background-image:radial-gradient(circle,color-mix(in srgb,var(--ink) 7%,transparent) 1px,transparent 1.2px);background-size:22px 22px;pointer-events:none;mask-image:radial-gradient(ellipse at center,#000 30%,transparent 75%)}
.sx-stage>*{position:relative}
.sx-bar{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:14px 18px}
.sx-views{width:220px;background:var(--surface);box-shadow:0 0 0 1px var(--line)}
.sx-views button{display:flex;align-items:center;justify-content:center;gap:6px}
.sx-views i{font-style:normal;min-width:18px;height:18px;border-radius:9px;background:var(--accent);color:#fff;font-size:11px;font-weight:700;display:inline-flex;align-items:center;justify-content:center;padding:0 5px}
.sx-tools{display:flex;align-items:center;gap:4px;background:var(--surface);border-radius:999px;padding:4px;box-shadow:0 0 0 1px var(--line),0 4px 14px -8px rgba(0,0,0,.2)}
.sx-tools button{height:36px;min-width:36px;padding:0 9px;border-radius:999px;display:flex;align-items:center;justify-content:center;gap:4px;color:var(--ink2)}
.sx-tools button:hover:not(:disabled){background:var(--soft);color:var(--ink)}
.sx-tools button:disabled{opacity:.3}
.sx-tools button.ok{color:var(--ok);font-weight:700}
.sx-tools small{font-size:11px;font-weight:600}
.sx-sep{width:1px;height:20px;background:var(--line);margin:0 4px}
.sx-canvas{position:relative;flex:1;min-height:0}
.sx-canvas canvas{position:absolute;inset:0;width:100%;height:100%;touch-action:none;display:block}
.sx-empty{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);display:grid;gap:4px;text-align:center;background:var(--glass);padding:16px 22px;border-radius:12px;pointer-events:none;box-shadow:0 10px 30px -18px rgba(0,0,0,.4)}
.sx-empty b{font-family:var(--serif);font-size:24px;font-weight:500}
.sx-empty span{font-size:13px;color:var(--ink2)}
.sx-strip{display:flex;justify-content:space-between;gap:12px;padding:12px 18px;font-size:13px;color:var(--ink2);border-top:1px solid var(--line);background:var(--glass2)}
.sx-strip b{color:var(--ink);font-weight:600}

.sx-panel{display:flex;flex-direction:column;min-height:0;background:var(--surface)}
.sx-head{padding:20px 22px 12px}
.sx-head .h2{font-size:34px;margin-top:4px}
.sx-tabs{display:grid;grid-template-columns:repeat(4,1fr);gap:4px;padding:0 16px;border-bottom:1px solid var(--line)}
.sx-tabs button{height:48px;display:flex;align-items:center;justify-content:center;gap:6px;font-size:13px;font-weight:600;color:var(--ink3);border-bottom:2px solid transparent;margin-bottom:-1px}
.sx-tabs button i{font-style:normal;width:18px;height:18px;border-radius:50%;background:var(--soft2);color:var(--ink2);font-size:10px;display:inline-flex;align-items:center;justify-content:center}
.sx-tabs button.on{color:var(--ink);border-color:var(--ink)}
.sx-tabs button.on i{background:var(--ink);color:#fff}
.sx-body{flex:1;overflow-y:auto;padding:4px 22px 22px;display:flex;flex-direction:column;gap:12px}
.sx-h{display:flex;justify-content:space-between;align-items:baseline;margin-top:14px;font-size:12px;font-weight:700;letter-spacing:.1em;text-transform:uppercase;color:var(--ink)}
.sx-h span,.sx-h .link{font-size:12px;font-weight:500;letter-spacing:0;text-transform:none;color:var(--ink3)}
.sx-h .link{color:var(--ink)}
.sx-add{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}
.sx-add button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;height:88px;border-radius:12px;box-shadow:inset 0 0 0 1px var(--line);font-size:12px;font-weight:600;color:var(--ink2);background:var(--surface);transition:all .15s}
.sx-add button:hover{box-shadow:inset 0 0 0 1.5px var(--ink);color:var(--ink);transform:translateY(-2px)}
.sx-mono{display:inline-flex;align-items:center;justify-content:center;width:30px;height:30px;border-radius:50%;box-shadow:inset 0 0 0 1.5px currentColor;font-family:var(--serif);font-weight:600;font-size:13px}
.sx-tpl{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
.sx-tpl button{display:grid;gap:6px;padding:8px;border-radius:12px;box-shadow:inset 0 0 0 1px var(--line);font-size:12px;font-weight:500;color:var(--ink2);background:var(--surface);text-align:center}
.sx-tpl button:hover{box-shadow:inset 0 0 0 1.5px var(--ink);color:var(--ink)}
.sx-tplv{height:64px;border-radius:8px;background:var(--soft);display:flex;align-items:center;justify-content:center;overflow:hidden;white-space:nowrap}
.sx-tplv img{width:32px;height:32px;object-fit:contain}
.sx-gfx{display:grid;grid-template-columns:repeat(5,1fr);gap:8px}
.sx-gfx button{aspect-ratio:1;border-radius:10px;box-shadow:inset 0 0 0 1px var(--line);display:flex;align-items:center;justify-content:center;color:var(--ink);background:var(--surface)}
.sx-gfx button:hover{box-shadow:inset 0 0 0 1.5px var(--ink);background:var(--soft)}
.sx-gfx img{width:30px;height:30px;object-fit:contain}
.sx-layers{display:grid;gap:4px}
.sx-layer{display:grid;grid-template-columns:30px 1fr repeat(4,26px);gap:4px;align-items:center;padding:6px 8px;border-radius:10px;box-shadow:inset 0 0 0 1px var(--line);cursor:pointer;font-size:13px}
.sx-layer.on{box-shadow:inset 0 0 0 1.5px var(--ink);background:var(--soft)}
.sx-li{width:28px;height:28px;border-radius:7px;background:var(--surface);box-shadow:inset 0 0 0 1px var(--line);display:flex;align-items:center;justify-content:center;font-family:var(--serif);font-weight:700;font-size:14px;text-shadow:0 0 1px rgba(0,0,0,.4)}
.sx-ln{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-weight:500}
.sx-layer button{width:26px;height:26px;border-radius:6px;color:var(--ink2);font-size:14px}
.sx-layer button:hover:not(:disabled){background:var(--surface);color:var(--ink)}
.sx-layer button:disabled{opacity:.25}
.sx-editor{display:grid;gap:4px;padding-top:12px;margin-top:4px;border-top:1px solid var(--line)}
.sx-acts{display:flex;flex-wrap:wrap;gap:6px;margin-top:10px}
.sx-acts .chip{height:34px;font-size:13px}
.sx-tech{display:grid;gap:8px}
.sx-tech button{display:grid;gap:4px;text-align:left;padding:14px 16px;border-radius:12px;box-shadow:inset 0 0 0 1px var(--line);background:var(--surface)}
.sx-tech button.on{box-shadow:inset 0 0 0 2px var(--ink)}
.sx-tech b{font-family:var(--serif);font-size:22px;font-weight:500}
.sx-tech span{font-size:13px;color:var(--ink2);line-height:1.45}
.sx-tech em{font-style:normal;font-size:12px;font-weight:600;color:var(--ink)}
.sx-cta{display:flex;align-items:center;gap:14px;padding:14px 22px calc(14px + env(safe-area-inset-bottom));border-top:1px solid var(--line);background:var(--surface)}
.sx-price{display:grid;line-height:1.15}
.sx-price small{font-size:12px;color:var(--ink3)}
.sx-price b{font-size:22px;font-weight:700;font-variant-numeric:tabular-nums}
.sx-cta .btn{flex:1;height:52px}
.sx .st-fonts{grid-template-columns:repeat(5,minmax(0,1fr))}
.sx .st-prods{grid-template-columns:repeat(3,minmax(0,1fr))}
.sx .threads button{width:30px;height:30px}

@media (max-width:1100px){.sx{grid-template-columns:minmax(0,1fr) 380px}}
@media (max-width:900px){
  .sx{grid-template-columns:1fr;height:auto;min-height:0}
  .sx-stage{position:sticky;top:var(--top);z-index:20;height:46vh;border-right:0;border-bottom:1px solid var(--line)}
  .sx-bar{padding:8px 10px}
  .sx-views{width:170px}
  .sx-tools button small,.sx-sep{display:none}
  .sx-strip{display:none}
  .sx-head{padding:14px 16px 6px}.sx-head .h2{font-size:26px}
  .sx-tabs{padding:0 8px;position:sticky;top:calc(var(--top) + 46vh);background:var(--surface);z-index:15}
  .sx-tabs button{font-size:12px;height:44px}
  .sx-tabs button i{display:none}
  .sx-body{padding:4px 16px 16px;overflow:visible}
  .sx-cta{position:sticky;bottom:0;z-index:16}
  .sx-gfx{grid-template-columns:repeat(6,1fr)}
  .sx-tpl{grid-template-columns:repeat(2,1fr)}
  .sx .st-hint{display:none}
}

/* v3 — acabamento do estúdio */
.sx-views{background:var(--surface)}
.sx-tools{background:var(--surface)}
.sx-tools button.on{background:var(--ink);color:var(--bg)}
.sx-empty{background:var(--glass);color:var(--ink)}
.sx-strip{background:var(--glass2);align-items:center}
.sx-qcol{display:flex;align-items:center;gap:6px;min-width:0}
.sx-qcol button{width:22px;height:22px;border-radius:50%;box-shadow:inset 0 0 0 1px rgba(0,0,0,.18);outline:2px solid transparent;outline-offset:2px;flex-shrink:0}
.sx-qcol button.on{outline-color:var(--ink)}
.sx-qcol span{margin-left:8px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sx-meta{display:flex;align-items:center;gap:10px;white-space:nowrap}
.sx-saved{color:var(--ok);font-size:12px;font-weight:600}
.sx-compare{position:absolute;right:18px;bottom:62px;width:min(26%,220px);aspect-ratio:1;border-radius:14px;background:var(--surface);box-shadow:var(--shadow),0 0 0 1px var(--line);overflow:hidden;z-index:3}
.sx-compare canvas{width:100%;height:100%;display:block}
.sx-compare span{position:absolute;left:10px;top:8px;font-size:11px;font-weight:700;letter-spacing:.1em;text-transform:uppercase;color:var(--ink3)}
.sx-quick{position:absolute;left:50%;bottom:16px;transform:translateX(-50%);display:flex;align-items:center;gap:8px;padding:6px;border-radius:999px;background:var(--surface);box-shadow:var(--shadow),0 0 0 1px var(--line);z-index:4;max-width:calc(100% - 24px)}
.sx-quick input{height:36px;border:0;outline:none;background:var(--soft);border-radius:999px;padding:0 14px;font-size:15px;width:180px;color:var(--ink)}
.sx-quick select{height:36px;border:0;border-radius:999px;background:var(--soft);padding:0 10px;font-size:13px;color:var(--ink)}
.sx-qc{display:flex;gap:4px;padding-right:4px}
.sx-qc button{width:24px;height:24px;border-radius:50%;box-shadow:inset 0 0 0 1px rgba(0,0,0,.2);outline:2px solid transparent;outline-offset:1px}
.sx-qc button.on{outline-color:var(--accent)}
.sx-steps{display:grid;grid-template-columns:repeat(4,1fr);gap:4px;padding:10px 22px 0;border-top:1px solid var(--line)}
.sx-steps span{display:flex;align-items:center;gap:6px;font-size:11px;font-weight:600;color:var(--ink3);white-space:nowrap}
.sx-steps i{font-style:normal;width:18px;height:18px;border-radius:50%;background:var(--soft2);display:inline-flex;align-items:center;justify-content:center;font-size:10px}
.sx-steps .ok{color:var(--ink)}
.sx-steps .ok i{background:var(--ok);color:#fff}
.sx-cta{border-top:0}
.sx-panel{background:var(--surface)}
.sx-tabs{background:var(--surface)}
.sx-add button,.sx-tpl button,.sx-gfx button,.sx-tech button,.sx-layer,.st-prods button{background:var(--surface);color:var(--ink)}
.sx-tplv{background:var(--soft)}
.sx-li{background:var(--surface)}
.sx-layer.on{background:var(--soft)}
.st-fonts button{background:var(--surface);color:var(--ink)}
.drop{background:var(--surface)}
.ideas button{background:var(--soft);color:var(--ink)}
[data-theme="dark"] .sx-tplv span[style*="#111111"]{color:var(--ink)!important}
[data-theme="dark"] .sx-gfx img,[data-theme="dark"] .sx-tplv img{filter:drop-shadow(0 0 6px rgba(194,56,75,.4))}
@media (max-width:900px){
  .sx-compare{display:none}
  .sx-quick{bottom:8px;gap:6px}.sx-quick input{width:120px}.sx-qc{display:none}
  .sx-steps{padding:8px 16px 0}
  .sx-steps span{font-size:10px}
}
