:root{color-scheme:dark;--ink:#f4f5ff;--sub:#b6bbcc;--hair:rgba(213,222,255,.18);--focus:#b9c9ff;--night:#090b13;--body:Inter,Arial,sans-serif;--display:"Inter Tight",Inter,Arial,sans-serif}
*{box-sizing:border-box}body{margin:0;background:var(--night);color:var(--ink);font:15px/1.5 var(--body);-webkit-font-smoothing:antialiased;overflow-x:clip}
button,input,textarea,select{font:inherit;color:inherit}button{border:0;cursor:pointer}button:disabled{opacity:.5;cursor:not-allowed}a{color:inherit;text-decoration:none}button:focus-visible,a:focus-visible,textarea:focus-visible,input:focus-visible,select:focus-visible{outline:2px solid var(--focus);outline-offset:4px}textarea:focus-visible{outline-offset:1px}button svg,.tool svg,.primary svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linejoin:round;stroke-linecap:round;flex:none}.symbols,.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}[hidden]{display:none!important}
.backdrop{position:fixed;inset:0;z-index:-1;pointer-events:none;overflow:hidden;background:#090a12}.backdrop img,.backdrop canvas{height:100%;width:100%;position:absolute;inset:0;object-fit:cover;object-position:50% 50%}.backdrop canvas{opacity:0;transition:opacity .5s}.backdrop canvas.ready{opacity:1}.backdrop::after{content:"";position:absolute;inset:0;background:linear-gradient(180deg,#05071042,transparent 23%,transparent 77%,#0608108c)}
.surface{display:flex;flex-direction:column;min-height:100svh;isolation:isolate;background:radial-gradient(ellipse at 50% 47%,#0b101d24 0,transparent 59%)}header,footer{width:100%;padding-inline:clamp(20px,4.5vw,85px);display:flex;align-items:center;justify-content:space-between}header{min-height:89px;gap:15px}header::after{content:"";position:absolute;inset:0 0 auto;height:110px;z-index:-1;background:linear-gradient(#06081375,transparent);pointer-events:none}.brand{display:flex;align-items:center;gap:8px;letter-spacing:-.055em;font:650 29px/1 var(--display);text-shadow:0 1px 10px #05060c88}.brand svg{height:28px;width:33px}
.header-action,.close,.quiet,.tool{display:inline-flex;align-items:center;justify-content:center;gap:9px;background:#191d2cb3;color:#eceef9;border:1px solid var(--hair);border-radius:100px}.header-action{min-height:40px;padding:0 16px;font-weight:525;font-size:13px;backdrop-filter:blur(14px)}.header-action:hover,.tool:hover,.quiet:hover,.close:hover{background:#353c50c7}
main{flex:1;display:grid;align-items:center;padding:clamp(30px,5.3vh,74px) 20px clamp(45px,9vh,112px)}
.creation{margin:auto;width:min(100%,720px)}.intro{text-align:center;margin:0 0 clamp(27px,3.8vh,48px)}h1,h2,p{margin:0}h1{font:550 clamp(68px,7.3vw,116px)/1.04 var(--display);letter-spacing:-.047em;word-spacing:.045em;color:#f8f9ff;text-shadow:0 3px 25px #090d1845}h1 span{background:linear-gradient(135deg,#ffffff 10%,#e4eaff 38%,#a7b3e9 85%);-webkit-background-clip:text;background-clip:text;color:transparent}.intro p{margin:14px auto 0;max-width:55ch;line-height:1.5;color:#d5d8e3;text-shadow:0 2px 12px #05060a;font-size:clamp(14px,1.15vw,17px)}
.composer{position:relative;border-radius:25px;border:1px solid #b9c8ff55;background:linear-gradient(125deg,rgba(43,48,70,.80),rgba(18,21,33,.89) 47%,rgba(35,40,59,.86));backdrop-filter:blur(26px) saturate(126%);box-shadow:inset 0 1px 0 #f0f3ff2c,inset 0 -1px 0 #adb4d315,0 24px 70px #02030b65;transition:border-color .18s}.composer:focus-within,.composer.drag{border-color:#b9ccff98}.composer.drag{box-shadow:inset 0 0 32px #788fd633}
form{margin:0;padding:0 20px 17px}.composer textarea{display:block;width:100%;border:0;background:transparent;border-radius:5px;color:#f4f5ff;font:410 19px/1.5 var(--display);padding:9px 4px;letter-spacing:-.012em}.composer textarea{height:92px;resize:vertical;min-height:74px;max-height:240px}.composer textarea::placeholder{color:#aeb4c5;opacity:1}
.bar,.tools,.primary{display:flex;align-items:center;gap:8px}.bar{justify-content:space-between;gap:12px}.tool{background:#ffffff06;font-size:12px;min-height:36px;padding:0 12px;gap:7px;color:#d7dbe8}.primary{justify-content:center;min-height:40px;padding:0 16px;border-radius:14px;border:1px solid #eef2ffdb;color:#151a30;background:linear-gradient(145deg,#f5f6ff,#c8d4f8);box-shadow:inset 0 1px 0 #fff,0 3px 13px #03061340;gap:10px;font-size:13px;font-weight:640;white-space:nowrap}.primary:hover{background:#fff}.primary svg{width:15px}
.under{margin:12px 5px 0;display:flex;align-items:baseline;justify-content:space-between;gap:10px;min-height:24px}.under button,footer button{font-size:12px;background:none;color:#c3c8dc;padding:3px 0}.under button:hover,footer button:hover{color:white}.under #notice{font-size:12px;color:#f9cfc4;text-align:right}select{background:#151929;color:#ebefff;border:1px solid var(--hair);border-radius:8px;padding:5px 8px}
.refs{display:flex;gap:6px;flex-wrap:wrap}.refs:not(:empty){margin:5px 0 12px}.ref{position:relative}.ref img{height:45px;width:54px;object-fit:cover;display:block;border-radius:7px;border:1px solid var(--hair)}.ref button{position:absolute;top:-5px;right:-3px;background:#20263a;color:white;border:1px solid #c2c9e781;width:21px;height:21px;padding:0;line-height:17px;border-radius:50%}
footer{color:#a9afc1;font-size:12px;min-height:62px;gap:20px}footer span,footer button{text-shadow:0 2px 6px #020510}footer button span{margin-left:3px}
dialog{color-scheme:dark;background:linear-gradient(130deg,#242a3d,#101420 75%);border:1px solid #b3bfe94f;color:#f4f5fb;border-radius:22px;box-shadow:0 25px 95px #02030b88;max-width:680px;width:calc(100% - 32px);max-height:85svh;padding:0}dialog::backdrop{background:#040611bd;backdrop-filter:blur(13px)}.sheet{position:relative;padding:30px}.close{width:34px;height:34px;position:absolute;right:16px;top:16px}.sheet h2{font:550 clamp(24px,3vw,34px)/1.15 var(--display);letter-spacing:-.045em;padding-right:36px;margin-bottom:17px}.sheet p,.meta{color:#c6ccdb;font-size:14px;line-height:1.55}.sheet p+p{margin-top:11px}.actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:18px}.quiet{font-size:12px;padding:9px 14px;min-height:38px;white-space:nowrap}.work{border:1px solid var(--hair);background:#10142099;border-radius:13px;padding:14px;line-height:1.5;overflow-wrap:anywhere;white-space:pre-wrap}.meta{margin-top:9px;font-size:12px}.work-list{display:grid;gap:7px}.work-list button{border:1px solid var(--hair);background:#181e2f;color:var(--ink);padding:12px 14px;text-align:left;border-radius:10px;display:grid;gap:3px}.work-list button:hover{background:#252d42}.work-list strong{font-size:14px;overflow-wrap:anywhere}.work-list small{color:#b6c1d2}.result-refs{display:flex;gap:6px;flex-wrap:wrap;margin-top:12px}.result-refs img{width:62px;height:48px;object-fit:cover;border-radius:7px}
@media(max-width:620px){header{min-height:67px}.brand{font-size:24px}.brand svg{width:27px;height:25px}.header-action{min-height:36px;font-size:12px;padding:0 12px}main{padding:35px 15px 65px}.intro{margin-bottom:24px}h1{font-size:clamp(55px,12.5vw,80px)}.intro p{font-size:14px;max-width:33ch;margin-top:11px}.composer{border-radius:20px}form{padding:0 13px 13px}.composer textarea{font-size:17px;height:96px}.primary{padding:0 12px;gap:8px}.tool{padding:0 9px}.tools{gap:5px}.sheet{padding:24px 17px}.surface{background:linear-gradient(180deg,#05091918,#06081533 24%,#07091348 73%,transparent)}.under{display:block}.under #notice{display:block;text-align:left;margin-top:8px}.under #notice:empty{display:none}footer{min-height:50px}}
@media(max-width:420px){.tool,.primary,.quiet{font-size:11px}.tool{gap:5px}.bar{gap:6px}.primary{padding:0 10px}}
@media(prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}
@media(max-width:620px) and (orientation:portrait){.backdrop{top:50%;left:50%;bottom:auto;right:auto;width:100dvh;height:100vw;transform:translate(-50%,-50%) rotate(90deg)}}
.composer::after {
  content:""; position:absolute; inset:-1px; border-radius:inherit; pointer-events:none;
  background:linear-gradient(108deg,transparent 12%,#c5d1ff99 30%,#f2f3ffa3 43%,transparent 62%) border-box;
  padding:1px; mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0); mask-composite:exclude;
  background-size:230% 100%; background-position:90% 50%; opacity:0;
  transition:opacity 320ms,background-position 900ms cubic-bezier(.2,.8,.2,1);
}
.composer:focus-within::after,.composer.drag::after {opacity:.95; background-position:10% 50%}
.primary,.tool,.header-action,.quiet,.close,.under button { transition:transform 160ms,background-color 180ms,box-shadow 180ms }
.primary:active,.tool:active,.header-action:active,.quiet:active,.close:active {transform:scale(.96)}
.primary svg { transition:transform 220ms cubic-bezier(.19,.81,.25,1) }
.primary:hover svg { transform:translateX(3px) }
.composer.drag { border-style:dashed; background-color:#393f5f }
#submit[aria-busy="true"] svg { display:none }
#submit[aria-busy="true"]::after { content:""; width:12px; height:12px; border-radius:50%; border:1.6px solid #66749b; border-top-color:#172345; animation:turn .65s linear infinite }
@keyframes turn { to {transform:rotate(360deg)} }
.success-mark { display:inline-grid; place-items:center; width:31px; height:31px; margin-right:10px; vertical-align:.02em; background:#accdb928; color:#c5f6da; border:1px solid #c0edd457; border-radius:50% }
.success-mark svg {width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:2.1;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:34;stroke-dashoffset:0;animation:draw-check 500ms cubic-bezier(.2,.8,.2,1) both}
@keyframes draw-check {from{stroke-dashoffset:34}to{stroke-dashoffset:0}}
@keyframes studio-arrive {from{opacity:0; transform:translateY(17px)}to{opacity:1;transform:none}}
@keyframes soft-reveal {from{opacity:.05; transform:translateY(7px)}to{opacity:1;transform:none}}
@media(prefers-reduced-motion:no-preference){
  .intro h1 { animation:studio-arrive 570ms cubic-bezier(.16,.8,.2,1) both }
  .intro p { animation:soft-reveal 430ms 60ms both }
  .composer { animation:studio-arrive 590ms 75ms cubic-bezier(.16,.82,.2,1) backwards }
  .under { animation:soft-reveal 350ms 165ms backwards }
  dialog[open]::backdrop { animation:backdrop-in 240ms both }
}
@keyframes backdrop-in { from{opacity:0}to{opacity:1} }

@media(prefers-reduced-motion:reduce){
  *,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}
}
.backdrop canvas {mix-blend-mode:lighten}.backdrop canvas.ready{opacity:.85}

.prompt-label { display:block; color:var(--sub); font-size:12px; font-weight:550 }
.composer #prompt {
  --prompt-min: 65px;
  height: var(--prompt-min);
  min-height: var(--prompt-min);
  max-height: clamp(var(--prompt-min), 42vh, 240px);
  max-height: clamp(var(--prompt-min), 42dvh, 240px);
  overflow-y: auto;
  resize: none;
  scrollbar-gutter: stable;
}
.composer #prompt.prompt-sized { transition: height 220ms cubic-bezier(.2,.78,.2,1) }
.composer textarea.prompt-sizing {
  position: absolute;
  top: 0;
  left: 0;
  height: 0;
  min-height: 0;
  max-height: none;
  overflow-y: scroll;
  scrollbar-gutter: stable;
  visibility: hidden;
  pointer-events: none;
}
@media (max-width: 620px) { .composer #prompt { --prompt-min: 67px } }
#studio-login { max-width: 510px }
#studio-login-status:not(:empty) { margin-top: 12px }
.account-wrap #studio-draft { margin-top: 22px }
.studio-draft-copy { display: grid; gap: 12px; width: 100%; min-width: 0 }
.studio-draft-copy .actions { margin-top: 2px }
.studio-draft-copy .actions .primary { margin: 0 }
.studio-draft-copy #studio-draft-refs { margin-top: 0 }
.studio-draft-copy #studio-draft-prompt { max-height: 240px; overflow: auto }
