/* The Ingress V2 web system; task-layout adaptations for Paste. */
body { background:var(--ground); font-size:15px; }
::selection { background:var(--spectrum-blue); color:var(--ground); }
input,textarea { caret-color:var(--ink); }
* { scrollbar-width:thin; scrollbar-color:var(--ink-muted) var(--ground); }
::-webkit-scrollbar { width:8px; height:8px; }
::-webkit-scrollbar-thumb { background:var(--ink-muted); border:2px solid var(--ground); border-radius:8px; }
button { font:inherit; }
[hidden] { display:none !important; }
button:disabled { opacity:.5; cursor:not-allowed; }
button:focus-visible,[tabindex]:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible {
  outline:2px solid var(--spectrum-blue); outline-offset:3px;
}
.ui-icon { width:18px; height:18px; flex-shrink:0; display:inline-block; vertical-align:middle; pointer-events:none; }
button .ui-icon { margin-inline-end:5px; }
.nav-glyph .ui-icon,.tab-glyph .ui-icon { margin:0; }
.nav-glyph { width:20px; display:flex; align-items:center; color:inherit; }
.tab-glyph { display:flex; }
#brand-motion { position:fixed; inset:0; width:100%; height:100%; object-fit:cover; z-index:0; pointer-events:none; }
#brand-header { position:relative; z-index:1; display:flex; align-items:center; justify-content:space-between; max-width:1600px; width:calc(100% - 48px); height:80px; margin:auto; }
.brand-lockup { display:flex; align-items:center; gap:24px; }
.brand-logo { display:block; width:120px; height:auto; }
.brand-product { border-inline-start:1px solid var(--border-main); padding-inline-start:24px; font-size:21px; font-weight:600; }
.brand-purpose { color:var(--ink-muted); font-size:14px; }
.spectrum-bar { display:flex; height:4px; width:144px; gap:3px; }
.spectrum-bar i { flex:1; border-radius:2px; background:var(--spectrum-gray); }
.spectrum-bar i:nth-child(2){background:var(--spectrum-pink)}
.spectrum-bar i:nth-child(3){background:var(--spectrum-peach)}
.spectrum-bar i:nth-child(4){background:var(--spectrum-yellow)}
.spectrum-bar i:nth-child(5){background:var(--spectrum-green)}
.spectrum-bar i:nth-child(6){background:var(--spectrum-cyan)}
.spectrum-bar i:nth-child(7){background:var(--spectrum-blue)}
.spectrum-bar i:nth-child(8){background:var(--spectrum-violet)}
.spectrum-bar i:nth-child(9){background:var(--spectrum-magenta)}
#app { position:relative; z-index:1; width:calc(100% - 48px); max-width:1600px; height:calc(100dvh - 104px); margin:0 auto 24px; grid-template-columns:208px minmax(0,1fr); background:var(--web-frame-bg); border:1px solid var(--border-main); border-radius:10px; overflow:hidden; }
#sidebar { width:auto; background:transparent; padding:24px 16px 16px; gap:24px; }
#sidebar > * { flex-shrink:0; }
.editor-body { min-height:0; }
.editor-body > * { flex-shrink:0; }
.editor-title-input { width:100%; min-width:0; }
.btn-new-note,.btn-primary { border-radius:8px; min-height:44px; display:inline-flex; align-items:center; justify-content:center; gap:4px; padding:10px 16px; }
.btn-new-note { text-align:center; }
.btn-primary:hover,.btn-new-note:hover { background:var(--ink-muted); filter:none; }
.nav-item,.tab-item { border:0; background:transparent; text-align:start; }
.nav-item { min-height:44px; padding:10px; gap:12px; }
.nav-item.selected { background:var(--surface-raised); }
.sidebar-heading { font-family:var(--font-ui); letter-spacing:0; font-size:13px; }
.nav-count,.vps-line,.quota-line,.notes-count-line,.file-meta,.note-card-time { font-family:var(--font-ui); font-variant-numeric:tabular-nums; }
.sidebar-footer { padding-top:16px; }
.vps-line { font-size:12px; letter-spacing:0; }
.btn-icon { width:32px; height:32px; }
.folder-item { min-height:36px; }
.tag-chip { font-size:12px; padding:4px 9px; }
.notes-screen { grid-template-columns:minmax(280px,330px) minmax(0,1fr); }
.notes-list-col { width:auto; background:transparent; }
.notes-list-header { padding:20px 16px 16px; gap:12px; }
.notes-search,.files-search { min-height:44px; font-size:16px; border-radius:8px; background:var(--surface-raised); }
input::placeholder,textarea::placeholder { color:var(--ink-muted); opacity:1; }
.owner-filter-row { flex-wrap:wrap; gap:6px; }
.owner-chip,.file-owner-chip,.fav-chip { font-family:var(--font-ui); font-size:12px; padding:6px 10px; min-height:32px; border-radius:8px; }
.owner-chip.active,.file-owner-chip.active,.fav-chip.active { background:var(--ink); color:var(--ground); border-color:var(--ink); }
.note-card { padding:16px; border-bottom:1px solid var(--border-main); }
.note-card.selected { background:var(--surface-raised); box-shadow:inset 0 0 0 1px var(--border-accent); }
.note-card-title { white-space:normal; overflow-wrap:anywhere; font-size:16px; line-height:1.5; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; }
.note-card-folder { display:flex; align-items:center; gap:6px; color:var(--ink-muted); margin-bottom:8px; font-size:12px; }
.note-card-folder .ui-icon { width:14px; height:14px; }
.note-card-excerpt { font-size:14px; color:var(--ink-muted); line-height:1.6; margin-top:8px; }
.note-card-time { font-size:12px; color:var(--ink-muted); }
.tag-chip.active { color:var(--ground); }
.note-pin-btn,.file-pin-btn { min-width:32px; min-height:32px; display:inline-flex; align-items:center; justify-content:center; color:var(--ink-muted); }
.note-pin-btn .ui-icon,.file-pin-btn .ui-icon { width:16px; height:16px; margin:0; }
.note-pin-btn.pinned,.file-pin-btn.pinned { color:var(--spectrum-yellow); }
.owner-badge { font-family:var(--font-ui); font-size:11px; border-radius:4px; }
.owner-badge.ai { color:var(--spectrum-cyan); border-color:var(--spectrum-cyan); }
.editor-head { padding:16px 24px; flex-wrap:wrap; gap:12px; background:transparent; }
.editor-breadcrumb { font-family:var(--font-ui); color:var(--ink-muted); font-size:12px; }
.editor-actions { gap:6px; flex-wrap:wrap; }
.btn-ghost { border-radius:8px; min-height:36px; padding:6px 10px; display:inline-flex; align-items:center; justify-content:center; font-family:var(--font-ui); gap:3px; }
.btn-ghost:hover { background:var(--surface-raised); }
.btn-ghost.danger { color:var(--danger); }
.editor-title-input { padding:24px 24px 8px; font-size:clamp(24px,2.1vw,32px); }
.editor-tag-row { padding:8px 24px; gap:8px; }
.editor-tag-chip,.editor-tag-add { font-size:13px; padding:5px 10px; }
.mode-switch-btn { font-family:var(--font-ui); min-height:36px; font-size:13px; }
.editor-toolbar { padding:12px 24px; border-bottom:1px solid var(--border-main); }
.tb-btn { min-width:32px; min-height:32px; border-radius:6px; display:inline-flex; align-items:center; justify-content:center; font-family:var(--font-ui); }
.tb-btn:hover { background:var(--surface-raised); }
.editor-content-ta { max-width:none; padding:20px 24px; font-size:16px; line-height:1.8; min-height:180px; }
.editor-content-ta.source-mode { font-family:var(--font-mono); font-size:15px; }
.attachments-block { padding:16px 24px; }
.editor-footer { padding:12px 24px; gap:12px; flex-wrap:wrap; font-family:var(--font-ui); font-size:12px; }
.note-save-line { display:flex; align-items:center; gap:12px; flex-wrap:wrap; padding:12px 24px; border-top:1px solid var(--border-main); color:var(--ink-muted); font-size:13px; }
.files-header { padding:24px 24px 16px; gap:12px; flex-wrap:wrap; }
.files-title { font-size:26px; font-weight:600; width:100%; }
.files-search { flex:1; min-width:180px; }
.files-tools { position:relative; }
.files-tools summary { cursor:pointer; list-style:none; min-height:44px; }
.files-tools summary::-webkit-details-marker { display:none; }
.files-tools-actions { position:absolute; right:0; top:calc(100% + 8px); z-index:20; padding:8px; width:210px; display:flex; flex-direction:column; gap:8px; background:var(--surface-raised); border:1px solid var(--border-main); border-radius:8px; }
.files-tools:not([open]) .files-tools-actions { display:none; }
.files-sort-select { font-family:var(--font-ui); font-size:14px; min-height:44px; }
.view-btn { min-width:44px; min-height:44px; }
.view-btn .ui-icon { margin:0; }
.files-filter-row { padding:0 24px 16px; gap:12px; flex-wrap:wrap; }
.files-quota { font-family:var(--font-ui); }
.files-quota-track { max-width:100px; }
.files-breadcrumb-row { padding:12px 24px; gap:8px; border-top:1px solid var(--border-main); }
.files-scope-toggle { display:flex; gap:4px; flex-shrink:0; }
.files-scope-toggle .btn-ghost { min-height:44px; }
.files-scope-toggle [aria-pressed="true"] { background:var(--ink); color:var(--ground); }
.files-scope-hint { color:var(--ink-muted); font-size:12px; }
.files-breadcrumb-row { flex-wrap:wrap; }
.files-more { grid-column:1/-1; display:flex; flex-wrap:wrap; align-items:center; justify-content:center; gap:12px; padding:16px; color:var(--ink-muted); font-size:13px; }
.file-location { display:flex; align-items:center; gap:6px; text-align:left; color:var(--ink-muted); background:transparent; border:0; padding:4px 0; min-height:44px; max-width:100%; overflow-wrap:anywhere; font-family:var(--font-ui); font-size:12px; cursor:pointer; }
.file-location .ui-icon { flex-shrink:0; }
.file-location:hover { color:var(--ink); text-decoration:underline; }
.install-description,.install-help { color:var(--ink-muted); font-size:14px; line-height:1.7; overflow-wrap:anywhere; }
.install-help summary { cursor:pointer; min-height:44px; padding-block:10px; }
.install-help p { margin-block:8px; }
#install-status:empty { display:none; }
#btn-install-app[hidden],#install-help[hidden] { display:none; }
.crumb { min-height:32px; font-family:var(--font-ui); font-size:14px; max-width:100%; overflow-wrap:anywhere; }
.files-grid { grid-template-columns:repeat(auto-fill,minmax(220px,1fr)); gap:16px; padding:20px 24px 104px; }
.file-card { padding:16px; gap:12px; background:var(--surface-raised); border-radius:8px; }
.file-card.selected { outline:1px solid var(--ink); outline-offset:-1px; }
.file-check { visibility:visible; width:22px; height:22px; accent-color:var(--ink); }
.file-card:focus-within .file-menu-btn { visibility:visible; }
.file-thumb { width:100%; height:140px; background-size:contain; background-repeat:no-repeat; background-color:var(--ground); border-radius:6px; }
.file-thumb.folder-thumb { height:64px; width:64px; background:transparent; }
.folder-thumb .ui-icon { width:36px; height:36px; }
.file-name-row { display:grid; grid-template-columns:minmax(0,1fr) auto auto; align-items:start; gap:4px; }
.file-name { grid-column:1/-1; white-space:normal; overflow-wrap:anywhere; font-size:15px; line-height:1.5; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; min-height:45px; }
.file-owner-badges { grid-column:1; grid-row:2; display:flex; flex-wrap:wrap; gap:4px; align-self:center; }
.file-name-row .file-pin-btn { grid-column:2; grid-row:2; }
.file-name-row .file-menu-btn { grid-column:3; grid-row:2; }
.file-menu-btn { visibility:visible; min-width:32px; min-height:32px; display:inline-flex; align-items:center; justify-content:center; }
.file-menu-btn .ui-icon { margin:0; }
.file-meta { font-size:12px; }
.files-grid.list-view .file-info { flex-direction:column; align-items:stretch; }
.files-grid.list-view .file-name-row { grid-template-columns:minmax(0,1fr) auto auto auto; align-items:center; width:100%; }
.files-grid.list-view .file-name { grid-column:1; grid-row:1; min-height:0; }
.files-grid.list-view .file-pin-btn { grid-column:2; grid-row:1; }
.files-grid.list-view .file-owner-badges { grid-column:3; grid-row:1; }
.files-grid.list-view .file-menu-btn { grid-column:4; grid-row:1; }
.files-grid.list-view .file-thumb { width:56px; height:56px; }
.files-grid.list-view .file-check { visibility:visible; }
.file-dropzone { grid-column:1/-1; min-height:96px; padding:16px; color:var(--ink-muted); }
.file-dropzone.drag-over { background:var(--surface-raised); }
.files-empty { grid-column:1/-1; padding:32px 16px; display:flex; flex-direction:column; align-items:center; gap:12px; text-align:center; color:var(--ink-muted); }
.file-selbar { visibility:hidden; pointer-events:none; width:max-content; max-width:calc(100% - 48px); padding:10px 16px; gap:12px; bottom:40px; background:var(--surface-raised); }
.file-selbar.show { visibility:visible; pointer-events:auto; }
.file-selbar-actions { flex-wrap:nowrap; }
.file-editor-card { background:var(--ground); border-radius:10px; }
.file-editor-card .editor-content-ta { min-height:220px; }
.file-editor-card .editor-toolbar { display:flex; }
.file-editor-card .editor-footer { font-size:13px; }
.pin-wordmark { font-family:var(--font-ui); font-size:40px; letter-spacing:-.02em; color:var(--ink); text-shadow:none; }
.pin-brand { width:140px; margin-bottom:32px; }
.pin-sub,.pin-tip,.pin-err { font-family:var(--font-ui); letter-spacing:0; font-size:14px; }
#toast { max-width:min(720px,calc(100vw - 32px)); background:var(--ink); color:var(--ground); font-family:var(--font-ui); line-height:1.6; }
.modal-title,.modal-input,.modal-msg,.modal-btn,.ctx-item { font-family:var(--font-ui); }
.modal-input { font-size:16px; }
.ctx-item { min-height:44px; }
.move-node { min-height:44px; display:flex; align-items:center; gap:8px; }
.move-card,.modal-box { background:var(--surface-raised); }

