.drive-settings{padding:20px}.drive-settings h3{font-size:16px;margin:0 0 12px}.drive-settings p{line-height:1.6}.drive-settings label{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:10px 0}.drive-settings select{max-width:100%}.drive-settings input[type=checkbox]{flex:none}.drive-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.drive-folder{display:flex;justify-content:space-between;gap:8px;padding:6px 0}.drive-folder button:first-child{text-align:left;overflow-wrap:anywhere}.drive-help{font-size:12px;color:var(--muted,var(--ink2,#637081))}.drive-settings button,.drive-settings select{padding:7px 10px;border:1px solid var(--line,#ced6df);border-radius:6px;background:var(--surface,var(--paper,#fff));color:inherit}.library-browser{min-width:0;width:100%}.library-toolbar{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin:12px 0}.library-toolbar input[type=search]{min-width:140px;flex:1}.library-scope{font-size:12px;white-space:nowrap;display:flex;align-items:center;gap:4px}.library-path{display:flex;gap:5px;flex-wrap:wrap;align-items:center}.library-path button{max-width:100%;overflow-wrap:anywhere}.library-files{display:grid;gap:4px}.library-file{display:flex;gap:8px;align-items:center;border-bottom:1px solid var(--line,#d8dfe7);padding:8px 0;min-width:0}.library-name{flex:1;text-align:left;min-width:0;overflow-wrap:anywhere}.library-name small{display:block;color:var(--muted,#637081);font-size:12px;margin-top:3px}.library-file .library-tools{display:flex;gap:3px;flex-wrap:wrap}.library-browser button,.library-browser input{border:1px solid var(--line,#cfd7e0);border-radius:5px;padding:7px 9px;color:inherit;background:var(--raised,var(--panel,var(--surface,var(--paper,#fff))))}.library-browser button:disabled{opacity:.5}.library-browser input[type=checkbox]{padding:0}.library-status{min-height:24px;font-size:13px;overflow-wrap:anywhere}.library-dropzone.drop-active{outline:2px dashed var(--accent,#315b7f);outline-offset:-3px}.library-dialog{max-width:600px;width:calc(100% - 32px);max-height:85vh;overflow:auto;border:1px solid var(--line,#ccd4df);border-radius:10px;background:var(--raised,var(--panel,var(--surface,var(--paper,#fff))));color:inherit;padding:20px}.library-dialog::backdrop{background:#0005}.library-dialog label{display:flex;flex-direction:column;gap:6px}.library-dialog input{font:inherit;padding:8px;max-width:100%;box-sizing:border-box}.library-dialog menu{display:flex;justify-content:flex-end;gap:8px;padding:0;flex-wrap:wrap}.library-dialog button{padding:7px 10px}.library-share-link{font-size:13px;max-width:100%;overflow-wrap:anywhere}.library-grid{grid-template-columns:repeat(auto-fit,minmax(180px,1fr))}.library-grid .library-file{flex-direction:column;align-items:stretch;padding:12px;border:1px solid var(--line,#cfd7e0);border-radius:8px}.library-tabs{display:flex;gap:8px;padding:8px 20px}.library-tabs [aria-selected=true]{font-weight:700;border-bottom:2px solid var(--accent,#315b7f)}.library-standalone{max-width:1200px;margin:0 auto;padding:20px}.library-preview{width:100%;min-height:320px;border:0}.library-dialog img{max-width:100%}@media(max-width:600px){.library-file{flex-wrap:wrap}.library-name{flex-basis:calc(100% - 40px)}.library-tools{margin-left:auto}.library-standalone{padding:12px}.drive-settings{padding:14px}}@media(pointer:coarse){.library-browser button,.library-browser input,.library-scope,.drive-settings button{min-height:44px}.library-browser input[type=checkbox]{min-height:auto}.library-browser input[type=search]{font-size:16px}}

.library-preview-dialog{width:calc(100% - 40px);max-width:1400px;height:85vh;max-height:85vh;padding:12px}.library-preview-dialog>header h2{flex:1;font-size:16px;margin:0;overflow-wrap:anywhere}.library-preview-dialog .file-preview-body{height:calc(100% - 50px);overflow:auto}.library-preview-dialog pre{white-space:pre-wrap;overflow-wrap:anywhere}.library-preview-dialog button{flex:none}

.library-file .library-tools{flex:0 0 245px;justify-content:flex-end}.library-browser .library-name{border-color:transparent;background:transparent}.library-browser .library-name:hover{background:var(--hover,#eaeef2)}.library-tools button{font-size:12px}.library-browser button:focus-visible{outline:2px solid var(--accent,#315b7f);outline-offset:2px}@media(max-width:600px){.library-file .library-tools{flex-basis:auto}}

.library-standalone{font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;font-size:14px;line-height:1.5}.library-standalone h1{font-size:24px}

.library-dialog [data-dialog-status]{font-size:13px;overflow-wrap:anywhere}.library-dialog [data-dialog-status][data-error]{color:var(--danger,#a13b35)}.library-dialog button:disabled{opacity:.5;cursor:wait}

.drive-settings button:disabled{opacity:.5;cursor:not-allowed}

/* Match notification settings: shared track/value, explicit state and save feedback. */
.drive-access-setting{--nt-soft:var(--paper2,#eeeee3);--nt-muted:var(--ink2,#63695d);--nt-accent:var(--accent,#425b46);padding:8px 0 12px;border-block:1px solid var(--rule,#ced6df)}
.drive-access-row{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:44px}
.drive-access-row>span{flex:1;min-width:0}
.drive-settings .drive-access-switch{display:inline-flex;align-items:center;gap:9px;flex:none;min-height:44px;padding:0;border:0;border-radius:6px;background:transparent;cursor:pointer}
.drive-access-switch[aria-checked=true] .switch-track{background:var(--nt-accent);border-color:var(--nt-accent)}
.drive-access-switch[aria-checked=true] .switch-track::after{transform:translateX(17px);background:var(--on-accent,#fff)}
.drive-access-switch[aria-checked=true] .switch-value{color:var(--nt-accent)}
.drive-access-switch:focus-visible{outline:2px solid var(--nt-accent);outline-offset:4px}
.drive-access-setting .drive-help{margin:2px 0 0}.drive-access-setting .drive-help strong{font-weight:600;color:var(--ink,#303d34)}
.drive-access-setting .drive-access-status{min-height:18px;margin:0;font-size:12px;text-align:right;color:var(--nt-muted)}
.drive-access-status[data-state=saved]{color:var(--nt-accent)}
.drive-access-status[data-state=error]{color:var(--danger,#a13b35);font-weight:600}
.drive-access-setting a{font-size:13px;color:var(--nt-accent);text-underline-offset:3px}

.drive-service-settings{padding:20px;line-height:1.6}.drive-service-settings h3{font-size:16px;margin:0 0 12px}.drive-service-settings h4{font-size:14px}
.drive-service-settings details{margin:14px 0}.drive-service-settings summary{cursor:pointer;font-weight:600}
.drive-service-settings button{padding:7px 10px;border:1px solid var(--rule,#ced6df);border-radius:6px;background:var(--surface,var(--paper,#fff));color:inherit;font:inherit;cursor:pointer}.drive-service-settings button:disabled{opacity:.5;cursor:not-allowed}
.drive-service-settings a{color:var(--accent,#315b7f);text-underline-offset:3px}.drive-service-settings ol{padding-left:24px}.drive-service-settings form{border-top:1px solid var(--rule,#ced6df);padding-top:4px}
.drive-service-settings li{margin:8px 0}.drive-service-settings input[type=file]{display:block;max-width:100%;margin:8px 0}
.drive-service-settings dd{margin:0 0 8px;overflow-wrap:anywhere}.drive-service-settings dt{font-size:12px;color:var(--ink2)}
.drive-service-uris>div{display:flex;align-items:center;gap:8px;margin:8px 0}.drive-service-uris code{flex:1;min-width:0;overflow-wrap:anywhere;font-size:12px;user-select:all}
.drive-service-consent{display:flex;align-items:flex-start;gap:8px;margin:12px 0}.drive-service-consent input[type=checkbox]{flex:none;min-height:0;margin-top:6px}.drive-service-state{font-weight:600}
@media(max-width:600px){.drive-service-settings{padding:14px}.drive-service-settings button{min-height:44px}}

/* File moves share the existing folder outline in list and grid views. */
.library-name[draggable=true]{cursor:grab}
.library-name.library-dragging{opacity:.45;cursor:grabbing}
.library-file.library-drop-target{outline:2px solid var(--accent,#315b7f);outline-offset:-2px;border-radius:6px;background:var(--hover,#e8edf3)}
.library-file.library-drop-target .library-name{background:transparent}
/* Drive file references share the same card in messages and composer drafts. */
.library-picker .library-tools{flex:0 0 auto}
.library-reference{display:inline-flex;align-items:center;vertical-align:top;gap:4px;position:relative;width:440px;max-width:100%;box-sizing:border-box;margin:5px 0;border:1px solid var(--line,#ced6df);border-radius:8px;background:var(--raised,var(--panel,var(--surface,var(--paper,#fff))));color:var(--text,var(--ink,#243444));line-height:1.4;white-space:normal}
.library-reference [data-library-card-content]{display:flex;align-items:center;flex:1;min-width:0;padding:4px}
.library-reference button{font:inherit;color:inherit;border:0;background:transparent;cursor:pointer;border-radius:5px}
.library-card-open{display:flex;align-items:center;gap:10px;flex:1;min-width:0;padding:10px;text-align:left}
.library-card-open>.icon{flex:none;width:28px;height:28px;color:var(--accent,#315b7f)}
.library-card-open>span{min-width:0}.library-card-open strong{display:block;font-size:14px;overflow-wrap:anywhere}.library-card-open small{display:block;margin-top:4px;color:var(--muted,#637081);font-size:12px}
.library-reference .library-card-download,.library-reference .library-card-remove{display:grid;place-items:center;width:36px;min-height:40px;flex:none;padding:7px}
.library-reference button:hover{background:var(--hover,#eaeef2)}.library-reference button:focus-visible{outline:2px solid var(--accent,#315b7f);outline-offset:-2px}.library-reference button:disabled{opacity:.5;cursor:wait}
.library-card-status{padding:12px;font-size:13px;color:var(--muted,#637081)}
.library-draft-cards{display:grid;gap:4px;padding:0 8px;max-height:190px;overflow:auto}.library-draft-cards:empty{display:none}.library-draft-cards .library-reference{width:100%;margin:4px 0}
@media(max-width:600px){.library-reference{width:100%}.library-reference .library-card-download,.library-reference .library-card-remove{width:44px;min-height:44px}.library-card-open{padding:8px;gap:6px}.library-card-open>.icon{width:22px;height:22px}}

/* Upload highlighting starts with the files, leaving navigation and tools outside. */
.library-browser.library-manage{display:flex;flex-direction:column;min-height:0;overflow:hidden}
.library-manage> :not(.library-dropzone){flex-shrink:0}
.library-manage>.library-dropzone{flex:1 1 0;min-height:0;overflow:auto;scrollbar-gutter:stable;padding:4px 10px 10px;border:1px solid var(--border,#cfd7e0);border-radius:8px;background:var(--sidebar,#eaeef3);background:color-mix(in srgb,var(--surface,#f6f8fa) 96%,var(--accent,#315b7f))}
.library-manage>.library-dropzone.drop-active{border-color:var(--accent,#315b7f);background:var(--hover,#dfe5ec);background:color-mix(in srgb,var(--surface,#f6f8fa) 90%,var(--accent,#315b7f))}
.library-dropzone:focus-visible{outline:2px solid var(--accent,#315b7f);outline-offset:2px}
.library-grid .library-file .library-tools{flex:0 0 auto}
.library-standalone{height:100vh;height:100dvh;display:flex;flex-direction:column}
.library-standalone>.library-browser{flex:1;min-height:0}

/* Windows File Explorer composition: address/search, commands, navigation tree,
   aligned details list and a compact status bar. Colors follow the active site. */
.library-explorer{--explorer-rule:var(--border,var(--line,#d5dce3));--explorer-bg:var(--surface,var(--panel,var(--paper,#fff)));--explorer-soft:color-mix(in srgb,var(--explorer-bg) 96%,var(--accent,#315b7f));--explorer-selected:color-mix(in srgb,var(--explorer-bg) 86%,var(--accent,#315b7f));--explorer-columns:minmax(220px,1fr) 170px 170px 90px 36px;font-family:system-ui,-apple-system,"Segoe UI",sans-serif;font-size:13px;line-height:1.4;gap:0;border:1px solid var(--explorer-rule);border-radius:8px;background:var(--explorer-bg);color:var(--text,var(--ink,#243444));isolation:isolate}
.library-explorer,.library-explorer *{box-sizing:border-box}
.library-explorer button{display:inline-flex;align-items:center;justify-content:center;gap:7px;font:inherit;border:1px solid transparent;background:transparent;cursor:pointer;border-radius:5px;padding:6px 9px;min-width:0;white-space:nowrap;min-height:32px}
.library-explorer button:hover:not(:disabled){background:var(--hover,var(--explorer-selected));border-color:var(--explorer-rule)}
.library-explorer button:disabled{opacity:.4;cursor:default}
.library-explorer button:focus-visible,.library-explorer [tabindex]:focus-visible{outline:2px solid var(--accent,#315b7f);outline-offset:-2px}
.explorer-icon{width:18px;height:18px;flex:none}
.explorer-location{display:flex;align-items:center;gap:10px;padding:10px 12px;border-bottom:1px solid var(--explorer-rule);min-width:0;background:var(--explorer-soft)}
.explorer-navigation{display:flex;gap:2px;flex:none}.explorer-navigation button{padding:6px;width:32px}.explorer-navigation button>span{display:none}
.explorer-address{display:flex;align-items:center;flex:1;flex-wrap:nowrap;gap:1px;border:1px solid var(--explorer-rule);border-radius:5px;min-height:34px;min-width:100px;overflow:auto;background:var(--explorer-bg);padding:0 4px;scrollbar-width:none}
.explorer-address button{flex:none;max-width:220px;padding:4px 5px}.explorer-address button span{overflow:hidden;text-overflow:ellipsis}.explorer-address .explorer-icon{color:var(--accent,#315b7f)}
.explorer-path-separator{opacity:.5;flex:none;padding:0 2px}
.explorer-search{display:flex;align-items:center;gap:6px;flex:0 1 400px;min-width:130px;border:1px solid var(--explorer-rule);border-radius:5px;background:var(--explorer-bg);padding:0 8px;min-height:34px}
.library-explorer .explorer-search input{width:100%;min-width:0;border:0;background:transparent;padding:6px 0;border-radius:0;font:inherit;outline-offset:0}.explorer-search>.explorer-icon{width:16px;opacity:.6}.explorer-search button{padding:3px;flex:none}
.explorer-commandbar{display:flex;align-items:center;gap:3px;padding:7px 10px;border-bottom:1px solid var(--explorer-rule);overflow-x:auto;min-height:49px;scrollbar-width:thin}
.explorer-commandbar>button{flex:none}.explorer-commandbar>button[data-selection]>span{display:none}.explorer-divider{height:22px;width:1px;background:var(--explorer-rule);margin:0 5px;flex:none}.explorer-command-spacer{flex:1;min-width:8px}
.explorer-commandbar .explorer-tree-toggle{display:none}
.explorer-search-options{display:flex;align-items:center;gap:14px;padding:5px 13px;font-size:12px;color:var(--muted,var(--ink2,#637081));min-height:28px}.explorer-search-options span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.library-explorer .library-scope{gap:5px}.library-explorer .library-scope input{margin:0;accent-color:var(--accent,#315b7f)}
.explorer-pending:empty{display:none}.explorer-pending{font-size:12px;max-height:80px;overflow:auto;padding:0 12px}.explorer-pending p{margin:3px 0}
.library-explorer .explorer-body{display:flex;flex:1 1 0;min-height:0;overflow:hidden;border-top:1px solid var(--explorer-rule)}
.explorer-sidebar{flex:0 0 205px;min-width:0;border-right:1px solid var(--explorer-rule);background:var(--explorer-soft);overflow:auto;padding:8px 4px;scrollbar-width:thin}.explorer-sidebar-title{font-size:11px;font-weight:600;color:var(--muted,var(--ink2,#637081));padding:6px 12px 10px}
.explorer-tree-row{display:flex;align-items:center;padding-left:calc(var(--tree-level)*15px);border-radius:5px;min-height:34px}.explorer-tree-node.is-current>.explorer-tree-row{background:var(--explorer-selected)}
.library-explorer .explorer-tree-row button[data-explorer-expand]{font-size:18px;flex:none;width:22px;padding:0;min-height:30px}.library-explorer .explorer-tree-row button[data-lib-folder]{flex:1;justify-content:flex-start;padding:4px 5px;border:0;min-width:0;font-size:13px}.explorer-tree-row button span:not(.explorer-file-icon){overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.explorer-tree-row .explorer-file-icon{width:20px;height:20px}.explorer-tree-row .explorer-file-icon svg{width:19px;height:19px}.explorer-tree-empty{display:block;font-size:11px;color:var(--muted,#637081);padding:6px 12px 6px 36px}.library-explorer .explorer-tree-retry{font-size:11px;white-space:normal;text-align:left}
.explorer-content{display:flex;flex-direction:column;flex:1;min-width:0;min-height:0;overflow:hidden}
.explorer-list-head{display:grid;grid-template-columns:var(--explorer-columns);align-items:center;border-bottom:1px solid var(--explorer-rule);background:var(--explorer-soft);min-height:33px;padding:0 calc(7px + var(--explorer-gutter,0px)) 0 7px}
.explorer-list-head[hidden]{display:none}
.explorer-list-head>button{justify-content:flex-start;border-radius:0;border-right:1px solid var(--explorer-rule);font-size:12px;padding:5px 10px;min-height:30px}.explorer-list-head button:first-child{padding-left:12px}.explorer-list-head button:nth-child(4){justify-content:flex-end}
.library-explorer .explorer-dropzone{flex:1;min-height:0;overflow:auto;padding:4px 7px 20px;border:0;border-radius:0;background:var(--explorer-bg);scrollbar-gutter:stable}
.library-explorer .library-files{display:block}.library-explorer .explorer-file{display:grid;grid-template-columns:var(--explorer-columns);align-items:center;gap:0;min-height:36px;padding:0;border:1px solid transparent;border-radius:4px;margin:1px 0}
.library-explorer .explorer-file:hover{background:var(--explorer-soft)}.library-explorer .explorer-file.is-selected{background:var(--explorer-selected);border-color:color-mix(in srgb,var(--accent,#315b7f) 40%,transparent)}
.library-explorer .library-name{display:flex;justify-content:flex-start;align-items:center;gap:9px;width:100%;min-width:0;padding:4px 10px;border:0;border-radius:0;background:transparent!important;text-align:left;overflow:hidden;white-space:normal}
.explorer-filename{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}.library-explorer .explorer-filename small{font-size:11px;margin:1px 0 0;overflow:hidden;text-overflow:ellipsis}
.explorer-file-icon{display:inline-grid;place-items:center;flex:none;width:25px;height:25px;color:var(--accent,#647687)}.explorer-file-icon.is-folder{color:#b28725}.explorer-file-icon.is-folder svg{fill:color-mix(in srgb,#e4b344 30%,transparent)}.explorer-file-icon.is-sheet{color:#248052}.explorer-file-icon.is-pdf{color:#c94c49}.explorer-file-icon.is-document{color:#4779b5}.explorer-file-icon.is-slide{color:#cf7a37}
.explorer-date,.explorer-type,.explorer-size{padding:4px 10px;color:var(--muted,var(--ink2,#637081));overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px}.explorer-size{text-align:right;font-variant-numeric:tabular-nums}
.library-explorer .explorer-row-menu{padding:4px 3px;opacity:0;min-height:30px;margin:0;justify-self:center;max-width:100%}.explorer-file:hover .explorer-row-menu,.explorer-file:focus-within .explorer-row-menu,.explorer-file.is-selected .explorer-row-menu{opacity:1}
.explorer-empty{margin:45px 14px;text-align:center;color:var(--muted,var(--ink2,#637081))}
.library-explorer .explorer-dropzone.drop-active{outline:2px dashed var(--accent,#315b7f);outline-offset:-4px;background:var(--explorer-selected)}
.library-explorer .explorer-file.library-drop-target{outline:2px solid var(--accent,#315b7f);outline-offset:-2px;background:var(--explorer-selected)}
.library-explorer .library-files.explorer-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(130px,1fr));gap:7px;padding:6px}.library-explorer .explorer-grid .explorer-file{display:flex;flex-direction:column;position:relative;align-items:center;padding:12px 6px;min-height:126px;border:1px solid transparent}.library-explorer .explorer-grid .library-name{flex-direction:column;align-items:center;text-align:center;padding:0 4px;flex:1;gap:7px}.explorer-grid .explorer-file-icon{width:42px;height:42px}.explorer-grid .explorer-file-icon svg{width:38px;height:38px}.explorer-grid .explorer-filename{white-space:normal;overflow-wrap:anywhere;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;font-size:12px}.explorer-grid .explorer-date,.explorer-grid .explorer-type{display:none}.explorer-grid .explorer-size{font-size:11px;text-align:center;margin:2px 0}.library-explorer .explorer-grid .explorer-row-menu{position:absolute;right:1px;top:1px}
.explorer-details{flex:0 0 225px;min-width:0;padding:22px 18px;border-left:1px solid var(--explorer-rule);overflow:auto;background:var(--explorer-soft)}.explorer-details[hidden]{display:none}.explorer-details>.explorer-file-icon{width:60px;height:60px}.explorer-details>.explorer-file-icon svg{width:48px;height:48px}.explorer-details h3{font-size:15px;overflow-wrap:anywhere;margin:12px 0 18px}.explorer-details dt{color:var(--muted,var(--ink2,#637081));font-size:11px;margin-top:14px}.explorer-details dd{margin:4px 0;overflow-wrap:anywhere;font-size:12px}.explorer-details p{font-size:12px;color:var(--muted,#637081)}
.explorer-footer{display:flex;align-items:center;gap:12px;min-height:31px;padding:3px 10px;border-top:1px solid var(--explorer-rule);background:var(--explorer-soft);font-size:11px;min-width:0}.explorer-footer>span{white-space:nowrap;flex:none}.library-explorer .library-status{font-size:11px;min-height:0;margin:0;flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.explorer-footer .explorer-view-switch{display:flex;gap:2px;margin-left:auto}.explorer-view-switch button{min-height:24px;padding:3px 5px}.explorer-view-switch button>span{display:none}.library-explorer button[aria-pressed=true]{background:var(--explorer-selected);border-color:var(--explorer-rule)}
.explorer-context-menu{position:fixed;z-index:20000;min-width:200px;padding:5px;border:1px solid var(--explorer-rule);border-radius:8px;background:var(--explorer-bg);box-shadow:0 8px 28px #0003}.library-explorer .explorer-context-menu button{display:flex;justify-content:flex-start;width:100%;text-align:left;padding:7px 9px}.explorer-context-menu small{margin-left:auto;color:var(--muted,#637081);font-size:11px}
@media(max-width:1200px){.explorer-sidebar{flex-basis:175px}.explorer-details{flex-basis:190px}}
@media(max-width:950px){.explorer-details{flex-basis:170px}.explorer-sidebar{flex-basis:150px}.explorer-commandbar>button[data-explorer=details]>span{display:none}}
@media(max-width:700px){.library-explorer{border-radius:6px}.explorer-location{flex-wrap:wrap;gap:6px;padding:6px}.explorer-navigation{gap:0}.explorer-navigation button{width:30px;padding:4px}.explorer-address{flex-basis:calc(100% - 150px);min-width:80px}.explorer-search{flex:1 1 100%;min-width:0}.explorer-commandbar{padding:6px;gap:1px}.explorer-commandbar>button[data-explorer=upload]>span{display:none}.explorer-commandbar .explorer-tree-toggle{display:inline-flex}.explorer-commandbar .explorer-tree-toggle>span{display:none}.explorer-sidebar{display:none;flex-basis:145px}.explorer-tree-visible .explorer-sidebar{display:block}.explorer-details{display:none}.explorer-footer{gap:8px}.explorer-footer .library-status{max-width:100%;white-space:normal}.explorer-search-options{padding:5px 8px}.library-explorer .explorer-file{min-height:44px}.library-explorer .explorer-row-menu{opacity:1;min-height:40px}.library-explorer .library-name{padding:6px 7px;min-height:42px}.library-explorer .explorer-context-menu button{min-height:44px}.library-explorer .explorer-details:not([hidden]){display:block;position:absolute;inset:auto 6px 40px;max-height:50%;border:1px solid var(--explorer-rule);border-radius:8px;box-shadow:0 5px 20px #0002;z-index:2}.library-explorer{position:relative}.explorer-type,.explorer-date,.explorer-size{padding:4px 6px}}
@media(pointer:coarse){.library-explorer .explorer-row-menu{opacity:1}.library-explorer .explorer-commandbar>button,.library-explorer .explorer-tree-row button{min-height:44px}.library-explorer .explorer-search input{font-size:16px;min-height:38px}}
.collection.library-collection{min-width:0;width:100%}.collection.library-collection .collection-head{padding:12px 18px;min-height:50px}.collection.library-collection .collection-head h1{font-size:17px}.collection.library-collection .collection-head p{display:none}.collection.library-collection .collection-list.library-explorer{padding:0;border:0;border-radius:0}
@media(max-width:700px){.explorer-body{position:relative}.explorer-tree-visible .explorer-sidebar{position:absolute;left:0;top:0;bottom:0;width:210px;max-width:80%;z-index:4;box-shadow:4px 0 14px #0002}}
.explorer-tree-row.library-drop-target{outline:2px solid var(--accent,#315b7f);outline-offset:-2px;background:var(--explorer-selected)}
/* Cached (stale) listing while the server is being checked: dates/sizes dim, footer shows a sync state. */
.library-stale .explorer-date,.library-stale .explorer-size,.library-stale .explorer-type{opacity:.55}
.explorer-sync{display:inline-flex;align-items:center;gap:4px;white-space:nowrap;color:var(--muted,#637081)}.explorer-sync[hidden]{display:none}
.explorer-sync .explorer-icon{width:13px;height:13px}.explorer-sync[data-sync=checking] .explorer-icon{animation:explorer-sync-spin 1s linear infinite}.explorer-sync[data-sync=failed]{color:#a0522d}
@keyframes explorer-sync-spin{to{transform:rotate(360deg)}}
@media(prefers-reduced-motion:reduce){.explorer-sync .explorer-icon{animation:none}}

/* Column widths follow the list's own width (sidebar and info panel included), not the viewport:
   wide = name gets the most room; then the type column, then the long date, then the date go. */
.explorer-content{container-type:inline-size;--explorer-columns:minmax(240px,2fr) 150px 150px 90px 36px}
.explorer-search-scope{display:inline-flex;align-items:center;gap:5px;flex:none;font-size:12px;color:var(--muted,var(--ink2,#637081));white-space:nowrap;cursor:pointer}.explorer-search-scope input{margin:0;width:14px;height:14px}
.explorer-search-options[hidden]{display:none}
.explorer-date .date-short{display:none}
@container (max-width:780px){.explorer-content .explorer-list-head,.explorer-content>.library-dropzone{--explorer-columns:minmax(200px,1fr) 140px 110px 80px 32px}}
@container (max-width:640px){.explorer-content .explorer-list-head,.explorer-content>.library-dropzone{--explorer-columns:minmax(180px,1fr) 110px 70px 32px}.explorer-content .explorer-list-head button:nth-child(3),.explorer-content .explorer-file>.explorer-type{display:none}.explorer-content .explorer-date .date-long{display:none}.explorer-content .explorer-date .date-short{display:inline}}
@container (max-width:460px){.explorer-content .explorer-list-head,.explorer-content>.library-dropzone{--explorer-columns:minmax(120px,1fr) 70px 36px}.explorer-content .explorer-list-head button:nth-child(2),.explorer-content .explorer-file>.explorer-date{display:none}.explorer-content .explorer-list-head button:nth-child(4){justify-content:flex-end}}
/* Independent splitter for the library folder tree; mobile keeps the overlay. */
.explorer-resizer{flex:0 0 6px;position:relative;cursor:col-resize;touch-action:none;outline:none;background:var(--explorer-soft)}
.explorer-resizer::after{content:"";position:absolute;inset:0 2px;background:var(--explorer-rule)}
.explorer-resizer:hover::after,.explorer-resizer:focus-visible::after,.explorer-resizing .explorer-resizer::after{inset:0 1px;background:var(--accent,#315b7f)}
.explorer-resizing,.explorer-resizing *{cursor:col-resize!important;user-select:none!important}
.explorer-resizer[hidden]{display:none}
@media(max-width:700px){.explorer-resizer{display:none}}

/* Trash is a restore-only view; explicit hidden wins over toolbar layout rules. */
.library-explorer [hidden]{display:none!important}
.library-explorer.library-trash .explorer-sidebar,.library-trash .explorer-divider{display:none}
.library-trash .explorer-commandbar>button[data-explorer=restore]>span{display:inline}

/* Header stays aligned with the file region when manual columns require horizontal scrolling. */
.explorer-header-scroll{flex:none;overflow:hidden;min-width:0}
.explorer-list-head{position:relative}
.explorer-column-grip{position:absolute;top:0;bottom:0;width:6px;cursor:col-resize;touch-action:none;outline:none;z-index:1}
.explorer-column-grip:hover,.explorer-column-grip:focus-visible,.explorer-columns-resizing .explorer-column-grip{background:color-mix(in srgb,var(--accent,#315b7f) 45%,transparent)}
.explorer-columns-resizing,.explorer-columns-resizing *{cursor:col-resize!important;user-select:none!important}
.explorer-custom-columns .explorer-list-head,.explorer-custom-columns>.library-dropzone{--explorer-columns:var(--explorer-custom-columns)}
.explorer-custom-columns .explorer-list-head{min-width:calc(var(--explorer-row-width) + 14px + var(--explorer-gutter,0px))}
.explorer-custom-columns .library-files:not(.explorer-grid){min-width:var(--explorer-row-width)}
.explorer-content.explorer-custom-columns .explorer-list-head>button,.explorer-custom-columns .library-files:not(.explorer-grid) .explorer-file>.explorer-type,.explorer-custom-columns .library-files:not(.explorer-grid) .explorer-file>.explorer-date{display:flex}
.explorer-custom-columns .explorer-file>.explorer-date .date-long{display:inline}.explorer-custom-columns .explorer-file>.explorer-date .date-short{display:none}
.explorer-content:has(.explorer-grid) .explorer-header-scroll{display:none}
@media(max-width:700px){.explorer-column-grip{display:none}}
/* AI·자료실 2단계 — 요약 칸·단계·이유·계정 사용처·폴더 고르기(개인·공동 같은 모양) */
.drive-settings .drive-summary{border:1px solid var(--rule,#ced6df);border-radius:12px;padding:14px 16px;margin:12px 0}
.drive-settings .drive-summary-head{display:flex;align-items:center;justify-content:space-between;gap:10px}
.drive-settings .drive-summary-head h3{margin:0}
.drive-settings .drive-badge{flex:none;font-size:12px;font-weight:700;border-radius:99px;padding:2px 10px;background:var(--paper2,#eeeee3);color:var(--accent,#425b46)}
.drive-settings .drive-facts{display:grid;grid-template-columns:max-content minmax(0,1fr);gap:4px 14px;margin:12px 0}
.drive-settings .drive-facts dt{color:var(--ink2,#63695d)}.drive-settings .drive-facts dd{margin:0;overflow-wrap:anywhere}
.drive-settings .drive-replace{border-top:1px solid var(--rule,#ced6df);margin-top:12px;padding-top:6px}
.drive-settings .drive-replace>summary{min-height:44px;display:flex;align-items:center;font-weight:600;cursor:pointer}
.drive-settings .drive-steps{list-style:none;margin:8px 0 12px;padding:0;display:flex;gap:6px;flex-wrap:wrap}
.drive-settings .drive-steps li{border-radius:8px;padding:4px 10px;font-size:12px;background:var(--paper2,#eeeee3);color:var(--ink2,#63695d)}
.drive-settings .drive-steps li.done{color:var(--accent,#425b46);font-weight:600}
.drive-settings .drive-steps li.now{outline:1.5px solid var(--accent,#425b46);color:var(--text,var(--ink,#26332c));font-weight:700;background:none}
.drive-settings .drive-link-row{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:10px 0}
.drive-settings [aria-disabled=true]{opacity:.5;cursor:not-allowed}
.drive-settings.drive-busy button,.drive-settings.drive-busy select,.drive-settings.drive-busy input{cursor:progress}
.drive-settings .drive-usage{border-radius:8px;background:var(--paper2,#eeeee3);padding:8px 12px;margin:8px 0}
.drive-settings .drive-usage p{margin:2px 0}.drive-settings .drive-usage ul{margin:4px 0;padding-left:18px}
.drive-settings .drive-crumbs{display:flex;align-items:center;gap:4px;flex-wrap:wrap;font-size:13px;margin:8px 0 2px}
.drive-settings .drive-crumbs button{border:0;background:none;padding:0 2px;min-height:32px;color:var(--accent,#425b46);text-decoration:underline;cursor:pointer;font:inherit}
.drive-settings .drive-folder-count{font-size:12px;color:var(--ink2,#63695d);margin:2px 0 6px}
.drive-settings .drive-folder-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:6px}
.drive-settings .drive-folder{display:flex;gap:6px;align-items:center;margin:0}
.drive-settings .drive-folder-open{flex:1;min-width:0;display:flex;align-items:center;gap:8px;text-align:left;min-height:40px}
.drive-settings .drive-folder-open span:nth-child(2){flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.drive-settings .drive-folder.chosen .drive-folder-open{outline:1.5px solid var(--accent,#425b46)}
.drive-settings .drive-folder [aria-pressed=true]{background:var(--accent,#425b46);color:var(--on-accent,#fff);border-color:var(--accent,#425b46);font-weight:700}
.drive-confirm{border:1px solid var(--rule,#ced6df);border-radius:12px;padding:18px 20px;max-width:min(440px,calc(100vw - 32px));background:var(--surface,var(--paper,#fff));color:var(--text,var(--ink,#26332c))}
.drive-confirm h2{font-size:16px;margin:0 0 8px}.drive-confirm ul{margin:0 0 14px;padding-left:18px;line-height:1.6}
.drive-confirm .drive-actions{display:flex;gap:8px;justify-content:flex-end}.drive-confirm button{min-height:40px;padding:0 14px}
.drive-confirm .drive-danger{background:#9A3412;color:#fff;border-color:#9A3412}

/* 자료실 연결 CTA는 배경·글자를 함께 지정한다. 테마의 밝은 글자만 남는 충돌 방지. */
html .drive-settings button.primary{background:var(--accent,#315b7f);color:var(--on-accent,#fff);border-color:var(--accent,#315b7f);font-weight:600}
html .drive-settings button.primary:hover:not([aria-disabled=true]){filter:brightness(.94)}
.drive-settings .drive-current-folder{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap;margin:8px 0}
.drive-settings .drive-current-folder span{min-width:0;overflow-wrap:anywhere}
.drive-settings .drive-current-folder button{flex:none}
.drive-settings .drive-current-folder [aria-pressed=true]{background:var(--accent,#315b7f);color:var(--on-accent,#fff);border-color:var(--accent,#315b7f)}
.drive-settings .drive-selected-folder:not(:empty){padding:10px 12px;border:1px solid var(--rule,#ced6df);border-radius:8px;background:var(--hover,var(--paper2,#f2f4f5));font-weight:600;overflow-wrap:anywhere}

.drive-settings label.drive-consent{flex-wrap:nowrap;align-items:flex-start}
.drive-settings .drive-consent input{margin-top:4px}
.drive-settings .drive-consent span{min-width:0}

.library-shared-label{font-size:11px;color:var(--muted,#596779);font-weight:400;margin-left:6px}

/* Keep desktop explorer controls in their original inline flow. */
.explorer-command-shell,.explorer-options{display:contents}
.library-explorer .explorer-options-toggle{display:none}
.explorer-options>button{flex:none}
@media(max-width:600px){
 .collection.library-collection>.collection-head{display:none}
 .explorer-command-shell{display:flex;position:relative;z-index:5;min-width:0;border-bottom:1px solid var(--explorer-rule)}
 .explorer-command-shell>.explorer-commandbar{flex:1;min-width:0;border-bottom:0}
 .library-explorer .explorer-options-toggle{display:inline-flex;flex:none;width:44px;border:0;border-left:1px solid var(--explorer-rule);border-radius:0;background:var(--explorer-bg);align-self:stretch}
 .explorer-options-toggle>span{display:none}
 .explorer-commandbar .explorer-options{display:none;position:absolute;right:6px;top:100%;width:190px;padding:5px;background:var(--explorer-bg);border:1px solid var(--explorer-rule);border-radius:8px;box-shadow:0 6px 20px #0002;z-index:10}
 .explorer-options-open .explorer-options{display:flex;flex-direction:column}
 .explorer-options>button,.explorer-options .explorer-tree-toggle{display:flex;width:100%;min-height:44px;justify-content:flex-start}
 .explorer-options>button>span,.explorer-options .explorer-tree-toggle>span{display:inline}
}
@media(min-width:601px) and (max-width:950px){.explorer-options>button[data-explorer=details]>span{display:none}}
@media(pointer:coarse){.library-explorer .explorer-options>button{min-height:44px}}
