html[data-boot-destination="drive"]:not([data-app-ready="true"]) #welcome-view { display:none !important; }
html[data-boot-destination="drive"]:not([data-app-ready="true"]) #drive-home { display:flex !important; }
.offline-unavailable { opacity:.42; filter:grayscale(1); }
.offline-settings { color:inherit; background:var(--bg-color,#fafaf8); border:1px solid #9995; border-radius:18px; width:min(440px,85vw); padding:24px; }
.offline-settings::backdrop { background:#0005; }
.offline-settings h2 { margin-top:0; font-size:20px; }
.offline-settings p { font-size:13px; opacity:.75; }
.offline-settings input { width:65px; padding:6px; margin:8px; color:inherit; background:transparent; border:1px solid #9998; border-radius:6px; }
.offline-settings button { font:inherit; cursor:pointer; padding:8px 14px; border-radius:20px; border:1px solid #9996; background:transparent; color:inherit; }
.offline-settings-actions { display:flex; justify-content:flex-end; gap:10px; margin-top:20px; }
.offline-settings-actions button[value="save"] { background:#f5df4d; color:#151515; border:0; }
.offline-recoveries { max-height:240px; overflow:auto; }

/* Upload feedback belongs to its document, including cached offline cards. */
.document-sync-status { position:absolute; top:8px; left:8px; z-index:3; max-width:calc(100% - 16px); padding:5px 9px; border:0; border-radius:10px; background:rgba(255,255,255,.92); color:#222; font:500 11px/1.3 sans-serif; box-shadow:0 1px 5px #0002; cursor:pointer; }
.document-sync-status[data-phase="uploading"]::before,
.document-sync-status[data-phase="building"]::before,
.document-sync-status[data-phase="checking"]::before,
.document-sync-status[data-phase="merging"]::before { content:""; display:inline-block; margin-right:5px; width:8px; height:8px; border:2px solid currentColor; border-right-color:transparent; border-radius:50%; animation:offline-sync-spin .8s linear infinite; }
@keyframes offline-sync-spin { to { transform:rotate(360deg); } }
@media (prefers-reduced-motion:reduce) { .document-sync-status::before { animation:none!important; } }

/* Photos mobile timeline thumb: 48 high, 0.6 aspect, round left edge. */
#document-fast-scroll { position:fixed; right:env(safe-area-inset-right,0px); top:0; z-index:90; width:29px; height:48px; border-radius:48px 4px 4px 48px; background:var(--accent-color,#df8143); color:#fff; box-shadow:0 2px 5px #0004; display:flex; align-items:center; justify-content:center; touch-action:none; user-select:none; cursor:ns-resize; }
#document-fast-scroll[hidden] { display:none; }
#document-fast-scroll:focus-visible { outline:2px solid currentColor; outline-offset:3px; }
#document-fast-scroll.is-dragging { filter:brightness(.9); }
[data-theme="dark"] #document-fast-scroll { background:#87502f; }

#drive-home button#btn-drive-new { position:fixed; right:calc(env(safe-area-inset-right,0px) + 24px); bottom:calc(env(safe-area-inset-bottom,0px) + 24px); z-index:1300; width:52px; height:52px; min-height:52px; padding:0; border-radius:14px; display:inline-flex; align-items:center; justify-content:center; background:#fff; color:#111; box-shadow:0 3px 16px #0002; }
#drive-home button#btn-drive-new svg { width:26px; height:26px; }
#drive-create-menu { position:fixed; z-index:1400; min-width:190px; padding:6px; background:var(--bg-primary,#fff); color:var(--text-primary,#222); border-radius:16px; box-shadow:0 6px 28px #0003; }
#drive-create-menu[hidden] { display:none; }
#drive-create-menu button { display:flex; align-items:center; gap:12px; width:100%; padding:12px; border:0; border-radius:10px; background:none; color:inherit; font:inherit; text-align:left; cursor:pointer; }
#drive-create-menu button:hover,#drive-create-menu button:focus-visible { background:var(--bg-secondary,#eee); }
#drive-create-menu svg { width:22px; height:22px; }

@media(max-width:720px) { #drive-home button#btn-drive-new { right:calc(env(safe-area-inset-right,0px) + 16px); bottom:calc(env(safe-area-inset-bottom,0px) + 84px); } }

.sync-error-detail { white-space:pre-wrap; overflow-wrap:anywhere; max-height:180px; overflow:auto; font:12px/1.5 monospace; user-select:text; }
#offline-sync-error .offline-settings-actions { flex-wrap:wrap; }