@media (max-width:1100px) and (min-width:761px) {
  #app { grid-template-columns:144px minmax(0,1fr); width:calc(100% - 32px); }
  #brand-header { width:calc(100% - 32px); }
  #sidebar { padding:16px 12px; }
  .notes-screen { grid-template-columns:220px minmax(0,1fr); }
  .editor-head,.editor-content-ta,.editor-footer,.note-save-line { padding-inline:16px; }
}
@media (max-width:760px) {
  #brand-header { height:64px; width:calc(100% - 24px); margin:0 auto; }
  .brand-logo { width:104px; }
  .brand-lockup { gap:16px; }
  .brand-product { padding-inline-start:16px; font-size:18px; }
  .brand-purpose { display:none; }
  .spectrum-bar { width:60px; gap:2px; height:3px; }
  #app { grid-template-columns:1fr; width:calc(100% - 24px); height:calc(100dvh - 156px); margin:0 auto 12px; }
  #mobile-tabbar { left:12px; right:12px; bottom:12px; padding:8px 0 max(8px,env(safe-area-inset-bottom)); border:1px solid var(--border-main); border-radius:10px; background:var(--web-frame-bg); min-height:68px; }
  .tab-item { color:var(--ink-muted); }
  .tab-item.selected { color:var(--ink); }
  .tab-glyph .ui-icon { width:20px; height:20px; }
  .tab-label { font-size:12px; }
  .notes-mobile-title-row { padding:16px 16px 0; }
  .notes-list-header { padding:12px 16px; }
  .notes-list { padding-bottom:16px; }
  .notes-fab { bottom:108px; right:28px; border-radius:12px; }
  .notes-fab .ui-icon { width:24px; height:24px; margin:0; }
  .owner-chip,.file-owner-chip,.fav-chip { min-height:44px; flex:1; padding:6px 8px; }
  .note-pin-btn,.file-pin-btn,.file-menu-btn,.btn-icon,.folder-rename-btn { min-width:44px; min-height:44px; }
  .note-card { padding:16px; }
  .note-card-title { font-size:17px; }
  .editor-title-input { font-size:24px; padding:20px 16px 8px; }
  .editor-tag-row,.editor-content-ta,.attachments-block,.editor-footer,.note-save-line { padding-inline:16px; }
  .editor-content-ta { font-size:16px; min-height:160px; padding-block:16px; }
  .editor-footer { flex-wrap:wrap; padding-block:12px; }
  .editor-footer-spacer { display:none; }
  .editor-footer #editor-updated-line { width:100%; }
  .editor-mobile-toolbar { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); gap:4px; overflow:visible; padding:8px; }
  .editor-mobile-toolbar .tb-btn { min-width:44px; min-height:44px; }
  .editor-mobile-toolbar .btn-ghost { padding:4px; font-size:12px; min-width:44px; }
  .editor-mobile-toolbar .ui-icon { margin:0; }
  body:has(.notes-screen.mobile-editor) #brand-header { display:none; }
  body:has(.notes-screen.mobile-editor) #app { height:calc(100dvh - 24px); margin:12px auto; }
  /* Mobile main is block layout: bound Files to the frame so overflow scrolls. */
  .files-screen { height:100%; }
  .files-header { padding:16px; display:grid; grid-template-columns:minmax(0,1fr) auto auto; gap:8px; }
  .files-title { display:block; grid-column:1/3; grid-row:1; font-size:23px; }
  #btn-upload-files { grid-column:3; grid-row:1; }
  .files-search { min-width:0; width:100%; grid-column:1/-1; grid-row:2; }
  .files-sort-select { width:126px; font-size:13px; }
  .files-view-toggle { width:max-content; }
  #btn-new-folder-files { justify-self:end; }
  #btn-upload-folder-files,#btn-upload-files { font-size:13px; min-height:44px; padding:8px 10px; }
  .files-filter-row { padding:0 16px 12px; gap:8px; }
  .files-filter-row .owner-filter-row { width:100%; gap:4px; }
  .files-quota { flex-direction:row; width:100%; justify-content:space-between; }
  .files-breadcrumb-row { padding:8px 16px; flex-wrap:wrap; }
  .crumb { min-height:44px; }
  .files-grid,.files-grid.list-view { padding:12px 12px 104px; gap:8px; }
  .file-card,.files-grid.list-view .file-card { padding:12px 8px; gap:8px; align-items:flex-start; }
  .file-check,.files-grid.list-view .file-check { position:static; width:28px; height:44px; flex-shrink:0; margin:0; }
  .file-thumb,.files-grid.list-view .file-thumb { width:48px; height:60px; flex-shrink:0; }
  .file-thumb.folder-thumb,.files-grid.list-view .folder-thumb { width:36px; height:44px; }
  .folder-thumb .ui-icon { width:28px; height:28px; }
  .file-info,.files-grid.list-view .file-info { flex:1; min-width:0; flex-direction:column; }
  .file-name-row,.files-grid.list-view .file-name-row { display:grid; grid-template-columns:minmax(0,1fr) auto auto; align-items:center; }
  .file-name,.files-grid.list-view .file-name { grid-column:1/-1; min-height:0; font-size:15px; }
  .file-name-row .file-pin-btn,.files-grid.list-view .file-name-row .file-pin-btn { grid-column:2; grid-row:2; }
  .file-name-row .file-owner-badges,.files-grid.list-view .file-owner-badges { grid-column:1; grid-row:2; }
  .file-name-row .file-menu-btn,.files-grid.list-view .file-menu-btn { grid-column:3; grid-row:2; }
  .file-meta { font-size:12px; }
  .file-selbar { bottom:92px; width:calc(100% - 48px); max-width:none; padding:8px; flex-direction:column; gap:4px; }
  .file-selbar-actions { width:100%; display:flex; gap:4px; }
  .file-selbar-actions .btn-ghost { flex:1; min-width:0; min-height:44px; padding:4px; font-size:12px; gap:0; }
  .file-selbar-actions .ui-icon { display:none; }
  .file-editor-card { width:calc(100vw - 24px); max-height:calc(100dvh - 24px); }
  .file-editor-card .file-editor-head { display:flex; padding:12px 16px; gap:8px; }
  .file-editor-card .editor-actions { width:100%; justify-content:space-between; }
  .file-editor-card .editor-toolbar { padding:8px 16px; gap:4px; }
  .file-editor-card .tb-btn { min-width:40px; min-height:44px; }
  .file-editor-card .editor-content-ta { min-height:160px; max-height:55dvh; }
  .file-editor-card .editor-footer { gap:8px; }
}
@media (prefers-reduced-motion:reduce) {
  *,*::before,*::after { animation:none !important; transition:none !important; scroll-behavior:auto !important; }
}

