 
:root{--studio-accent:#13776d;--studio-soft:#e7f5f0;--studio-warn:#865506;--studio-warn-bg:#fff8e9}
[data-theme=dark]{--studio-accent:#62d8bd;--studio-soft:#183c36;--studio-warn:#f1cb80;--studio-warn-bg:#332b1c}
[hidden]{display:none!important}
.studio-nav{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:10px;margin:0 0 22px}
.tool-card{background:var(--surface);border:1px solid var(--line);color:var(--ink);border-radius:15px;padding:16px 8px;min-height:104px;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:10px;cursor:pointer;font:inherit;transition:background .15s,border .15s}
.tool-card:hover,.tool-card[aria-pressed=true]{border-color:var(--studio-accent);background:var(--studio-soft)}
.tool-card svg{width:25px;height:25px;fill:none;stroke:var(--studio-accent);stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.tool-card strong{font-size:13px}.studio-topline{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:16px;flex-wrap:wrap}
.studio-topline h2{font-size:20px;margin:0 0 6px}.studio-topline p{margin:0;font-size:12px;color:var(--muted);line-height:1.8}
.studio-grid{display:grid;grid-template-columns:minmax(0,1fr) 330px;gap:20px;align-items:start}
.studio-workspace{min-width:0;overflow:hidden}.studio-controls{padding:14px 18px;display:flex;gap:8px;flex-wrap:wrap;align-items:center;border-bottom:1px solid var(--line)}
.studio-controls .button{font-size:12px;min-height:40px}.studio-controls .field{margin:0;flex:1 1 180px}.studio-controls input{min-width:0;width:100%}
.studio-selection{display:flex;gap:9px;align-items:center;flex-wrap:wrap;padding:12px 18px;font-size:12px;background:var(--studio-soft)}
.studio-selection .text-button{font-size:12px;padding:6px;min-height:36px}.studio-selection strong{margin-inline-end:auto}
.pdf-drop{padding:34px 20px;text-align:center;border:2px dashed var(--line);border-radius:16px;margin:20px;min-height:230px;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:13px}
.pdf-drop svg{width:48px;height:48px;stroke:var(--studio-accent);fill:none;stroke-width:1.3}.pdf-drop h3{font-size:22px;margin:0}.pdf-drop p{max-width:400px;font-size:13px;color:var(--muted);line-height:1.9;margin:0}
.pdf-drop.file-over{background:var(--studio-soft);border-color:var(--studio-accent)}
.pdf-list{list-style:none;margin:0;padding:18px;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.pdf-card{border:1px solid var(--line);border-radius:13px;overflow:hidden;min-width:0;background:var(--surface)}
.pdf-card.selected{border-color:var(--studio-accent)}.pdf-card-head{display:flex;align-items:center;justify-content:space-between;padding:10px 12px;gap:8px;font-size:12px}
.pdf-card-head label{display:flex;gap:7px;align-items:center;cursor:pointer;min-height:30px}.pdf-card-head input{accent-color:var(--studio-accent);width:19px;height:19px}
.pdf-page-art{margin:0 12px 10px;background:var(--bg);border-radius:8px;min-height:110px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;cursor:pointer;border:0;width:calc(100% - 24px);color:var(--ink);font:inherit}
.pdf-page-art strong{font-size:28px;font-variant-numeric:tabular-nums;letter-spacing:-1px}.pdf-page-art span{font-size:11px;color:var(--muted)}
.pdf-page-art small{font-size:9px;letter-spacing:1.4px;color:var(--studio-accent);font-weight:700}
.pdf-card-info{padding:0 12px 10px}.pdf-card-info strong{display:block;font-size:11px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:1.9}.pdf-card-info span{font-size:10px;color:var(--muted);line-height:1.7}
.pdf-card-actions{display:grid;grid-template-columns:repeat(5,1fr);border-top:1px solid var(--line);padding:3px}
.pdf-card-actions button{font:inherit;font-size:17px;min-height:39px;min-width:0;border:0;border-radius:7px;background:transparent;color:var(--ink);cursor:pointer}.pdf-card-actions button:hover{background:var(--studio-soft)}.pdf-card-actions button:disabled{opacity:.3;cursor:default}
.pdf-pagination{display:flex;gap:14px;align-items:center;justify-content:center;padding:5px 18px 18px;font-size:12px}.pdf-pagination button{min-height:40px}
.studio-summary{display:flex;justify-content:space-between;flex-wrap:wrap;gap:10px;padding:14px 18px;border-top:1px solid var(--line);font-size:11px;color:var(--muted)}
.studio-sidebar{padding:20px}.studio-sidebar h3{font-size:15px;margin:0 0 18px}.studio-sidebar .field{margin-bottom:15px}.studio-sidebar .field>span{font-size:12px}.studio-sidebar textarea{width:100%;min-height:100px;resize:vertical;background:var(--bg);color:var(--ink);border:1px solid var(--line);border-radius:10px;padding:12px;font:inherit;font-size:16px;line-height:1.7}
.studio-sidebar input[type=color]{width:100%;height:43px;border:1px solid var(--line);border-radius:10px;padding:5px;background:var(--surface)}
.studio-sidebar .button{width:100%;margin-top:6px}.studio-sidebar .field-row{gap:10px}.studio-sidebar details{margin-bottom:14px;font-size:12px}.studio-sidebar details summary{cursor:pointer;min-height:35px}
.studio-notice{background:var(--studio-warn-bg);color:var(--studio-warn);border-radius:10px;padding:12px 14px;font-size:11px;line-height:1.9;margin:14px 0;overflow-wrap:anywhere}
.studio-note{font-size:11px;line-height:1.9;color:var(--muted);margin:10px 0}.studio-export{border-top:1px solid var(--line);margin:18px -20px -20px;padding:18px 20px 20px}
.studio-storage{padding:18px 22px;margin-top:20px}.storage-head{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}.storage-head h3{margin:0;font-size:14px}.storage-head .text-button{font-size:12px}
.storage-content{padding-top:15px}.storage-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px}.storage-actions button{font-size:12px;min-height:40px}.storage-content .toggle-row{justify-content:flex-start;gap:14px;min-height:44px}.storage-content .toggle-row input{flex-shrink:0}
.offline-chip{display:inline-flex;align-items:center;gap:7px;border:1px solid var(--line);border-radius:99px;font-size:10px;padding:7px 11px;background:var(--surface);color:var(--muted)}
.offline-chip::before{content:'';width:6px;height:6px;background:var(--studio-accent);border-radius:50%;flex-shrink:0}
.studio-error-list{font-size:13px;line-height:1.9;max-height:45vh;overflow:auto;padding-inline-start:20px;overflow-wrap:anywhere}
.pdf-preview-modal{width:min(1000px,96vw);max-width:none;padding:20px}.pdf-preview-modal h2{margin:0 0 14px;font-size:18px;max-width:85%;overflow-wrap:anywhere}
.pdf-preview-modal iframe{width:100%;height:65dvh;min-height:280px;border:1px solid var(--line);border-radius:10px;background:#eceef2;display:block}
.preview-actions{display:flex;gap:10px;justify-content:space-between;align-items:center;margin-top:12px;flex-wrap:wrap}.preview-actions p{font-size:11px;color:var(--muted);margin:0;max-width:600px;line-height:1.8}
.signature-pad{border:1px dashed var(--line);border-radius:10px;background:#fff;width:100%;height:160px;touch-action:none;display:block;cursor:crosshair}
.signature-toolbar{display:flex;align-items:center;justify-content:space-between;margin:4px 0 10px;font-size:11px;color:var(--muted)}
.studio-progress-line{display:flex;justify-content:space-between;gap:12px;font-size:12px;margin-bottom:12px}.studio-progress-line span{overflow-wrap:anywhere}
#studio-toast{position:fixed;inset-inline:20px;bottom:max(22px,env(safe-area-inset-bottom));max-width:580px;margin:auto;z-index:2000;background:var(--ink);color:var(--surface);padding:15px 20px;border-radius:13px;font-size:13px;line-height:1.8;box-shadow:0 10px 35px #0003;overflow-wrap:anywhere}
#studio-toast.error{background:#8a293b;color:white}
.studio-range{direction:ltr;text-align:left}.studio-range::placeholder{font-size:12px}
#studio-panel .panel{background:var(--surface)}
@media(min-width:1200px){.studio-grid{grid-template-columns:minmax(0,1fr) 350px}.pdf-list{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:850px){.studio-nav{grid-template-columns:repeat(3,minmax(0,1fr))}.studio-grid{grid-template-columns:1fr}.studio-sidebar{order:2}.pdf-list{grid-template-columns:repeat(3,minmax(0,1fr))}.studio-topline h2{font-size:18px}}
@media(max-width:520px){.studio-nav{gap:7px;margin-bottom:20px}.tool-card{min-height:88px;padding:12px 4px;gap:8px;border-radius:12px}.tool-card strong{font-size:10px}.tool-card svg{width:23px;height:23px}.studio-topline p{font-size:11px}.pdf-list{grid-template-columns:repeat(2,minmax(0,1fr));padding:12px;gap:9px}.pdf-card-head{padding:7px 9px;font-size:11px}.pdf-card-info{padding-inline:9px}.pdf-card-actions button{font-size:17px;min-height:41px}.studio-controls{padding:12px;gap:6px}.studio-controls .button{padding-inline:10px}.studio-selection{padding:9px 12px;gap:7px}.studio-selection strong{width:100%}.pdf-drop{margin:12px;min-height:230px;padding:24px 13px}.pdf-drop h3{font-size:20px}.studio-sidebar{padding:18px}.studio-export{margin-inline:-18px;margin-bottom:-18px}.studio-summary{font-size:10px;padding:12px}.studio-storage{padding:16px}.storage-content .toggle-row{font-size:11px}.storage-head h3{font-size:13px}.pdf-preview-modal{padding:16px;width:96vw}.pdf-preview-modal iframe{height:60dvh}.hero h1{font-size:30px}}
@media(max-width:350px){.tool-card strong{font-size:9px}.pdf-card-head input{width:17px;height:17px}.pdf-page-art{min-height:90px}.pdf-card-actions{grid-template-columns:repeat(3,1fr)}.pdf-card-actions button{min-height:36px}.studio-controls .button{font-size:11px}.studio-selection .text-button{font-size:10px}}
