@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,600;0,800;1,600&family=Montserrat:wght@400;500;600;700&display=swap');
:root{color-scheme:dark;--bg:#14061f;--bg2:#23093a;--pink:#ff6ff5;--gold:#f4c95d;--text:#f6ecff;--muted:#c9b3dd;--line:#63316e}*{box-sizing:border-box}body{margin:0;background:radial-gradient(ellipse at 90% 0,#4a145e 0,transparent 45%),var(--bg);color:var(--text);font:16px/1.6 Montserrat,system-ui,sans-serif;min-height:100vh}header{max-width:1160px;margin:auto;padding:25px 28px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line);gap:20px}.wordmark{display:flex;align-items:center;gap:18px;color:var(--pink);font:italic 54px Georgia;text-decoration:none}.wordmark span{font:600 12px/1.7 Montserrat,sans-serif;letter-spacing:2px;max-width:150px;color:var(--gold)}a{color:var(--gold)}.subtle{font-size:14px}main{max-width:1100px;margin:auto;padding:50px 28px}h1,h2{font-family:'Playfair Display',Georgia,serif;line-height:1.13}h1{font-size:clamp(42px,7vw,76px);margin:14px 0 16px;letter-spacing:-2px}h1 em{color:var(--pink);font-weight:600}h2{font-size:30px;margin:10px 0 18px}.eyebrow{font-size:12px;font-weight:700;letter-spacing:2.5px;color:var(--gold)}.lead{color:var(--muted);font-size:18px;margin:0 0 32px}p{color:var(--muted)}button,input{font:inherit}button{cursor:pointer;border:1px solid var(--line);border-radius:12px;padding:12px 20px;background:#2e123d;color:var(--text);min-height:48px;font-weight:600;transition:background .15s}button:hover{background:#482052}button:disabled{opacity:.5;cursor:wait}.primary{background:var(--gold);color:#260d30;border-color:var(--gold)}.primary:hover{background:#ffe6a3}button:focus-visible,a:focus-visible,input:focus-visible{outline:3px solid var(--pink);outline-offset:3px}.panel{padding:32px;border:1px solid var(--line);border-radius:22px;background:linear-gradient(115deg,#30113e,#1d0b2b)}.capture{display:grid;grid-template-columns:1fr 1fr;gap:36px;border-top:3px solid var(--gold)}.capture h2{font-size:40px}.capture p{margin-bottom:0}.capture-actions{display:flex;flex-direction:column;justify-content:center;gap:12px}.capture-actions button{padding:17px}.capture-actions small{font-size:12px;text-align:center;color:var(--muted);margin-top:5px}.section-head{display:flex;justify-content:space-between;align-items:center;gap:20px;margin:42px 0 15px}.section-head h2{margin-bottom:0}.tabs{display:flex;gap:8px;flex-wrap:wrap;margin:20px 0}.tabs button{border-radius:999px}.tabs button[aria-pressed=true]{background:#f4c95d;color:#260d30;border-color:#f4c95d}.gallery,.queue{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}.photo{border:1px solid var(--line);border-radius:16px;overflow:hidden;background:#210d2d}.photo img{width:100%;height:230px;object-fit:cover;display:block}.photo .image-button{display:block;padding:0;width:100%;border:0;border-radius:0}.photo-body{padding:12px;display:flex;gap:8px;flex-wrap:wrap}.photo-body p,.photo-body progress{width:100%;margin:0;font-size:14px;overflow-wrap:anywhere}.photo-body button{padding:8px 12px;font-size:14px;min-height:44px}.photo-body a{font-size:14px}.empty{grid-column:1/-1;border:1px dashed var(--line);padding:44px 22px;text-align:center;border-radius:18px;color:var(--muted)}#status:empty{display:none}#status{padding:14px 18px;border-left:3px solid var(--gold);background:#31113e;color:#f6ecff}footer{border-top:1px solid var(--line);max-width:1100px;margin:20px auto 0;padding:25px 28px 40px;font-size:14px;color:var(--muted);display:flex;justify-content:space-between;gap:20px}dialog{background:#1a0826;color:var(--text);border:1px solid var(--line);border-radius:18px;padding:24px;max-width:1050px;width:calc(100% - 24px);max-height:94dvh}dialog::backdrop{background:#08020bdc}.editor-header{display:flex;justify-content:space-between;align-items:center;gap:20px}.editor-header h2{font-size:27px}.editor-grid{display:grid;grid-template-columns:1fr 280px;gap:24px}.canvas-wrap{align-self:start;min-width:0}.canvas-wrap canvas{display:block;width:100%;height:auto;max-height:65dvh;object-fit:contain;touch-action:none;background:#0b0410}.canvas-wrap p{font-size:14px}.tools{display:flex;flex-direction:column;gap:10px}label{font-size:14px;color:var(--muted)}input:not([type=range]):not([type=file]){width:100%;padding:10px;border:1px solid var(--line);border-radius:8px;background:#2a1036;color:white;min-height:44px}input[type=color]{padding:4px!important}.sticker-grid,.tool-row{display:grid;grid-template-columns:1fr 1fr;gap:8px}.sticker-grid button{font-size:12px;padding:10px 5px;color:var(--gold)}#pen[aria-pressed=true]{border-color:var(--pink);background:#632566}#more{margin-top:25px}#viewer{max-width:900px}#viewer img{display:block;width:100%;max-height:76dvh;object-fit:contain;margin-top:15px}[hidden]{display:none!important}@media(max-width:700px){header{padding:16px 20px}.wordmark{font-size:43px}.wordmark span{font-size:10px}.subtle{font-size:12px}main{padding:32px 20px}h1{letter-spacing:-1px}.capture{grid-template-columns:1fr;padding:24px;gap:20px}.capture h2{font-size:34px}.capture p{font-size:14px}.gallery,.queue{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.photo img{height:180px}.section-head h2{font-size:26px}.section-head{gap:10px}.section-head button{padding:10px 12px;font-size:14px}.editor-grid{grid-template-columns:1fr}.canvas-wrap canvas{max-height:48dvh}.tools{gap:8px}dialog{padding:16px}.editor-header h2{font-size:23px}footer{font-size:12px}.tabs button{font-size:14px;padding:10px 14px}}@media(prefers-reduced-motion:reduce){*{transition:none!important}}
.canvas-wrap canvas{max-height:none}

.tools h3{font-size:15px;margin:14px 0 0;color:var(--gold)}.clipart-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px}.clipart-grid button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;min-width:0;padding:8px 3px;font-size:10px;line-height:1.3}.clipart-grid img{width:40px;height:40px}.sticker-credit{font-size:10px;color:var(--muted)}#selection{font-size:12px;margin:4px 0}