.folder-item-label { border:0; background:transparent; color:inherit; text-align:start; font:inherit; min-height:36px; flex:1; overflow-wrap:anywhere; }
.editor-tag-chip { font-family:inherit; }
.editor-toolbar { flex-wrap:wrap; }
.file-name { -webkit-line-clamp:unset; display:block; }
@media(max-width:760px) { .file-check,.files-grid.list-view .file-check { width:44px; height:44px; } }

@media(max-width:760px) { .btn-ghost,.mode-switch-btn { min-height:44px; } .editor-mobile-toolbar .tb-btn { min-width:44px; } }
@media(max-width:370px) {
  .files-header { grid-template-columns:minmax(0,1fr) auto; }
  .files-title { grid-column:1; }
  #btn-upload-files { grid-column:2; }
  .files-sort-select { grid-column:1/-1; width:100%; }
  .files-view-toggle { grid-column:1; }
  .files-tools { grid-column:2; justify-self:end; }
  .editor-mobile-toolbar { grid-template-columns:repeat(5,minmax(0,1fr)); }
  .editor-mobile-toolbar .btn-ghost { grid-column:span 2; }
  .files-tools summary { padding-inline:4px; font-size:12px; }
}
@media(pointer:coarse) {
  .btn-ghost,.tb-btn,.note-pin-btn,.file-pin-btn,.file-menu-btn,.tag-chip,.editor-tag-chip,.editor-tag-add,.mode-switch-btn,.folder-item-label { min-height:44px; }
  .note-pin-btn,.file-pin-btn,.file-menu-btn { min-width:44px; }
  .file-check { width:44px; height:44px; }
}

