@font-face{font-family:PostcardRuslan;src:url("assets/postcard/ruslan.ttf") format("truetype");font-weight:400;font-display:swap}
@font-face{font-family:PostcardPress;src:url("assets/postcard/press-start.ttf") format("truetype");font-weight:400;font-display:swap}
@font-face{font-family:PostcardYanone;src:url("assets/postcard/yanone.ttf") format("truetype");font-weight:200 700;font-display:swap}
.we-editor{container-type:inline-size;--line:#d4d9e2;--ink:#202b40;--blue:#245bb8;background:#fff;color:var(--ink);font:15px/1.4 Tahoma,Arial,sans-serif;padding:18px 20px 0}
.we-editor *{box-sizing:border-box}
.we-editor [hidden]{display:none!important}
.we-head{display:flex;align-items:baseline;justify-content:space-between;gap:10px;margin:0 0 11px}
.we-editor .we-head h2{margin:0;font:bold 24px/1.15 Tahoma,Arial,sans-serif;color:#172e56;letter-spacing:-.045em}
.we-count{font-size:13px;color:#59677d}
.we-workbench{display:grid;grid-template-columns:minmax(0,1.18fr) minmax(0,1fr);gap:18px;align-items:start}
.we-stage{min-width:0;display:grid;align-content:center;padding:13px 10px;background:linear-gradient(145deg,#f1f2f5,#e8eaf0);border:1px solid #d8dce5;border-radius:5px;align-self:stretch}
.we-book{width:100%;max-width:540px;aspect-ratio:1200/810;margin:auto;perspective:1150px;position:relative}
.we-assembly,.we-pages,.we-spread,.we-handles{position:absolute;inset:0;width:100%;height:100%}
.we-assembly{transform:translateX(-25%);transform-style:preserve-3d}
.we-pages{opacity:0;pointer-events:none}
.we-spread{display:block;background:#fff;box-shadow:0 2px 7px #30395030}
.we-leaf{position:absolute;top:0;left:50%;width:50%;height:100%;z-index:2;transform-origin:left center;transform-style:preserve-3d;transform:rotateY(0);pointer-events:none}
.we-cover,.we-verso{position:absolute;inset:0;display:block;width:100%;height:100%;backface-visibility:hidden;-webkit-backface-visibility:hidden;background:#fff;box-shadow:2px 4px 9px #27314930}
.we-cover{transform:translateZ(.7px)}
.we-verso{transform:rotateY(180deg) translateZ(.7px)}
.we-unfolded .we-assembly{transform:translateX(0)}
.we-unfolded .we-pages{opacity:1;pointer-events:auto}
.we-unfolded .we-leaf{transform:rotateY(-180deg);visibility:hidden}
.we-turning .we-assembly{transition:transform .65s ease-in-out}
.we-turning .we-leaf{visibility:visible;transition:transform .67s cubic-bezier(.48,.05,.2,.99)}
.we-turning .we-pages{pointer-events:none;animation:we-page-close .65s both}
.we-turning .we-unfolded .we-pages{animation:we-page-open .65s both}
@keyframes we-page-open{0%{opacity:1;clip-path:inset(0 0 0 50%)}43%{opacity:1;clip-path:inset(0 0 0 50%)}100%{opacity:1;clip-path:inset(0)}}
@keyframes we-page-close{0%{opacity:1;clip-path:inset(0)}55%{opacity:1;clip-path:inset(0 0 0 50%)}99%{opacity:1;clip-path:inset(0 0 0 50%)}100%{opacity:0}}
.we-handles{pointer-events:none}
.we-editor .we-handles button{position:absolute;display:block;transform:translate(-50%,-50%) rotate(var(--turn));padding:0;margin:0;min-width:0;min-height:0;border:1.5px solid transparent;box-shadow:none;background:transparent;border-radius:3px;touch-action:none;cursor:grab;pointer-events:auto}
.we-editor .we-handles button[aria-pressed=true],.we-editor .we-handles button:hover{border:1.5px dashed #1765b1;background:#bedbff18}
.we-editor .we-handles button:active{cursor:grabbing}
.we-editor .we-resize{position:absolute;z-index:3;min-width:0;min-height:0;width:26px;height:26px;transform:translate(-25%,-25%);margin:0;padding:0;border:0;background:transparent;box-shadow:none;touch-action:none;cursor:nwse-resize}
.we-editor .we-resize::after{content:"";position:absolute;left:4px;top:4px;width:12px;height:12px;border:2px solid #fff;border-radius:2px;background:#2265b7;box-shadow:0 0 0 1px #265086}
.we-editor .we-rotate{position:absolute;z-index:3;display:grid;place-items:center;width:30px;height:30px;min-width:0;min-height:0;transform:translate(-50%,-50%);padding:0;margin:0;border:0;background:transparent;box-shadow:none;touch-action:none;cursor:grab}
.we-editor .we-rotate:active{cursor:grabbing}
.we-rotate span{display:grid;place-items:center;width:19px;height:19px;border:1px solid #fff;border-radius:50%;background:#2265b7;box-shadow:0 0 0 1px #265086;color:white;font:700 16px/1 Arial,sans-serif}
.we-handles.we-outside .we-sticker[aria-pressed=true]{border-color:#b23e2e;background:#c14b2c33;cursor:no-drop}

.we-cover-tools,.we-inside-tools{display:grid;align-content:start;gap:13px;min-width:0}
.we-editor label,.we-editor legend{display:block;color:#2e405a;font:bold 14px/1.35 Tahoma,Arial,sans-serif}
.we-editor fieldset{min-width:0;border:0;margin:0;padding:0}
.we-editor legend{padding:0 0 5px}
.we-editor input:not([type=file],[type=range]),.we-editor textarea,.we-editor select{display:block;width:100%;min-width:0;margin-top:4px;border:1px solid #a5b4cb;border-radius:3px;background:#fff;color:#18283e;font:16px/1.22 Tahoma,Arial,sans-serif;padding:8px 9px}
.we-editor textarea{resize:vertical;min-height:76px;max-height:165px}
.we-editor button,.we-editor .we-upload-label{font:14px/1.2 Tahoma,Arial,sans-serif;cursor:pointer;text-transform:none;letter-spacing:normal;color:#273b5e}
.we-editor .we-height{display:flex;align-items:center;gap:12px}
.we-caption-height{flex:1;min-width:0;height:28px;margin:0;accent-color:#245fb4;cursor:pointer}
.we-editor :is(button,input,textarea,select):focus-visible,.we-upload-label:focus-within{outline:2px solid #2263b9;outline-offset:2px}
.we-gallery{max-height:156px;overflow:auto;scrollbar-width:thin;scrollbar-color:#afbed2 #edf0f5;padding:2px 5px 3px 2px}
.we-library{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:5px}
.we-editor .we-library button{position:relative;width:100%;aspect-ratio:1;min-width:0;padding:2px;overflow:hidden;background:#fff;border:1px solid #c3cad7;border-radius:3px;box-shadow:none;line-height:0}
.we-library img{display:block;width:100%;height:100%;object-fit:cover}
.we-editor .we-library button[aria-pressed=true]{outline:2px solid #2265c5;outline-offset:-1px;border-color:#2265c5}
.we-library button[aria-pressed=true]::after{content:"✓";position:absolute;right:1px;bottom:1px;padding:2px 3px;background:#2265c5;color:white;font:bold 11px/1 Tahoma,sans-serif}
.we-editor .we-upload-label{position:relative;display:inline-block;margin:6px 0 0;padding:3px 0;color:#245ca9;text-decoration:underline;text-underline-offset:2px}
.we-upload-label input{position:absolute;inset:0;opacity:0;width:100%;height:100%;cursor:pointer}
.we-selected-upload::after{content:" ✓";font-weight:bold}
.we-arts{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:3px}
.we-editor .we-arts button{display:grid;align-content:center;justify-items:center;gap:3px;min-width:0;min-height:44px;padding:4px 1px;background:#fff;border:1px solid #ced3dc;border-radius:3px;box-shadow:none}
.we-arts button[aria-pressed=true]{outline:2px solid #2866b9;outline-offset:-1px}
.we-arts button b{font:bold 21px/1.1 Georgia,serif}
.we-arts button span{font:11px/1.1 Tahoma,sans-serif}
.we-arts [data-style="0"] b{font-family:PostcardRuslan,serif;color:#a944bb;text-shadow:1px 1px #69dffb,-1px -1px #ffc138}
.we-arts [data-style="1"] b{color:#354a68;text-shadow:0 -1px #b4dffa,1px 1px #9dbad1;font-style:italic}
.we-arts [data-style="2"] b{color:#aa6512;text-shadow:1px 1px #ffe076;font-style:italic}
.we-arts [data-style="3"] b{color:#b02cad;text-shadow:-1px 0 #00bace,1px 0 #f478a7}
.we-arts [data-style="4"] b{color:#c44216;text-shadow:0 -1px #ffba2c;font-family:PostcardRuslan,serif}
.we-arts [data-style="5"] b{font:15px/1.54 PostcardPress,monospace;color:#29594c}
.we-arts [data-style="6"] b{font-family:PostcardYanone,sans-serif;color:#1a54a6;text-shadow:1px 1px #9dbfeb}
.we-sticker-panel{display:grid;gap:8px}
.we-editor :is(.we-actions button,.we-stickers-toggle){padding:8px 12px;min-height:37px;background:linear-gradient(#fff,#eff1f5);border:1px solid #a5b2c5;border-radius:4px;box-shadow:inset 0 1px #fff}
.we-editor .we-stickers-toggle{justify-self:start}
.we-editor .we-primary{background:#205eb6!important;color:#fff!important;border-color:#194c96!important;box-shadow:inset 0 1px #6d98d4!important;font-weight:bold!important}
.we-status:not(:empty){margin:8px 0 0;color:#925022;font-size:14px}
.we-actions{display:flex;align-items:center;justify-content:space-between;gap:8px;border-top:1px solid var(--line);margin:15px -20px 0;padding:11px 20px max(15px,env(safe-area-inset-bottom))}
.we-actions button{min-height:40px}
.we-actions button:disabled{opacity:.6}
@container(max-width:620px){
.we-workbench{grid-template-columns:1fr;gap:10px}
.we-head{margin-bottom:8px}.we-editor .we-head h2{font-size:21px}
.we-stage{padding:7px 12px}.we-book{max-width:310px}
.we-cover-tools,.we-inside-tools{gap:8px}
.we-gallery{max-height:95px}
.we-library{grid-template-columns:repeat(7,minmax(0,1fr));gap:4px}
.we-editor .we-upload-label{margin-top:3px}
.we-editor .we-arts button{min-height:43px}
.we-actions{margin-top:11px}
.we-actions button{min-height:44px}
}
@media(max-width:550px){
.we-editor{padding:10px 11px 0}
.we-actions{margin-left:-11px;margin-right:-11px;padding-left:11px;padding-right:11px;padding-bottom:max(14px,env(safe-area-inset-bottom))}
}
@media(max-height:680px) and (max-width:620px){
.we-stage .we-book{max-width:230px}.we-gallery{max-height:64px}
}
@media(prefers-reduced-motion:reduce){
.we-editor .we-assembly,.we-editor .we-leaf,.we-editor .we-pages{animation:none!important;transition:none!important}
}
