#root{max-width:100%;margin:0 auto;padding:0;color:#0f172a;min-height:100vh;display:flex}.app{display:flex;flex-direction:column;gap:1rem;width:100%;padding:1rem 1.25rem}.app-header{display:flex;justify-content:space-between;gap:1rem;align-items:center;height:56px;padding:0 .75rem;background:#f8fafc;border-bottom:1px solid #e2e8f0}.app-title{font-size:1.05rem;font-weight:600;margin:0}.header-right{display:flex;align-items:center;gap:1rem}.cache-pill{font-size:.8rem;color:#475569;background:#f1f5f9;border:1px solid #e2e8f0;padding:.25rem .5rem;border-radius:999px;margin-right:.5rem;font-weight:700}.menu-wrapper{position:relative}.user-pill{width:36px;height:36px;border-radius:999px;border:none;background:#e2e8f0;color:#1e293b;font-weight:700;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;padding:0}.menu{position:absolute;right:0;top:44px;min-width:160px;background:#ffffff;border-radius:12px;border:1px solid #e2e8f0;box-shadow:0 12px 24px #0f172a1f;padding:.35rem;display:flex;flex-direction:column;gap:.25rem;z-index:1001}.menu-item{border:none;background:transparent;padding:.5rem .65rem;text-align:left;border-radius:8px;cursor:pointer;font-size:.9rem;color:#1e293b}.menu-item:hover{background:#f1f5f9}.app-body{display:flex;flex-direction:column;gap:1.5rem;min-height:calc(100vh - 104px)}.eyebrow{text-transform:uppercase;letter-spacing:.2em;font-size:.65rem;font-weight:600;color:#64748b}.app-header h1{margin:.1rem 0 0;font-size:1.35rem}.card{background:#ffffff;border-radius:16px;padding:1.25rem;box-shadow:0 12px 24px #0f172a14;display:flex;flex-direction:column;gap:.75rem}.card h2{margin:0;font-size:1.25rem}label{font-size:.9rem;font-weight:600;color:#1e293b}input[type=password],input[type=text],input[type=file]{border:1px solid #cbd5f5;border-radius:8px;padding:.55rem .75rem;font-size:1rem;background:#f1f5f9}.passphrase-field{display:flex;align-items:center;gap:.5rem}.passphrase-field input{flex:1}.actions{display:flex;gap:.75rem;align-items:center}button{border:none;border-radius:999px;padding:.6rem 1.3rem;font-size:.95rem;font-weight:600;background:#1e40af;color:#fff;cursor:pointer;transition:transform .15s ease,box-shadow .15s ease}button:hover:not(:disabled){transform:translateY(-1px);box-shadow:0 10px 24px #1e40af40}button:disabled{opacity:.5;cursor:not-allowed;box-shadow:none}button.ghost{background:#e2e8f0;color:#1e293b}button.ghost.active{background:#3b82f6;color:#fff}.status{font-size:.9rem;color:#475569}.preview-modal .status{padding:0;margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.status.ok{color:#16a34a;font-weight:600}.status.error{color:#b91c1c;font-weight:600}.muted{color:#64748b;font-size:.95rem}.user-info{display:flex;align-items:center;gap:.75rem;padding:.2rem .4rem;border-radius:999px;background:transparent}.avatar{width:32px;height:32px;border-radius:999px;object-fit:cover}.auth-card,.passphrase-card{align-self:center;width:min(520px,100%)}.passphrase-card{margin-top:10vh}.strength{display:flex;flex-direction:column;gap:.35rem}.strength-bar{width:100%;height:8px;border-radius:999px;background:#e2e8f0;overflow:hidden}.strength-fill{display:block;height:100%;width:0%;background:#ef4444;transition:width .2s ease,background .2s ease}.strength-fill.level-1{width:25%;background:#ef4444}.strength-fill.level-2{width:50%;background:#f59e0b}.strength-fill.level-3{width:75%;background:#22c55e}.strength-fill.level-4{width:100%;background:#16a34a}.strength-label{font-size:.85rem}.preview{min-height:120px;border-radius:10px;border:1px dashed #cbd5f5;background:#f8fafc;display:flex;align-items:center;justify-content:center;padding:1rem}.preview img,.preview video{max-width:100%;max-height:320px;border-radius:10px}.download-link{color:#1d4ed8;font-weight:600}.hidden-input{display:none}.upload-list{display:flex;flex-direction:column;gap:.5rem;max-height:240px;overflow:auto;padding-right:.25rem}.upload-row{display:flex;align-items:center;justify-content:space-between;gap:.5rem;padding:.25rem .3rem;border-radius:10px;background:#ffffff;border:1px solid #f1f5f9}.upload-modal{position:fixed;right:1rem;bottom:1rem;width:min(480px,92vw);background:#ffffff;border-radius:16px;border:1px solid #e5e7eb;box-shadow:0 12px 24px #0f172a1f;padding:.75rem;display:flex;flex-direction:column;gap:.6rem;z-index:999}.upload-modal-header{display:flex;align-items:center;justify-content:space-between}.upload-progress{position:relative;height:6px;width:100%;background:#eef1f6;border-radius:999px;overflow:hidden;margin-top:.5rem}.upload-progress-bar{position:absolute;top:0;right:0;bottom:0;left:0;width:0%;background:linear-gradient(90deg,#3b82f6,#22c55e);transition:width .2s ease}.upload-controls{display:flex;gap:.25rem}.icon-button{border:none;background:transparent;color:#64748b;font-size:1rem;padding:.2rem .35rem;cursor:pointer;border-radius:6px}.icon-button:hover{background:#f1f5f9}.actions .icon-button{border:1px solid #e2e8f0;width:36px;height:36px;display:inline-flex;align-items:center;justify-content:center;background:#ffffff;color:#1e293b}.actions .icon-button.active{background:#3b82f6;border-color:#3b82f6;color:#fff}.actions .icon-button.active:hover{background:#2563eb;border-color:#2563eb}.icon-image{width:16px;height:16px;display:block}.upload-icon{width:22px;height:22px;display:inline-flex;align-items:center;justify-content:center;font-size:.85rem;background:#f8fafc;border-radius:6px}.upload-meta{min-width:0;width:75%}.upload-meta p{margin-top:.5em;margin-bottom:.5em}.upload-name{font-size:.85rem;line-height:1.2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}.upload-bytes{font-size:.75rem}.upload-row .status{font-size:.8rem}.upload-row .muted{font-size:.78rem;line-height:1.2}.upload-status{width:20px;height:20px;border-radius:999px;display:inline-flex;align-items:center;justify-content:center;font-size:.8rem;font-weight:700}.upload-status.ok{background:#dcfce7;color:#16a34a}.upload-status.error{background:#fee2e2;color:#b91c1c}.upload-spinner{width:18px;height:18px;border-radius:999px;border:2px solid #e2e8f0;border-top-color:#1e40af;animation:spin .9s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}.gallery-header{display:flex;align-items:center;justify-content:space-between;gap:1rem;flex-wrap:wrap;padding-bottom:.5rem;border-bottom:1px solid #e2e8f0}.gallery-title{display:flex;align-items:center;gap:.5rem}.breadcrumb{display:flex;gap:.25rem;flex-wrap:wrap;align-items:center}.breadcrumb-button{border:none;background:#eef2ff;color:#1e3a8a;font-weight:600;cursor:pointer;padding:.25rem .6rem;border-radius:999px;transition:background .15s ease,color .15s ease}.breadcrumb-button:not(:last-child):after{content:"›";margin-left:.5rem;color:#94a3b8}.breadcrumb-button:disabled{color:#475569;cursor:default;background:#e2e8f0}.gallery-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:1rem}.dropzone{position:relative;cursor:default;min-height:calc(100vh - 88px - 1rem)}.dropzone.active{cursor:copy}.dropzone-overlay{position:absolute;top:0;right:0;bottom:0;left:0;border-radius:16px;border:2px dashed #94a3b8;background:rgba(248,250,252,.9);display:flex;align-items:center;justify-content:center;font-weight:600;color:#475569;z-index:10;pointer-events:none}.folder-strip{display:flex;flex-wrap:wrap;gap:.6rem;padding:.4rem 0}.folder-pill{display:inline-flex;align-items:center;gap:.35rem;border-radius:12px;border:1px solid #e2e8f0;background:#f8fafc;max-width:240px;min-width:240px;-webkit-border-radius:12px;-moz-border-radius:12px;-ms-border-radius:12px;-o-border-radius:12px;position:relative;justify-content:space-between;overflow:hidden}.folder-pill button:hover:not(:disabled){box-shadow:none;transform:none;-webkit-transform:none;-moz-transform:none;-ms-transform:none;-o-transform:none}.folder-pill-button{display:inline-flex;align-items:center;gap:.5rem;border:none;background:transparent;padding:0;cursor:pointer;color:inherit;font:inherit;padding:.6rem .8rem;flex:1}.folder-pill-button:hover{box-shadow:none;transform:none;-webkit-transform:none;-moz-transform:none;-ms-transform:none;-o-transform:none}.folder-pill:hover{background:#eef2ff}.folder-icon{width:20px;height:20px}.folder-name-wrap{position:relative;min-width:0;flex:1;padding-top:.45rem}.folder-name{font-size:.9rem;font-weight:600;color:#1e293b;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block}.cache-ready-badge{display:inline-flex;align-items:center;justify-content:center;color:#22c55e;filter:drop-shadow(0 1px 2px rgba(15,23,42,.25));pointer-events:none}.cache-ready-badge svg{display:block}.cache-ready-badge--file{position:absolute;top:.45rem;right:.45rem;width:1.35rem;height:1.35rem;z-index:2}.cache-ready-badge--folder{position:absolute;top:0;left:0;width:.95rem;height:.95rem;z-index:1}.gallery-card.folder .status{font-size:.9rem;font-weight:600;color:#1e293b;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.gallery-card{display:flex;align-items:stretch;gap:.75rem;padding:.85rem;border-radius:16px;border:1px solid #dbeafe;background:#ffffff;text-align:left;width:100%;box-shadow:0 6px 14px #0f172a0f}.gallery-card-button{border:none;background:transparent;padding:0;width:100%;text-align:left;cursor:pointer}.gallery-card.file{position:relative;border:1px solid #e2e8f0;cursor:pointer;flex-direction:column;padding:.75rem;gap:.6rem}.gallery-card.file:hover{box-shadow:0 10px 22px #0f172a29}.gallery-card.file.selected{border-color:#3b82f6;box-shadow:0 0 0 2px #3b82f64d}.selection-bar{display:flex;align-items:center;gap:.75rem;padding:.5rem .75rem;background:#eff6ff;border:1px solid #bfdbfe;border-radius:10px;margin-bottom:1rem}.selection-bar .selection-count{font-size:.9rem;font-weight:600;color:#1e40af}.gallery-card button,.gallery-card.file,.gallery-card.folder{border:none;background:transparent}.gallery-card.folder{cursor:pointer;transition:transform .15s ease,box-shadow .15s ease;align-items:center;padding:.6rem .9rem;border-radius:12px;background:#f8fafc;border:1px solid #e2e8f0;gap:.6rem;-webkit-border-radius:12px;-moz-border-radius:12px;-ms-border-radius:12px;-o-border-radius:12px}.gallery-card.folder:hover{transform:translateY(-1px);box-shadow:0 10px 22px #0f172a29;background:#eef2ff}.gallery-card.folder>div{overflow:auto}.gallery-icon{width:22px;height:22px}.file-header{display:flex;align-items:center;gap:.5rem;justify-content:space-between;width:100%}.item-menu{position:relative;display:inline-flex;align-items:center;padding:.6rem .8rem}.menu-trigger{border:none;background:transparent;color:#64748b;font-size:1.1rem;padding:.2rem .35rem;cursor:pointer;border-radius:6px}.context-menu{position:absolute;top:calc(100% + 4px);right:0;min-width:180px;background:#ffffff;border:1px solid #e5e7eb;border-radius:10px;box-shadow:0 12px 24px #0f172a1f;padding:.35rem;display:flex;flex-direction:column;gap:.25rem;z-index:50}.context-menu .menu-item{background:transparent;border:none;text-align:left;padding:.5rem .6rem;border-radius:8px;cursor:pointer;color:#0f172a;font-size:.85rem}.context-menu .menu-item:hover{background:#f1f5f9}.context-menu .menu-item.danger{color:#dc2626}.file-badge{display:inline-flex;align-items:center;justify-content:center;width:26px;height:26px;border-radius:8px;background:#eef2ff;font-size:.85rem}.file-name{font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}.file-preview{position:relative;width:100%;border-radius:12px;background:#f1f5f9;overflow:hidden;aspect-ratio:1 / 1}.gallery-thumb{width:100%;height:100%;object-fit:cover;display:block}.file-loading{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;align-items:center;justify-content:center;font-size:.85rem;font-weight:600;color:#1e293b;background:rgba(241,245,249,.75)}.file-loading.thumb-failed{color:#b91c1c;background:rgba(254,226,226,.85)}.status.thumbnail-failed{color:#b91c1c;font-size:.9rem;padding:.5rem .75rem;background:#fef2f2;border-radius:8px}.preview-modal{position:fixed;top:0;right:0;bottom:0;left:0;background:rgba(15,23,42,.75);display:flex;align-items:center;justify-content:center;padding:2rem 1.5rem;z-index:1000}.preview-content{background:#ffffff;border-radius:16px;max-width:960px;width:100%;max-height:90vh;padding:1rem;display:flex;flex-direction:column;gap:1rem}.preview-content img,.preview-content video{width:100%;max-height:65vh;border-radius:12px;object-fit:contain;background:#0f172a}.preview-top{display:flex;align-items:center;justify-content:space-between;gap:1rem}.preview-nav{display:flex;justify-content:space-between;gap:1rem}@media (max-width: 720px){.header-right{justify-content:space-between;flex-wrap:wrap;gap:.5rem}.gallery-grid{grid-template-columns:repeat(auto-fill,minmax(160px,1fr))}.app{padding:.75rem .9rem 2.5rem}.upload-modal{right:.75rem;bottom:.75rem;width:min(360px,95vw)}.user-info{order:2}}.app-with-activity{padding-bottom:2.75rem}.activity-bar{position:fixed;left:0;right:0;bottom:0;z-index:40;display:flex;align-items:center;gap:.5rem;padding:.45rem 1rem;padding-bottom:max(.45rem,env(safe-area-inset-bottom));background:rgba(248,250,252,.95);border-top:1px solid #e2e8f0;-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);font-size:.75rem;color:#475569}.activity-bar-dot{width:7px;height:7px;border-radius:999px;background:#cbd5e1;flex-shrink:0}.activity-bar-dot.active{background:#22c55e;box-shadow:0 0 0 3px #22c55e33}.activity-bar-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:root{font-family:Inter,system-ui,-apple-system,sans-serif;line-height:1.5;font-weight:400;color:#0f172a;background-color:#f1f5f9;font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-text-size-adjust:100%}*{box-sizing:border-box}body{margin:0;min-width:320px;min-height:100vh;background:#f1f5f9}a{text-decoration:none}
