/* iPhone: three separate desk pages, a compact editor, and an explicit tool tray. */
html{scroll-padding-top:16px}body{background:#f7f5ef;font-size:16px}#office.phone-office{padding:max(0px,env(safe-area-inset-top)) max(16px,env(safe-area-inset-right)) 0 max(16px,env(safe-area-inset-left));max-width:650px;min-height:var(--office-viewport,100dvh)}
button,summary,input,select{min-height:46px}input,select,textarea{font-size:16px!important}.office-header{height:76px}.office-brand{font-size:21px;gap:10px}.brand-symbol{width:35px;height:40px;font-size:26px}.office-brand small{font-size:10px}.header-right{gap:0}.local-label{display:none}#help-button{min-width:46px;padding:6px}#help-button span{display:none}
.phone-intro{padding:25px 0 20px}.phone-intro h1{font-size:34px}.phone-intro p:not(.eyebrow){font-size:14px;color:var(--muted);margin:8px 0}.phone-intro .open-button{margin-top:20px;display:flex;justify-content:space-between;width:100%;padding:12px;font-size:15px;gap:8px}.open-button small{font-size:10px;padding:0;margin:0}.library{margin-top:0}.library .section-heading>div{display:none}.library .section-heading{display:block;margin-bottom:12px}.search-label input{width:100%;font-size:16px;padding:11px 14px}.library-filters{gap:4px;overflow:auto;scrollbar-width:none}.library-filters button{font-size:12px;padding:10px 7px;white-space:nowrap;min-height:46px}.project-row{padding:9px 0;gap:4px}.project-open{padding:10px 2px;gap:10px;min-height:70px}.project-name{max-width:225px;font-size:16px}.project-open small{font-size:11px}.project-options summary{min-width:46px;text-align:center}.project-options>div{top:46px}.empty-library{padding:34px 12px}.empty-library h3{font-size:17px}.empty-library p{font-size:14px}
[data-desk-pane]{padding-bottom:105px}.phone-dock{position:fixed;bottom:0;left:0;right:0;z-index:20;display:grid;grid-template-columns:repeat(3,1fr);padding:8px max(12px,env(safe-area-inset-right)) max(9px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left));background:#fdfcf8f5;backdrop-filter:blur(12px);border-top:1px solid #d9dfd8;box-shadow:0 -4px 18px #26374b08}.phone-dock button{display:grid;gap:2px;place-items:center;background:none;border:0;color:#6f7781;font-size:21px;padding:4px;min-height:55px}.phone-dock button span{font-size:11px}.phone-dock [aria-pressed=true]{color:#285d49;background:#e8efe8;border-radius:10px}
.new-projects{display:grid;grid-template-columns:1fr;gap:15px}.new-card{grid-template-columns:53px 1fr;min-height:130px;padding:20px 16px;align-items:center}.card-text strong{font-size:20px}.card-text>span{font-size:14px}.card-text small{font-size:11px;margin-top:8px}.starters{margin:0}.starters>.section-heading{display:none}.starter-grid{display:grid;grid-template-columns:1fr;gap:15px}.starter-grid>button{display:grid;grid-template-columns:105px 1fr;grid-template-rows:1fr 1fr}.starter-art{grid-row:1/3;height:110px;font-size:32px;gap:9px}.starter-art span{font-size:8px}.starter-grid strong{font-size:16px;padding:12px 13px 0;align-self:end}.starter-grid small{font-size:12px;padding:6px 13px 12px}.more-starters{font-size:14px}.more-starters>div{display:grid}
body[data-office-view=editor] .office-header{display:none}.editor-heading{display:grid;grid-template-columns:60px minmax(0,1fr) 88px;gap:3px;padding:10px 0 7px}.editor-heading #back-home{padding:5px 0;font-size:14px}.editor-heading #project-title{order:0;width:100%;min-width:0;font-size:16px;flex-basis:auto;padding:6px}.editor-heading #file-kind{display:none}.editor-heading #save-status{grid-column:1/-1;grid-row:2;text-align:right;font-size:10px;min-height:17px}.editor-heading #download{grid-column:3;grid-row:1;font-size:12px;padding:7px}.phone-editor-actions{display:flex;gap:6px;padding:0 0 9px}.phone-editor-actions button{flex:1;font-size:13px;padding:8px 6px;background:#fff}.phone-editor-actions [aria-expanded=true]{background:#e5edf6;border-color:#8aa9c4}
.phone-tool-tray{background:#eef1f0;border:1px solid var(--line);border-radius:10px;padding:8px;margin-bottom:10px}.editor-menus{display:grid;grid-template-columns:repeat(4,1fr);gap:0;border:0;padding:0 0 8px}.editor-menus summary{font-size:13px;text-align:center;padding:11px 2px;background:#fff}.editor-menus details{position:static}.phone-tool-tray{position:relative}.menu-panel{left:0;right:0;top:55px;min-width:0;max-height:50dvh;padding:8px}.menu-panel button{font-size:15px}.toolbar{border:0;border-radius:8px;gap:6px;padding:8px;display:flex;flex-wrap:wrap}.toolbar button{font-size:14px;min-width:44px;padding:8px}.toolbar select{max-width:150px}.toolbar input[type=color]{height:44px;width:44px}.toolbar .divider{display:none}
#editor-content{border:0;border-radius:10px;min-height:calc(var(--office-viewport,100dvh) - 205px);background:#e9ecea;overflow-x:auto}.document-paper{margin:0;padding:24px 18px;box-shadow:none;min-height:calc(var(--office-viewport,100dvh) - 205px);max-width:100%!important}.ProseMirror{font-size:17px;min-height:350px}.editor-foot{display:block;padding:10px 0 24px;font-size:11px}.editor-foot button{font-size:12px;padding:5px 0}.formula-bar{padding:8px;gap:5px;position:sticky;top:0;z-index:5}.cell-address{min-width:42px}.formula-bar input{min-height:46px}.grid-scroll{max-height:calc(var(--office-viewport,100dvh) - 300px)}.sheet-grid td{height:44px;font-size:15px}.sheet-grid th{height:35px}.sheet-tabs{overflow:auto}.sheet-tabs button{white-space:nowrap;min-height:46px}.chart-area{padding:8px}.chart-card{padding:12px}
.slide-workspace{display:flex;flex-direction:column;min-height:350px}.slide-strip{flex-direction:row;max-height:106px;border:0;padding:7px;gap:7px}.slide-thumb{width:100px;min-height:80px}.slide-center{padding:20px 12px;min-height:230px;align-items:center}.resize-handle{width:24px;height:24px;bottom:-9px;right:-9px}.object-inspector{display:none;border-left:0;border-top:1px solid var(--line);max-height:none;overflow:visible}.show-inspector .object-inspector{display:block}.object-inspector label{font-size:14px}.object-inspector textarea{min-height:120px}.position-fields{width:100%;grid-template-columns:repeat(2,minmax(0,1fr))}.object-inspector input,.object-inspector textarea{padding:9px}
dialog{width:calc(100% - 26px);max-width:500px;max-height:calc(var(--office-viewport,100dvh) - 30px);padding:22px;overflow:auto}.dialog-actions{position:sticky;bottom:0;background:#fff;padding-top:10px}.dialog-actions button{min-height:48px}.keyboard-open .phone-dock{display:none}.keyboard-open .phone-intro{padding-top:12px}#notice{bottom:max(20px,env(safe-area-inset-bottom));width:max-content;max-width:90vw}body[data-office-view=desk] #notice{bottom:95px}#slideshow{padding:8px}#slideshow nav{flex-wrap:wrap;justify-content:center;gap:6px}#slideshow button{min-height:46px}
@media print{.phone-editor-actions,.phone-dock,.phone-tool-tray{display:none!important}#office.phone-office{padding:0}.document-paper{padding:0}}
body{padding-bottom:95px}.editor-foot{display:grid;justify-content:start;gap:4px}.editor-foot button{text-align:left}
@media print{body{padding-bottom:0}}

/* The grid owns scrolling; editing must not widen or zoom the whole page. */
body[data-office-kind=spreadsheet]{padding-bottom:0}
body[data-office-kind=spreadsheet] #office{min-height:0;height:var(--office-viewport,100dvh)}
body[data-office-kind=spreadsheet] #editor-view{display:flex;flex-direction:column;height:100%;min-width:0}
body[data-office-kind=spreadsheet] .editor-heading,body[data-office-kind=spreadsheet] .phone-editor-actions{flex-shrink:0}
body[data-office-kind=spreadsheet] #touch-tools{flex-shrink:0;max-height:45%;overflow:auto}
body[data-office-kind=spreadsheet] #editor-content{display:flex;flex:1;min-height:0;min-width:0;overflow:hidden}
body[data-office-kind=spreadsheet] .spreadsheet-view{display:flex;flex-direction:column;width:100%;min-width:0;min-height:0}
body[data-office-kind=spreadsheet] .formula-bar{position:static;flex-shrink:0;min-width:0;gap:4px}
body[data-office-kind=spreadsheet] .cell-address{min-width:32px}
body[data-office-kind=spreadsheet] .formula-bar input{width:0;font-size:16px}
body[data-office-kind=spreadsheet] .formula-bar button{padding:6px 9px;font-size:14px;flex-shrink:0}
body[data-office-kind=spreadsheet] .grid-scroll{flex:1;min-height:0;max-height:none;min-width:0;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
body[data-office-kind=spreadsheet] .grid-kid-tools{flex-shrink:0;flex-wrap:nowrap;overflow-x:auto;margin:0;padding:4px;gap:4px}
body[data-office-kind=spreadsheet] .grid-kid-tools button{flex-shrink:0;white-space:nowrap}
body[data-office-kind=spreadsheet] .sheet-grid td{font-size:16px}
body[data-office-kind=spreadsheet] .grid-resize{display:none}
body[data-office-kind=spreadsheet] .sheet-tabs{flex-shrink:0;position:static;min-width:0}
body[data-office-kind=spreadsheet] .chart-area{max-height:25%;overflow:auto;flex-shrink:0}
body[data-office-kind=spreadsheet] .chart-area:empty{display:none}
body[data-office-kind=spreadsheet] .editor-foot{flex-shrink:0;padding:5px 0;gap:0}
body[data-office-kind=spreadsheet] #editor-detail{display:none}
.keyboard-open[data-office-kind=spreadsheet] .editor-heading,.keyboard-open[data-office-kind=spreadsheet] .phone-editor-actions,.keyboard-open[data-office-kind=spreadsheet] #touch-tools,.keyboard-open[data-office-kind=spreadsheet] .grid-kid-tools,.keyboard-open[data-office-kind=spreadsheet] .editor-foot,.keyboard-open[data-office-kind=spreadsheet] .chart-area{display:none}
@media(max-height:500px){body[data-office-kind=spreadsheet] .editor-foot,body[data-office-kind=spreadsheet] .grid-kid-tools,body[data-office-kind=spreadsheet] #save-status{display:none}}
@media print{body[data-office-kind=spreadsheet] #office,body[data-office-kind=spreadsheet] #editor-view{height:auto;display:block}body[data-office-kind=spreadsheet] #editor-content,body[data-office-kind=spreadsheet] .spreadsheet-view{display:block;overflow:visible}body[data-office-kind=spreadsheet] .grid-scroll{overflow:visible}body[data-office-kind=spreadsheet] .grid-kid-tools{display:none}}