/* Keep the hit area generous without covering identifying content. */
.file-select-target { position:absolute; inset:8px 8px auto auto; width:44px; height:44px; display:flex; align-items:center; justify-content:center; flex-shrink:0; cursor:pointer; }
.file-select-target .file-check { position:static; margin:0; width:18px; height:18px; visibility:visible; appearance:none; border:1px solid var(--ink-muted); border-radius:4px; background:var(--ground); cursor:pointer; }
.file-select-target .file-check:checked { background:var(--ink) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m5 12 4 4L19 6' fill='none' stroke='%23000' stroke-width='3'/%3E%3C/svg%3E") center/14px no-repeat; border-color:var(--ink); }
.file-select-target:focus-within { outline:2px solid var(--spectrum-blue); outline-offset:2px; border-radius:6px; }
.file-card > .file-thumb:not(.folder-thumb) { width:calc(100% - 44px); }
.files-grid.list-view .file-select-target { position:static; }
.files-grid.list-view .file-card > .file-thumb { width:56px; }
.note-save-line { flex-shrink:0; background:var(--ground); }
#note-short-options { display:none; }
#note-short-options summary { list-style:none; cursor:pointer; }
#note-short-options summary::-webkit-details-marker { display:none; }
@media(max-width:760px) {
  .file-select-target { position:static; }
  .file-card > .file-thumb:not(.folder-thumb),.files-grid.list-view .file-card > .file-thumb { width:48px; }
}
@media(max-height:500px) {
  #brand-header { height:40px; }
  #app { height:calc(100dvh - 52px); margin-bottom:12px; }
  #note-short-options { display:block; padding:4px 8px; }
  #note-short-options summary { min-height:44px; width:max-content; }
  #note-short-options .editor-head { display:flex; padding:8px 0; }
  #note-short-options .editor-toolbar { display:flex; padding:8px 0; }
  #note-short-options .editor-tag-row { padding-inline:0; }
  .editor-title-input { font-size:22px; padding:8px 12px; }
  .note-save-line { padding:6px 12px; min-height:44px; gap:6px; }
  .notes-list-header { padding:8px; gap:6px; }
  .files-header { padding:8px; gap:6px; }
  .files-tools-actions { max-height:calc(100dvh - 140px); overflow-y:auto; }
  .files-tools-actions .files-filter-row { padding:4px; gap:8px; }
  .files-tools-actions .owner-filter-row { width:100%; }
  .files-tools-actions .files-quota { width:100%; }
  .files-breadcrumb-row { padding:4px 8px; }
  .files-grid,.files-grid.list-view { display:flex; flex-direction:column; gap:8px; padding:8px 12px 104px; }
  .file-card,.files-grid.list-view .file-card { flex-direction:row; align-items:flex-start; padding:8px; gap:8px; }
  .file-select-target { position:static; }
  .file-card > .file-thumb:not(.folder-thumb),.files-grid.list-view .file-card > .file-thumb { width:56px; height:64px; flex-shrink:0; }
  .file-thumb.folder-thumb { width:36px; height:44px; }
  .file-info,.files-grid.list-view .file-info { flex:1; min-width:0; flex-direction:column; }
  .file-name-row,.files-grid.list-view .file-name-row { grid-template-columns:minmax(0,1fr) auto auto; }
  .file-name,.files-grid.list-view .file-name { grid-column:1/-1; grid-row:1; min-height:0; }
  .file-name-row .file-owner-badges,.files-grid.list-view .file-owner-badges { grid-column:1; grid-row:2; }
  .file-name-row .file-pin-btn,.files-grid.list-view .file-pin-btn { grid-column:2; grid-row:2; }
  .file-name-row .file-menu-btn,.files-grid.list-view .file-menu-btn { grid-column:3; grid-row:2; }
}
@media(max-height:500px) and (min-width:761px) {
  .files-header { display:grid; grid-template-columns:auto minmax(100px,1fr) auto auto auto auto; }
  .files-title { width:auto; font-size:20px; }
  .files-search { min-width:0; }
  .files-sort-select { width:120px; font-size:12px; }
  .files-header .btn-primary,.files-tools summary { padding-inline:8px; font-size:12px; }
}
@media(max-height:500px) and (max-width:760px) {
  #app { height:calc(100dvh - 124px); }
  body:has(.notes-screen.mobile-editor) #app { height:calc(100dvh - 24px); }
  .files-title { display:none; }
  .files-search { grid-column:1/3; grid-row:1; }
  .files-sort-select,.files-view-toggle,.files-tools { grid-row:2; }
  .editor-mobile-toolbar { padding-block:4px; }
}
@media(max-height:500px) and (max-width:370px) {
  .files-search { grid-column:1; }
  .files-sort-select { grid-column:1; }
  .files-view-toggle { grid-column:2; }
  .files-tools { grid-column:1/-1; grid-row:3; }
}