/* Full-screen editor: photo and tools have independent, bounded space. */
body:has(#editor[open]){overflow:hidden}
#editor{position:fixed;inset:0;margin:0;width:100%;height:100dvh;max-width:none;max-height:none;border:0;border-radius:0;padding:0;overflow:hidden}
#editor[open]{display:flex;flex-direction:column}
#editor .editor-header{flex:none;padding:calc(10px + env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) 10px max(12px,env(safe-area-inset-left));border-bottom:1px solid var(--line);gap:8px}
#editor .editor-header h2{font-size:21px;margin:0;text-align:center}
#editor .editor-header button{padding:10px 14px;white-space:nowrap}
#editor .editor-grid{flex:1;min-height:0;display:grid;grid-template-columns:minmax(0,1fr) 360px;gap:0}
#editor .canvas-wrap{align-self:stretch;min-height:0;display:flex;flex-direction:column;padding:12px;background:#0b0410;overflow:hidden}
#canvas-stage{flex:1;min-height:0;display:flex;align-items:center;justify-content:center;overflow:hidden}
#editor canvas{flex:none;max-width:100%;max-height:100%;object-fit:fill}
#editor .canvas-wrap p{flex:none;text-align:center;margin:8px 0 0;font-size:12px}
#editor .tools{min-height:0;gap:0;overflow:hidden;border-left:1px solid var(--line);padding-bottom:env(safe-area-inset-bottom)}
.editor-tabs{display:grid;grid-template-columns:repeat(4,1fr);gap:4px;padding:8px;flex:none;border-bottom:1px solid var(--line)}
.editor-tabs button{padding:8px 3px;font-size:13px;min-height:44px;border-radius:8px}
.editor-tabs button[aria-pressed=true]{background:var(--gold);color:#260d30}
.tool-content{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;padding:12px}
.tool-content section{display:flex;flex-direction:column;gap:8px}
#editor .tools h3{margin:0 0 4px}
.selection-tools{flex:none;padding:8px 12px;border-top:1px solid var(--line);background:#230d30}
#editor #selection{line-height:1.35;min-height:32px;margin:0 0 4px}
.size-color{display:grid;grid-template-columns:1fr 64px;gap:16px;align-items:center;margin-bottom:6px}
.size-color label{display:flex;flex-direction:column;font-size:12px}
.size-color input[type=range]{width:100%;height:32px;margin:0}
#editor .size-color input[type=color]{height:32px;min-height:32px}
.selection-tools button{min-height:40px;padding:6px 10px;font-size:13px}
@media(max-width:700px) and (orientation:portrait){
 #editor .editor-grid{grid-template-columns:1fr;grid-template-rows:minmax(120px,1fr) minmax(260px,48%)}
 #editor .tools{border-left:0;border-top:1px solid var(--line)}
 #editor .canvas-wrap{padding:8px}
 #editor .editor-header h2{font-size:17px}
 #editor .editor-header button{font-size:13px;min-height:44px;padding:8px 12px}
 #editor #selection{min-height:0;font-size:11px}
 .tool-content{padding:8px 12px}
}
@media(orientation:landscape) and (max-height:500px){
 #editor .editor-grid{grid-template-columns:minmax(0,1fr) 330px}
 #editor .editor-header{padding-top:5px;padding-bottom:5px}
 #editor .editor-header button{min-height:36px;padding:5px 12px}
 #editor #selection{display:none}
 .editor-tabs{padding:4px}
 .selection-tools{padding:4px 10px}
}
