/* ===== Studio v2 (upload → preview → editor → confirm) — brick.me-style, Beadigo colours ===== */
.st-narrow{max-width:640px;margin:0 auto;padding:48px 16px 60px}
.brickword{color:var(--pop)}
.st-narrow .sub{color:#5b5b66;margin:4px 0 26px}
.st-card{display:flex;align-items:center;gap:16px;background:#fff;border:1.5px solid #e4e2ee;border-radius:16px;padding:20px 22px;margin:12px 0;text-decoration:none;color:#3a3a3a;cursor:pointer;transition:border-color .15s,box-shadow .15s;text-align:right}
.st-card:hover{border-color:var(--pop);box-shadow:0 8px 24px rgba(124,92,214,.12)}
.st-card.drop{border-style:dashed}.st-card.drop.over{border-color:var(--cta);background:#fff6fb}
.st-card-text{display:flex;flex-direction:column;gap:2px;flex:1}.st-card-text b{font-family:var(--round);font-size:1.1rem}.st-card-text small{color:#6b6b78}
.st-ic{width:56px;height:56px;border-radius:14px;flex:none;background:var(--accent-soft) no-repeat center/26px}
.st-ic.up{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237c5cd6' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 16V4m0 0l-4 4m4-4l4 4'/%3E%3Cpath d='M4 17v2a2 2 0 002 2h12a2 2 0 002-2v-2'/%3E%3C/svg%3E")}
.st-ic.folder{background:#fff0f6 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e0397a' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 7a2 2 0 012-2h4l2 2h8a2 2 0 012 2v9a2 2 0 01-2 2H5a2 2 0 01-2-2z'/%3E%3C/svg%3E") no-repeat center/26px}
.st-arrow{color:#9a9aa8;font-size:1.3rem}
/* preview */
.pv-frame{display:inline-block;border-radius:16px;overflow:hidden;box-shadow:0 16px 40px rgba(34,48,58,.14);margin:10px auto 14px;max-width:100%}
.pv-frame img{display:block;max-height:52vh;max-width:100%;object-fit:contain}
.pv-actions{justify-content:center;gap:10px;margin-bottom:14px}
.pill.ghost{background:#fff;border:1.5px solid #d8d8e0;color:#3a3a3a;padding:10px 18px;font-size:.95rem;box-shadow:none}
.pill.big{padding:16px 40px;font-size:1.15rem}
/* editor shell */
#studio{background:#fafafc;min-height:calc(100vh - 72px)}
.st-top{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px clamp(12px,3vw,32px);background:#fff;border-bottom:1px solid #ececf1;position:sticky;top:0;z-index:5}
.st-back{background:none;border:0;font:inherit;font-weight:600;color:#5b5b66;cursor:pointer;padding:8px}.st-back:hover{color:var(--pop)}
.st-meta{font-size:1.05rem;color:#3a3a3a}.st-meta b{font-family:var(--round)}
.st-body{display:grid;grid-template-columns:400px 1fr;gap:0;min-height:calc(100vh - 140px)}
.st-panel{background:#fff;border-inline-end:1px solid #ececf1;padding:0 0 30px}
.st-tabs{display:grid;grid-template-columns:repeat(5,1fr);border-bottom:1px solid #ececf1}
.st-tabs button{background:none;border:0;border-bottom:3px solid transparent;font:inherit;font-size:.85rem;font-weight:600;color:#5b5b66;padding:12px 4px 10px;cursor:pointer;display:flex;flex-direction:column;align-items:center;gap:6px}
.st-tabs button.on{color:var(--pop-dark);border-bottom-color:var(--pop);background:#f6f2ff}
.ti{width:26px;height:26px;background:no-repeat center/24px;opacity:.8}
.ti.ti-crop{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233a3a3a' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 2v14a2 2 0 002 2h14'/%3E%3Cpath d='M18 22V8a2 2 0 00-2-2H2'/%3E%3C/svg%3E")}
.ti.ti-colours{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233a3a3a' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Ccircle cx='8' cy='10' r='1.4' fill='%233a3a3a'/%3E%3Ccircle cx='12' cy='7' r='1.4' fill='%233a3a3a'/%3E%3Ccircle cx='16' cy='10' r='1.4' fill='%233a3a3a'/%3E%3Ccircle cx='9' cy='15' r='1.4' fill='%233a3a3a'/%3E%3C/svg%3E")}
.ti.ti-adjust{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233a3a3a' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M4 6h10M18 6h2M4 12h2M10 12h10M4 18h8M16 18h4'/%3E%3Ccircle cx='16' cy='6' r='2'/%3E%3Ccircle cx='8' cy='12' r='2'/%3E%3Ccircle cx='14' cy='18' r='2'/%3E%3C/svg%3E")}
.ti.ti-filters{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233a3a3a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3l1.8 4.6L18 9l-4.2 1.4L12 15l-1.8-4.6L6 9l4.2-1.4z'/%3E%3Cpath d='M19 15l.8 2 2 .8-2 .8-.8 2-.8-2-2-.8 2-.8z'/%3E%3C/svg%3E")}
.ti.ti-paint{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233a3a3a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 3l3 3-11 11-4 1 1-4z'/%3E%3Cpath d='M3 21h18'/%3E%3C/svg%3E")}
.st-pane{padding:18px 20px}
.st-pane-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px}.st-pane-head h3{margin:0;font-size:1.15rem}
.st-undo{background:none;border:0;font:inherit;color:#5b5b66;cursor:pointer;font-size:.9rem}.st-undo:hover{color:var(--pop)}
.st-slider{display:flex;align-items:center;gap:8px;margin:6px 0 12px}
.st-slider button{width:34px;height:34px;border-radius:50%;border:1.5px solid #d8d8e0;background:#fff;font:inherit;font-size:1.1rem;cursor:pointer;flex:none;padding:0;line-height:1}
.st-slider input[type=range]{flex:1;margin:0;accent-color:var(--pop);height:6px}
.st-slider output{min-width:52px;text-align:center;font-variant-numeric:tabular-nums;color:#3a3a3a;font-weight:600;font-size:.9rem}
.st-row{display:block;margin:6px 0}.st-row>span{font-weight:600;color:#3a3a3a;font-size:.95rem}
/* crop stage */
.crop-stage{position:relative;width:100%;aspect-ratio:1;background:#2a2734;border-radius:12px;overflow:hidden;touch-action:none;cursor:grab;user-select:none}
.crop-stage:active{cursor:grabbing}
.crop-stage img{position:absolute;left:0;top:0;transform-origin:0 0;pointer-events:none;max-width:none;max-height:none;object-fit:fill}
.crop-box{position:absolute;box-shadow:0 0 0 9999px rgba(20,16,30,.55);border:2px solid #fff;outline:2px solid var(--pop);box-sizing:border-box;cursor:move;background:repeating-linear-gradient(0deg,transparent 0 calc(33.33% - 1px),rgba(255,255,255,.35) calc(33.33% - 1px) 33.33%),repeating-linear-gradient(90deg,transparent 0 calc(33.33% - 1px),rgba(255,255,255,.35) calc(33.33% - 1px) 33.33%)}
.cb-h{position:absolute;width:18px;height:18px;background:#fff;border:2px solid var(--pop);border-radius:4px;cursor:nwse-resize}
.cb-h[data-c=tl]{left:-9px;top:-9px}.cb-h[data-c=br]{right:-9px;bottom:-9px}.cb-h[data-c=tr]{right:-9px;top:-9px;cursor:nesw-resize}.cb-h[data-c=bl]{left:-9px;bottom:-9px;cursor:nesw-resize}
.crop-actions{gap:8px;margin:0 0 10px}.pill.ghost.small{padding:8px 14px;font-size:.9rem}
/* swatches */
.swatches{display:grid;grid-template-columns:repeat(10,1fr);gap:6px;margin-top:10px}
.swatches.small{grid-template-columns:repeat(10,1fr)}
.sw{aspect-ratio:1;border-radius:8px;border:2px solid transparent;cursor:pointer;position:relative;box-shadow:inset 0 -3px 0 rgba(0,0,0,.12)}
.sw.on{border-color:#22303a}.sw.on::after{content:"✓";position:absolute;inset:0;display:grid;place-items:center;color:#fff;font-weight:800;text-shadow:0 0 3px rgba(0,0,0,.7);font-size:.9rem}
.sw.locked{outline:2px solid var(--pop);outline-offset:1px}
.sw[title]:hover::before{content:attr(title);position:absolute;bottom:110%;left:50%;transform:translateX(-50%);background:#22303a;color:#fff;font-size:.72rem;padding:3px 6px;border-radius:4px;white-space:nowrap;z-index:3}
/* filters */
.filters{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}
.filters button{background:#fff;border:2px solid #e4e2ee;border-radius:12px;padding:8px;font:inherit;cursor:pointer;display:flex;flex-direction:column;align-items:center;gap:6px;color:#3a3a3a}
.filters button.on{border-color:var(--pop);background:#f6f2ff}
.filters canvas{width:96px;height:96px;border-radius:8px;image-rendering:pixelated}
/* stage */
.st-stage{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:28px 16px}
.st-board-wrap{background:#fff;padding:14px;border-radius:14px;box-shadow:0 20px 60px rgba(34,48,58,.14)}
#st-board{display:block;width:min(576px,calc(100vw - 480px),80vh);height:auto;image-rendering:auto;cursor:crosshair}
.st-stage-note{margin-top:14px}
/* confirm */
.cf-wrap{display:grid;grid-template-columns:420px 1fr;gap:40px;max-width:1240px;margin:0 auto;padding:24px clamp(16px,3vw,32px) 60px;align-items:start}
.cf-side h2{margin:8px 0 4px;font-size:2rem}.cf-side .sub{color:#5b5b66;margin:0 0 14px}
.cf-swatches{display:flex;flex-wrap:wrap;gap:5px;margin:0 0 22px}.cf-swatches i{width:22px;height:22px;border-radius:6px;display:block;box-shadow:inset 0 -3px 0 rgba(0,0,0,.12)}
.cf-products{display:flex;flex-direction:column;gap:10px;margin:0 0 14px}
.cf-product{display:flex;align-items:center;gap:12px;border:2px solid #e4e2ee;border-radius:14px;padding:14px 16px;cursor:pointer;background:#fff}
.cf-product.on{border-color:var(--pop);background:#f6f2ff}.cf-product input{accent-color:var(--pop);margin:0}
.cf-product div{flex:1;display:flex;flex-direction:column}.cf-product div span{color:#6b6b78;font-size:.9rem}
.cf-price{font-family:var(--round);font-size:1.3rem;color:#3a3a3a}
#cf-add{width:100%;margin-top:6px}
.cf-views{display:flex;gap:6px;background:#f1f1f4;border-radius:999px;padding:4px;width:max-content;margin:0 auto 16px}
.cf-views button{border:0;background:none;font:inherit;font-weight:600;color:#5b5b66;padding:8px 18px;border-radius:999px;cursor:pointer}.cf-views button.on{background:#fff;color:var(--pop-dark);box-shadow:0 2px 6px rgba(0,0,0,.08)}
.cf-view{display:flex;justify-content:center}
#cf-board{width:min(720px,100%);height:auto;border-radius:6px;box-shadow:0 20px 60px rgba(34,48,58,.16)}
.room{position:relative;width:min(720px,100%);border-radius:14px;overflow:hidden}.room img{display:block;width:100%}
.room canvas{position:absolute;left:50.5%;top:36%;width:16%;height:auto;box-shadow:0 10px 24px rgba(0,0,0,.3)}
.cf-box{background:#f6f2ff;border-radius:10px;padding:8px 12px}
/* mobile */
@media (max-width:900px){
  .st-body{grid-template-columns:1fr;min-height:0}
  .st-stage{order:1;padding:14px 12px 6px}.st-board-wrap{padding:8px}#st-board{width:min(100%,calc(100vw - 40px),40vh);margin:0 auto}.st-stage-note{margin-top:6px}
  .st-panel{order:2;border:0;border-top:1px solid #ececf1}
  .st-tabs button{font-size:.78rem;padding:10px 2px 8px}.ti{width:22px;height:22px;background-size:20px}
  .st-top{padding:10px 12px;display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:6px}.st-top .pill{padding:10px 14px;font-size:.92rem;white-space:nowrap}.st-meta{font-size:.82rem;text-align:center;line-height:1.3}.st-back{white-space:nowrap}
  .crop-stage{max-width:360px;margin:0 auto}
  .cf-wrap{grid-template-columns:1fr;gap:20px}.cf-stage{order:1}.cf-side{order:2}
  .swatches{grid-template-columns:repeat(8,1fr)}
}
.pill{white-space:nowrap}
body[data-screen="studio"] .disc-tab,body[data-screen="confirm"] .disc-tab,body[data-screen="preview"] .disc-tab{display:none}
.st-stock-note{max-width:560px;text-align:center;background:#fff6e5;border:1px solid #f3d9a4;border-radius:10px;padding:8px 12px;color:#6b4e00;margin-top:8px}
/* "one last look" before the cart */
.ll-box{background:#fff;border-radius:16px;padding:26px 26px 20px;max-width:520px;width:100%;text-align:center;max-height:92vh;overflow:auto}
.ll-box h2{margin:0 0 14px;font-size:1.5rem}.ll-box canvas{width:160px;height:160px;border-radius:8px;box-shadow:0 8px 24px rgba(0,0,0,.15)}
.ll-box .tiny{margin:6px 0 16px}
.ll-list{text-align:right;margin:0;padding:0;list-style:none;display:flex;flex-direction:column;gap:10px}
.ll-list li{display:flex;gap:10px;align-items:flex-start;color:#4b4b55}.ll-list li b{color:#22303a}.ll-list i{width:26px;height:26px;border-radius:50%;background:var(--accent-soft);color:var(--pop-dark);display:grid;place-items:center;font-style:normal;flex:none;font-weight:800}
.ll-check{display:flex;gap:10px;align-items:flex-start;text-align:right;background:#f6f6f9;border-radius:10px;padding:12px 14px;margin:18px 0 16px;font-weight:600;color:#22303a}.ll-check input{margin-top:4px;accent-color:var(--pop)}
.ll-btns{display:flex;gap:10px;justify-content:center;flex-wrap:wrap}.ll-btns .pill.ghost{padding:13px 22px}.ll-btns .pill.cta:disabled{opacity:.45;cursor:not-allowed;transform:none}

/* ---- cart / checkout v2 (14.9.2026): two columns, sticky summary, option cards ---- */
.ck-wrap{max-width:1080px;margin:0 auto;padding:28px 20px 60px;display:grid;grid-template-columns:1fr 340px;gap:28px;align-items:start}
.ck-main h2{margin:0 0 6px}
.ck-steps{display:flex;gap:6px;margin:0 0 18px;font-size:.85rem;color:#8a8a96}.ck-steps span{padding:4px 10px;border-radius:999px;background:#f1eef8}.ck-steps span.on{background:var(--pop-dark,#5b3fd1);color:#fff}
.ck-block{background:#fff;border:1.5px solid #e6e2f0;border-radius:14px;padding:18px 20px;margin:0 0 16px}.ck-block h3{margin:0 0 12px;font-size:1.05rem}
.ck-block .cart-item{border-color:#eeebf5;margin:0 0 10px}
.ck-opt{display:flex;align-items:center;gap:12px;border:1.5px solid #e6e2f0;border-radius:12px;padding:12px 14px;margin:0 0 10px;cursor:pointer;font-weight:500}
.ck-opt:has(input:checked){border-color:var(--pop-dark,#5b3fd1);background:#f8f6ff}.ck-opt input{accent-color:var(--pop-dark,#5b3fd1);flex:none}
.ck-opt span{flex:1;display:flex;flex-direction:column}.ck-opt small{color:#6b6b78;font-weight:400;font-size:.85rem}.ck-opt-price{white-space:nowrap}
.ck-block .addr{margin-top:6px}.ck-block .contact-wrap{margin-top:10px}
.ck-side{position:sticky;top:90px}
.ck-summary{background:#fff;border:1.5px solid #e6e2f0;border-radius:14px;padding:18px 20px;box-shadow:0 10px 30px rgba(60,40,120,.08)}
.ck-summary h3{margin:0 0 12px}.ck-summary .coupon-row{margin:0 0 4px}.ck-summary .coupon-row input{flex:1;min-width:0}
.ck-summary .total{border:0;background:#f8f6ff;margin:10px 0 12px;font-size:1rem;line-height:1.7}
.ck-summary #checkout{width:100%;margin:0 0 10px}.ck-summary #checkout:disabled{opacity:.7;cursor:wait}
.ck-trust{line-height:1.6}
#order-done,#after-pay-profile{grid-column:1/-1}
@media (max-width:900px){.ck-wrap{grid-template-columns:1fr;padding:20px 16px 50px}.ck-side{position:static}}
.ck-block .addr-grid{overflow:visible}.ck-block .addr-grid input,.ck-block .addr-grid select{min-width:0;width:100%;box-sizing:border-box}.ck-block .addr{overflow:hidden}
.ck-total-row{display:flex;justify-content:space-between;gap:10px}.ck-total-row.grand{font-weight:800;font-size:1.15rem;border-top:1.5px solid #e6e2f0;margin-top:6px;padding-top:8px}.ck-total-row .ok{color:#1c8a5a}
@media (max-width:900px){.ck-block .cart-item{grid-template-columns:72px 1fr;grid-template-areas:"img text" "qty price";row-gap:10px}.ck-block .cart-item > :last-child{grid-area:price;justify-self:end;align-self:center}}
.crop-actions.seg{display:flex;background:#f1eef8;border-radius:999px;padding:4px;margin:0 0 10px}.crop-actions.seg button{flex:1;border:0;background:none;font:inherit;font-weight:600;color:#5b5b66;padding:8px 10px;border-radius:999px;cursor:pointer}.crop-actions.seg button.on{background:#fff;color:var(--pop-dark,#5b3fd1);box-shadow:0 2px 6px rgba(0,0,0,.08)}
