/* Zeelm file viewer: full-screen reader shared by every file type. */
body.zv-open{overflow:hidden}
.zv [hidden]{display:none!important}
.zv{position:fixed;inset:0;z-index:2000;display:grid;grid-template-rows:auto auto 1fr;background:#0b0c0e;color:#f2f3f5;font-family:Manrope,'Segoe UI',system-ui,sans-serif}
.zv button{font:inherit;color:inherit}
.zv-bar{display:flex;align-items:center;gap:12px;min-height:60px;padding:10px max(14px,env(safe-area-inset-right)) 10px max(14px,env(safe-area-inset-left));padding-top:max(10px,env(safe-area-inset-top));border-bottom:1px solid #ffffff14;background:#111215}
.zv-title{display:flex;align-items:center;gap:12px;min-width:0;flex:1}
.zv-title>div{display:grid;min-width:0;gap:1px}
.zv-title strong{font-size:15px;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.zv-title small{font-size:12px;color:#9aa0aa;font-variant-numeric:tabular-nums}
.zv-chip{display:inline-grid;place-items:center;flex:none;min-width:40px;height:40px;padding:0 6px;border-radius:10px;font-size:11px;font-weight:800;letter-spacing:.03em;color:#fff;background:#3a3f48}
.zv-chip.small{min-width:30px;height:26px;border-radius:7px;font-size:9.5px}
.zv-chip .icon{width:15px;height:15px}
.zv-chip[data-kind=pdf]{background:#d93a32}.zv-chip[data-kind=docx]{background:#2b63d9}.zv-chip[data-kind=pptx]{background:#d9622b}
.zv-chip[data-kind=sheet],.zv-chip[data-kind=csv]{background:#1f8a4c}.zv-chip[data-kind=zip]{background:#8a6a1f}
.zv-chip[data-kind=image]{background:#8a3fd1}.zv-chip[data-kind=video]{background:#c2265f}.zv-chip[data-kind=audio]{background:#16919b}
.zv-chip[data-kind=text],.zv-chip[data-kind=markdown]{background:#4b5563}.zv-chip[data-kind=folder]{background:#2a2f37;color:#cfd5df}
.zv-tools{display:flex;align-items:center;gap:6px}
.zv-counter{font-size:12.5px;color:#b9bec7;padding:0 10px;white-space:nowrap;font-variant-numeric:tabular-nums}
.zv-icon,.zv-fit,.zv-button{display:inline-flex;align-items:center;justify-content:center;gap:8px;height:38px;min-width:38px;padding:0 10px;border:1px solid #ffffff1a;border-radius:10px;background:#ffffff0d;color:#f2f3f5;text-decoration:none;font-size:13.5px;font-weight:650;cursor:pointer}
.zv-icon{padding:0}.zv-icon .icon,.zv-button .icon{width:18px;height:18px}
.zv-icon:hover,.zv-fit:hover,.zv-button:hover{background:#ffffff1a}
.zv-button{background:#f2f3f5;color:#0b0c0e;border-color:transparent}
.zv-button:hover{background:#fff}
.zv-trail{display:flex;align-items:center;gap:6px;overflow-x:auto;padding:8px 16px;border-bottom:1px solid #ffffff10;background:#0f1013;font-size:13px;color:#9aa0aa;scrollbar-width:none}
.zv-trail button{border:0;background:none;padding:4px 6px;border-radius:6px;cursor:pointer;white-space:nowrap;color:#b9bec7}
.zv-trail button:hover{background:#ffffff12;color:#fff}
.zv-trail [aria-current]{color:#fff;font-weight:700}
.zv-stage{position:relative;overflow:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;outline:none;min-height:0}
.zv-loading{position:absolute;inset:0;display:grid;place-content:center;justify-items:center;gap:14px;color:#9aa0aa;font-size:14px}
.zv-spinner{width:28px;height:28px;border-radius:50%;border:3px solid #ffffff22;border-top-color:#fff;animation:zv-spin .8s linear infinite}
@keyframes zv-spin{to{transform:rotate(360deg)}}
.zv-message{min-height:100%;display:grid;place-content:center;justify-items:center;gap:10px;padding:32px;text-align:center}
.zv-message-icon{display:grid;place-items:center;width:64px;height:64px;border-radius:18px;background:#ffffff0f}
.zv-message-icon .icon{width:30px;height:30px}
.zv-message strong{font-size:17px}.zv-message p{margin:0;color:#9aa0aa;max-width:46ch}

/* Image */
.zv-stage[data-kind=image]{display:grid;place-items:center;padding:20px;background:repeating-conic-gradient(#15161a 0 25%,#111215 0 50%) 50%/24px 24px}
.zv-image{max-width:100%;max-height:calc(100dvh - 110px);object-fit:contain;border-radius:6px;box-shadow:0 20px 60px #0008;cursor:zoom-in}
.zv-image.zoomed{max-width:none;max-height:none;cursor:zoom-out}
/* Video / audio */
.zv-stage[data-kind=video],.zv-stage[data-kind=audio]{display:grid;place-items:center;padding:20px;background:#000}
.zv-video{width:min(100%,1600px);max-height:calc(100dvh - 120px);border-radius:10px;background:#000}
.zv-audio{width:min(100%,640px)}
/* PDF */
.zv-stage[data-kind=pdf]{background:#2a2c31}
.zv-pages{display:grid;justify-content:center;gap:18px;padding:22px 12px 60px}
.zv-page{background:#fff;box-shadow:0 10px 30px #0006;border-radius:2px;margin:0 auto}
.zv-page canvas{display:block}
/* Word */
.zv-stage[data-kind=docx]{background:#2a2c31}
.zv-docx{padding:22px 0 60px;--zv-docx-scale:1}
.zv-docx .docx-wrapper{background:transparent!important;padding:0!important;display:flex;flex-direction:column;align-items:center;gap:18px}
.zv-docx .docx-wrapper>section.docx{box-shadow:0 10px 30px #0006!important;margin:0!important;zoom:var(--zv-docx-scale)}
/* PowerPoint */
.zv-stage[data-kind=pptx]{background:#1c1d21}
.zv-deck{display:grid;gap:26px;justify-items:center;padding:24px 14px 70px}
.zv-slide-frame{margin:0;width:min(100%,1280px);display:grid;gap:8px}
.zv-slide{position:relative;width:100%;overflow:hidden;background:#fff;color:#111;border-radius:6px;box-shadow:0 14px 40px #0007;container-type:inline-size;font-family:Calibri,'Segoe UI',Manrope,system-ui,sans-serif}
.zv-shape{position:absolute;display:flex;flex-direction:column;overflow:hidden;line-height:1.15}
.zv-shape img{width:100%;height:100%;object-fit:contain}
.zv-shape p{margin:0 0 .25em;padding:0 .8cqw;overflow-wrap:anywhere}
.zv-shape p.zv-bullet{padding-left:2.4cqw;position:relative}
.zv-shape p.zv-bullet::before{content:'•';position:absolute;left:.9cqw}
.zv-slide-table{width:100%;height:100%;border-collapse:collapse;font-size:1.3cqw}
.zv-slide-table td{border:1px solid #0002;padding:.4cqw .6cqw}
.zv-slide-number{justify-self:end;font-size:12px;color:#8b9099;font-variant-numeric:tabular-nums}
/* Sheets */
.zv-stage[data-kind=sheet],.zv-stage[data-kind=csv]{background:#f6f7f9;color:#111}
.zv-sheets{display:grid;grid-template-rows:auto 1fr;min-height:100%}
.zv-tabs{position:sticky;top:0;z-index:2;display:flex;gap:4px;overflow-x:auto;padding:8px 10px;background:#eceef2;border-bottom:1px solid #d9dce2}
.zv-tabs button{border:1px solid transparent;border-radius:8px;background:none;padding:6px 12px;font-size:13px;font-weight:600;cursor:pointer;white-space:nowrap;color:#333}
.zv-tabs [aria-selected=true]{background:#fff;border-color:#d0d4db;color:#111;box-shadow:0 1px 2px #0001}
.zv-sheet{overflow:auto}
.zv-table{border-collapse:separate;border-spacing:0;font-size:13px;font-variant-numeric:tabular-nums;background:#fff}
.zv-table th,.zv-table td{border-right:1px solid #e3e5ea;border-bottom:1px solid #e3e5ea;padding:5px 9px;white-space:nowrap;max-width:420px;overflow:hidden;text-overflow:ellipsis;text-align:left}
.zv-table thead th{position:sticky;top:0;background:#f0f1f4;color:#555;font-weight:700;font-size:12px;text-align:center;z-index:1}
.zv-table tbody th{position:sticky;left:0;background:#f0f1f4;color:#666;font-weight:600;font-size:12px;text-align:right;min-width:42px}
/* Text and code */
.zv-stage[data-kind=text],.zv-stage[data-kind=other]{background:#0f1013}
.zv-code{display:grid;grid-template-columns:auto 1fr;margin:0;min-height:100%;font:13px/1.6 ui-monospace,'Cascadia Code',Consolas,monospace;tab-size:4}
.zv-gutter{padding:16px 12px 40px 16px;text-align:right;color:#5b616c;user-select:none;border-right:1px solid #ffffff10;background:#0c0d10;white-space:pre}
.zv-code code{padding:16px 20px 40px;white-space:pre;color:#e3e6eb}
.zv-markdown{max-width:780px;margin:0 auto;padding:36px 22px 70px;font-size:16px;line-height:1.7;color:#e7e9ee}
.zv-markdown h1,.zv-markdown h2,.zv-markdown h3{line-height:1.25;margin:1.4em 0 .5em}
.zv-markdown code{background:#ffffff14;padding:.1em .35em;border-radius:5px;font-size:.9em}
.zv-markdown pre{background:#ffffff0d;padding:14px;border-radius:10px;overflow:auto}
.zv-markdown blockquote{margin:1em 0;padding-left:14px;border-left:3px solid #ffffff33;color:#b9bec7}
.zv-markdown a{color:#8ab4ff}
/* ZIP browser */
.zv-zip{max-width:980px;margin:0 auto;padding:18px 14px 70px;display:grid;gap:12px}
.zv-filter{display:flex;align-items:center;gap:10px;height:42px;padding:0 12px;border:1px solid #ffffff1a;border-radius:11px;background:#ffffff0a}
.zv-filter .icon{width:17px;height:17px;color:#9aa0aa}
.zv-filter input{flex:1;border:0;background:none;color:inherit;font:inherit;font-size:14px;outline:none}
.zv-tree{display:grid;gap:1px}
.zv-node{display:flex;align-items:center;gap:10px;width:100%;min-height:44px;padding:6px 12px 6px calc(12px + var(--depth) * 22px);border:0;border-radius:9px;background:none;text-align:left;cursor:pointer}
.zv-node:hover{background:#ffffff0d}
.zv-node:focus-visible{outline:2px solid #8ab4ff;outline-offset:-2px}
.zv-caret{display:inline-grid;place-items:center;width:16px;flex:none;color:#7c828c;transition:transform .15s}
.zv-caret .icon{width:14px;height:14px}
.zv-node[aria-expanded=false] .zv-caret{transform:rotate(-90deg)}
.zv-node-name{flex:1;min-width:0;font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.zv-node small{color:#8b9099;font-size:12px;font-variant-numeric:tabular-nums;white-space:nowrap}
.zv-node.zv-busy{opacity:.55;pointer-events:none}
.zv-node.zv-denied{opacity:.5}
.zv-lock .icon{width:14px;height:14px;color:#e0b341}
.zv-note{margin:6px 4px;color:#9aa0aa;font-size:13px}
@media (max-width:640px){
  .zv-bar{gap:8px;min-height:54px}
  .zv-button span,.zv-fit{display:none}
  .zv-button{min-width:38px;padding:0}
  .zv-counter{display:none}
  .zv-chip{min-width:34px;height:34px}
  .zv-pages{gap:10px;padding:10px 4px 40px}
  .zv-deck{gap:16px;padding:12px 8px 40px}
}
@media (prefers-reduced-motion:reduce){.zv-spinner{animation-duration:2s}}

/* Files list: type chips, sortable header, filters, grid thumbnails */
.live-files-table-head button{border:0;background:none;padding:0;color:var(--muted);font:inherit;font-size:13px;font-weight:650;text-align:left;cursor:pointer}
.live-files-table-head button:hover,.live-files-table-head button.active{color:var(--text)}
.live-files-page .file-chip{min-width:40px;height:40px;border-radius:10px;font-size:10.5px}
.live-files-page .live-file-name{display:flex;align-items:center;gap:14px;min-width:0}
.live-files-page .live-files-filters{flex-wrap:wrap}
.live-files-page .live-files-filters button.selected{color:var(--text)}
.live-files-table.grid .live-files-rows{display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:12px}
.live-files-table.grid .live-file-row{position:relative;display:flex!important;flex-direction:column;align-items:stretch;gap:8px;min-height:0!important;padding:12px!important;border:1px solid var(--line);border-radius:14px}
.live-files-table.grid .live-file-name{flex-direction:column;align-items:flex-start;gap:10px}
.live-files-table.grid .live-file-name .file-chip{width:100%;height:110px;border-radius:10px;font-size:16px}
.live-files-table.grid .file-thumb{position:absolute;top:12px;left:12px;width:calc(100% - 24px);height:110px;object-fit:cover;border-radius:10px;background:#000}
.live-files-table.grid .live-file-meta,.live-files-table.grid .live-files-table-head{display:none}
.live-files-table.grid .live-file-actions{position:absolute;right:16px;bottom:10px}
.live-files-table.grid .live-file-name strong{display:block;max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
