
:root{color-scheme:dark;--bg:#141416;--panel:#1c1c20;--surface:#242429;--stroke:#333339;--fg:#f7f6f4;--muted:#a8a7b0;--orange:#ff4500;--hot:#ff7544;font-family:Inter,system-ui,sans-serif}
*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--fg)}button,input,select{font:inherit}button{cursor:pointer;color:inherit;background:var(--surface);border:1px solid var(--stroke);border-radius:8px;padding:9px 12px;font-weight:650;font-size:13px}button:hover{border-color:var(--hot)}:focus-visible{outline:2px solid var(--hot);outline-offset:3px}button:disabled{cursor:default;opacity:.65}
header{height:66px;border-bottom:1px solid var(--stroke);display:flex;align-items:center;justify-content:space-between;padding:0 clamp(16px,4vw,56px);background:#19191c}.brand,.actions,.tool,.layer,.stagebar,.titleline{display:flex;align-items:center;gap:10px}.brand{font-weight:850;letter-spacing:-.035em}.brandmark{display:grid;place-items:center;background:var(--orange);border-radius:10px;width:34px;height:34px;color:#151517}.brandmark svg{width:23px}.divider{width:1px;height:24px;background:var(--stroke);margin:0 7px}.brand small,.muted{color:var(--muted);font-size:12px;font-weight:550;letter-spacing:0}.primary{background:var(--orange);color:#100c0b;border-color:var(--orange)}
main{max-width:1550px;margin:auto;padding:33px clamp(16px,4vw,56px)}h1{font-size:clamp(34px,4.5vw,60px);letter-spacing:-.075em;line-height:1;margin:0}.titleline{justify-content:space-between;margin-bottom:24px}.titleline p{margin:8px 0 0;color:var(--muted);font-size:14px}.flag{color:var(--hot);font-size:11px;font-weight:750;border:1px solid #633824;background:#291f1b;padding:6px 9px;border-radius:20px;white-space:nowrap}
.editor{display:grid;grid-template-columns:174px minmax(0,1fr) 267px;border:1px solid var(--stroke);border-radius:13px;overflow:hidden;background:var(--panel)}.sidebar,.inspector{padding:17px 13px}.sidebar{border-right:1px solid var(--stroke)}.inspector{border-left:1px solid var(--stroke);padding:17px}.section{color:var(--muted);text-transform:uppercase;font-size:10px;font-weight:800;letter-spacing:.13em;margin:0 0 12px}.tool,.layer{width:100%;text-align:left;background:transparent;border-color:transparent;margin-bottom:3px}.tool.selected,.layer.selected{background:#39251f;border-color:#67402e;color:#ffab8c}.tool svg,.layer svg,.actions svg{width:16px;height:16px;flex:none}.line{border:0;border-top:1px solid var(--stroke);margin:17px 0}.stage{min-width:0;background:#161619}.stagebar{justify-content:space-between;border-bottom:1px solid var(--stroke);min-height:44px;padding:0 14px;background:#212125}.stagebar strong{font-size:12px}.stagebar span{font-variant-numeric:tabular-nums}.board{min-height:446px;display:grid;place-items:center;padding:33px 32px;background-image:radial-gradient(#35353d 1px,transparent 1px);background-size:17px 17px}.art{position:relative;width:min(100%,545px);aspect-ratio:1.29;background:#101011;box-shadow:0 12px 32px #0009;container-type:inline-size;overflow:hidden}.art img{width:100%;height:100%;object-fit:contain;display:block}.caption{position:absolute;left:4%;width:92%;text-align:center;text-transform:uppercase;color:white;font-family:Impact,'Arial Black',sans-serif;font-weight:900;font-size:6.1cqw;line-height:1.02;letter-spacing:.01em;paint-order:stroke fill;-webkit-text-stroke:.85cqw #0d0d0d;overflow-wrap:anywhere}.caption.top{top:6%}.caption.bottom{bottom:6%}.caption.active{outline:1px solid var(--orange);outline-offset:5px}.artmark{position:absolute;right:3%;bottom:18%;width:30%;height:auto;pointer-events:none}.asset-card{display:grid;justify-items:start;gap:8px;width:min(100%,230px);text-align:left}.asset-card img{display:block;width:100%;height:45px;object-fit:contain}.asset-card[aria-pressed=true]{border-color:var(--orange)}.inspector h2{margin:0 0 15px;font-size:16px;letter-spacing:-.02em}.field{display:grid;gap:6px;margin-bottom:12px;color:var(--muted);font-size:12px;font-weight:650}.field input,.field select{color:var(--fg);width:100%;min-height:36px;background:#151518;border:1px solid #383840;border-radius:7px;padding:6px 9px;font-size:13px}.field input[type=color]{padding:4px}.pair{display:grid;grid-template-columns:1fr 1fr;gap:9px}.switch{display:flex;align-items:center;gap:8px;font-size:13px}.switch input{accent-color:var(--orange)}.layers .layer{font-size:12px;padding:8px}.gallery{margin-top:23px}.gallery h2{font-size:18px;margin:0 0 12px;letter-spacing:-.035em}.cards{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px}.card{padding:0;overflow:hidden;text-align:left;background:var(--panel)}.card[aria-pressed=true]{border-color:var(--orange)}.card img{width:100%;height:clamp(72px,8vw,122px);object-fit:cover;display:block;background:#141416}.card span{display:block;padding:9px 11px}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}.status{min-height:18px;margin:12px 0 0;color:var(--muted);font-size:12px}[hidden]{display:none!important}
@media(max-width:1000px){.editor{grid-template-columns:135px minmax(0,1fr) 222px}.board{padding:20px;min-height:360px}}
@media(max-width:750px){.editor{grid-template-columns:minmax(0,1fr)}.sidebar{display:flex;gap:4px;flex-wrap:wrap;border-right:0;border-bottom:1px solid var(--stroke);padding:8px}.sidebar .section,.sidebar .line{display:none}.sidebar .tool{width:auto;margin:0;padding:7px}.inspector{border:0;border-top:1px solid var(--stroke);display:grid;grid-template-columns:1fr 1fr;gap:15px}.inspector .line{display:none}.board{min-height:0;padding:22px 18px}.cards{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:420px){.brand small,.divider,.actions svg{display:none}.brandmark{width:29px;height:29px}.titleline{align-items:start}.flag{margin-top:4px}.inspector{grid-template-columns:1fr}.cards{grid-template-columns:repeat(2,minmax(0,1fr))}}
 .assets-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}.assets-heading h2{margin:0}.asset-list{display:flex;flex-wrap:wrap;gap:12px}.asset-card span{overflow-wrap:anywhere}.art .artmark{width:30%;height:auto}.art .user-asset{position:absolute;height:auto;object-fit:contain;cursor:move;touch-action:none;user-select:none}.user-asset.active{outline:2px solid var(--orange);outline-offset:2px}.asset-help{color:var(--muted);font-size:12px}
 
.art .caption{bottom:auto;cursor:move;touch-action:none;user-select:none}
.caption .resize-caption{position:absolute;right:-5px;bottom:-5px;width:14px;height:14px;padding:0;border:2px solid white;border-radius:2px;background:var(--orange);cursor:nwse-resize;touch-action:none;display:none}
.caption.active .resize-caption{display:block}
.layer-group{border:1px solid var(--stroke);border-radius:8px;margin:10px 0;padding:8px}
.layer-group-header{display:flex;align-items:center;justify-content:space-between;gap:5px;margin-bottom:5px;font-size:12px}
.layer-group-header button{padding:3px 7px}
.layers .layer{overflow-wrap:anywhere}
.layer-actions{display:flex;gap:6px;flex-wrap:wrap}
.layer-group{min-height:62px}.layers .layer{cursor:grab;touch-action:none}.layers .layer:active{cursor:grabbing}.layer-group.drop-target{border-color:var(--orange);background:#39251f}.layer.drop-before{box-shadow:0 -2px var(--orange)}.layer.drop-after{box-shadow:0 2px var(--orange)}

.field textarea{font:inherit;color:var(--fg);width:100%;background:#151518;border:1px solid #383840;border-radius:7px;padding:9px;resize:vertical}
.art .caption{height:18%;min-height:0}
.caption-content{display:block;white-space:pre-wrap;width:100%;height:100%;overflow:hidden}
.art .user-asset{position:absolute}
.art .user-asset img{width:100%;height:100%;object-fit:fill;pointer-events:none}
.resize-handle{position:absolute;width:13px;height:13px;padding:0;border:2px solid white;border-radius:2px;background:var(--orange);touch-action:none;display:none;z-index:1}
.active>.resize-handle{display:block}
.resize-handle.width{right:-5px;top:calc(50% - 6px);cursor:ew-resize}
.resize-handle.height{bottom:-5px;left:calc(50% - 6px);cursor:ns-resize}
.resize-handle.both{right:-5px;bottom:-5px;cursor:nwse-resize}

.brandlogo{display:block;width:150px;height:50px;object-fit:contain}
.brand{gap:8px}.brandlogo+ .divider{margin-left:2px}
.art .user-asset .artmark{position:static;width:100%;height:100%;object-fit:fill}
.resize-handle.left{left:-5px;top:calc(50% - 6px);cursor:ew-resize}
.resize-handle.right{right:-5px;top:calc(50% - 6px);cursor:ew-resize}
.resize-handle.top{top:-5px;left:calc(50% - 6px);cursor:ns-resize}
.resize-handle.bottom{bottom:-5px;left:calc(50% - 6px);cursor:ns-resize}
.resize-handle.corner{right:-5px;bottom:-5px;cursor:nwse-resize}
@media(max-width:750px){.brandlogo{width:100px;height:38px}.brand{font-size:12px}}
@media(max-width:420px){.brandlogo{width:80px}.brand{font-size:10px;gap:4px}}
#exportFormat{background:var(--surface);color:var(--fg);border:1px solid var(--stroke);border-radius:8px;padding:8px;font:inherit;font-size:12px}@media(max-width:420px){header{padding:0 8px}.actions{gap:4px}.actions button{padding:8px}}
.home-link{color:var(--hot);font-size:13px;text-decoration:none;white-space:nowrap}.home-link:hover{text-decoration:underline}.privacy-note{color:var(--muted);font-size:13px;line-height:1.5;max-width:850px}.titleline{flex-wrap:wrap}.titleline>div{min-width:0}

/* Shared integration controls; editor design retained. */
.editor-privacy{padding:0 clamp(16px,4vw,56px) 24px}.editor-privacy p{margin:0}


.external-confirm{width:min(440px,calc(100vw - 40px));max-height:calc(100dvh - 40px);box-sizing:border-box;padding:26px;border:1px solid #555;border-radius:14px;background:#1a1d1f;color:#fff;box-shadow:0 24px 90px #0009}

.external-confirm::backdrop{background:rgba(0,0,0,.78)}

.external-confirm h2{font-size:24px;margin:0 0 14px}

.external-confirm p{font-size:15px;line-height:1.5;margin:10px 0}

.external-confirm-url{display:block;max-height:150px;overflow:auto;overflow-wrap:anywhere;padding:12px;border-radius:6px;background:#0c0e0f;color:#ccc;font:12px/1.5 monospace}

.external-confirm-actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:22px}

.external-confirm-actions button,.external-confirm-actions a{border:1px solid #62676b;border-radius:7px;padding:11px 16px;font:600 14px/1.2 sans-serif;cursor:pointer;text-decoration:none;background:#292d30;color:white}

.external-confirm-actions a{background:#ff4500;border-color:#ff4500}

body.external-confirm-open{overflow:hidden}
