/* Ported from ArxivStone documents/components. Scope the source design to Cloud. */
#portalPage[data-tab="cloud"] #portalBanner,
#portalPage[data-tab="cloud"] .portal-portal-tools,
#portalPage[data-tab="cloud"] .portal-page-body > .portal-page-heading { display: none; }
.cloud-panel { min-width: 0; color: var(--dm-ink, #111827); font: 400 16px/1.5 -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif; }
.cloud-panel [hidden], .cloud-dialog [hidden], .cloud-header-actions[hidden] { display: none !important; }
.cloud-panel *, .cloud-dialog *, .cloud-menu *, .cloud-header-actions * { box-sizing: border-box; }
.cloud-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 32px; padding: 6px 12px; border: 0; background: transparent; color: var(--dm-ink-soft, #4b5563); font: 400 14px/20px -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; cursor: pointer; transition: background-color 150ms, color 150ms; box-shadow: none; transform: none !important; border-radius: 0; }
.cloud-button:disabled { opacity: .45; cursor: default; }
.cloud-button:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.cloud-item:focus, .cloud-item:focus-visible { outline: none; box-shadow: none; }
.cloud-symbol { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; flex-shrink: 0; vertical-align: middle; }
.cloud-symbol svg { display: block; width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.cloud-icon { width: 32px; height: 32px; padding: 6px; flex-shrink: 0; }
.cloud-header-actions { position: relative; flex-shrink: 0; }
.cloud-new { height: 32px; padding: 0 16px; gap: 8px; border: 1px solid var(--dm-success-line, #1f793a); border-radius: 0; background: var(--dm-success-fill, #1f883d); color: white; font-weight: 600; }
.cloud-new-caret { width: 0; height: 0; border-left: 4px solid transparent; border-right: 4px solid transparent; border-top: 5px solid var(--dm-line, white); }
.cloud-storage-header { position: relative; display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; margin-bottom: 24px; }
.cloud-storage-header .cloud-heading-content { flex: 1; min-width: 0; margin-bottom: 0; }
.cloud-heading-row { display: flex; align-items: center; column-gap: 12px; row-gap: 8px; margin-bottom: 12px; }
.cloud-heading-row h1 { white-space: nowrap; }
.is-loading-directory .cloud-workspace::before { content: ''; position: absolute; inset: 0 0 auto; height: 2px; background: var(--brand-color); opacity: .45; transform-origin: left; animation: cloud-directory-loading 1.1s ease-in-out infinite alternate; pointer-events: none; }
@keyframes cloud-directory-loading { from { transform: scaleX(.15); } to { transform: scaleX(1); } }
.cloud-workspace { overflow-anchor: none; }
@media (prefers-reduced-motion:reduce) { .is-loading-directory .cloud-workspace::before { animation: none; } }
.cloud-header-controls { width: 384px; flex-shrink: 0; }
.cloud-search { position: relative; width: 100%; }
.cloud-search > .cloud-symbol { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--dm-muted, #9ca3af); pointer-events: none; }
.cloud-search input { display: block; width: 100%; height: 38px; min-width: 0; padding: 8px 40px 8px 48px; border: 1px solid var(--dm-line-strong, #b4b3b0); border-radius: 0; font-family: inherit; font-size: 14px; line-height: 20px; background: var(--dm-surface, white); color: var(--dm-ink, #111827); }
.cloud-search input::-webkit-search-cancel-button { display: none; }
.cloud-search #cloudSearchClear { position: absolute; right: 8px; top: 3px; color: var(--dm-muted, #9ca3af); min-height: 30px; width: 24px; padding: 4px; }
.cloud-search input:focus { border-color: var(--brand-color); outline: none; box-shadow: 0 0 0 1px var(--brand-color); }
.cloud-view-tools { display: flex; align-items: center; justify-content: flex-end; gap: 16px; margin-top: 16px; }
.cloud-sort { padding: 0; gap: 4px; min-height: 28px; }
.cloud-sort .cloud-symbol { width: 12px; height: 12px; }
.cloud-view-toggle { display: flex; padding: 2px; background: var(--dm-hover, #efeeec); border-radius: 0; }
.cloud-view-toggle .cloud-button { width: 26px; height: 26px; min-height: 26px; padding: 6px; border-radius: 0; }
.cloud-view-toggle .cloud-symbol { width: 14px; height: 14px; }
.cloud-view-toggle [aria-pressed="true"] { background: var(--dm-surface, white); color: var(--dm-ink, #111827); box-shadow: 0 1px 2px #0000000d; }
.cloud-workspace { position: relative; min-height: calc(100dvh - 264px); padding-bottom: 120px; user-select: none; outline: none; -webkit-tap-highlight-color: transparent; }
.cloud-location { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 24px; }
.cloud-location #cloudBack { padding: 8px 12px; }
.cloud-filter { font-size: 14px; color: var(--dm-ink-soft, #4b5563); margin-bottom: 24px; }
.cloud-filter .cloud-button { text-decoration: underline; color: var(--dm-accent-ink, #2563eb); }
.cloud-items { min-width: 0; }
.cloud-space { min-width: 0; padding-bottom: 12px; }
.cloud-space + .cloud-space { margin-top: 28px; padding-top: 28px; border-top: 1px solid var(--dm-line, #dfe3e8); }
.cloud-space-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.cloud-space-title { margin: 0; color: var(--dm-ink, #111827); font: 600 14px/1.4 var(--font-body, sans-serif); }
.cloud-space-hint, .cloud-space-empty { margin: 5px 0 0; color: var(--dm-muted, #6b7280); font-size: 12px; line-height: 1.5; }
.cloud-space-empty { padding: 12px 0; }
.cloud-space-add { flex-shrink: 0; }
.cloud-item-group { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
.cloud-item { position: relative; width: 104px; flex: 0 0 104px; padding: 8px; color: var(--dm-ink, #111827); border: 0; border-radius: 0; background: transparent; cursor: pointer; transition: background-color 200ms; outline: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; touch-action: manipulation; }
.cloud-item.is-selected { background: var(--dm-hover, #ebeae8); }
.cloud-item-visual { display: flex; align-items: center; justify-content: center; width: 64px; height: 80px; position: relative; pointer-events: none; }
.cloud-items[data-view="grid"] .cloud-item-visual { margin-inline: auto; }
.cloud-asset { object-fit: contain; user-select: none; pointer-events: none; }
.cloud-item-visual > .cloud-asset { width: 40px; height: 40px; }
.cloud-item-visual > .cloud-asset.is-full-trash { width: 46px; height: 46px; }
.cloud-item[data-kind="file"] .cloud-asset { width: 100%; height: 100%; padding: 8px; }
.cloud-thumb, .cloud-pdf-thumb { display: block; width: 100%; height: 100%; object-fit: contain; background: var(--dm-surface, white); border-radius: 0; box-shadow: 0 1px 2px #0000000d; }
.cloud-file-art { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 100%; height: 100%; background: var(--dm-surface-soft, #f9fafb); border: 1px solid var(--dm-line, #e5e7eb); border-radius: 0; box-shadow: 0 1px 2px #0000000d; color: var(--dm-muted, #9ca3af); gap: 8px; }
.cloud-file-art .cloud-symbol { width: 36px; height: 36px; stroke-width: 2; }
.cloud-file-art small { font-size: 12px; line-height: 16px; font-weight: 500; color: var(--dm-ink-soft, #374151); }
.cloud-file-art[data-type="pdf"] { border-color: var(--dm-danger-line, #fecaca); background: var(--dm-surface, white); color: var(--dm-danger-ink, #dc2626); }
.cloud-file-art[data-type="video"] { border-color: var(--dm-purple-line, #e9d5ff); background: var(--dm-surface, white); color: var(--dm-purple-ink, #9333ea); }
.cloud-file-art[data-type="word"] { border-color: var(--dm-accent-line, #bfdbfe); background: var(--dm-accent-soft, #eff6ff); color: var(--dm-accent-ink, #2563eb); }
.cloud-file-art[data-type="sheet"] { border-color: var(--dm-success-line, #bbf7d0); background: var(--dm-success-soft, #f0fdf4); color: var(--dm-success-ink, #16a34a); }
.cloud-file-art[data-type="slide"] { border-color: var(--dm-warning-line, #fed7aa); background: var(--dm-warning-soft, #fff7ed); color: var(--dm-danger-ink, #ea580c); }
.cloud-item-details { min-width: 0; margin-top: 4px; }
.cloud-item-name-wrap { display: flex; align-items: center; justify-content: center; min-height: 36px; margin-inline: -8px; }
.cloud-item-name { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; width: 100%; border: 1px solid transparent; border-radius: 0; padding: 0 2px; color: var(--dm-ink, #111827); font-size: var(--cloud-name-size, 12px); font-weight: 400; line-height: 1.3; text-align: center; overflow-wrap: anywhere; }
.cloud-item-meta { display: none; }
.cloud-rename { -webkit-user-select: text; user-select: text; -webkit-touch-callout: default; display: block; width: 100%; min-width: 0; height: auto; padding: 0 2px; margin: 0; border: 1px solid var(--dm-accent-line, #93c5fd); border-radius: 0; background: var(--dm-accent-soft, #eff6ff); color: var(--dm-ink, #111827); font: inherit; font-size: 12px; line-height: 1.3; }
.cloud-item.is-drop-target { outline: 2px dashed var(--dm-accent-line, #60a5fa); outline-offset: -2px; background: var(--dm-accent-soft, #dbeafe); }
.cloud-item[data-item-id="trash"].is-drop-target { outline-color: var(--dm-danger-line, #d44c47); background: var(--dm-danger-soft, #fef2f2); }
.cloud-items[data-view="list"] .cloud-item-group { display: flex; flex-direction: column; gap: 4px; }
.cloud-items[data-view="list"] .cloud-item { width: 100%; flex: 0 0 auto; display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-radius: 0; }
.cloud-items[data-view="list"] .cloud-item-visual { width: 28px; height: 28px; flex: 0 0 28px; }
.cloud-items[data-view="list"] .cloud-item-visual > .cloud-asset { width: 28px; height: 28px; }
.cloud-items[data-view="list"] .cloud-item[data-kind="file"] .cloud-item-visual { width: 36px; height: 36px; flex-basis: 36px; }
.cloud-items[data-view="list"] .cloud-item[data-kind="file"] .cloud-asset { width: 34px; height: 34px; padding: 0; }
.cloud-items[data-view="list"] .cloud-file-art .cloud-symbol { width: 24px; height: 24px; }
.cloud-items[data-view="list"] .cloud-file-art small { display: none; }
.cloud-items[data-view="list"] .cloud-item-details { margin: 0; min-width: 0; flex: 1; }
.cloud-items[data-view="list"] .cloud-item-name-wrap { min-height: 20px; justify-content: flex-start; margin-inline: 0; }
.cloud-items[data-view="list"] .cloud-item-name { display: block; font-size: 14px; font-weight: 500; line-height: 20px; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cloud-items[data-view="list"] .cloud-item-meta { display: flex; gap: 12px; font-size: 12px; line-height: 18px; color: var(--dm-muted, #6b7280); }
.cloud-items[data-view="list"] .cloud-rename { font-size: 16px; line-height: 24px; }
.cloud-empty { text-align: center; padding: 64px 16px; }
.cloud-empty > .cloud-symbol { width: 64px; height: 64px; color: var(--dm-muted, #9ca3af); margin-bottom: 16px; }
.cloud-empty h3 { font: 600 18px/28px -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; color: var(--dm-ink, #111827); margin: 0 0 8px; }
.cloud-empty p { max-width: 448px; margin: 0 auto 24px; color: var(--dm-ink-soft, #4b5563); font-size: 16px; }
.cloud-empty-actions { display: flex; justify-content: center; gap: 16px; }
.cloud-outline { border: 1px solid var(--dm-line, #e5e7eb); background: var(--dm-surface, white); color: var(--dm-ink, #111827); min-height: 36px; }
.cloud-primary { background: var(--brand-color); color: white; min-height: 36px; }
.cloud-error { color: var(--dm-danger-ink, #b91c1c); font-size: 14px; line-height: 1.6; overflow-wrap: anywhere; }
.cloud-watermark { pointer-events: none; position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%); font-size: 10px; color: var(--dm-muted, #9ca3af); opacity: .6; letter-spacing: .025em; white-space: nowrap; }
.cloud-panel.is-dragging .cloud-workspace { outline: 2px dashed var(--dm-accent-line, #60a5fa); outline-offset: 4px; }
.cloud-selection-rectangle { position: fixed; z-index: 40; pointer-events: none; background: #337ea926; border: 1px solid var(--dm-accent-line, #337ea9); }
.cloud-menu, .cloud-suggestions { background: var(--dm-surface, white); border: 1px solid var(--dm-line, #e5e7eb); border-radius: 0; box-shadow: 0 10px 15px -3px #0000001a,0 4px 6px -4px #0000001a; z-index: 120; padding: 0; font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; }
.cloud-menu { box-sizing: border-box; position: fixed; min-width: 180px; max-width: calc(100vw - 16px); max-height: calc(100dvh - 16px); overflow-y: auto; transform-origin: top right; animation: cloud-menu-in 160ms ease-out; }
.cloud-menu .cloud-button { width: 100%; justify-content: flex-start; padding: 8px 16px; border-radius: 0; min-height: 36px; text-align: left; color: var(--dm-ink-soft, #374151); }
.cloud-menu .cloud-button:first-child { border-radius: 0; }
.cloud-menu .cloud-button:last-child { border-radius: 0; }
.cloud-menu .cloud-button.is-active { background: var(--dm-hover, #ebeae8); color: var(--dm-ink, #111827); }
.cloud-menu .cloud-menu-trailing { margin-left: auto; }
.cloud-context-menu { overflow: visible; animation: none; }
.cloud-menu-branch { position: relative; }
.cloud-submenu { position: absolute; left: calc(100% - 6px); top: -6px; transform: none; animation: none; }
.cloud-submenu .cloud-button.is-current { color: var(--dm-ink, #111827); }
.cloud-context-menu > .cloud-button > .cloud-symbol:first-child { margin-right: 4px; }
.cloud-menu hr { border: 0; border-top: 1px solid var(--dm-line, #e5e7eb); margin: 8px 0; }
.cloud-suggestions { position: absolute; width: 100%; right: 0; top: calc(100% + 8px); overflow: auto; max-height: 384px; animation: cloud-menu-in 160ms ease-out; }
.cloud-suggestion { width: 100%; display: flex; align-items: flex-start; gap: 12px; padding: 10px 16px; border: 0; background: transparent; text-align: left; cursor: pointer; }
.cloud-suggestion > .cloud-item-visual { width: 24px !important; height: 24px !important; flex-shrink: 0; margin-top: 2px; }
.cloud-suggestion .cloud-asset { width: 22px; height: 22px; padding: 0; }
.cloud-suggestion .cloud-file-art .cloud-symbol { width: 16px; height: 16px; }
.cloud-suggestion .cloud-file-art small { display: none; }
.cloud-suggestion-text { min-width: 0; color: var(--dm-ink, #111827); font-size: 14px; font-weight: 500; line-height: 1.375; overflow-wrap: anywhere; }
.cloud-suggestion-text small { display: block; font-size: 11px; color: var(--dm-muted, #6b7280); font-weight: 400; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cloud-progress { display: flex; align-items: center; width: fit-content; max-width: 100%; gap: 12px; padding: 6px 12px; margin-bottom: 24px; background: var(--dm-surface-soft, #f9fafb); border: 1px solid var(--dm-line, #e5e7eb); border-radius: 0; font-size: 12px; }
.cloud-progress > .cloud-symbol { color: var(--dm-accent-ink, #3b82f6); width: 12px; height: 12px; }
.cloud-progress progress { appearance: none; border: 0; min-width: 60px; width: 120px; height: 6px; border-radius: 0; background: var(--dm-hover, #e5e7eb); overflow: hidden; }
.cloud-progress progress::-webkit-progress-bar { background: var(--dm-hover, #e5e7eb); }
.cloud-progress progress::-webkit-progress-value { background: var(--dm-accent-fill, #3b82f6); border-radius: 0; transition: width 300ms ease-out; }
.cloud-progress progress::-moz-progress-bar { background: var(--dm-accent-fill, #3b82f6); }
#cloudProgressPercent { color: var(--dm-accent-ink, #2563eb); font-weight: 500; min-width: 35px; text-align: right; }
#cloudProgressSpeed, #cloudProgressTime { color: var(--dm-muted, #6b7280); white-space: nowrap; }
.cloud-progress .cloud-icon { width: 20px; height: 20px; min-height: 20px; padding: 2px; }
.cloud-dialog { margin: auto; padding: 0; width: min(448px,calc(100vw - 32px)); max-width: none; max-height: calc(100dvh - 32px); border: 2px solid var(--dm-line, #e5e7eb); border-radius: 0; background: var(--dm-surface, white); color: var(--dm-ink, #111827); box-shadow: 0 20px 25px -5px #0000001a,0 8px 10px -6px #0000001a; opacity: 0; transform: scale(.95); transition: transform 200ms ease,opacity 200ms ease; font: 400 14px/1.5 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; }
.cloud-dialog[open] { display: flex; flex-direction: column; }
.cloud-dialog.is-visible { opacity: 1; transform: scale(1); }
.cloud-dialog::backdrop { background: #0003; opacity: 0; transition: opacity 200ms ease; }
.cloud-dialog.is-visible::backdrop { opacity: 1; }
.cloud-dialog header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 24px 24px 16px; border-bottom: 1px solid var(--dm-line, #e5e7eb); flex-shrink: 0; }
.cloud-dialog-heading { min-width: 0; display: flex; align-items: baseline; gap: 12px; }
.cloud-dialog h2 { margin: 0; font: 600 20px/28px -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; outline: none; overflow-wrap: anywhere; }
.cloud-dialog-heading > span { color: var(--dm-muted, #6b7280); font-size: 14px; white-space: nowrap; }
#cloudDialogTools { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.cloud-dialog #cloudDialogClose { color: var(--dm-muted, #9ca3af); width: 28px; height: 28px; min-height: 28px; padding: 4px; }
.cloud-dialog #cloudDialogClose .cloud-symbol { width: 20px; height: 20px; }
.cloud-dialog-body { min-height: 0; overflow: auto; padding: 24px; overscroll-behavior: contain; }
.cloud-dialog footer { padding: 24px; border-top: 1px solid var(--dm-line, #e5e7eb); display: flex; justify-content: flex-end; gap: 8px; flex-shrink: 0; }
.cloud-dialog footer:empty { display: none; }
#cloudDialogError { padding: 0 24px; }
.cloud-destructive .cloud-dialog-body { font-size: 16px; color: var(--dm-ink-soft, #374151); }
.cloud-destructive footer { justify-content: center; }
.cloud-destructive footer .cloud-button { width: 100%; max-width: 384px; background: var(--dm-hover, #f1f0ef); color: var(--dm-danger-ink, #d44c47); font-weight: 500; min-height: 36px; }
.cloud-confirm-list { max-height: 192px; overflow: auto; padding-left: 24px; overflow-wrap: anywhere; }
.cloud-info-dialog { width: min(576px,calc(100vw - 32px)); }
.cloud-info-identity { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 24px; }
.cloud-info-identity > .cloud-item-visual { width: 64px; height: 64px; flex-shrink: 0; border-radius: 0; border: 1px solid var(--dm-line, #e5e7eb); background: var(--dm-surface-soft, #f3f4f6); }
.cloud-info-identity > div:nth-child(2) { min-width: 0; flex: 1; }
.cloud-info-identity h3 { font: 600 18px/28px -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; margin: 0; overflow-wrap: anywhere; }
.cloud-info-identity p { font-size: 14px; color: var(--dm-muted, #6b7280); margin: 4px 0; }
.cloud-info-size { font-size: 14px; font-weight: 500; white-space: nowrap; }
.cloud-info-fields { display: grid; gap: 16px; }
.cloud-info-row { display: flex; align-items: center; gap: 12px; }
.cloud-info-row > .cloud-symbol { color: var(--dm-ink-soft, #4b5563); }
.cloud-info-row label { min-width: 80px; color: var(--dm-muted, #6b7280); font-size: 12px; font-weight: 500; letter-spacing: .05em; text-transform: uppercase; }
.cloud-info-row > span:last-of-type { overflow-wrap: anywhere; font-size: 14px; }
.cloud-info-row .cloud-icon { margin-left: auto; width: 24px; height: 24px; min-height: 24px; padding: 4px; }
.cloud-field { display: grid; gap: 8px; }
.cloud-field input { width: 100%; min-width: 0; padding: 8px 12px; border: 1px solid var(--dm-line, #e5e7eb); font: inherit; }
.cloud-picker-crumbs { display: flex; align-items: center; flex-wrap: wrap; font-size: 13px; }
.cloud-folder-picker { max-height: 280px; overflow: auto; margin-top: 16px; }
.cloud-folder-choice { display: flex; width: 100%; justify-content: flex-start; text-align: left; }
.cloud-folder-choice img { width: 24px; height: 24px; }
.cloud-muted { color: var(--dm-muted, #6b7280); font-size: 14px; }
.cloud-preview { width: min(768px,80vw); max-height: 75dvh; border: 0; transform: var(--cloud-origin,scale(.9)); transition: transform 300ms cubic-bezier(.4,0,.2,1),opacity 300ms ease; }
.cloud-preview.cloud-preview-large { width: min(1024px,90vw); max-height: 85dvh; }
.cloud-preview.is-visible { transform: translate(var(--cloud-drag-x,0px),var(--cloud-drag-y,0px)) scale(1); }
.cloud-preview::backdrop { background: #0006; transition-duration: 300ms; }
.cloud-preview header { padding: 8px 16px; background: var(--dm-hover, #f1f0ef); cursor: grab; border-bottom: 1px solid var(--dm-line, #e5e7eb); }
.cloud-preview h2 { font-size: 16px; line-height: 24px; font-weight: 500; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.cloud-preview #cloudDialogTools .cloud-icon { color: var(--dm-ink-soft, #4b5563); width: 36px; height: 36px; min-height: 36px; padding: 8px; }
.cloud-preview #cloudDialogTools .cloud-symbol { width: 20px; height: 20px; }
.cloud-preview .cloud-dialog-body { padding: 0; display: flex; flex-direction: column; background: var(--dm-surface, white); }
.cloud-preview.is-fullscreen { width: 100vw; height: 100dvh; max-height: 100dvh; max-width: 100vw; border-radius: 0; transform: none; }
.cloud-preview.is-fullscreen header { cursor: default; }
.cloud-preview.is-fullscreen .cloud-dialog-body { flex: 1; }
.cloud-media-stage { display: flex; align-items: center; justify-content: center; background: var(--dm-surface-soft, #f9fafb); min-height: 200px; flex: 1; overflow: auto; }
.cloud-preview-image { display: block; max-width: 100%; max-height: calc(75dvh - 60px); object-fit: contain; }
.cloud-preview-video { display: block; width: 100%; max-height: calc(85dvh - 60px); }
.cloud-preview.is-fullscreen .cloud-preview-image,.cloud-preview.is-fullscreen .cloud-preview-video { max-height: calc(100dvh - 60px); }
.cloud-preview-text { white-space: pre-wrap; overflow-wrap: anywhere; padding: 16px; margin: 0; min-height: 200px; font: 14px/24px "SF Mono",Monaco,Consolas,monospace; }
.cloud-preview-status { padding: 8px 16px; display: flex; align-items: center; justify-content: space-between; gap: 16px; color: var(--dm-ink-soft, #4b5563); font-size: 12px; background: var(--dm-surface, white); }
.cloud-preview-fallback { text-align: center; background: var(--dm-surface-soft, #f9fafb); padding: 32px; }
.cloud-preview-fallback .cloud-asset { width: 96px; height: 96px; }
.cloud-preview-fallback h3 { font: 500 20px/28px -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; margin: 16px 0 8px; }
.cloud-preview-fallback p { color: var(--dm-muted, #6b7280); }
.cloud-pdf-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px; border-bottom: 1px solid var(--dm-line, #e5e7eb); background: var(--dm-surface, #fffffff2); flex-shrink: 0; }
.cloud-pdf-toolbar > div { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.cloud-pdf-toolbar .cloud-button { min-height: 28px; height: 28px; padding: 6px; }
.cloud-pdf-toolbar input { width: 48px; padding: 4px; height: 28px; border: 1px solid var(--dm-line, #d1d5db); border-radius: 0; font-size: 12px; text-align: center; }
.cloud-pdf-toolbar select { font-size: 12px; padding: 4px 8px; border: 1px solid var(--dm-line, #d1d5db); border-radius: 0; background: var(--dm-surface, white); }
.cloud-pdf-pages { display: flex; flex-direction: column; align-items: center; gap: 16px; overflow: auto; padding: 16px; background: var(--dm-surface-soft, #f9fafb); min-height: 200px; max-height: calc(85dvh - 160px); }
.cloud-pdf-pages canvas { display: block; box-shadow: 0 4px 6px #0002; max-width: none; }
.cloud-preview.is-fullscreen .cloud-pdf-pages { max-height: none; flex: 1; }
.cloud-toasts { position: fixed; right: 24px; bottom: 24px; z-index: 140; display: grid; gap: 8px; pointer-events: none; }
.cloud-toast { background: var(--dm-surface, white); border: 1px solid var(--dm-line, #e5e7eb); border-radius: 0; box-shadow: 0 4px 15px #0001; padding: 12px 16px; color: var(--dm-ink-soft, #374151); font-size: 14px; max-width: min(380px,calc(100vw - 32px)); animation: cloud-menu-in 160ms ease-out; }
.cloud-mobile-selection { display: none; }
.cloud-visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
@keyframes cloud-menu-in { from { opacity: 0; transform: translateY(-4px) scale(.98); } to { opacity: 1; transform: none; } }
@media (hover:hover) and (pointer:fine) {
 .cloud-button:not(:disabled):hover,.cloud-menu .cloud-button:not(:disabled):hover { background: var(--dm-hover, #ebeae8); }
 .cloud-new:not(:disabled):hover { background: var(--dm-success-fill, #1b7835); }
 .cloud-primary:not(:disabled):hover { background: var(--dm-accent-fill, #294f88); }
 .cloud-item:not(.is-selected):hover { background: var(--dm-hover, #f1f0ef); }
 .cloud-item-name:hover { background: var(--dm-surface-soft, #f3f4f6); }
 .cloud-item.is-selected .cloud-item-name:hover { background: var(--dm-hover, #e2e1df); }
 .cloud-suggestion:hover { background: var(--dm-hover, #f1f0ef); }
 .cloud-preview #cloudDialogTools .cloud-button:hover { background: var(--dm-pressed, #d3d2d0); }
 .cloud-destructive footer .cloud-button:hover { color: white; background: var(--dm-danger-fill, #d44c47); }
}
.cloud-button:not(:disabled):active,.cloud-menu .cloud-button:not(:disabled):active { background: var(--dm-pressed, #d3d2d0); }
.cloud-new:not(:disabled):active { background: var(--dm-success-fill, #16652c); }
.cloud-primary:not(:disabled):active { background: var(--dm-accent-fill, #19325a); }
@media (max-width:1100px) {
 .cloud-storage-header { gap: 24px; }
 .cloud-header-controls { width: 320px; }
 .cloud-heading-row { flex-wrap: wrap; }
}
@media (max-width:700px) {
 .cloud-storage-header { flex-direction: column; gap: 16px; margin-bottom: 24px; }
 .cloud-heading-content,.cloud-header-controls { width: 100%; }
 .cloud-heading-row { margin-bottom: 0; }
 .cloud-search input { font-size: 16px; height: 40px; }
 .cloud-view-tools { margin-top: 12px; }
 .cloud-item-group { gap: 12px; }
 .cloud-items[data-view="grid"] .cloud-item { width: min(104px, calc((100% - 24px) / 3)); flex-basis: min(104px, calc((100% - 24px) / 3)); min-width: 0; }
 .cloud-workspace { min-height: calc(100dvh - 310px); }
 .cloud-item-name { pointer-events: none; }
 .cloud-items[data-view="list"] .cloud-item-name { font-size: 14px; }
 .cloud-items[data-view="list"] .cloud-item-meta { font-size: 12px; flex-wrap: wrap; gap: 4px 12px; }
 .cloud-progress { gap: 8px; width: 100%; }
 .cloud-progress progress { flex: 1; width: 80px; }
 #cloudProgressTime { display: none; }
 .cloud-dialog header { padding: 20px 20px 16px; }
 .cloud-dialog-body,.cloud-dialog footer { padding: 20px; }
 .cloud-dialog h2 { font-size: 18px; }
 .cloud-preview,.cloud-preview.cloud-preview-large { width: calc(100vw - 24px); max-height: 85dvh; }
 .cloud-preview header { padding: 8px; gap: 6px; }
 .cloud-preview .cloud-dialog-body { padding: 0; }
 .cloud-preview h2 { font-size: 14px; }
 .cloud-preview .cloud-dialog-heading > span { display: none; }
 .cloud-preview #cloudDialogTools { gap: 2px; }
 .cloud-preview #cloudDialogTools .cloud-icon { width: 30px; height: 30px; min-height: 30px; padding: 5px; }
 .cloud-pdf-toolbar { padding: 8px; flex-wrap: wrap; justify-content: center; }
 .cloud-pdf-toolbar > div { gap: 4px; font-size: 12px; }
 .cloud-preview-status { font-size: 10px; }
 .cloud-info-identity { flex-wrap: wrap; gap: 12px; }
 .cloud-info-identity h3 { font-size: 16px; }
 .cloud-info-row { gap: 8px; }
 .cloud-info-row label { min-width: 64px; font-size: 11px; }
 .cloud-info-row > span:last-of-type { font-size: 12px; }
 .cloud-mobile-selection { display: flex; align-items: center; gap: 8px; position: sticky; bottom: 12px; width: fit-content; margin: 16px auto; padding: 4px 8px 4px 12px; background: var(--dm-surface, white); border: 1px solid var(--dm-line, #e5e7eb); border-radius: 0; box-shadow: 0 3px 12px #0001; font-size: 12px; }
 .cloud-toasts { right: 16px; bottom: 16px; }
 .cloud-rename { font-size: 16px; }
}
@media (prefers-reduced-motion:reduce) { .cloud-panel *, .cloud-dialog, .cloud-dialog::backdrop, .cloud-menu { animation: none !important; transition: none !important; } }
.cloud-grid-count { margin: 0; color: var(--dm-muted, #6b7280); font-size: 12px; line-height: 16px; text-align: center; }
.cloud-items[data-view="list"] .cloud-grid-count { display: none; }
.cloud-sort:not(:disabled):hover,.cloud-sort:not(:disabled):active { background: transparent; }
.cloud-crumb-path { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 280px; }
.cloud-crumb-path[hidden] { display: none !important; }
html:has(.cloud-dialog[open]) { overflow-y: hidden; }
@media (max-width:700px) { .cloud-crumb-path { max-width: 120px; } }
.cloud-rtf-stage { overflow: auto; padding: 16px; background: var(--dm-surface, white); min-height: 240px; }
.cloud-rtf-content { max-width: 896px; margin: auto; }
.cloud-rtf-content p { margin: 0; }
@media (pointer:coarse) {
 .cloud-item-name { pointer-events: none; }
}
.cloud-info-badge { display: inline-flex; padding: 2px 8px; margin-top: 4px; background: var(--dm-hover, #f1f0ef); color: var(--dm-ink-soft, #4b5563); border-radius: 0; font-size: 12px; line-height: 16px; }
.cloud-info-file-icon .cloud-symbol { width: 20px; height: 20px; color: var(--dm-accent-ink, #2563eb); }
.cloud-info-identity > .cloud-item-visual > .cloud-asset { width: 40px; height: 40px; }
