:root{color-scheme:dark;--bg:#141419;--panel:#1b1b22;--surface:#22222c;--line:#30303b;--muted:#9998aa;--soft:#c7c6d4;--text:#f4f3fa;--lime:#d6fa70;--lime-dim:#313b25;--radius:13px;font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;font-synthesis:none}
*,*::before,*::after{box-sizing:border-box}body{margin:0;min-width:300px;background:var(--bg);color:var(--text)}button,input,textarea,select{font:inherit}button{color:inherit;cursor:pointer}button:disabled{opacity:.34;cursor:default}button:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible,canvas:focus-visible{outline:2px solid var(--lime);outline-offset:3px}svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;flex:none;vertical-align:middle}.symbols{position:absolute;width:0;height:0;overflow:hidden}[hidden]{display:none!important}h1,h2,h3,p{margin:0}.bare,.icon,.ghost,.primary,.format-chip,.tool{display:inline-flex;align-items:center;justify-content:center;gap:8px;border:0;background:none}.bare,.icon{padding:0}.icon{width:36px;height:36px;border-radius:9px;color:var(--soft);flex:none}.icon:not(:disabled):hover,.bare:hover{color:var(--lime);background:#ffffff09}.outlined{border:1px solid var(--line);background:var(--surface)}.ghost,.primary{min-height:37px;padding:0 12px;border-radius:9px;font-size:12px;font-weight:670;white-space:nowrap}.ghost{border:1px solid var(--line);background:var(--surface);color:var(--soft)}.ghost:hover{background:#2c2c38;color:var(--text)}.primary{background:var(--lime);color:#1c2510;border:1px solid transparent}.primary:hover{background:#e3ff9b}.topbar{height:61px;padding:0 25px;display:flex;align-items:center;gap:22px;background:var(--panel);border-bottom:1px solid var(--line);position:relative;z-index:2}.brand{display:flex;align-items:center;gap:10px;font-size:26px;font-weight:830;line-height:.94;letter-spacing:-1.3px;white-space:nowrap}.brand-mark{display:block;flex:none;width:37px;height:37px;border-radius:11px;object-fit:contain}.brand-dot{color:var(--lime)}.brand small{display:block;margin-top:6px;font-size:8px;font-weight:760;letter-spacing:1.4px;color:var(--muted)}.project-name,.top-actions{display:flex;align-items:center;gap:15px}.project-name{min-width:0}.header-divider{width:1px;height:25px;background:var(--line);flex:none}.project-name button{min-width:0;font-size:13px;color:var(--soft);text-align:left;padding:7px 0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:block}.project-name svg{width:14px;margin-left:4px;color:var(--muted)}.top-actions{margin-left:auto;gap:7px}.top-actions .header-divider{margin:0 6px}.top-actions .primary{padding:0 17px;min-height:39px}.top-actions .ghost{background:none}
.studio{display:grid;grid-template-columns:260px minmax(0,1fr) 335px;min-height:calc(100dvh - 98px)}.library,.inspector{background:var(--panel);padding:23px 18px 20px;min-width:0}.library{border-right:1px solid var(--line)}.inspector{border-left:1px solid var(--line)}.panel-eyebrow{display:flex;align-items:center;gap:7px;font-size:9px;font-weight:800;letter-spacing:1.6px;color:var(--muted)}.panel-eyebrow>span{height:5px;width:5px;border-radius:50%;background:var(--lime)}.side-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:8px 0 19px;min-height:36px}.side-heading h1,.side-heading h2{font-size:26px;line-height:1;font-weight:775;letter-spacing:-.9px}.feature-tag{color:#c9bdf5;border:1px solid #3c3552;background:#2a2539;padding:5px 7px;display:flex;align-items:center;gap:4px;border-radius:6px;font-size:8px;letter-spacing:1px;font-weight:800}.feature-tag svg{height:11px;width:11px}
.drop{display:flex;align-items:center;justify-content:center;flex-direction:column;gap:5px;width:100%;min-height:127px;background:#252631;border:1px dashed #505164;border-radius:var(--radius);padding:12px;text-align:center}.drop:hover,.drop.dragging{border-color:var(--lime);background:var(--lime-dim)}.drop-icon{display:grid;place-items:center;width:33px;height:33px;background:#343549;border-radius:9px;color:#d7d2fd;margin-bottom:3px}.drop strong{font-size:13px}.drop small,.library-hint{font-size:11px;color:var(--muted)}.import-actions{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin-top:9px}.import-actions .ghost{padding:0 6px;gap:5px}.import-actions svg{height:15px;width:15px}.asset-heading{margin:25px 0 11px;display:flex;justify-content:space-between;align-items:center}.asset-heading h2{font-size:13px}.count{display:inline-grid;place-items:center;background:var(--surface);border:1px solid var(--line);border-radius:6px;min-width:21px;height:20px;color:var(--muted);font-size:10px}.assets{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;max-height:320px;overflow:auto;scrollbar-width:thin}.asset{display:block;position:relative;aspect-ratio:1.12;background:var(--surface);padding:0;border:1px solid var(--line);border-radius:9px;overflow:hidden}.asset:hover,.asset.active{border-color:var(--lime)}.asset img{width:100%;height:100%;object-fit:cover;display:block}.asset.active::after{content:"";position:absolute;right:5px;top:5px;width:8px;height:8px;background:var(--lime);border-radius:100%;box-shadow:0 0 0 2px #222}.library-hint{margin-top:12px;line-height:1.55}.demo-button{margin-top:20px;font-size:11px;font-weight:650;color:var(--soft);padding:6px 0}.demo-button svg{color:#c5b2fd;width:14px;height:14px}
.workspace{display:grid;grid-template-rows:minmax(0,1fr) 35px;min-width:0;background:radial-gradient(circle at 50% 45%,#20202a 0%,#16161d 65%)}.workspace-head,.workspace-foot{display:flex;justify-content:space-between;align-items:center;padding:0 19px;gap:8px;color:var(--muted)}.workspace-head{font-size:10px;font-weight:770;letter-spacing:1.2px}.canvas-dot{display:inline-block;width:6px;height:6px;border-radius:50%;background:#b5a0fa;margin-right:4px}.format-chip{padding:6px 8px;background:#22222d;border:1px solid var(--line);border-radius:7px;font-size:11px;font-weight:650;color:var(--soft);letter-spacing:0}.format-chip:hover{border-color:var(--lime)}.format-chip svg{width:13px;height:13px}.stage{min-height:490px;overflow:auto;display:flex;position:relative;scrollbar-width:thin;align-items:safe center;justify-content:safe center;padding:6px 14px;background-image:radial-gradient(#353544 1px,transparent 1px);background-size:17px 17px;background-position:center}.artboard{position:relative;flex:none;line-height:0;box-shadow:0 13px 50px #0009;outline:1px solid #ffffff20;background:#171a15}.artboard canvas{width:100%;height:100%;display:block;touch-action:none;-webkit-touch-callout:none;user-select:none}.artboard canvas.swapping{cursor:grabbing}.guides{position:absolute;pointer-events:none;inset:9% 6% 13%;border:1px dashed #fff9;box-shadow:0 0 0 1500px #16161b25;clip-path:inset(-12% -7% -17% -7%)}.workspace-foot{font-size:11px;font-weight:600}.zoom{display:flex;align-items:center;gap:3px;background:#22222b;border:1px solid var(--line);border-radius:8px;padding:1px 4px}.zoom .icon{height:28px;width:28px}.zoom svg{width:14px;height:14px}.zoom output{min-width:36px;text-align:center}.zoom i{height:15px;width:1px;background:var(--line)}
.tools{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:4px;padding-bottom:14px;border-bottom:1px solid var(--line)}.tool{min-width:0;min-height:48px;flex-direction:column;gap:5px;border:1px solid transparent;border-radius:8px;padding:5px 1px;color:var(--muted);font-size:9px;font-weight:650}.tool:hover{background:var(--surface);color:var(--text)}.tool.active{background:var(--lime-dim);border-color:#56673c;color:var(--lime)}.media-tool{display:none}.controls{padding-top:17px}.group+.group{margin-top:20px}.group h3{font-size:12px;letter-spacing:.05px;margin-bottom:8px}.group-note{font-size:11px;line-height:1.5;color:var(--muted);margin-top:8px}.formats,.choices,.layout-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}.choice,.layout-option,.preset,.sticker-button{background:var(--surface);border:1px solid var(--line);border-radius:8px;color:var(--soft);padding:7px 3px;font-size:10px;font-weight:650;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;min-height:41px}.choice strong{font-size:12px}.choice span,.layout-option span,.preset span{color:var(--muted);font-size:9px}.choice:hover,.layout-option:hover,.preset:hover,.sticker-button:hover,.choice.active,.layout-option.active,.preset.active{border-color:#82974c;color:var(--lime)}.choice.active,.layout-option.active,.preset.active{background:#2a3422}.layout-option{min-height:64px}.layout-option svg{width:31px;height:34px;color:#a6a3bc;stroke-width:0}.layout-option.active svg{color:var(--lime)}.swatches{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.swatch,.color-input{width:27px;height:27px;border-radius:50%;background:var(--swatch);border:1px solid #ffffff35;display:inline-grid;place-items:center;flex:none}.swatch.active{outline:1px solid var(--lime);outline-offset:2px}.color-input{appearance:none;background:none;padding:0;overflow:hidden;cursor:pointer}.color-input::-webkit-color-swatch-wrapper{padding:0}.color-input::-webkit-color-swatch{border:0;border-radius:50%}.color-input::-moz-color-swatch{border:0;border-radius:50%}.sliders{display:grid;gap:10px}.slider{display:grid;gap:5px;font-size:11px;color:var(--soft)}.slider>span{display:flex;justify-content:space-between}.slider output{color:var(--lime);font-variant-numeric:tabular-nums}.slider input{width:100%;height:16px;margin:0;accent-color:var(--lime)}.check-label{display:flex;align-items:center;gap:6px;color:var(--soft);font-size:11px;cursor:pointer}.check-label input{accent-color:var(--lime)}.control-row{display:flex;align-items:center;gap:7px;flex-wrap:wrap}.control-row .ghost{flex:1}.field{width:100%;min-height:39px;color:var(--text);background:var(--surface);border:1px solid var(--line);padding:8px 10px;border-radius:8px}.field:is(input,textarea){font-size:16px}textarea.field{min-height:68px;resize:vertical}.preset{overflow:hidden;padding:0 0 6px}.preset img{display:block;width:100%;height:53px;object-fit:cover}.sticker-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:5px}.sticker-button{font-size:21px}.layer-row{display:flex;gap:5px;margin-top:5px}.layer-row .ghost{justify-content:flex-start;flex:1;overflow:hidden}.layer-row .ghost.active{color:var(--lime);border-color:#82974c}.layer-row .ghost span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.layer-row .icon{height:37px}
.statusbar{display:flex;min-height:37px;justify-content:space-between;align-items:center;gap:10px;padding:0 19px;border-top:1px solid var(--line);background:var(--panel);color:var(--muted);font-size:10px}.online{display:inline-block;width:6px;height:6px;margin-right:4px;border-radius:50%;background:#99d482}.status-right{display:flex;align-items:center;gap:16px}.statusbar .bare{font-size:inherit;color:var(--soft);gap:4px}.statusbar svg{height:14px;width:14px}
dialog{width:min(94vw,440px);padding:19px;border-radius:15px;background:var(--panel);color:var(--text);border:1px solid #444456;box-shadow:0 20px 70px #0009}dialog::backdrop{background:#08080cb5}.dialog-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px;gap:10px}.dialog-head h2{font-size:21px}.dialog-body p,#dialog-body p{font-size:13px;color:var(--soft);line-height:1.5;margin-bottom:12px}.dialog-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px}.dialog-actions .primary,.dialog-actions .ghost{min-height:41px}.dialog-format{display:flex;gap:7px;margin:12px 0}.dialog-format label{flex:1}.dialog-format input{accent-color:var(--lime)}.toast{position:fixed;z-index:10;bottom:max(19px,env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);max-width:min(92vw,480px);padding:10px 14px;border:1px solid #62774a;background:#283622;color:#efffdb;font-size:13px;border-radius:9px;box-shadow:0 8px 25px #0006}
@media(max-width:1150px) and (min-width:831px){.studio{grid-template-columns:215px minmax(0,1fr) 300px}.library,.inspector{padding-inline:13px}}
@media(max-width:830px){.topbar{height:calc(56px + env(safe-area-inset-top));padding:env(safe-area-inset-top) max(10px,env(safe-area-inset-right)) 0 max(10px,env(safe-area-inset-left));gap:9px}.brand{font-size:20px;gap:6px}.brand small{display:none}.brand-mark{width:30px;height:30px;border-radius:8px}.project-name{gap:7px}.project-name .header-divider{display:none}.project-name button{font-size:11px}.top-actions{gap:2px}.top-actions .header-divider{display:none}.top-actions .icon{width:30px}.top-actions .ghost{padding:0 5px;border:0}.top-actions .ghost span{display:none}.top-actions .primary{padding:0 9px;min-height:35px;gap:4px}.top-actions .primary svg{width:15px;height:15px}.studio{display:flex;flex-direction:column;min-height:0}.library{order:3;border:0;display:none}.inspector{order:2;border:0;border-top:1px solid var(--line);padding:0 12px 16px}.inspector .side-heading,.inspector .panel-eyebrow{display:none}.workspace{grid-template-rows:minmax(0,1fr) 34px}.workspace-head,.workspace-foot{padding-inline:12px}.stage{min-height:0;height:clamp(220px, min(76dvh, 100dvh - 181px - env(safe-area-inset-top) - env(safe-area-inset-bottom), (100vw - 12px)*var(--artboard-ratio,1.7778) + 12px), 820px);padding:6px}.tools{grid-template-columns:repeat(6,minmax(0,1fr));gap:3px;padding:6px 0;position:sticky;top:0;z-index:1;background:var(--panel)}.tool{min-height:44px}.media-tool{display:inline-flex}.controls{padding-top:11px}.group+.group{margin-top:14px}.statusbar{padding:8px 12px max(8px,env(safe-area-inset-bottom));flex-wrap:wrap}.status-right{gap:9px}.assets{grid-template-columns:repeat(4,minmax(0,1fr))}.library .side-heading{margin-bottom:10px}.library .drop{min-height:80px}.library .drop-icon{display:none}.library .asset-heading{margin-top:12px}}
@media(max-width:410px){.project-name{display:none}.topbar .top-actions{gap:3px}}
#new-project{margin-left:10px}
@media(min-width:831px){.stage{height:max(490px,calc(100dvh - 173px))}}
#account-label{max-width:110px;overflow:hidden;text-overflow:ellipsis}
#auth-form{display:grid;gap:10px}
#auth-form label{display:grid;gap:5px;font-size:12px;color:var(--soft)}
#auth-form p{margin:0}

@media (display-mode: standalone), (display-mode: window-controls-overlay), (display-mode: minimal-ui) {
  #install{display:none}
}
.drop-indicator{
  position:absolute;z-index:2;pointer-events:none;display:grid;place-items:center;
  border:2px dashed var(--lime);background:#d6fa7029;box-shadow:inset 0 0 0 1px #1c251088;
}
.drop-indicator span{
  max-width:95%;padding:4px 6px;border-radius:6px;background:var(--lime);color:#1c2510;
  text-align:center;font-size:clamp(9px,2.5vw,12px);font-weight:750;line-height:1.15;
}
.drag-preview{
  position:fixed;top:0;left:0;z-index:8;width:74px;height:74px;pointer-events:none;
  border:2px solid #fff;border-radius:12px;overflow:hidden;background:var(--surface);
  box-shadow:0 6px 20px #000b;will-change:transform;
}
.drag-preview.can-drop{border-color:var(--lime)}
.drag-preview img{display:block;width:100%;height:100%;object-fit:cover}

.choice-categories{display:flex;gap:5px;overflow:auto;padding:3px 3px 7px;scrollbar-width:thin;margin:-3px -3px 6px}
.choice-categories .ghost{min-height:31px;padding-inline:8px;flex:none}
.choice-categories [aria-pressed=true]{background:var(--lime-dim);color:var(--lime);border-color:#56673c}
.sticker-button{min-height:42px}
.admin-search{display:flex;gap:7px;margin-bottom:10px}
.admin-search .field{min-width:0}
.admin-list{max-height:50dvh;overflow:auto;scrollbar-width:thin}
.admin-user{display:flex;justify-content:space-between;align-items:center;gap:10px;border-top:1px solid var(--line);padding:9px 1px}
.admin-user strong{display:block;overflow-wrap:anywhere;font-size:13px}
.admin-user small{color:var(--muted);font-size:11px}
.admin-user .ghost{font-size:11px;min-height:33px}

.print-dialog{width:min(96vw,1000px);max-height:95dvh}
.print-layout{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,1fr);gap:18px}
.print-work,.print-fields{min-width:0}
.print-preview{display:grid;place-items:center;min-height:120px;padding:10px;background:#141419;border:1px solid var(--line);border-radius:10px}
.print-sheet{position:relative;width:min(100%,var(--print-width,440px),calc(55dvh * var(--print-aspect,.6667)));aspect-ratio:var(--print-aspect,.6667);box-shadow:0 3px 18px #0009}
.print-sheet canvas{width:100%;height:100%;display:block;touch-action:none;cursor:grab}
#print-summary{margin:9px 0 0;min-height:2.6em;font-variant-numeric:tabular-nums}
.print-fields{display:grid;align-content:start;gap:9px}
.print-fields label:not(.check-label):not(.print-import){display:grid;gap:4px;font-size:11px;color:var(--soft);min-width:0}
.print-fields .print-pair{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;align-items:end}
.print-fields input[type=range]{width:100%;height:17px;margin:5px 0;accent-color:var(--lime)}
.print-fields output{color:var(--lime)}
.print-fields .group-note{margin:0}
.print-import{position:relative;overflow:hidden;width:max-content;max-width:100%;cursor:pointer}
.print-import input{position:absolute;inset:0;width:100%;opacity:0;cursor:pointer}
.print-import:focus-within{outline:2px solid var(--lime);outline-offset:2px}
@media(max-width:680px){.print-layout{grid-template-columns:minmax(0,1fr);gap:10px}.print-dialog{padding:12px}.print-sheet{width:min(100%,var(--print-width,440px),calc(36dvh * var(--print-aspect,.6667)))}}

@media(max-width:355px){.top-actions .primary span{display:none}.top-actions .primary{padding-inline:8px}}

.print-paper{display:none}
@media print{
  body.printing-photo{margin:0;min-width:0;background:#fff}
  body.printing-photo > :not(.print-paper),body.printing-photo dialog::backdrop{display:none!important}
  body.printing-photo > .print-paper{display:block;margin:0;max-width:none;max-height:none;break-inside:avoid}
}

.export-scale{display:grid;gap:5px;font-size:12px;color:var(--soft)}

.home{width:min(100% - 32px,760px);margin:0 auto;padding:clamp(28px,7vh,84px) 0 48px;min-height:calc(100dvh - 100px)}
.home-head h1{font-size:clamp(30px,6vw,54px);letter-spacing:-.045em;line-height:1.07;margin:10px 0}
.home-head p,.recent-open small{color:var(--muted)}
.home-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:24px 0 30px}
.home-actions button{min-height:56px;font-size:clamp(12px,2.7vw,16px);padding:0 5px}
.home-projects h2{font-size:17px;margin-bottom:12px}
.home-extra{margin-top:20px}
.recent-row{display:flex;align-items:center;gap:8px;margin:7px 0}
.recent-open{flex:1;min-height:54px;justify-content:flex-start;white-space:normal;text-align:left}
.recent-open span{min-width:0;overflow-wrap:anywhere}.recent-open small{display:block;margin-top:3px}
.recent-open img{width:34px;height:40px;object-fit:cover;border-radius:4px}
.on-home #projects-home,.on-home #undo,.on-home #redo,.on-home #export,.on-home #print,.on-home .project-name{display:none}
#projects-home{font-size:31px;line-height:1}#view-mode{font-size:12px;padding:8px;color:var(--lime)}
.tools{grid-template-columns:repeat(6,minmax(0,1fr))}
.layer-toolbar,.layer-actions{display:flex;align-items:center;gap:5px;flex-wrap:wrap}
.layer-stack{display:grid;gap:8px}
.layer-stack .layer-row{display:grid;grid-template-columns:minmax(0,1fr);gap:4px;padding:6px;border:1px solid var(--line);border-radius:9px}
.layer-stack .layer-row>.ghost{justify-content:flex-start;overflow:hidden}
.layer-stack .layer-row>.ghost span{overflow:hidden;text-overflow:ellipsis}
.inspector .controls{overflow:auto;max-height:calc(100dvh - 195px);scrollbar-width:thin}

@media(max-width:830px){
  .topbar #projects-home,.top-actions .icon,.top-actions .ghost{min-width:40px;min-height:48px;padding:0 4px}
  .topbar{gap:3px}.topbar .top-actions{gap:0}.top-actions .primary{min-height:48px}
  .topbar #print{display:none}.on-home #home-print{display:inline-flex}
  .studio .inspector{padding-bottom:3px}
  .tool{min-height:48px;font-size:10px}
  .home-extra .ghost{min-height:44px}
}
@media(max-width:370px){.topbar .brand>span{display:none}.topbar .top-actions .primary span{display:inline}}
#export-details{margin:16px 0 10px}#export-details summary{cursor:pointer;color:var(--soft);margin-bottom:10px}
#export-details input[type=range]{accent-color:var(--lime)}
#export-notice{margin-top:14px}
.layer-values{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;margin:8px 0}
.layer-values label,.inspector label:has(select.field){font-size:11px;color:var(--soft)}
.histogram{height:64px;display:flex;align-items:end;gap:1px;padding:5px;background:var(--surface);border-radius:8px;margin-bottom:8px}
.histogram i{flex:1;background:#b9adf6}
.artboard.snapping::after{content:"";position:absolute;inset:0;pointer-events:none;background:linear-gradient(90deg,transparent calc(50% - 1px),#d6fa70 50%,transparent calc(50% + 1px)),linear-gradient(0deg,transparent calc(50% - 1px),#d6fa70 50%,transparent calc(50% + 1px))}
.cloud-list{display:grid;gap:8px}
.template-grid .layout-option{min-height:77px}.template-grid small{color:var(--muted);font-size:10px}
.cloud-list .ghost{white-space:normal;overflow-wrap:anywhere}
@media(max-width:830px){
  .topbar{position:sticky;top:0;z-index:4}
  body:not(.on-home) #install{display:none}
  .home-actions button{flex-direction:column;gap:5px;min-height:64px;white-space:normal;text-align:center}
}
@media(max-width:400px){
  .topbar .top-actions .icon,.topbar #projects-home,.topbar .top-actions .ghost{width:44px;min-width:44px}
  .topbar .top-actions .primary{min-width:60px}
  .topbar .brand{font-size:17px}.topbar .brand-mark{width:26px;height:26px}
}

/* Keep browser zoom out of two-finger editing, including scrollable panels. */
html,body,.stage,.controls,.library,.studio,dialog,.choices,.assets,.choice-categories {
  touch-action:pan-x pan-y;
}
[data-action=compare] {touch-action:none;user-select:none;-webkit-touch-callout:none}
#before-label {position:absolute;top:10px;left:10px;z-index:4;padding:5px 9px;border-radius:7px;
  background:#141419dc;color:#fff;font:700 13px/1.2 system-ui;pointer-events:none}
.alignment-line {position:absolute;z-index:3;pointer-events:none;background:#55e9db;box-shadow:0 0 2px #122a28}
.alignment-line.vertical {inset-block:0;width:1px}
.alignment-line.horizontal {inset-inline:0;height:1px}
.collage-grid {margin-top:10px}
@media(max-width:380px){.studio .tool {font-size:9px}}
.layout-option svg {fill:currentColor;stroke:none}

.collage-panel {min-width:0}
.collage-panel:not(.presets) {display:grid;gap:10px;padding:3px 0 8px}
.collage-bar {display:flex;align-items:center;gap:8px;margin-bottom:7px}
.collage-bar .ghost {min-height:32px;padding:0 9px}
.collage-bar .ghost svg {width:14px;height:14px}
.collage-hint {color:var(--muted);font-size:11px;min-width:0}
.collage-reset {font-size:11px;margin-left:auto;color:var(--lime)}
.collage-rail {display:flex;gap:6px;overflow-x:auto;scrollbar-width:thin;touch-action:pan-x pan-y;
  overscroll-behavior-inline:contain;padding:2px 3px 6px;scroll-snap-type:x proximity}
.collage-rail .layout-option {flex:0 0 63px;min-height:54px;gap:2px;overflow:hidden;scroll-snap-align:start}
.collage-rail .layout-option svg {width:29px;height:29px}
.collage-rail .layout-option span {max-width:100%;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}
.collage-rail:focus-visible {outline:2px solid var(--lime);outline-offset:-2px}
.collage-tabs {display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:4px;padding-top:6px}
.collage-tabs .ghost {gap:4px;padding:0 3px;min-height:36px;font-size:10px}
.collage-tabs svg {width:15px;height:15px}
.collage-tabs [aria-pressed=true] {color:var(--lime);border-color:#56673c;background:var(--lime-dim)}
#resize-controls {position:absolute;inset:0;pointer-events:none;z-index:5}
.resize-preview {position:absolute;inset:0;z-index:1;contain:strict;pointer-events:none;isolation:isolate}
.artboard:has(>.resize-preview)>#canvas {opacity:0;pointer-events:none}
.resize-preview-surface {position:absolute;inset:0;width:100%;height:100%}
.resize-preview-cell,.resize-preview-outline {position:absolute;top:0;left:0;will-change:transform}
.resize-preview-cell {overflow:hidden}
.resize-preview-cell.empty {display:grid;place-items:center;background:#2c2c35;color:#aaa9bb;
  font:500 calc(34px * var(--resize-scale)) system-ui}
.resize-preview-photo {position:absolute;top:0;left:0;display:block;max-width:none;will-change:transform}
.resize-preview-outline {box-shadow:inset 0 0 0 max(1px,calc(2.5px * var(--resize-scale))) #ffdb56}
.resize-handle {position:absolute;width:42px;height:42px;transform:translate(-50%,-50%);display:grid;
  place-items:center;touch-action:none;pointer-events:auto;border:0;background:none;color:#10130b;padding:0}
.resize-handle span {width:22px;height:22px;display:grid;place-items:center;background:var(--lime);
  border-radius:100%;font:800 15px/1 system-ui;box-shadow:0 1px 6px #000c;opacity:.88}
.resize-handle.nearby span,.resize-handle:hover span,#resize-controls.dragging span {opacity:1}
.resize-handle.x {cursor:ew-resize}
.resize-handle.y {cursor:ns-resize}
.resize-handle:focus-visible {outline:0}
.resize-handle:focus-visible span {outline:2px solid #fff;outline-offset:3px}
.collage-quick {display:flex;gap:5px}
.collage-quick .ghost {min-height:29px;padding:0 8px;font-size:10px}
.workspace-foot:has(.collage-quick:not([hidden])) .zoom {display:none}
@media(max-width:360px){.collage-quick .ghost{padding:0 5px}}


/* The menu shares the canvas grid area and never contributes to track size. */
@media screen {
  body:not(.on-home):has(.studio:not([hidden])) {
    display:grid;
    grid-template-rows:auto minmax(0,1fr) auto;
    height:var(--editor-height,100dvh);
    overflow:hidden;
  }
  .studio {
    position:relative;
    display:grid;
    grid-template-columns:minmax(0,1fr);
    grid-template-rows:minmax(0,1fr) auto;
    min-width:0;
    min-height:0;
    overflow:hidden;
  }
  .studio .workspace {grid-area:1 / 1;min-height:0;grid-template-rows:minmax(0,1fr) 35px}
  .studio .stage {height:auto;min-height:0}
  .studio .tools {
    grid-area:2 / 1;
    position:relative;
    display:grid;
    grid-template-columns:repeat(6,minmax(0,96px));
    justify-content:center;
    gap:4px;
    padding:4px max(8px,env(safe-area-inset-right)) max(4px,env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-left));
    border:0;
    border-top:1px solid var(--line);
    background:var(--panel);
    z-index:7;
  }
  .studio .tool {min-height:48px;font-size:11px}
  .studio .tool:focus-visible {outline-offset:-2px}
  .tool-menu {
    grid-area:1 / 1 / 2 / 2;
    position:absolute;
    inset:auto 12px 42px auto;
    width:min(380px,calc(100% - 24px));
    max-height:min(66%,520px);
    display:flex;
    flex-direction:column;
    overflow:hidden;
    z-index:6;
    border:1px solid #4b4b59;
    border-radius:16px;
    background:var(--panel);
    box-shadow:0 13px 45px #0009;
    animation:menu-rise .14s ease-out;
  }
  .tool-menu-head {
    display:flex;
    flex:0 0 auto;
    align-items:center;
    gap:9px;
    padding:5px 8px 5px 11px;
    border-bottom:1px solid var(--line);
  }
  .tool-menu-head h2 {font-size:14px;flex:1;min-width:0}
  .tool-menu-head .icon {width:44px;height:38px}
  .tool-menu-icon {display:grid;place-items:center;width:28px;height:28px;border-radius:8px;color:var(--lime);background:var(--lime-dim)}
  .tool-menu-icon svg {width:16px;height:16px}
  .tool-menu>.controls,.tool-menu>.library {
    display:block;
    min-height:0;
    max-height:none;
    overflow:auto;
    overscroll-behavior-y:contain;
    scrollbar-width:thin;
    border:0;
    padding:11px 12px 14px;
  }
  .tool-menu .library .drop {min-height:70px}
  .tool-menu .library .drop-icon {display:none}
  .tool-menu .library .asset-heading {margin-top:12px}
  .tool-menu .library .assets {grid-template-columns:repeat(4,minmax(0,1fr));max-height:170px}
  .tool-menu .group h3 {font-size:13px}
  .tool-menu .group+.group {margin-top:14px}
  .tool-menu .control-row {margin-bottom:8px}
  .tool-menu .control-row svg,.tool-menu .layer-actions svg {width:15px;height:15px}
  .tool-menu .control-row .ghost,.tool-menu .layer-actions .ghost {min-height:38px}
  .tool-menu .slider {font-size:12px}
  .tool-menu .slider input {height:24px}
  .tool-shortcuts {display:grid;grid-template-columns:1fr 1fr;gap:7px}
  .tool-shortcuts .ghost {justify-content:flex-start;min-height:46px;font-size:13px}
  .tool-shortcuts .ghost svg:first-child {color:var(--lime)}
  .tool-shortcuts .ghost svg:last-child {margin-left:auto;transform:rotate(-90deg);width:14px}
  .collage-selector {margin-bottom:8px}
  .choice-menu-row {margin:8px 0}
  .tool-menu .dropdown-trigger {margin-bottom:6px}
  .tool-menu .collage-selector .dropdown-trigger,.tool-menu .choice-menu-row .dropdown-trigger {margin-bottom:0}
  .tool-menu[data-tool=layout] .collage-selector .dropdown-trigger {min-height:36px}
  .tool-menu[data-tool=layout] .collage-panel:not(.presets) {padding:0}
}
@media screen and (max-width:830px), screen and (pointer:coarse) and (max-height:540px) {
  body:not(.on-home):has(.studio:not([hidden])) {grid-template-rows:auto auto minmax(0,1fr)}
  body:not(.on-home) .topbar {grid-row:1}
  body:not(.on-home) .statusbar {
    grid-row:2;
    min-height:22px;
    padding:3px 12px;
    border-top:0;
    border-bottom:1px solid var(--line);
    justify-content:flex-end;
  }
  body:not(.on-home) .statusbar>span:first-child {display:none}
  body:not(.on-home) .status-right {width:100%;justify-content:flex-end}
  .studio {grid-row:3}
  .studio .workspace {grid-template-rows:minmax(0,1fr) 34px}
  .studio .stage {padding:6px}
  .studio .tools {grid-template-columns:repeat(6,minmax(0,1fr))}
  .studio .tool {font-size:10px}
  .tool-menu {inset:auto 7px 39px 7px;width:auto;max-height:min(57%,430px)}
  body:not(.on-home) .toast {bottom:calc(62px + env(safe-area-inset-bottom))}
}
@media screen and (orientation:landscape) and (max-height:540px) {
  .tool-menu {inset:auto 8px 38px auto;width:min(380px,47%);max-height:calc(100% - 42px)}
}
@keyframes menu-rise {
  from {opacity:0;transform:translateY(6px)}
  to {opacity:1;transform:translateY(0)}
}

.dropdown-trigger {
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:9px;
  text-align:left;
  cursor:pointer;
  min-width:0;
}
.dropdown-trigger>svg:first-child {color:var(--lime);width:16px;height:16px}
.dropdown-trigger>svg:last-child {margin-left:auto;color:var(--muted);width:15px;height:15px}
.dropdown-trigger[aria-expanded=true] {border-color:#819b53;background:var(--lime-dim)}
.dropdown-trigger[aria-expanded=true]>svg:last-child {transform:rotate(180deg)}
.dropdown-value {overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.dropdown-list {
  position:fixed;
  inset:auto;
  margin:0;
  padding:5px;
  overflow:auto;
  overscroll-behavior:contain;
  z-index:30;
  color:var(--text);
  background:#252530;
  border:1px solid #56566a;
  border-radius:12px;
  box-shadow:0 12px 30px #0009;
}
.dropdown-option {
  width:100%;
  display:flex;
  align-items:center;
  gap:8px;
  padding:7px 9px;
  min-height:42px;
  border:0;
  border-radius:7px;
  background:none;
  text-align:left;
  color:var(--text);
  font-size:13px;
}
.dropdown-option span {min-width:0;flex:1;overflow-wrap:anywhere}
.dropdown-option svg {width:16px;height:16px;color:var(--muted)}
.dropdown-option[aria-selected=true] {background:var(--lime-dim)}
.dropdown-option[aria-selected=true] svg {color:var(--lime)}
.dropdown-option:hover,.dropdown-option:focus-visible {outline-offset:-2px;background:#383847}
.dropdown-group {padding:7px 9px 2px;color:var(--muted);font-size:10px;font-weight:700}
@media(prefers-reduced-motion:reduce){.tool-menu{animation:none}}

.canvas-format-control {min-width:0;margin-right:auto}
.canvas-format-control .dropdown-trigger {width:auto;min-height:30px;padding:3px 7px;font-size:11px;gap:4px}
.canvas-format-control .dropdown-trigger>svg {width:13px;height:13px}
.resize-handle.nearby span {background:#ffdb56}

.tool-menu[data-tool=layout] .tool-menu-head {gap:4px;padding-inline:6px}
.tool-menu[data-tool=layout] .tool-menu-head .tool-menu-icon {display:none}
.tool-menu[data-tool=layout] .tool-menu-head .icon {width:36px;height:40px}
.tool-menu[data-tool=layout] .tool-menu-head .icon svg {width:17px;height:17px}
.collage-head-tools {display:flex;gap:2px;flex:none}
.collage-head-tools [aria-pressed=true] {color:var(--lime);background:var(--lime-dim)}
.collage-head-tools .add-collage {color:var(--lime);background:var(--surface)}
.collage-head-tools button {touch-action:manipulation;user-select:none;-webkit-touch-callout:none}
.collage-title-tip {position:absolute;top:48px;z-index:2;padding:6px 9px;border:1px solid #56566a;border-radius:7px;
  color:var(--text);background:#252530;box-shadow:0 5px 15px #0008;font-size:12px;white-space:nowrap;pointer-events:none}
@media(max-width:360px) {
  .tool-menu[data-tool=layout] .tool-menu-head .icon {width:31px}
  .tool-menu[data-tool=layout] .tool-menu-head h2 {font-size:13px}
  .canvas-format-control .dropdown-trigger>svg:first-child {display:none}
  .workspace-foot .zoom .icon {width:30px}
}

.scrub-row {min-height:38px;display:flex;align-items:center;justify-content:space-between;gap:9px;
  border-bottom:1px solid var(--line);color:var(--soft);font-size:13px}
.sliders:has(.scrub-row) {gap:3px}
.scrub-value,.scrub-input {width:85px;min-height:36px;border:1px solid transparent;border-radius:8px;color:var(--lime);
  background:transparent;font-size:14px;font-variant-numeric:tabular-nums}
.scrub-value {display:flex;align-items:center;justify-content:flex-end;gap:4px;padding:2px 3px;cursor:ns-resize;
  touch-action:none;user-select:none;-webkit-touch-callout:none}
.scrub-value svg {width:15px;height:15px;color:var(--muted)}
.scrub-value:hover,.scrub-value.scrubbing {background:var(--lime-dim)}
.scrub-input {border-color:#819b53;background:var(--surface);padding:3px 6px;font-size:16px;text-align:right}

.format-rail .layout-option {flex-basis:76px;min-height:66px}
.format-rail .layout-option[data-collage-format] svg {fill:currentColor}
.format-rail .layout-option strong {font-size:11px;font-variant-numeric:tabular-nums}
.format-rail .layout-option[data-action] {flex-basis:91px}
.format-rail .layout-option[data-action] svg {fill:none;stroke:currentColor;stroke-width:1.5}
.background-modes {display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:5px;margin-bottom:10px}
.background-modes .choice {min-height:52px}
.background-modes .choice span {line-height:1.1;text-align:center}
.background-modes svg {width:18px;height:18px}
.collage-panel.background .check-label {min-height:32px}
.photo-head-actions {display:flex;align-items:center;gap:4px;min-width:0}
#filter-category-control {min-width:0;max-width:135px}
#filter-category-control .dropdown-trigger {min-height:38px;margin:0;padding-inline:7px;gap:5px;font-size:12px}
.tool-menu[data-tool=filters] .tool-menu-head {gap:5px;padding-inline:7px}
.tool-menu[data-tool=filters] .tool-menu-head .icon {width:37px}
.tool-menu[data-tool=filters] .tool-menu-icon {display:none}
.tool-menu[data-tool=filters]>.controls {padding:7px 8px}
#filter-intensity {flex:none;padding:0 10px;border-top:1px solid var(--line);background:var(--panel)}
#filter-intensity .scrub-row {margin:0}
.filter-grid {gap:5px}
.filter-card {min-width:0;position:relative}
.filter-card .preset {width:100%;min-height:66px;gap:4px;padding:0 0 4px}
.filter-card .preset img,.filter-placeholder {height:48px}
.filter-placeholder {width:100%;display:grid;place-items:center}
.filter-placeholder svg {width:18px;height:18px}
.filter-card .preset>span:last-child {max-width:100%;padding-inline:3px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.filter-star {display:grid;place-items:start end;position:absolute;top:0;right:0;width:42px;height:41px;padding:4px;color:#fff;border:0;background:none;border-radius:8px}
.filter-star svg {width:24px;height:24px;padding:4px;background:#17171bdc;border-radius:50%}
.filter-star[aria-pressed=true] {color:#ffdb56}
.filter-star[aria-pressed=true] svg {fill:currentColor}
.filter-note {margin:0 0 6px;color:var(--muted);font-size:11px}

.tool-menu[data-tool=filters] {max-height:min(66%,520px,var(--filter-room,520px))}
.tool-menu[data-tool=filters][data-placement=top] {top:8px;bottom:auto}
@media screen and (max-width:830px), screen and (pointer:coarse) and (max-height:540px) {
  .tool-menu[data-tool=filters] {max-height:min(57%,430px,var(--filter-room,430px))}
}
@media screen and (orientation:landscape) and (max-height:540px) {
  .tool-menu[data-tool=filters] {max-height:min(calc(100% - 42px),var(--filter-room,430px))}
}
.photo-head-actions .icon[aria-pressed=true] {color:var(--lime);background:var(--lime-dim);box-shadow:inset 0 0 0 1px #697943}
.photo-head-actions .icon[aria-pressed=false] {color:var(--muted)}
.tool-menu[data-tool=filters] .tool-menu-head .icon {width:34px}
.tool-menu[data-tool=filters] #filter-category-control {max-width:133px}
#filter-category-control .dropdown-trigger {font-size:11px}
#filter-category-control .dropdown-trigger>svg {width:13px}
#crop-frame-control .dropdown-trigger {min-height:38px;margin:0;font-size:12px}
.tool-menu:is([data-tool=light],[data-tool=color],[data-tool=crop])>.controls {padding:8px 10px}
.paired-controls {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px 8px}
.paired-controls .scrub-row {min-width:0;gap:3px;padding-inline:6px}
.paired-controls .scrub-row>span {min-width:0;line-height:1.15;font-size:12px;overflow-wrap:anywhere}
.paired-controls .scrub-value {width:auto;min-width:44px;flex:none;padding-inline:2px;gap:2px}
.paired-controls .scrub-input {width:58px;max-width:55%;padding-inline:4px}
.paired-controls .scrub-value svg {width:12px;height:12px}
.auto-light {margin-bottom:5px}
.auto-light svg {color:var(--lime)}
.tool-details {margin-top:7px;border-top:1px solid var(--line)}
.tool-details>summary {padding:8px 2px;color:var(--soft);font-size:12px;font-weight:650;cursor:pointer}
.tool-details>summary::marker {color:var(--lime)}
.crop-fit,.crop-actions {display:flex;gap:5px;margin-bottom:5px}
.crop-fit .ghost,.crop-actions .ghost {flex:1;min-width:0;padding:0 6px;gap:4px}
.crop-fit .ghost[aria-pressed=true] {color:var(--lime);border-color:#697943;background:var(--lime-dim)}
.crop-actions {margin-top:5px}
.crop-actions .ghost svg {width:15px;height:15px}
.crop-tip,.crop-empty p {margin:4px 0;color:var(--muted);font-size:11px}
.crop-empty p {margin-bottom:8px}
.tool-menu[data-tool=color] .paired-controls {grid-template-columns:minmax(0,.88fr) minmax(0,1.12fr)}
@media(max-width:340px) {
  .tool-menu[data-tool=color] .paired-controls .scrub-row>span {font-size:11px}
}

.crop-actions .ghost[aria-pressed=true] {color:var(--lime);border-color:#697943;background:var(--lime-dim)}
.admin-actions {display:flex;flex-wrap:wrap;justify-content:flex-end;gap:5px;flex:0 1 auto}
.admin-actions [data-admin-action=sync][aria-pressed=true] {color:var(--lime);border-color:#697943;background:var(--lime-dim)}

dialog.account-dialog {
  width:min(calc(100vw - 28px),424px);
  max-height:calc(100dvh - 24px);
  padding:clamp(14px,4vw,22px);
  border:1px solid #454652;
  border-radius:23px;
  background:linear-gradient(155deg,#24252e 0%,#1b1c23 48%,#1b1c23 100%);
}
.account-dialog[open] {animation:account-enter .18s ease-out}
.account-dialog .dialog-head {margin-bottom:14px}
.account-dialog .dialog-head h2 {font-size:21px;letter-spacing:-.025em}
.account-dialog .dialog-head .icon {
  width:40px;height:40px;border-radius:12px;background:#ffffff08;border:1px solid #ffffff13;
}
.account-profile {
  display:flex;align-items:center;gap:13px;min-width:0;padding:13px;
  border:1px solid #41464a;border-radius:17px;
  background:radial-gradient(ellipse at 8% 0%,#384233 0%,transparent 77%),#272a31;
}
.account-avatar {
  position:relative;isolation:isolate;overflow:hidden;display:grid;place-items:center;
  flex:none;width:58px;height:58px;border-radius:17px;color:#1a2613;
  background:linear-gradient(145deg,#e8ff9a,#afda56);
  border:1px solid #e4ff9d;box-shadow:0 5px 12px #10160e54;
  font-size:21px;font-weight:800;letter-spacing:-.045em;
}
.account-avatar::before,.account-avatar::after {
  content:"";position:absolute;z-index:-1;border:1px solid #384e2852;border-radius:50%;
  width:64px;height:64px;left:21px;top:-32px;
}
.account-avatar::after {width:78px;height:78px;left:15px;top:-39px}
.account-avatar svg {width:24px;height:24px}
.account-identity {min-width:0;display:grid;justify-items:start;gap:5px}
.account-identity>strong {font-size:15px;line-height:1.28;overflow-wrap:anywhere}
.account-role {
  display:inline-flex;align-items:center;gap:5px;color:#d9ebaa;
  font-size:11px;font-weight:650;letter-spacing:.02em;
}
.account-role svg {width:13px;height:13px}
.account-sync {
  display:flex;align-items:center;gap:10px;margin:9px 0 15px;padding:8px 11px;
  border:1px solid #3c4b34;border-radius:13px;background:#252d24;
}
.account-sync-icon {display:grid;place-items:center;flex:none;width:29px;height:29px;color:#c2e889}
.account-sync[data-enabled=false] {border-color:#56483b;background:#302920}
.account-sync[data-enabled=false] .account-sync-icon {color:#f3cb91}
.account-sync[data-enabled=true] .account-sync-icon svg:last-child,
.account-sync[data-enabled=false] .account-sync-icon svg:first-child {display:none}
.account-sync .account-action-copy strong {font-size:12px}
.account-actions {display:grid;gap:7px}
.account-action {
  display:grid;grid-template-columns:38px minmax(0,1fr) 17px;align-items:center;gap:10px;
  min-width:0;width:100%;min-height:56px;padding:7px 10px;text-align:left;
  border:1px solid #363744;border-radius:13px;background:#252631;color:#f0eff7;
  transition:background-color .15s,border-color .15s;
}
.account-action:hover {border-color:#6c707e;background:#2d2f3a}
.account-action:active {background:#30343d}
.account-action-icon {
  width:36px;height:36px;display:grid;place-items:center;border-radius:10px;
  color:#d1d1e8;background:#343648;
}
.account-action-copy {display:grid;min-width:0;gap:2px;line-height:1.25}
.account-action-copy strong {font-size:13px;font-weight:700;overflow-wrap:anywhere}
.account-action-copy small {font-size:11px;color:#b1b1c2;overflow-wrap:anywhere}
.account-action-next {color:#b1b1c2}
.account-action-next svg {width:16px;height:16px;transform:rotate(-90deg)}
.account-action-main {
  color:#202b15;border-color:#d8f890;
  background:linear-gradient(110deg,#def98a,#c4eb68);
}
.account-action-main:hover,.account-action-main:active {border-color:#f2ffbf;background:#e4fc9c}
.account-action-main .account-action-icon {color:#253618;background:#24321819}
.account-action-main .account-action-copy small,.account-action-main .account-action-next {color:#405029}
.account-footer {display:flex;justify-content:flex-end;margin-top:12px;padding-top:6px;border-top:1px solid #ffffff13}
.account-logout {
  display:inline-flex;align-items:center;justify-content:center;gap:7px;
  min-height:43px;padding:5px 10px;border:1px solid transparent;border-radius:11px;
  color:#f3bbbe;background:transparent;font-size:13px;font-weight:650;
}
.account-logout:hover {background:#493138;border-color:#68444b}
#dialog-body #account-error {color:#f7b6b9;margin:10px 0 0}
#account-error:empty {display:none}
@keyframes account-enter {from {opacity:0;transform:translateY(6px) scale(.985)} to {opacity:1;transform:none}}
@media(prefers-reduced-motion:reduce) {
  .account-dialog[open] {animation:none}
  .account-action {transition:none}
}

/* Stories gallery */
.home {width:min(100% - 28px,900px);padding:clamp(18px,5vh,48px) 0 38px}
.home-start {
  position:relative;overflow:hidden;isolation:isolate;padding:clamp(16px,4vw,30px);border:1px solid #41473a;border-radius:23px;
  background:radial-gradient(ellipse at 95% 0%,#3b4a2e 0%,transparent 62%),linear-gradient(132deg,#292c31,#1e2027 70%);
}
.home-start::before,.home-start::after {
  content:"";position:absolute;z-index:-1;pointer-events:none;transform:rotate(24deg);
  top:-38px;right:24px;width:90px;height:150px;border:1px solid #d6fa7030;border-radius:18px;
}
.home-start::after {top:-24px;right:2px;transform:rotate(39deg)}
.home-head {max-width:37rem}
.home-head h1 {font-size:clamp(26px,5.6vw,47px);margin:8px 0 7px;max-width:15em}
.home-head p {font-size:clamp(12px,2.8vw,15px);color:#c1c3cb}
.home-actions {margin:16px 0 0;gap:7px;grid-template-columns:1.35fr 1fr 1fr}
.home-actions button {
  display:flex;flex-direction:column;min-width:0;min-height:62px;gap:5px;padding:6px 4px;
  border-radius:12px;font-size:clamp(11px,2.6vw,14px);white-space:normal;line-height:1.15;
}
.home-actions button svg {width:18px;height:18px}
.home-actions .ghost {background:#ffffff0a;border-color:#ffffff25}
.home-actions .ghost:hover {background:#ffffff1a}
.home-projects {margin-top:21px}
.home-stories-head {display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:9px}
.home-stories-head h2 {display:flex;align-items:center;gap:7px;margin:0;font-size:clamp(17px,4vw,22px);letter-spacing:-.02em}
#home-story-count {
  display:inline-grid;place-items:center;min-width:22px;height:22px;padding:0 5px;border-radius:99px;
  background:#30352b;color:#dbe8b7;font-size:11px;font-variant-numeric:tabular-nums;
}
#home-cloud {display:flex;align-items:center;gap:5px;min-height:42px;color:#d1ec94;font-size:12px}
#home-cloud svg {width:17px;height:17px}
.stories-grid {display:grid;grid-template-columns:repeat(auto-fill,minmax(164px,1fr));gap:10px}
.story-card {
  min-width:0;position:relative;border:1px solid #383a46;border-radius:15px;background:#22242c;
  transition:border-color .15s,background-color .15s;
}
.story-card:hover,.story-card:focus-within {border-color:#667255;background:#272a31}
.story-open {
  display:grid;grid-template-rows:auto 1fr;width:100%;height:100%;padding:0;border:0;border-radius:inherit;
  background:none;text-align:left;min-width:0;
}
.story-cover {
  display:grid;place-items:center;position:relative;aspect-ratio:4/4.2;border-radius:14px 14px 0 0;
  overflow:hidden;background:radial-gradient(ellipse at 85% 5%,#3a4734,transparent 68%),linear-gradient(125deg,#303341,#222631);
}
.story-cover>img {width:100%;height:100%;object-fit:cover;position:absolute;inset:0}
.story-cover-icon {display:grid;place-items:center;width:52px;height:52px;border-radius:16px;background:#ffffff0b;color:#b9c4ad}
.story-cover-icon svg {width:26px;height:26px}
.story-badge {
  position:absolute;top:8px;left:8px;display:inline-flex;align-items:center;gap:4px;padding:4px 6px;
  border:1px solid #ffffff30;border-radius:7px;background:#212329;color:#e0ddeb;
  font-size:10px;font-weight:650;line-height:1.2;
}
.story-badge svg {width:13px;height:13px}
.story-card[data-story-kind=cloud] .story-badge {background:#293522;color:#ddf4b0;border-color:#7c965f}
.story-card[data-story-kind=guest] .story-badge {background:#342c48;color:#e5d9ff;border-color:#746491}
.story-caption {display:grid;align-content:center;gap:4px;min-width:0;min-height:60px;padding:8px 9px}
.story-card:has(.story-menu) .story-caption {padding-right:39px}
.story-caption strong {overflow-wrap:anywhere;font-size:13px;line-height:1.25}
.story-caption small {font-size:10px;color:#a9abba}
.story-menu {position:absolute;bottom:9px;right:3px;width:36px;height:40px;background:transparent}
.stories-empty {
  grid-column:1/-1;display:flex;align-items:center;gap:12px;padding:17px 14px;
  border:1px dashed #444754;border-radius:15px;background:#202229;
}
.stories-empty>svg {color:#d6ec9d;width:23px;height:23px}
.stories-empty strong {font-size:14px}
.stories-empty p {font-size:12px;color:var(--muted);margin-top:4px}
.home-extra {gap:6px;margin-top:15px}
.home-extra button {flex:1 1 auto}
@media(max-width:560px) {
  .stories-grid {grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(prefers-reduced-motion:reduce) {
  .story-card {transition:none}
}

/* Account photo */
#account .account-mark {display:grid;place-items:center;flex:none}
.account-mark img {width:26px;height:26px;border-radius:8px;object-fit:cover}
.account-avatar {padding:0}
.account-avatar img {width:100%;height:100%;position:absolute;inset:0;object-fit:cover}
.account-avatar:hover,.account-avatar:focus-visible {border-color:white}
.avatar-camera {
  position:absolute;right:0;bottom:0;width:22px;height:22px;display:grid;place-items:center;
  border-radius:9px 0 0 0;background:#222623;color:#f1f8df;
}
.account-avatar .avatar-camera svg {width:13px;height:13px}
#remove-avatar {min-height:27px;color:#c6bac7;text-decoration:underline;text-underline-offset:3px;font-size:11px}
#remove-avatar:hover {color:#f3bbbe}
.avatar-preview {display:grid;place-items:center;padding:10px}
.avatar-preview img {width:min(100%,224px);aspect-ratio:1;object-fit:cover;border-radius:23px;background:#30313a}
#avatar-error:empty {display:none}

.home-start-secondary {display:flex;flex-wrap:wrap;gap:7px;margin-top:8px}
.home-start-secondary .ghost {flex:1;min-height:40px;padding-inline:7px;font-size:12px}
.home-start-secondary .ghost svg {width:15px;height:15px}
.story-card[data-story-kind=shared] .story-badge {background:#343052;color:#eee2ff;border-color:#8573ab}
.story-open {touch-action:pan-y;user-select:none;-webkit-touch-callout:none}
#shared-actions {color:#d7c6fb}

dialog.project-context-dialog {
  width:min(calc(100vw - 24px),390px);padding:16px;border-radius:21px;
  border-color:#454653;background:linear-gradient(145deg,#262830,#1b1c23 65%);
}
.project-context-dialog .dialog-head {margin-bottom:10px}
.project-context-dialog .dialog-head h2 {font-size:18px}
.project-context-heading {
  display:flex;align-items:center;gap:9px;padding:10px 11px;margin-bottom:11px;
  border:1px solid #46493f;border-radius:13px;color:#e5edcf;background:#2c302a;
  font-size:13px;overflow-wrap:anywhere;
}
.project-context-heading svg {flex:none;width:17px;height:17px;color:#d9ec9e}
.project-context-actions {display:grid;gap:5px}
.project-action {
  display:grid;grid-template-columns:34px minmax(0,1fr) 16px;align-items:center;gap:9px;
  padding:5px 8px;min-height:46px;text-align:left;border:1px solid #373947;
  border-radius:11px;color:#f1eff7;background:#272933;font-size:13px;font-weight:650;
}
.project-action:hover,.project-action:active {border-color:#657051;background:#31352c}
.project-action-icon {display:grid;place-items:center;width:32px;height:32px;border-radius:9px;color:#dceca9;background:#ffffff0b}
.project-action>svg {width:15px;height:15px;color:#b8b6c6;transform:rotate(-90deg)}
.project-action-danger {color:#f5bec1}
.project-action-danger .project-action-icon {color:#f1b2b6;background:#ee939516}
.project-action-danger:hover {border-color:#795157;background:#3d2e33}
#invite-output {display:grid;gap:6px;margin-top:11px}
#invite-output label {font-size:12px;color:#d8dbcf}
#invite-output .field {width:100%;min-width:0;font-size:14px}
#invite-message {margin:7px 0 0}
#invite-message:empty,#revoke-note:empty {display:none}

.story-open,.story-menu,.project-action {-webkit-tap-highlight-color:transparent}

.sr-status {position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
body:not(.on-home) #home-more {display:none}
body:not(.on-home) .statusbar:not(:has(#apply-update:not([hidden]))) {display:none}
.on-home .statusbar {min-height:43px;padding-block:2px max(2px,env(safe-area-inset-bottom))}
.home #home-title {margin-top:0}
.cloud-library-intro {display:flex;align-items:center;gap:10px;padding:11px;border-radius:13px;background:#2d3427;color:#e5f0cc}
.cloud-library-intro>svg {width:23px;height:23px;color:var(--lime);flex:none}
.cloud-library-intro strong,.cloud-library-intro small {display:block}
.cloud-library-intro strong {font-size:14px}
.cloud-library-intro small {font-size:11px;margin-top:3px;color:#c1cbb1}
.cloud-library-list {display:grid;gap:6px;margin:13px 0}
.cloud-library-list h3 {font-size:12px;margin:4px 0 2px;color:var(--soft)}
.cloud-library-list h3 span {margin-left:4px;color:#d0e69e}
.cloud-project-row {display:flex;align-items:center;gap:2px;border:1px solid #373947;border-radius:12px;background:#262832;min-width:0}
.cloud-project-open {flex:1;display:grid;grid-template-columns:34px minmax(0,1fr) 15px;align-items:center;gap:8px;min-width:0;padding:6px 8px;background:none;border:0;text-align:left;min-height:52px;border-radius:11px}
.cloud-project-open:hover {background:#353a33}
.cloud-project-open strong,.cloud-project-open small {display:block;overflow-wrap:anywhere}
.cloud-project-open strong {font-size:13px}
.cloud-project-open small {font-size:11px;color:var(--muted);margin-top:3px}
.cloud-project-icon {display:grid;place-items:center;width:34px;height:34px;border-radius:9px;background:#333d2d;color:var(--lime)}
.cloud-project-open>svg {transform:rotate(-90deg);width:14px;height:14px;color:var(--muted)}
.cloud-project-delete {color:#d6a6aa;width:39px;height:41px;flex:none}
#dialog-body .cloud-library-quota {margin:0;font-size:11px;color:var(--muted)}
#dialog-body .cloud-library-empty {margin:0;padding:10px;border:1px dashed var(--line);border-radius:10px}

.print-dialog[open] {
  display:flex;flex-direction:column;width:min(calc(100vw - 20px),980px);height:min(92dvh,730px);
  max-height:calc(100dvh - 20px);padding:13px;border-radius:18px;overflow:hidden;
}
.print-dialog .dialog-head {flex:none;margin-bottom:8px}
.print-dialog .dialog-head h2 {font-size:clamp(17px,4vw,21px)}
.print-dialog #dialog-body {display:grid;grid-template-rows:minmax(0,1fr) auto;gap:8px;min-height:0;flex:1}
.print-dialog .print-layout {min-height:0;grid-template-columns:minmax(0,1.13fr) minmax(0,1fr);gap:11px}
.print-dialog .print-work {display:grid;grid-template-rows:minmax(0,1fr) auto;min-height:0;gap:5px}
.print-dialog .print-preview {height:100%;min-height:0;padding:6px;container-type:size;background:radial-gradient(ellipse at center,#262934,#15161d)}
.print-dialog .print-sheet {width:min(calc(100cqw - 12px),calc((100cqh - 12px) * var(--print-aspect,.6667)));max-width:100%}
.print-preview-tools {display:flex;align-items:center;gap:5px;min-width:0}
#print-summary {flex:1;font-size:11px;line-height:1.3;color:var(--muted);margin:0;min-height:0;min-width:0}
#print-view {flex:none;min-height:32px;font-size:11px}
.print-settings {display:grid;grid-template-rows:auto minmax(0,1fr);gap:6px;min-width:0;min-height:0}
.print-tabs,.print-segment {display:grid;gap:4px;grid-template-columns:repeat(3,minmax(0,1fr))}
.print-segment {grid-template-columns:repeat(2,minmax(0,1fr))}
.print-tabs .ghost,.print-segment .ghost {padding:0 4px;gap:4px;min-width:0;min-height:38px;font-size:11px}
.print-tabs svg {width:14px;height:14px}
.print-tabs [aria-pressed=true],.print-segment [aria-pressed=true],.print-frame-list [aria-pressed=true] {
  color:var(--lime);background:#303929;border-color:#626f46;
}
.print-dialog .print-fields {display:block;overflow:auto;min-height:0;overscroll-behavior:contain;padding:0 2px 3px;scrollbar-width:thin}
.print-section {display:grid;gap:7px;min-width:0}
.print-section .field {min-height:38px}
.print-section .dropdown-trigger {margin:0}
#print-photo-format-fields {display:grid;gap:5px}
.print-scrubs .scrub-row,.print-edit-row .scrub-row {margin:0;min-width:0;font-size:12px;gap:3px}
.print-scrubs .scrub-value,.print-edit-row .scrub-value {min-width:0;width:auto;flex:none;padding-inline:3px}
.print-scrubs .scrub-input,.print-edit-row .scrub-input {max-width:56%}
.print-source {display:grid;grid-template-columns:minmax(0,1fr) auto;gap:5px;align-items:end}
.print-source .print-import {min-height:38px}
.print-frame-list {display:flex;gap:4px;overflow-x:auto;scrollbar-width:thin}
.print-frame-list:empty {display:none}
.print-frame-list .ghost {flex:none;min-width:32px;padding-inline:5px;min-height:34px}
.print-edit-row {display:grid;grid-template-columns:minmax(0,1fr) repeat(3,auto);align-items:center;gap:4px}
.print-edit-row>.ghost {width:37px;padding:0}
.print-edit-row>.ghost svg {width:15px;height:15px}
.print-footer {display:flex;flex-wrap:wrap;gap:5px;border-top:1px solid var(--line);padding-top:7px}
.print-footer .primary,.print-footer .ghost {min-height:37px;padding:0 8px;gap:4px}
.print-footer a {text-decoration:none}
.print-footer svg {width:15px;height:15px}
@media(max-width:680px) {
  .print-dialog[open] {height:min(95dvh,820px);padding:9px}
  .print-dialog .print-layout {grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(105px,44%) minmax(0,1fr);gap:6px}
  .print-dialog .print-preview {padding:4px}
  .print-dialog .print-sheet {width:min(calc(100cqw - 8px),calc((100cqh - 8px) * var(--print-aspect,.6667)))}
  .print-dialog .print-fields {padding-bottom:4px}
  .print-footer .primary,.print-footer .ghost {flex:1}
}

.print-photo-spec {padding:7px 8px;border:1px solid #3a3c46;border-radius:10px;background:#22242c}
.print-photo-spec strong {display:block;margin:0 0 5px;font-size:12px;color:#e3e6d5}
.print-photo-spec #print-photo-custom {margin-top:5px}
#print-frame-placement {display:block;margin-top:4px;font-size:10px;color:var(--muted)}
#print-frame-placement[data-unplaced=true] {color:#f0b89b}
.print-frame-list [data-print-frame] {display:grid;gap:2px;min-width:49px;padding:4px 6px;line-height:1.05}
.print-frame-list [data-print-frame] small {font-size:9px;font-weight:500;font-variant-numeric:tabular-nums}
.print-frame-list [data-unplaced=true] {color:#ffc7a9;border-color:#825444;background:#3c2b28}
.print-frame-head {display:flex;align-items:center;justify-content:space-between;gap:6px;margin-bottom:4px}
.print-frame-head strong {margin:0}
.print-frame-head .ghost {width:37px;min-height:33px;padding:0}
.print-frame-head .ghost svg {width:15px;height:15px}

/* Workspace controls and layer panels */
.studio .workspace {position:relative}
.workspace-start {order:-1;display:flex;align-items:center;gap:4px;margin-right:auto;min-width:0}
.workspace-start .canvas-format-control {margin:0}
#canvas-layers {min-height:30px;min-width:42px;padding:2px 6px;gap:4px;font-size:11px;font-variant-numeric:tabular-nums}
#canvas-layers svg {width:15px;height:15px;color:var(--lime)}
#canvas-layers[aria-expanded=true] {color:var(--lime);background:var(--lime-dim)}
.studio .tools {display:flex;justify-content:safe center;overflow-x:auto;overflow-y:hidden;scrollbar-width:none;touch-action:pan-x;overscroll-behavior-inline:contain}
.studio .tools::-webkit-scrollbar,.sticker-categories::-webkit-scrollbar,.sticker-pages::-webkit-scrollbar {display:none}
.studio .tools .tool {display:inline-flex;flex:0 0 clamp(56px,13vw,94px)}
.layer-quick {position:absolute;z-index:5;left:50%;bottom:41px;transform:translateX(-50%);display:flex;gap:3px;
  padding:3px;background:var(--panel);border:1px solid #4b4b59;border-radius:12px;box-shadow:0 8px 23px #0008}
.layer-quick .icon {width:40px;height:36px}
.layer-quick .icon:first-child {color:var(--lime)}
.artboard:has(>.layer-motion-preview)>#canvas {opacity:0}
.layer-motion-preview {position:absolute;inset:0;z-index:1;overflow:hidden;contain:strict;pointer-events:none}
.layer-motion-preview .layer-motion-item {position:absolute;inset:auto;top:0;left:0;will-change:transform;transform-origin:center}
.layer-head-tools {display:flex;align-items:center;gap:3px;flex:0 1 auto;min-width:0}
.tool-menu-head .layer-head-tools>.icon {width:37px;flex:none}
.layer-head-tools [aria-pressed=true] {color:var(--lime);background:var(--lime-dim)}
.sticker-categories {display:flex;gap:2px;min-width:0;overflow-x:auto;scrollbar-width:none;touch-action:pan-x}
.tool-menu-head .sticker-categories .icon {flex:0 0 34px;width:34px;font-size:16px}
.tool-menu[data-tool=stickers] .tool-menu-head {gap:5px;padding-inline:6px}
.tool-menu[data-tool=stickers] .tool-menu-head h2 {flex:0 0 auto}
.tool-menu[data-tool=stickers] .tool-menu-icon {display:none}
.tool-menu[data-tool=stickers] #close-tool-menu {flex:0 0 34px;width:34px}
.sticker-pages {display:flex;overflow-x:auto;scroll-snap-type:x mandatory;scrollbar-width:none;touch-action:pan-x pan-y;overscroll-behavior-inline:contain}
.sticker-page {flex:0 0 100%;min-width:0;scroll-snap-align:start;scroll-snap-stop:always;padding:1px 2px 4px}
.sticker-page .sticker-grid {grid-template-columns:repeat(6,minmax(0,1fr))}
.sticker-page .sticker-button {min-height:43px}
.text-presets {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
.text-presets .ghost {min-width:0;display:grid;justify-items:start;gap:6px;padding:9px;text-align:left}
.text-presets .ghost svg,.layer-thumb svg {color:var(--lime);width:19px;height:19px}
.text-presets b,.text-presets small {display:block}
.text-presets small,.layer-label small {font-size:10px;color:var(--muted);margin-top:3px}
.layer-edit-card {display:grid;gap:8px}
.layer-edit-title {display:flex;align-items:center;justify-content:space-between}
.layer-edit-title b {font-size:26px}
.layer-field-pair {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.layer-entry {display:flex;align-items:center;gap:2px;min-width:0;border:1px solid var(--line);border-radius:10px;background:#22222c}
.layer-entry:has(.layer-select[aria-pressed=true]) {border-color:#71834e;background:#2d3524}
.layer-entry.is-muted .layer-thumb {opacity:.45}
.layer-select {display:flex;align-items:center;gap:8px;flex:1;min-width:0;padding:4px 6px;border:0;background:none;text-align:left}
.layer-thumb {display:grid;place-items:center;width:39px;height:35px;flex:none;overflow:hidden;border-radius:7px;background:#303342}
.layer-thumb img {width:100%;height:100%;object-fit:cover}
.layer-thumb b {font-size:20px}
.layer-label {min-width:0}
.layer-label strong,.layer-label small {display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.layer-entry>.icon {flex:0 0 38px;width:38px;height:41px}
.layer-entry>.icon[aria-pressed=true] {color:var(--lime)}

.action-cards {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.action-card {--accent:#d6fa70;--tint:#39432a;display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:start;
  text-align:left;gap:8px;min-height:108px;padding:10px;border:1px solid var(--tint);border-radius:12px;color:var(--text);
  background:linear-gradient(145deg,var(--tint),var(--surface) 72%);transition:border-color .14s,background-color .14s}
.action-card[data-accent=blue] {--accent:#a8d4ff;--tint:#2c4159}
.action-card[data-accent=violet] {--accent:#d0b6ff;--tint:#443456}
.action-card[data-accent=peach] {--accent:#ffc8a8;--tint:#503931}
.action-card:hover,.action-card:focus-visible,.action-card[aria-pressed=true] {border-color:var(--accent)}
.action-card-icon {grid-area:1/1;display:grid;place-items:center;width:31px;height:31px;background:var(--tint);color:var(--accent);border-radius:8px}
.action-card-icon svg {width:19px;height:19px}
.action-card>svg {grid-area:1/2;color:var(--accent);width:15px;height:15px;align-self:center}
.action-card-copy {grid-area:2/1/3/3;display:grid;gap:3px}
.action-card-copy strong {font-size:13px;line-height:1.2}
.action-card-copy small {font-size:10px;line-height:1.35;color:var(--soft)}
.layer-values .scrub-row {min-width:0;gap:3px;padding-inline:4px}
.layer-entry .layer-context-trigger {color:var(--soft)}
.layer-entry .layer-context-trigger:hover {color:var(--lime)}
.sticker-button img {width:28px;height:28px;object-fit:contain;pointer-events:none}
.layer-thumb b {display:grid;place-items:center;width:100%;height:100%}
.layer-thumb b img,.layer-edit-title b img {width:28px;height:28px;object-fit:contain}

.frame-properties {display:grid;gap:7px}
.frame-settings-head {display:flex;justify-content:space-between;align-items:center;gap:8px}
.frame-settings-head h3 {margin:0;font-size:13px}
.frame-settings-head .primary {min-height:34px;min-width:100px;padding:0 8px;gap:5px;font-size:12px}
.frame-settings-head .primary svg {width:15px;height:15px}
.frame-properties .group h3 {margin:0 0 5px}
.retouch-controls {display:grid;gap:5px}
.retouch-tools {display:grid;grid-auto-flow:column;grid-auto-columns:minmax(0,1fr);gap:5px}
.retouch-tools .icon {width:100%;height:42px;border:1px solid var(--line);border-radius:8px;background:var(--surface);color:var(--soft)}
.retouch-tools .icon[aria-pressed=true] {background:var(--lime-dim);color:var(--lime);border-color:#62764a}
.retouch-tools svg {width:18px;height:18px}
.brush-values {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px}
.brush-values .scrub-row {display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:auto auto;align-content:start;
  min-width:0;gap:0;padding:5px 4px 1px;border:1px solid var(--line);border-radius:8px;text-align:center}
.brush-values .scrub-row>span {min-height:15px;line-height:15px;font-size:10.5px;white-space:nowrap}
@media(max-width:360px) {
  .brush-values .scrub-row>span {font-size:9.5px}
}
.brush-values :is(.scrub-value,.scrub-input) {width:100%;min-height:36px;justify-content:center;text-align:center}
.retouch-toggles {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px}
.retouch-toggles .check-label {min-height:30px;font-size:11px;gap:4px}
.retouch-resets,.layer-history {display:flex;align-items:center;gap:5px;color:var(--muted);font-size:11px}
.retouch-resets .ghost {min-height:32px;gap:4px;padding:0 7px;font-size:11px}
.retouch-resets .ghost svg,.layer-history .icon svg {width:15px;height:15px}
.layer-history {justify-content:flex-end;border-top:1px solid var(--line);margin-top:2px;padding-top:2px}
.layer-history span {margin-right:auto}
.layer-history .icon {height:32px;width:36px}
.frame-tone {border-top:1px solid var(--line);padding:5px 0;font-size:12px;color:var(--soft)}
