/* SPMC Office Studio v0.11.56 */
.office-hero{display:flex;justify-content:space-between;gap:18px;align-items:center;padding:22px;border-radius:20px;background:linear-gradient(135deg,color-mix(in srgb,var(--accent) 18%,var(--surface)),var(--surface));border:1px solid var(--border)}
.office-launch-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:14px;margin-top:18px}.office-launch{padding:20px;border:1px solid var(--border);border-radius:18px;background:var(--surface);cursor:pointer;transition:.18s ease;text-align:left;color:inherit}.office-launch:hover{transform:translateY(-3px);border-color:var(--accent);box-shadow:0 14px 30px rgba(15,23,42,.1)}.office-launch .office-icon{font-size:34px}.office-launch h3{margin:10px 0 5px}.office-launch p{margin:0;color:var(--muted);font-size:13px;line-height:1.45}
.office-shell{display:none;margin-top:18px;border:1px solid var(--border);border-radius:18px;overflow:hidden;background:var(--surface)}.office-shell.active{display:block}.office-app-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 14px;border-bottom:1px solid var(--border);background:color-mix(in srgb,var(--surface) 90%,var(--accent) 10%)}.office-app-head h3{margin:0}.office-actions{display:flex;gap:8px;flex-wrap:wrap}.office-toolbar{display:flex;gap:7px;align-items:center;flex-wrap:wrap;padding:10px 12px;border-bottom:1px solid var(--border);background:var(--surface)}.office-toolbar select,.office-toolbar input[type=number],.office-toolbar input[type=color]{width:auto;min-width:70px;padding:8px}.office-tool-btn{border:1px solid var(--border);background:var(--surface);color:inherit;border-radius:9px;padding:8px 10px;cursor:pointer}.office-tool-btn:hover{border-color:var(--accent)}
.writer-layout{display:grid;grid-template-columns:220px 1fr;min-height:610px}.office-files{border-right:1px solid var(--border);padding:12px;background:color-mix(in srgb,var(--surface) 96%,var(--accent) 4%);overflow:auto}.office-files h4{margin:0 0 10px}.office-file-item{padding:10px;border:1px solid transparent;border-radius:10px;cursor:pointer;margin-bottom:7px}.office-file-item:hover,.office-file-item.active{background:var(--surface);border-color:var(--border)}.office-file-item b{display:block}.office-file-item small{color:var(--muted)}.writer-work{padding:22px;background:#e8ebef;overflow:auto}.writer-page{max-width:816px;min-height:1056px;margin:auto;background:#fff;color:#111;padding:72px 76px;box-shadow:0 8px 24px rgba(0,0,0,.14);outline:none;line-height:1.55}.writer-title{width:100%;border:0!important;border-bottom:1px solid var(--border)!important;border-radius:0!important;font-size:18px;font-weight:700;background:transparent!important}
.sheet-layout{display:grid;grid-template-columns:220px 1fr;min-height:600px}.sheet-main{overflow:auto;padding:0}.sheet-formula{display:flex;gap:8px;padding:9px;border-bottom:1px solid var(--border)}.sheet-formula input{flex:1}.sheet-grid{border-collapse:collapse;min-width:1100px;background:var(--surface)}.sheet-grid th,.sheet-grid td{border:1px solid var(--border);min-width:105px;height:34px;padding:0}.sheet-grid th{position:sticky;top:0;background:color-mix(in srgb,var(--surface) 90%,var(--accent) 10%);z-index:2;text-align:center}.sheet-grid .row-head{position:sticky;left:0;min-width:44px;background:color-mix(in srgb,var(--surface) 90%,var(--accent) 10%);z-index:1}.sheet-cell{width:100%;height:100%;border:0!important;border-radius:0!important;padding:6px!important;background:transparent!important;color:inherit}.sheet-cell.selected{outline:2px solid var(--accent);outline-offset:-2px}.sheet-tabs{display:flex;gap:6px;padding:9px;border-top:1px solid var(--border)}
.slides-layout{display:grid;grid-template-columns:210px 1fr 230px;min-height:620px}.slide-thumbs{border-right:1px solid var(--border);padding:10px;overflow:auto}.slide-thumb{aspect-ratio:16/9;background:#fff;color:#111;border:2px solid transparent;border-radius:8px;margin-bottom:10px;padding:9px;overflow:hidden;cursor:pointer;font-size:9px}.slide-thumb.active{border-color:var(--accent)}.slide-stage-wrap{background:#dfe3e8;padding:24px;display:grid;place-items:center;overflow:auto}.slide-stage{position:relative;width:min(900px,100%);aspect-ratio:16/9;background:#fff;color:#111;box-shadow:0 8px 24px rgba(0,0,0,.16);overflow:hidden}.slide-element{position:absolute;min-width:80px;min-height:30px;padding:6px;border:1px dashed transparent;cursor:move;white-space:pre-wrap}.slide-element.selected{border-color:#2563eb}.slide-properties{border-left:1px solid var(--border);padding:12px;overflow:auto}.slide-properties .field{margin-bottom:10px}
.paint-layout{display:grid;grid-template-columns:190px 1fr;min-height:620px}.paint-tools{border-right:1px solid var(--border);padding:12px}.paint-tools .field{margin-bottom:10px}.paint-stage{background:#dfe3e8;padding:18px;overflow:auto;display:grid;place-items:start center}.paint-canvas{background:#fff;box-shadow:0 6px 22px rgba(0,0,0,.16);touch-action:none;cursor:crosshair}
.office-status{padding:8px 12px;border-top:1px solid var(--border);font-size:12px;color:var(--muted);display:flex;justify-content:space-between;gap:10px}
@media(max-width:1050px){.office-launch-grid{grid-template-columns:repeat(2,1fr)}.slides-layout{grid-template-columns:160px 1fr}.slide-properties{grid-column:1/-1;border-left:0;border-top:1px solid var(--border)}.writer-layout,.sheet-layout{grid-template-columns:1fr}.office-files{border-right:0;border-bottom:1px solid var(--border);max-height:160px}.paint-layout{grid-template-columns:1fr}.paint-tools{border-right:0;border-bottom:1px solid var(--border)}}
@media(max-width:620px){.office-launch-grid{grid-template-columns:1fr}.office-hero{align-items:flex-start;flex-direction:column}.writer-work{padding:8px}.writer-page{padding:36px 24px;min-height:900px}.office-app-head{align-items:flex-start;flex-direction:column}.slides-layout{grid-template-columns:1fr}.slide-thumbs{display:flex;gap:8px;border-right:0;border-bottom:1px solid var(--border)}.slide-thumb{min-width:130px}.paint-canvas{max-width:100%;height:auto}}
@media print{body.office-printing *{visibility:hidden!important}body.office-printing .office-print-target,body.office-printing .office-print-target *{visibility:visible!important}.office-print-target{position:absolute!important;left:0!important;top:0!important;width:100%!important;box-shadow:none!important}.office-print-hide{display:none!important}}


/* v0.11.56 — Sheets workspace and unified Office file library */
.office-hero-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.office-files-library-toolbar{display:grid;grid-template-columns:minmax(220px,1fr) 190px 190px;gap:10px;padding:14px;border-bottom:1px solid var(--border)}.office-files-summary{display:flex;gap:10px;flex-wrap:wrap;padding:14px 14px 0}.office-files-summary .badge{padding:8px 11px}.office-files-library{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:12px;padding:14px;min-height:360px}.office-library-card{border:1px solid var(--border);border-radius:15px;padding:14px;background:var(--surface);display:flex;gap:12px;align-items:flex-start}.office-library-card .file-icon{font-size:28px}.office-library-card .file-info{min-width:0;flex:1}.office-library-card h4{margin:0 0 4px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.office-library-card p{margin:0;color:var(--muted);font-size:12px}.office-library-actions{display:flex;gap:6px;margin-top:10px;flex-wrap:wrap}.office-library-empty{grid-column:1/-1;text-align:center;padding:70px 20px;color:var(--muted)}
.sheet-menu-bar{display:flex;gap:2px;padding:5px 10px;border-bottom:1px solid var(--border);background:var(--surface)}.sheet-menu-bar button{border:0;background:transparent;color:inherit;padding:7px 10px;border-radius:6px;cursor:default}.sheet-menu-bar button:hover{background:color-mix(in srgb,var(--surface) 86%,var(--accent) 14%)}.sheet-google-toolbar{flex-wrap:nowrap;overflow-x:auto;padding:7px 10px;background:color-mix(in srgb,var(--surface) 96%,#34a853 4%)}.sheet-google-toolbar .sheet-title{min-width:220px;max-width:320px;font-weight:650}.sheet-google-toolbar input[type=color]{min-width:34px;width:34px;height:34px;padding:3px}.sheet-google-toolbar select{min-width:68px}.sheet-layout{position:relative;grid-template-columns:240px minmax(0,1fr);min-height:650px;transition:grid-template-columns .2s ease}.sheet-layout.files-collapsed{grid-template-columns:0 minmax(0,1fr)}.sheet-files-panel{min-width:0;transition:opacity .15s ease,padding .2s ease;overflow:hidden}.sheet-layout.files-collapsed .sheet-files-panel{opacity:0;padding-left:0;padding-right:0;border-right:0;pointer-events:none}.sheet-files-head{display:flex;justify-content:space-between;align-items:center;gap:8px}.sheet-files-handle{display:none;position:absolute;left:0;top:48%;z-index:8;border:1px solid var(--border);border-left:0;border-radius:0 10px 10px 0;background:var(--surface);color:inherit;width:28px;height:55px;cursor:pointer;box-shadow:3px 0 10px rgba(0,0,0,.08)}.sheet-layout.files-collapsed .sheet-files-handle{display:block}.sheet-main{min-width:0;display:flex;flex-direction:column;overflow:hidden}.sheet-formula{align-items:center;background:var(--surface);padding:7px 9px}.sheet-name-box{width:72px;min-width:72px;text-align:center;border:1px solid var(--border);border-radius:7px;padding:8px;background:color-mix(in srgb,var(--surface) 94%,var(--accent) 6%);font-weight:650}.sheet-grid-wrap{overflow:auto;flex:1;background:#fff}.sheet-grid{min-width:1800px;color:#202124;background:#fff}.sheet-grid th,.sheet-grid td{border-color:#d9dce0;min-width:112px;height:30px}.sheet-grid th{background:#f8f9fa;color:#5f6368;font-weight:600;top:0}.sheet-grid .row-head{background:#f8f9fa;color:#5f6368;min-width:46px;left:0}.sheet-grid thead .row-head{z-index:5}.sheet-cell{font-family:Arial,sans-serif;font-size:12px;color:#202124}.sheet-cell.selected{outline:2px solid #1a73e8!important;box-shadow:inset 0 0 0 1px #fff}.sheet-tabs{background:#f8f9fa;padding:7px 10px;position:sticky;bottom:0}.sheet-tabs .office-tool-btn{background:#fff;border-radius:4px;padding:7px 14px}.sheet-tabs .primary-btn{color:#137333;border-color:#137333;background:#e6f4ea}.sheet-save-dirty{color:#b45309;font-weight:650}
@media(max-width:820px){.office-files-library-toolbar{grid-template-columns:1fr}.sheet-layout,.sheet-layout.files-collapsed{grid-template-columns:1fr}.sheet-files-panel{max-height:170px;border-bottom:1px solid var(--border);opacity:1!important;padding:12px!important;pointer-events:auto!important}.sheet-files-handle{display:none!important}.sheet-google-toolbar{flex-wrap:nowrap}.sheet-menu-bar{overflow-x:auto}.office-hero-actions{align-items:flex-start}}

/* v0.11.57 — simplified Sheets, blank cells and automatic formula guide */
.sheet-formula-guide-btn{margin-left:auto;white-space:nowrap}.sheet-formula-guide{position:fixed;inset:0;z-index:10050;display:none}.sheet-formula-guide.open{display:block}.sheet-formula-guide-backdrop{position:absolute;inset:0;background:rgba(15,23,42,.46);backdrop-filter:blur(2px)}.sheet-formula-guide-panel{position:absolute;right:0;top:0;height:100%;width:min(430px,92vw);background:var(--surface);color:inherit;border-left:1px solid var(--border);box-shadow:-16px 0 40px rgba(0,0,0,.18);display:flex;flex-direction:column;animation:sheetGuideIn .2s ease}.sheet-formula-guide-head{display:flex;justify-content:space-between;gap:12px;padding:18px;border-bottom:1px solid var(--border)}.sheet-formula-guide-head h3{margin:0 0 4px}.sheet-formula-guide-head p{margin:0;color:var(--muted);font-size:13px}.sheet-formula-search{padding:12px;border-bottom:1px solid var(--border)}.sheet-formula-search input{width:100%}.sheet-formula-guide-list{padding:12px;overflow:auto;display:grid;gap:9px}.sheet-formula-card{width:100%;display:flex;justify-content:space-between;align-items:center;gap:14px;text-align:left;border:1px solid var(--border);border-radius:12px;background:var(--surface);color:inherit;padding:12px;cursor:pointer}.sheet-formula-card:hover{border-color:var(--accent);background:color-mix(in srgb,var(--surface) 94%,var(--accent) 6%)}.sheet-formula-card b{display:block}.sheet-formula-card p{margin:3px 0 0;color:var(--muted);font-size:12px}.sheet-formula-card code{font-size:11px;white-space:nowrap;color:var(--accent)}@keyframes sheetGuideIn{from{transform:translateX(35px);opacity:.5}to{transform:none;opacity:1}}@media(max-width:820px){.sheet-formula-guide-btn{margin-left:0}.sheet-google-toolbar{flex-wrap:wrap}.sheet-formula-guide-panel{width:100%}}

/* v0.11.58 — Writer collapsible library, bilingual resume templates and Sheets decimals */
.writer-layout{position:relative;transition:grid-template-columns .2s ease}.writer-layout.files-collapsed{grid-template-columns:0 minmax(0,1fr)}.writer-files-panel{min-width:0;overflow:hidden;transition:opacity .15s ease,padding .2s ease}.writer-layout.files-collapsed .writer-files-panel{opacity:0;padding-left:0;padding-right:0;border-right:0;pointer-events:none}.writer-files-head{display:flex;align-items:center;justify-content:space-between;gap:8px}.writer-files-handle{display:none;position:absolute;left:0;top:46%;z-index:8;width:28px;height:58px;border:1px solid var(--border);border-left:0;border-radius:0 10px 10px 0;background:var(--surface);color:inherit;box-shadow:3px 0 10px rgba(0,0,0,.08);cursor:pointer}.writer-layout.files-collapsed .writer-files-handle{display:block}.writer-template-gallery{position:fixed;inset:0;z-index:10060;display:none}.writer-template-gallery.open{display:block}.writer-template-backdrop{position:absolute;inset:0;background:rgba(15,23,42,.5);backdrop-filter:blur(2px)}.writer-template-panel{position:absolute;inset:4vh 4vw;background:var(--surface);border:1px solid var(--border);border-radius:20px;box-shadow:0 24px 70px rgba(0,0,0,.25);display:flex;flex-direction:column;overflow:hidden}.writer-template-head{display:flex;justify-content:space-between;align-items:flex-start;gap:15px;padding:18px 20px;border-bottom:1px solid var(--border)}.writer-template-head h3,.writer-template-head p{margin:0}.writer-template-head p{margin-top:4px;color:var(--muted)}.writer-template-controls{display:grid;grid-template-columns:190px minmax(220px,1fr);gap:10px;padding:14px 20px;border-bottom:1px solid var(--border)}.writer-template-list{padding:18px 20px;overflow:auto;display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:14px}.writer-template-card{border:1px solid var(--border);border-radius:15px;background:var(--surface);color:inherit;padding:12px;text-align:left;cursor:pointer}.writer-template-card:hover{border-color:var(--accent);transform:translateY(-2px);box-shadow:0 10px 24px rgba(0,0,0,.09)}.writer-template-card b,.writer-template-card small{display:block}.writer-template-card small{color:var(--muted);margin-top:3px}.writer-template-preview{height:180px;background:#fff;border:1px solid #d8dde5;border-top:12px solid var(--template-color);border-radius:7px;margin-bottom:10px;padding:18px;box-shadow:0 4px 12px rgba(0,0,0,.08)}.writer-template-preview span{display:block;height:7px;border-radius:5px;background:#d8dde5;margin-bottom:12px}.writer-template-preview span:first-child{width:62%;height:12px;background:var(--template-color)}.writer-template-preview span:nth-child(2){width:85%}.writer-template-preview span:nth-child(3){width:72%}.writer-template-preview span:nth-child(4){width:92%}.sheet-decimal-tools{display:flex;gap:4px;padding-left:5px;border-left:1px solid var(--border)}
@media(max-width:820px){.writer-layout,.writer-layout.files-collapsed{grid-template-columns:1fr}.writer-files-panel{max-height:170px;border-bottom:1px solid var(--border);opacity:1!important;padding:12px!important;pointer-events:auto!important}.writer-files-handle{display:none!important}.writer-template-panel{inset:2vh 2vw}.writer-template-controls{grid-template-columns:1fr}.sheet-decimal-tools{border-left:0;padding-left:0}}

/* v0.11.59 Writer template library and rulers */
.writer-viewbar{display:flex;align-items:center;gap:10px;margin-bottom:10px}.writer-viewbar .writer-title{flex:1}.writer-viewbar select{width:95px}.writer-viewbar input[type=range]{width:120px}.writer-canvas{--writer-zoom:1;display:grid;grid-template-columns:34px max-content;grid-template-rows:30px max-content;justify-content:center;align-items:start;min-width:max-content;transform-origin:top center}.writer-corner-ruler{grid-column:1;grid-row:1;background:#f4f5f7;border:1px solid #cdd3db}.writer-ruler-horizontal{grid-column:2;grid-row:1;width:816px;height:30px;background:repeating-linear-gradient(to right,#f8f9fb 0,#f8f9fb 11px,#c3c9d2 12px,#f8f9fb 13px);border:1px solid #cdd3db;display:flex;justify-content:space-between;padding:4px 8px;font-size:10px;color:#596273;box-sizing:border-box;transform:scaleX(var(--writer-zoom));transform-origin:left top}.writer-ruler-vertical{grid-column:1;grid-row:2;width:34px;height:1056px;background:repeating-linear-gradient(to bottom,#f8f9fb 0,#f8f9fb 11px,#c3c9d2 12px,#f8f9fb 13px);border:1px solid #cdd3db;display:flex;flex-direction:column;justify-content:space-between;padding:8px 5px;font-size:10px;color:#596273;box-sizing:border-box;transform:scaleY(var(--writer-zoom));transform-origin:left top}.writer-page-stage{grid-column:2;grid-row:2;transform:scale(var(--writer-zoom));transform-origin:top left;margin-bottom:calc((var(--writer-zoom) - 1) * 1056px)}.writer-page.writer-page-a4{max-width:794px;min-height:1123px}.writer-template-controls{grid-template-columns:160px 190px minmax(220px,1fr)}
@media(max-width:820px){.writer-canvas{justify-content:start}.writer-ruler-horizontal{width:816px}.writer-viewbar{flex-wrap:wrap}.writer-template-controls{grid-template-columns:1fr}}

/* v0.11.60 — restore direct editing in Writer and Slides */
.writer-corner-ruler,.writer-ruler-horizontal,.writer-ruler-vertical{pointer-events:none;user-select:none}.writer-page-stage{position:relative;z-index:2;pointer-events:auto}.writer-page[contenteditable="true"]{position:relative;z-index:3;pointer-events:auto!important;user-select:text!important;cursor:text;caret-color:#111}.writer-page[contenteditable="true"] *{pointer-events:auto}.slide-element{touch-action:none}.slide-text-element{cursor:text;pointer-events:auto!important;user-select:text;outline:none}.slide-text-element:focus{border-color:#2563eb;background:rgba(255,255,255,.04)}.slide-image-element{cursor:move}.slide-text-element.selected::after{content:"Alt + drag to move";position:absolute;right:0;top:-23px;font-size:10px;line-height:18px;padding:1px 6px;border-radius:5px;background:#2563eb;color:#fff;white-space:nowrap;pointer-events:none}.slide-stage{isolation:isolate}


/* v0.11.62.4 — audited Writer formatting and Slides manipulation */
#office-writer .office-toolbar button:active,#office-writer .office-toolbar button:focus-visible{border-color:var(--accent);box-shadow:0 0 0 2px color-mix(in srgb,var(--accent) 25%,transparent)}
.slide-element{box-sizing:border-box}.slide-text-element:not(.editing){cursor:move;user-select:none}.slide-text-element.editing{cursor:text;user-select:text}.slide-text-element.editing .slide-move-handle,.slide-text-element.editing .slide-resize-handle{display:none}.slide-move-handle{position:absolute;left:50%;top:-28px;transform:translateX(-50%);width:34px;height:24px;padding:0;border:1px solid #1d4ed8;border-radius:7px;background:#2563eb;color:#fff;font-size:18px;line-height:20px;cursor:grab;z-index:8;touch-action:none}.slide-move-handle:active{cursor:grabbing}.slide-resize-handle{position:absolute;right:-6px;bottom:-6px;width:14px;height:14px;padding:0;border:2px solid #fff;background:#2563eb;box-shadow:0 0 0 1px #1d4ed8;cursor:nwse-resize;z-index:8;touch-action:none}.slide-format-row{display:flex;gap:6px;margin-bottom:10px}.slide-format-row .office-tool-btn.active{border-color:#2563eb;background:color-mix(in srgb,#2563eb 14%,var(--surface))}.slide-help{font-size:12px;line-height:1.45}.slide-element.selected{z-index:4}

/* v0.11.62.4 — Office reliability rebuild */
#office-writer .office-toolbar{position:relative;z-index:10}
#office-writer .office-toolbar button,#office-writer .office-toolbar select,#office-writer .office-toolbar input{touch-action:manipulation}
.writer-page:focus{outline:2px solid color-mix(in srgb,var(--accent) 38%,transparent);outline-offset:2px}
.slide-element{position:absolute;overflow:visible;border:1px solid transparent}
.slide-element.selected{border-color:#2563eb;box-shadow:0 0 0 1px rgba(37,99,235,.22)}
.slide-text-content{width:100%;height:100%;box-sizing:border-box;overflow:auto;white-space:pre-wrap;word-break:break-word;outline:none;padding:4px;cursor:inherit}
.slide-text-element.editing .slide-text-content{cursor:text;user-select:text;background:rgba(255,255,255,.08)}
.slide-text-element:not(.editing) .slide-text-content{pointer-events:none;user-select:none}
.slide-move-handle,.slide-resize-handle{user-select:none;-webkit-user-select:none}
.slide-object-actions{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;margin:10px 0}
.slide-stage:focus{outline:2px solid color-mix(in srgb,var(--accent) 35%,transparent)}

/* v0.11.63 — native Office editing engine */
#writerEditor{white-space:normal;overflow-wrap:anywhere;word-break:normal;line-height:1.5;-webkit-user-modify:read-write-plaintext-only}
#writerEditor:focus{-webkit-user-modify:read-write;}
#writerEditor p,#writerEditor div,#writerEditor li,#writerEditor td,#writerEditor th{cursor:text}
#writerEditor table{border-collapse:collapse;max-width:100%}
#writerEditor td,#writerEditor th{min-width:36px;vertical-align:top}
#writerEditor img{max-width:100%;height:auto;cursor:default}
.slide-stage{user-select:none;-webkit-user-select:none}
.slide-text-element.editing{user-select:text;-webkit-user-select:text}
.slide-text-element.editing .slide-text-content{overflow:auto;caret-color:currentColor}
.slide-text-element:not(.editing):hover,.slide-image-element:hover{border-color:rgba(37,99,235,.55)}
.slide-element:focus{outline:none}
.slide-element.selected .slide-move-handle{display:block}
@media (pointer:coarse){.slide-move-handle{width:42px;height:30px;top:-34px}.slide-resize-handle{width:18px;height:18px;right:-9px;bottom:-9px}}

/* v0.11.64 native editor stability */
#writerEditor[contenteditable="true"]{touch-action:manipulation;-webkit-user-modify:read-write;overflow-wrap:anywhere}
.slide-text-element.editing{touch-action:manipulation!important}
.slide-text-element.editing .slide-text-content[contenteditable="true"]{touch-action:manipulation!important;-webkit-user-modify:read-write;pointer-events:auto!important}

/* v0.11.65 isolated Office editors */
.writer-editor-frame{display:block;width:816px;max-width:816px;height:1056px;padding:0!important;border:0;background:#fff;overflow:hidden}.writer-editor-frame:focus{outline:2px solid color-mix(in srgb,var(--accent) 38%,transparent);outline-offset:2px}.writer-page-stage{background:#fff}.slide-text-editor{display:block;border:0!important;resize:none!important;background:transparent!important;color:inherit!important;font:inherit!important;text-align:inherit!important;line-height:1.25!important;pointer-events:auto!important;user-select:text!important;-webkit-user-select:text!important;cursor:text!important}.slide-text-element.editing{touch-action:auto!important}.slide-text-element.editing .slide-text-editor{touch-action:auto!important}

/* v0.11.77 — Writer template gallery visual preview refinement */
.writer-template-panel{inset:3vh 3vw;max-width:1500px;margin:auto}
.writer-template-list{grid-template-columns:repeat(auto-fill,minmax(230px,1fr));align-content:start;gap:18px;padding:20px}
.writer-template-card{display:flex;flex-direction:column;min-width:0;padding:0;overflow:hidden;border-radius:16px;background:var(--surface);border:1px solid var(--border);transition:border-color .18s ease,transform .18s ease,box-shadow .18s ease}
.writer-template-card:hover{border-color:var(--accent);transform:translateY(-2px);box-shadow:0 12px 28px rgba(15,23,42,.12)}
.writer-template-thumb{display:block;width:100%;padding:12px;border:0;background:color-mix(in srgb,var(--surface-2) 78%,#dfe5ec 22%);cursor:pointer;text-align:inherit}
.writer-template-preview{position:relative;height:286px;margin:0;overflow:hidden;border:1px solid #cbd2dc;border-radius:9px;background:#dfe4ea;box-shadow:0 6px 16px rgba(15,23,42,.12)}
.writer-template-paper{position:absolute;left:50%;top:12px;width:794px;min-height:1123px;background:#fff;color:#111;transform:translateX(-50%) scale(.225);transform-origin:top center;box-shadow:0 8px 20px rgba(0,0,0,.18);overflow:hidden}
.writer-template-paper-content{width:794px;min-height:1123px;background:#fff;font:16px/1.55 Arial,sans-serif;overflow:hidden}
.writer-template-zoom-hint{position:absolute;right:9px;bottom:9px;padding:6px 9px;border-radius:999px;background:rgba(15,23,42,.82);color:#fff;font-size:11px;font-weight:700;opacity:0;transform:translateY(4px);transition:.18s ease}
.writer-template-thumb:hover .writer-template-zoom-hint,.writer-template-thumb:focus-visible .writer-template-zoom-hint{opacity:1;transform:none}
.writer-template-meta{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:13px 14px 14px}
.writer-template-meta>div{min-width:0}.writer-template-meta b{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.writer-template-meta small{display:block;margin-top:4px;color:var(--muted)}
.writer-template-use{flex:0 0 auto;padding:8px 10px;font-size:12px}
.writer-template-preview-modal{position:fixed;inset:0;z-index:10080;display:none}
.writer-template-preview-modal.open{display:block}
.writer-template-preview-backdrop{position:absolute;inset:0;background:rgba(15,23,42,.66);backdrop-filter:blur(3px)}
.writer-template-preview-dialog{position:absolute;inset:2.5vh 4vw;max-width:1200px;margin:auto;display:grid;grid-template-rows:auto minmax(0,1fr) auto;background:var(--surface);border:1px solid var(--border);border-radius:20px;overflow:hidden;box-shadow:0 28px 80px rgba(0,0,0,.35)}
.writer-template-preview-head,.writer-template-preview-actions{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 18px;border-bottom:1px solid var(--border)}
.writer-template-preview-head h3,.writer-template-preview-head p{margin:0}.writer-template-preview-head p{margin-top:3px}.writer-template-preview-actions{justify-content:flex-end;border-top:1px solid var(--border);border-bottom:0}
.writer-template-preview-stage{overflow:auto;padding:24px;background:#dfe4ea;text-align:center}
.writer-template-preview-page{display:inline-block;width:794px;min-height:1123px;padding:0;background:#fff;color:#111;text-align:left;box-shadow:0 12px 34px rgba(15,23,42,.22);font:16px/1.55 Arial,sans-serif;vertical-align:top}
body.writer-template-preview-open{overflow:hidden}
@media(max-width:900px){.writer-template-list{grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.writer-template-preview{height:250px}.writer-template-paper{transform:translateX(-50%) scale(.195)}.writer-template-preview-dialog{inset:1.5vh 2vw}.writer-template-preview-stage{padding:16px}.writer-template-preview-page{transform:scale(.82);transform-origin:top center;margin-bottom:-202px}}
@media(max-width:620px){.writer-template-panel{inset:0;border-radius:0}.writer-template-head{padding:14px}.writer-template-head p{font-size:12px}.writer-template-controls{padding:10px 12px}.writer-template-list{grid-template-columns:1fr;padding:12px;gap:12px}.writer-template-card{display:grid;grid-template-columns:118px minmax(0,1fr);align-items:stretch}.writer-template-thumb{padding:8px}.writer-template-preview{height:154px}.writer-template-paper{top:7px;transform:translateX(-50%) scale(.12)}.writer-template-zoom-hint{display:none}.writer-template-meta{align-items:flex-start;flex-direction:column;padding:12px}.writer-template-use{width:100%;margin-top:auto}.writer-template-preview-dialog{inset:0;border-radius:0}.writer-template-preview-head{padding:12px}.writer-template-preview-stage{padding:10px}.writer-template-preview-page{transform:scale(.46);margin-bottom:-606px}.writer-template-preview-actions{padding:10px}.writer-template-preview-actions button{flex:1}}
