/* Pastegram v71.12: compact, consistent editor panels and canvas actions */
:root {--pg712-accent:#5167f7;--pg712-line:#e1e7f1;--pg712-curve:16px}
#quick-sidebar,#quick-sidebar #panel{min-width:0;box-sizing:border-box}
#quick-sidebar #panel{overflow-x:hidden;overflow-wrap:break-word}
#quick-sidebar #panel :is(button,input,select,textarea){max-width:100%;box-sizing:border-box}
#quick-sidebar #panel :is(button,select,input:not([type="range"]):not([type="color"]),textarea){border-radius:12px}
#quick-sidebar #panel input[type="number"],#quick-sidebar #panel input[type="text"]{min-width:0;width:100%}
#quick-sidebar #panel :is(.fields,.button-grid,.pg65-action-grid,.pg65-preset-grid){min-width:0;column-gap:9px;row-gap:9px}
#quick-sidebar #panel :is(.fields,.button-grid,.pg65-action-grid) > *{min-width:0}
#quick-sidebar #panel button{font-family:Outfit,system-ui,sans-serif;transition:background-color .15s ease,border-color .15s ease,box-shadow .15s ease}
#quick-sidebar #panel button:focus-visible,#top-tools button:focus-visible,.floating-tools button:focus-visible{outline:3px solid #90aeff!important;outline-offset:2px}
#quick-sidebar #panel :is(button,input,select){touch-action:manipulation}
#quick-sidebar #panel :is(h2,h3,h4){letter-spacing:-.02em;line-height:1.25}
#quick-sidebar #panel :is(label,p,small){line-height:1.45}
#quick-sidebar #panel :is(input[type="color"]){width:100%;min-height:39px;cursor:pointer;padding:4px;border:1px solid var(--pg712-line);background:#fff}
#quick-sidebar #panel :is(input[type="range"]){accent-color:var(--pg712-accent)}
#quick-sidebar #panel :is(select){min-height:42px;cursor:pointer}
#quick-sidebar #panel button{min-height:40px;overflow-wrap:anywhere;white-space:normal}
#quick-sidebar #panel :is(.card,.tool-card,.panel-card){min-width:0;max-width:100%;box-sizing:border-box}
/* Keep multi-page and annotate groups readable in the 250-320px settings column. */
#quick-sidebar #panel :is(.pg70-card,.pg70-box,.pg65-card,.pg67-card,.pg68-card){min-width:0;max-width:100%;box-sizing:border-box}
#quick-sidebar #panel :is(.pg70-card,.pg70-box,.pg65-card,.pg67-card,.pg68-card) button{white-space:normal}
/* Canvas toolbar — compact elevated chips, with horizontal scroll rather than clipping. */
#top-tools{min-width:0;max-width:100%;overflow-x:auto;overflow-y:hidden;scrollbar-width:thin;overscroll-behavior-x:contain;gap:7px!important;padding:8px 10px!important}
#top-tools button{flex-shrink:0;min-height:38px!important;padding:8px 12px!important;border:1px solid #e0e7f4!important;border-radius:13px!important;background:linear-gradient(180deg,#fff,#f6f8ff)!important;color:#22314c!important;box-shadow:0 3px 10px #223e7710!important;font-weight:700!important;white-space:nowrap!important}
#top-tools button:hover{border-color:#a9bcfa!important;background:#edf2ff!important}
#top-tools button.active{background:linear-gradient(130deg,#4968fa,#654ef1)!important;color:#fff!important;border-color:transparent!important}
/* Workspace action strip and preview controls */
#workspace :is(.floating-tools,.workspace-heading){min-width:0;box-sizing:border-box}
#workspace .floating-tools{border:1px solid #e4eafa!important;border-radius:19px!important;padding:8px!important;gap:7px!important;box-shadow:0 8px 28px #1d345a18!important;background:#ffffffed!important;backdrop-filter:blur(14px)}
#workspace .floating-tools button{border:1px solid #e1e8f4!important;border-radius:13px!important;background:#fff!important;min-width:49px;min-height:49px;padding:7px!important;transition:background-color .15s ease,transform .15s ease}
#workspace .floating-tools button:hover{background:#eaf0ff!important;transform:translateY(-1px)}
#workspace .workspace-heading button{border-radius:12px!important}
/* Refine the v71.11 welcome, retaining original controls and actions */
dialog.pg7111-welcome{border-radius:30px!important;background:radial-gradient(circle at 92% 0%,#354f92 0,transparent 39%),linear-gradient(158deg,#172a4a,#101b30 75%)!important;box-shadow:0 30px 100px #06132bab!important}
dialog.pg7111-welcome .pg7111-orb{border-radius:21px!important;background:linear-gradient(140deg,#477fff,#6850ef)!important}
dialog.pg7111-welcome .pg7111-upload,dialog.pg7111-welcome .pg7111-blank{transition:transform .15s ease,border-color .15s ease,filter .15s ease;outline-offset:3px}
dialog.pg7111-welcome .pg7111-upload:hover,dialog.pg7111-welcome .pg7111-blank:hover{transform:translateY(-1px);filter:brightness(1.07)}
dialog.pg7111-welcome .pg7111-blank{border-color:#637399!important;background:linear-gradient(130deg,#2c405e,#22344e)!important}
/* Dark mode remains legible */
html[data-theme="dark"] #top-tools button{background:#1d2b44!important;color:#edf3ff!important;border-color:#3d4b67!important;box-shadow:none!important}
html[data-theme="dark"] #top-tools button.active{background:linear-gradient(130deg,#4968fa,#654ef1)!important;color:#fff!important}
html[data-theme="dark"] #workspace .floating-tools{background:#1b2943f5!important;border-color:#415274!important}
html[data-theme="dark"] #workspace .floating-tools button{background:#253653!important;border-color:#435471!important;color:#fff!important}
html[data-theme="dark"] #workspace .floating-tools button:hover{background:#354a72!important}
html[data-theme="dark"] #quick-sidebar #panel input[type="color"]{background:#273955;border-color:#475c7c}
@media(max-width:900px){
 #top-tools{padding:7px!important;gap:6px!important}
 #top-tools button{min-height:37px!important;padding:7px 10px!important;font-size:12px!important}
 #workspace .floating-tools{max-width:calc(100vw - 20px);overflow-x:auto;flex-wrap:nowrap!important}
 dialog.pg7111-welcome{padding:24px 18px!important;max-height:calc(100dvh - 22px)!important}
}
