/* Garage Reframe — Design Studio app, v3 */
.studio-body{background:var(--day);min-height:100vh;display:flex;flex-direction:column}
.st-hdr{border-bottom:1px solid var(--line);background:var(--day);position:sticky;top:0;z-index:20}
.st-hdr-in{max-width:1400px;margin:0 auto;padding:0 20px;min-height:64px;display:flex;align-items:center;justify-content:space-between;gap:16px}
.st-nav{display:flex;gap:20px;align-items:center}.st-nav a{text-decoration:none;font-size:15px;font-weight:500}
@media(max-width:1023px){.st-nav a{display:none}}
.st-main{flex:1;display:grid;grid-template-columns:minmax(0,1fr) 380px;max-width:1400px;width:100%;margin:0 auto;min-height:calc(100vh - 64px)}
@media(max-width:1023px){.st-main{grid-template-columns:1fr}}
.st-chat{display:flex;flex-direction:column;min-height:calc(100vh - 64px);padding:0 20px}
@media(max-width:600px){.st-chat{padding:0 16px}}
.st-intro{padding:40px 0 8px;max-width:64ch;display:grid;gap:8px}
.st-intro h1{font-size:clamp(34px,4.6vw,56px);margin-bottom:4px}
.st-intro .lead{font-size:17px;margin:0 0 8px}
.st-drop{display:flex;gap:14px;align-items:center;text-align:left;border:1.5px dashed #C9CFD6;background:var(--white);border-radius:var(--r);padding:16px;cursor:pointer;font:inherit;color:inherit;max-width:560px}
.st-drop:hover{border-color:var(--chalk)}
.st-drop-ic{width:48px;height:48px;flex:none;background:var(--blue-soft);color:var(--blue-ink);display:flex;align-items:center;justify-content:center;border-radius:12px}
.st-drop-ic svg{width:24px;height:24px}
.st-drop b{display:block;font-weight:700;font-size:17px;letter-spacing:-.01em}
.st-drop span span{display:block;font-size:14px;color:var(--steel);margin-top:2px}
.st-messages{flex:1;display:flex;flex-direction:column;gap:14px;padding:16px 0 24px;max-width:760px;width:100%}
.msg{display:flex;flex-direction:column;gap:8px;max-width:92%}
.msg.user{align-self:flex-end;align-items:flex-end}
.msg .b{padding:12px 16px;border-radius:16px;font-size:16px;line-height:1.5;white-space:pre-wrap;word-wrap:break-word}
.msg.assistant .b{background:var(--white);border:1px solid var(--line);border-bottom-left-radius:6px}
.msg.user .b{background:var(--blue);color:#fff;border-bottom-right-radius:6px}
.msg .who{font-size:13px;font-weight:600;color:var(--steel)}
.msg .chips{margin-top:0}
.msg .chips .chip{background:var(--white)}
.msg .chips .chip.primary{background:var(--chalk);color:#fff;border-color:var(--chalk)}
.msg-card{border:1px solid var(--line);border-radius:var(--r);background:var(--white);padding:14px 16px;font-size:15px;width:100%}
.msg-card .code{font-size:13px;font-weight:600;color:var(--steel)}
.msg-card b{font-weight:700;font-size:20px;display:block;margin:4px 0 6px;letter-spacing:-.02em}
.msg-card .lines{list-style:none;padding:0;margin:8px 0 0}
.msg-card .lines li{display:flex;justify-content:space-between;gap:12px;padding:6px 0;border-top:1px solid var(--line-2)}
.msg-card .big{font-weight:800;font-size:28px;letter-spacing:-.03em;font-variation-settings:"wdth" 100}
.st-pkgs{display:grid;grid-template-columns:repeat(2,1fr);gap:8px;width:100%}
@media(max-width:600px){.st-pkgs{grid-template-columns:1fr}}
.st-pkg{border:1px solid var(--line);border-radius:var(--r);padding:12px;background:var(--white);font-size:14px;display:flex;flex-direction:column;gap:4px;cursor:pointer}
.st-pkg:hover,.st-pkg.on{border-color:var(--chalk)}
.st-pkg b{font-weight:700;font-size:17px;letter-spacing:-.02em}
.st-pkg .st-price{font-weight:600;font-size:14px;color:var(--chalk)}
.st-pkg p{margin:0;color:var(--steel)}
.st-pkg a{font-size:13px}
.typing{display:inline-flex;gap:4px;padding:12px 16px}
.typing i{width:6px;height:6px;border-radius:50%;background:var(--steel);animation:blink 1.2s infinite}
.typing i:nth-child(2){animation-delay:.2s}.typing i:nth-child(3){animation-delay:.4s}
@keyframes blink{0%,80%,100%{opacity:.25}40%{opacity:1}}
.st-composer-wrap{position:sticky;bottom:0;background:linear-gradient(to top,var(--day) 70%,rgba(242,243,240,0));padding:12px 0 calc(12px + env(safe-area-inset-bottom));max-width:760px;width:100%}
.st-composer{background:var(--white);border:1px solid var(--line);border-radius:18px;padding:10px 10px 8px;display:flex;flex-direction:column;gap:8px;box-shadow:0 10px 30px -14px rgba(0,0,0,.25)}
.st-composer textarea{border:0;resize:none;font:inherit;font-size:16px;line-height:1.4;padding:6px 6px;max-height:160px;background:transparent;color:var(--graph);width:100%}
.st-actions{display:flex;justify-content:space-between;align-items:center;gap:8px}
.st-fine{font-size:13px;color:var(--steel);margin:8px 0 0}
.st-side{border-left:1px solid var(--line);background:var(--white)}
.st-side-in{position:sticky;top:64px;max-height:calc(100vh - 64px);overflow:auto;padding:20px;display:flex;flex-direction:column;gap:14px}
@media(max-width:1023px){.st-side{position:fixed;inset:64px 0 0 0;z-index:25;transform:translateX(100%);transition:transform .25s var(--ease);border-left:0}.st-side.open{transform:none}.st-side-in{max-height:none;height:100%}}
.st-card{border:1px solid var(--line);border-radius:var(--r);padding:14px;font-size:15px}
.st-card h3{font-size:17px;margin:0 0 8px}
.st-card .k{font-size:13px;font-weight:600;color:var(--steel);display:block;margin-bottom:6px}
.st-card .row{display:flex;justify-content:space-between;gap:8px;padding:6px 0;border-top:1px solid var(--line-2)}
.st-card .row:first-of-type{border-top:0}
.st-thumbs{display:grid;grid-template-columns:repeat(3,1fr);gap:6px}
.st-thumbs img{aspect-ratio:1;object-fit:cover;border-radius:var(--r);width:100%;cursor:pointer;border:2px solid transparent}
.st-thumbs img.sel{border-color:var(--chalk)}
.st-thumbs .add{aspect-ratio:1;border:1px dashed var(--line);border-radius:var(--r);display:flex;align-items:center;justify-content:center;cursor:pointer;font-size:24px;color:var(--steel);background:none}
.st-design{border:1px solid var(--line);border-radius:var(--r);padding:8px;margin-top:8px}
.st-design img{border-radius:var(--r);width:100%}
.st-design .k{margin:4px 0 0}
.st-sheet{position:fixed;inset:0;background:rgba(35,39,43,.5);z-index:60;display:flex;align-items:flex-end;justify-content:center}.st-sheet[hidden]{display:none}
@media(min-width:768px){.st-sheet{align-items:center}}
.st-sheet-in{background:var(--day);width:100%;max-width:520px;border-radius:var(--r) var(--r) 0 0;padding:24px;position:relative;max-height:92vh;overflow:auto}
@media(min-width:768px){.st-sheet-in{border-radius:var(--r)}}
.st-close{position:absolute;top:10px;right:12px;border:0;background:none;font-size:26px;cursor:pointer;color:var(--steel);width:44px;height:44px}
.st-sheet h2{font-size:28px;margin-bottom:8px}
.st-sheet .form{max-width:none}
.pay-methods{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:12px 0}
.pay-methods button{border:1px solid var(--line);border-radius:var(--r);padding:12px;background:var(--white);font:inherit;font-weight:600;min-height:48px;color:var(--graph);cursor:not-allowed;opacity:.55}
.pay-methods .wide{grid-column:1/-1}
.st-upload-progress{font-size:13px;color:var(--steel)}
.st-error{color:#B42318;font-size:13px}
/* v4.5 phone-first gate */
.st-gate{flex:1;display:flex;align-items:center;padding:40px 20px 56px}
.st-gate-in{max-width:1200px;width:100%;margin:0 auto;display:grid;grid-template-columns:minmax(0,5fr) minmax(0,6fr);gap:56px;align-items:center}
.st-gate-copy{max-width:520px}
.st-gate h1{font-size:clamp(34px,4.4vw,54px);margin-bottom:12px;text-wrap:balance}
.st-gate .lead{font-size:18px;margin:0 0 20px}
.st-steps{list-style:none;margin:0 0 22px;padding:0;display:grid;gap:8px}
.st-steps li{display:flex;align-items:center;gap:12px;font-size:16px;color:var(--ink-2)}
.st-steps b{width:28px;height:28px;flex:none;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;font-size:14px;font-weight:700;background:var(--bg-2);color:var(--ink-2)}
.st-steps li.on{color:var(--ink);font-weight:600}.st-steps li.on b{background:var(--blue);color:#fff}
.st-gate-form{display:grid;gap:14px;max-width:none;background:var(--card);border:1px solid var(--line);border-radius:var(--r);padding:20px;box-shadow:0 1px 2px rgba(31,35,39,.04),0 12px 32px -16px rgba(31,35,39,.18)}
.st-gate-form input[type=tel]{font-size:20px;min-height:56px;letter-spacing:.01em}
.st-gate-form .opt{font-weight:400;color:var(--ink-2)}
.st-gate-go{width:100%;min-height:56px;font-size:17px}
.st-gate-img{margin:0}
.st-gate-img img{width:100%;aspect-ratio:3/2;object-fit:cover;border-radius:var(--r);background:var(--line);display:block}
.st-gate-img figcaption{font-size:13px;color:var(--ink-2);margin-top:8px}
@media(max-width:1023px){.st-gate{align-items:flex-start;padding:24px 16px 40px}.st-gate-in{grid-template-columns:1fr;gap:24px}.st-gate-img{order:-1}.st-gate-img img{aspect-ratio:16/9}.st-gate-img figcaption{display:none}}
/* progress and photo slots */
.st-progress{list-style:none;margin:20px 0 0;padding:0;display:flex;gap:6px;flex-wrap:wrap;max-width:760px}
.st-progress li{display:flex;align-items:center;gap:8px;font-size:14px;color:var(--ink-2);padding:6px 12px 6px 6px;border:1px solid var(--line);border-radius:999px;background:var(--card)}
.st-progress b{width:24px;height:24px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;font-size:12px;font-weight:700;background:var(--bg-2)}
.st-progress li.done{color:var(--ink)}.st-progress li.done b{background:#E3F1E8;color:#1E6B3A}
.st-progress li.on{border-color:var(--blue);color:var(--ink);font-weight:600}.st-progress li.on b{background:var(--blue);color:#fff}
.st-progress small{font-weight:500;color:var(--ink-2)}
@media(max-width:600px){.st-progress li:not(.on) span{display:none}.st-progress li:not(.on){padding:6px}}
.st-intro{padding:20px 0 4px}
.st-intro h1,.st-intro .st-h1{font-size:clamp(30px,4vw,46px);margin:0 0 4px}
.st-slots{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;max-width:760px;margin-top:4px}
.st-slot{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;text-align:center;aspect-ratio:4/3;border:1.5px dashed #C9CFD6;border-radius:var(--r);background:var(--card);cursor:pointer;font:inherit;color:inherit;padding:10px;overflow:hidden}
.st-slot:hover{border-color:var(--blue)}
.st-slot b{font-size:14px;font-weight:600;line-height:1.25}
.st-slot-ic{width:44px;height:44px;border-radius:12px;background:var(--blue-soft);color:var(--blue-ink);display:flex;align-items:center;justify-content:center}.st-slot-ic svg{width:22px;height:22px}
.st-slot img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.st-slot.has{border-style:solid;border-color:var(--line)}.st-slot.has b{position:absolute;left:8px;bottom:8px;background:rgba(20,23,26,.78);color:#fff;font-size:12px;padding:4px 8px;border-radius:8px}.st-slot.has .st-slot-ic{display:none}
.st-skip{background:none;border:0;padding:12px 0;font:inherit;font-size:14px;color:var(--ink-2);text-decoration:underline;cursor:pointer;justify-self:start;min-height:44px}
@media(max-width:600px){.st-slots{gap:8px}.st-slot b{font-size:12px}.st-slot-ic{width:36px;height:36px}}

.gated .st-nav{display:none}
.st-gate-form .check{display:flex;gap:10px;align-items:flex-start}
@media(max-width:1023px){.st-gate-img{display:none}.st-gate h1{font-size:34px}.st-gate .lead{font-size:16px;margin-bottom:16px}.st-steps{margin-bottom:16px}}

/* v4.6: the whole gate fits in the first screen */
.gated .st-hdr-in{min-height:56px}
.st-gate{min-height:calc(100svh - 57px);padding:clamp(16px,3vh,40px) 20px;box-sizing:border-box}
.st-gate-in{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:clamp(24px,4vw,56px)}
.st-gate-copy{max-width:540px}
.st-gate h1{font-size:clamp(30px,min(4vw,6.2vh),48px);line-height:1.02;margin-bottom:10px}
.st-gate .lead{font-size:17px;line-height:1.45;margin:0 0 14px}
.st-steps{display:flex;flex-wrap:wrap;gap:6px;margin:0 0 14px}
.st-steps li{gap:8px;font-size:14px;padding:4px 12px 4px 4px;border:1px solid var(--line);border-radius:999px;background:var(--card)}
.st-steps b{width:24px;height:24px;font-size:12px}
.st-steps li.on{border-color:var(--blue)}
.st-gate-form{gap:12px;padding:16px}
.st-gate-row{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(0,1fr);gap:10px}
.st-gate-form label{font-size:14px}
.st-gate-form input[type=tel],.st-gate-form input[name=name]{min-height:50px;font-size:18px}
.st-gate-form .check{font-size:13px;line-height:1.4}
.st-gate-go{min-height:52px}
.st-gate-form .st-fine{margin:0;text-align:center}
#gf-ts:empty{display:none}
.st-gate-img img{max-height:calc(100svh - 57px - 2*clamp(16px,3vh,40px) - 28px);aspect-ratio:auto;height:auto}
@media(max-width:1023px){.st-gate{min-height:0;padding:16px}.st-gate-in{grid-template-columns:1fr}.st-gate h1{font-size:30px}.st-gate .lead{font-size:15px;margin-bottom:12px}}
@media(max-width:520px){.st-gate-row{grid-template-columns:1fr;gap:8px}.st-gate-form input[type=tel],.st-gate-form input[name=name]{min-height:46px;font-size:17px}.st-gate-form{padding:14px;gap:10px}.st-steps li{font-size:13px}}
/* v4.6: the Studio is one screen. The page never scrolls; only the conversation does. */
.st-hdr-in{min-height:56px}
.studio-body:not(.gated){height:100vh;height:100svh;overflow:hidden}
.studio-body:not(.gated) .st-main{flex:1;min-height:0;height:calc(100svh - 57px)}
.st-chat{min-height:0;height:100%;overflow:hidden}
.st-progress{margin:12px 0 0;flex:none}
.st-progress li{padding:4px 10px 4px 4px;font-size:13px}.st-progress b{width:22px;height:22px}
.st-intro{flex:none;display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;column-gap:12px;row-gap:8px;padding:12px 0 4px;max-width:760px}
.st-intro h1,.st-intro .st-h1{grid-column:1;grid-row:1;font-size:clamp(22px,min(3vw,4vh),32px);margin:0;line-height:1.1}
.st-intro .st-skip{grid-column:2;grid-row:1;padding:0;min-height:44px;font-size:13px;white-space:nowrap}
.st-intro .st-slots{grid-column:1/-1;grid-row:2;margin:0}
.st-intro .lead{grid-column:1/-1;grid-row:3;font-size:13px;margin:0;color:var(--ink-2)}
.st-slot{aspect-ratio:auto;height:clamp(64px,14vh,112px);flex-direction:row;gap:10px;padding:8px}
.st-slot-ic{width:36px;height:36px}
.st-messages{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:12px 4px 12px 0}
.st-composer-wrap{position:static;flex:none;background:none;padding:8px 0 calc(8px + env(safe-area-inset-bottom))}
.st-fine{margin:6px 0 0;font-size:12px}
.st-side{height:100%;overflow:hidden}
.st-side-in{position:static;top:auto;max-height:none;height:100%;overflow-y:auto;padding:16px;gap:10px}
.st-card{padding:12px}
#st-plan:empty,#st-plan.empty{display:none}
@media(max-width:1023px){.st-side{position:fixed;inset:57px 0 0 0;height:auto}}
@media(max-width:600px){.st-slot{flex-direction:column;gap:4px;height:clamp(64px,11vh,96px)}.st-slot b{font-size:12px}.st-slot-ic{width:28px;height:28px}.st-slot-ic svg{width:18px;height:18px}.st-intro .lead{display:none}.st-composer textarea{font-size:16px}}
/* gate on very short phones */
@media(max-width:520px) and (max-height:640px){.st-gate .lead{display:none}.st-gate h1{font-size:26px;margin-bottom:8px}.st-gate-form .st-fine{display:none}.st-steps{margin-bottom:10px}}
.st-main[hidden],#st-gate[hidden]{display:none!important}
#gf-ts{height:0;overflow:hidden;margin:-6px 0}#gf-ts.show{height:auto;overflow:visible;margin:0}
@media(max-width:600px){.st-gate{padding:12px 16px}.st-gate h1{font-size:28px;margin-bottom:6px}.st-gate .lead{font-size:15px;line-height:1.4;margin-bottom:10px}.st-steps{margin-bottom:10px;gap:4px}.st-steps li{padding:3px 10px 3px 3px}.st-gate-form .st-fine{display:none}.st-gate-form .check{font-size:12.5px}}
.studio-body{padding-bottom:0!important;min-height:100vh;min-height:100svh;box-sizing:border-box}
@media(max-width:520px) and (max-height:600px){.st-gate{padding:8px 16px}.st-gate-form{gap:8px;padding:12px}.st-gate-form input[type=tel],.st-gate-form input[name=name]{min-height:44px}}
/* v5.2 explainer */
.st-about{margin-top:14px;font-size:14px;color:var(--mut);max-width:62ch}.st-about summary{cursor:pointer;font-weight:600;color:var(--ink);display:list-item;padding:10px 0;min-height:40px;box-sizing:border-box}.st-about p{margin:6px 0 0;line-height:1.5}
/* v5.5 Studio audit: 44px touch targets, visible upload status, Turnstile host for uploads */
.msg .chips .chip{min-height:44px;display:inline-flex;align-items:center}
.st-actions .btn-sm,#st-project-btn,.st-side .btn-sm{min-height:44px}
.st-up-main{font-size:14px;line-height:1.4;color:var(--ink-2);padding:0 4px 8px}
.st-up-main:empty{display:none}
.st-ts{margin:0 0 8px}
.st-ts:empty{display:none}
