.file-page { min-height:calc(100svh - var(--cloud-header-height,95px)); }
.cloud-workspace-page .file-shell { max-width:none; }
.file-guest-page { padding-block:28px 50px; }
.file-guest-page .file-shell { max-width:1500px; }
.file-viewer { display:flex; flex-direction:column; min-height:600px; min-width:0; height:calc(100svh - var(--cloud-header-height,95px) - 70px); border:1px solid var(--line); border-radius:16px; overflow:hidden; background:var(--workspace-surface,#10100f); }
.file-viewer-header { display:flex; align-items:center; justify-content:space-between; flex:none; gap:24px; min-height:82px; padding:18px 26px; border-bottom:1px solid var(--line); }
.file-viewer-header .drive-brand { margin:0; font-size:22px; }
.file-owner { display:flex; align-items:center; justify-content:flex-end; gap:9px; min-width:0; font-size:11px; line-height:1.6; color:var(--muted); }
.file-owner>span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.file-viewer-stage { position:relative; display:flex; align-items:center; justify-content:center; flex:1; min-height:240px; min-width:0; padding:28px; }
.file-document-art { display:block; width:200px; height:210px; object-fit:contain; }
.file-document-art.drive-item-picture { display:grid; place-items:center; }
.file-document-art.drive-item-picture>.icon { width:170px; height:180px; }
.file-document-art .drive-file-extension { min-height:42px; min-width:58px; padding:0 10px; left:0; bottom:38px; font-size:16px; border-radius:9px; }
.file-viewer-footer { display:flex; align-items:center; justify-content:space-between; flex:none; gap:24px; padding:24px 28px; border-top:1px solid var(--line); }
.file-info { min-width:0; }
.file-info h1 { font-size:17px; font-weight:550; line-height:1.5; overflow-wrap:anywhere; }
.file-info p { margin-top:5px; font-size:11px; line-height:1.7; color:var(--muted); }
.file-actions { display:flex; align-items:center; justify-content:flex-end; flex-wrap:nowrap; gap:10px; flex:none; }
.file-actions .cloud-button { display:inline-flex; align-items:center; justify-content:center; gap:9px; min-height:44px; padding:0 14px; font-size:12px; }
.file-actions .cloud-button>.icon { display:block; width:18px; height:18px; flex-shrink:0; }
.file-actions .cloud-button .control-label { line-height:1; white-space:nowrap; }
.file-actions button:disabled { opacity:.55; cursor:default; }
.file-denied-placeholder { filter:blur(9px); opacity:.12; pointer-events:none; }
.file-denied { position:absolute; inset:0; display:flex; flex-direction:column; align-items:center; justify-content:center; padding:28px; text-align:center; }
.file-lock { display:grid; place-items:center; width:58px; height:58px; margin-bottom:20px; color:var(--muted); }
.file-lock .icon { display:block; width:40px; height:40px; }
.file-denied h1 { font-size:22px; line-height:1.4; font-weight:550; }
.file-denied p { max-width:360px; color:var(--muted); font-size:12px; line-height:1.8; margin-top:12px; }
.file-denied .cloud-button { margin-top:22px; }
.file-info-placeholder { filter:blur(6px); opacity:.25; user-select:none; }
.file-info-placeholder small { display:block; margin-top:6px; }
.is-denied .file-owner { filter:blur(4px); opacity:.4; }
#account-file-share { --share-tile:#ffffff0b; width:min(480px,calc(100% - 32px)); padding:24px; border-radius:18px; }
#account-file-share .account-modal-head { min-height:28px; padding:0; margin-bottom:16px; border:0; }
#account-file-share .account-modal-head h2 { font-size:20px; line-height:1.4; }
#account-file-share .account-modal-body { padding:0; }
#account-file-share .exit-close { width:32px; height:32px; }
[data-file-share-form] { display:grid; gap:16px; min-width:0; }
.file-share-access { position:relative; min-width:0; }
.file-access-trigger { display:flex; align-items:center; justify-content:flex-start; width:100%; min-height:64px; gap:14px; padding:12px 16px; border-radius:12px; background:var(--share-tile); color:var(--paper); text-align:left; }
.file-access-trigger>span { min-width:0; flex:1; }
.file-access-trigger>.icon { display:block; width:22px; height:22px; flex-shrink:0; }
.file-access-trigger>.icon:last-child { width:15px; height:15px; transform:rotate(90deg); color:var(--muted); }
:is(.file-access-trigger,.file-access-options) strong { display:block; font-size:13px; font-weight:550; line-height:1.5; }
:is(.file-access-trigger,.file-access-options) small { display:block; font-size:11px; line-height:1.6; color:var(--muted); margin-top:2px; }
.file-access-options { position:absolute; inset:calc(100% + 6px) 0 auto; z-index:3; padding:0; border:1px solid var(--line); border-radius:8px; background:var(--workspace-surface,#10100f); color:var(--paper); box-shadow:0 8px 24px #0004; overflow:hidden; }
.file-access-options[popover] { position:fixed; inset:auto; margin:0; max-height:calc(100dvh - 16px); overflow:auto; }
.file-access-heading { display:flex; align-items:center; min-height:40px; padding:10px 16px; border-bottom:1px solid var(--line); font-size:11px; font-weight:600; line-height:1.5; color:var(--muted); }
.file-access-options button { display:flex; align-items:center; justify-content:flex-start; width:100%; min-height:62px; padding:11px 16px; gap:12px; border-radius:0; color:var(--paper); text-align:left; }
.file-access-options button+button { border-top:1px solid var(--line); }
.file-access-options button>span { min-width:0; flex:1; }
.file-access-options button strong { font-size:12px; font-weight:600; }
.file-access-options button small { margin-top:3px; font-size:11px; }
.file-access-options button:hover,.file-access-options button:focus-visible { background:var(--share-tile); }
.file-access-options button:focus-visible { outline:2px solid var(--copper-light); outline-offset:-3px; }
.file-access-options .icon { display:block; width:16px; height:16px; color:var(--copper-light); flex-shrink:0; visibility:hidden; }
.file-access-options button[aria-checked=true] .icon { visibility:visible; }
.file-share-recipients { display:flex; align-items:flex-start; gap:14px; min-height:78px; padding:14px 16px; border-radius:12px; background:var(--share-tile); opacity:.4; transition:opacity 160ms; }
.file-share-recipients.is-enabled { opacity:1; }
.file-share-recipients>.icon { display:block; flex:none; width:22px; height:22px; }
.file-share-recipients>div { min-width:0; flex:1; }
.file-share-recipients label { display:block; color:var(--paper); font-size:13px; font-weight:550; line-height:1.5; }
.file-share-recipients textarea { display:block; width:100%; height:32px; min-height:32px; max-height:80px; padding:4px 0; margin:2px 0 0; background:transparent; color:var(--paper); border:0; border-radius:0; font:inherit; font-size:11px; line-height:1.7; resize:none; }
.file-share-recipients textarea:focus { outline:none; box-shadow:0 1px var(--copper-light); }
.file-share-recipients textarea::placeholder { color:var(--muted); opacity:1; }
.file-share-recipients.is-enabled textarea { height:60px; overflow-y:auto; scrollbar-width:thin; }
.file-share-recipients p { display:none; color:var(--muted); font-size:10px; line-height:1.7; margin-top:6px; }
.file-share-recipients.is-enabled p { display:block; }
.file-share-footer { display:flex; align-items:center; justify-content:flex-start; }
.file-share-footer .cloud-button { display:inline-flex; align-items:center; justify-content:center; gap:8px; min-height:40px; padding:0 14px; font-size:12px; }
.file-share-footer .cloud-button .control-label { line-height:1; }
.file-share-footer .icon { display:block; width:17px; height:17px; flex-shrink:0; }
.file-share-url { display:block; width:100%; min-width:0; min-height:40px; padding:0 10px; border:1px solid var(--line); border-radius:7px; background:transparent; color:var(--muted); font:inherit; font-size:11px; }
.file-share-status { color:var(--muted); font-size:11px; line-height:1.7; overflow-wrap:anywhere; }
.file-share-status:empty { display:none; }
.file-access-trigger:disabled,.file-share-footer button:disabled { opacity:.5; cursor:default; }
:is(.file-access-options,.file-share-url)[hidden] { display:none; }
html[data-theme=light] #account-file-share { --share-tile:#392b200b; }
@media(max-width:850px) {
  .file-viewer-footer { flex-direction:column; align-items:stretch; gap:18px; }
  .file-actions { justify-content:flex-start; }
  .file-owner>span:first-child { display:none; }
}
@media(max-width:600px) {
  .file-viewer { min-height:540px; height:calc(100svh - var(--cloud-header-height,76px) - 118px); border-radius:12px; }
  .file-viewer-header { min-height:72px; padding:14px; gap:12px; }
  .file-viewer-header .drive-brand { font-size:20px; gap:7px; }
  .file-owner { gap:7px; font-size:10px; }
  .file-viewer-footer { padding:20px 16px; }
  .file-info h1 { font-size:15px; }
  .file-actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
  .file-actions .cloud-button { min-height:44px; min-width:0; padding-inline:8px; gap:7px; font-size:11px; }
  .file-actions .cloud-button>.icon { width:16px; height:16px; }
  .file-viewer-stage { padding:16px; }
  .file-document-art { width:160px; height:180px; }
  #account-file-share { padding:20px; width:calc(100% - 24px); }
  #account-file-share .account-modal-head h2 { font-size:19px; }
  #account-file-share .exit-close { width:36px; height:36px; }
  .file-access-trigger,.file-share-recipients { padding:12px; gap:10px; }
  .file-share-footer .cloud-button { min-height:44px; }
  .file-denied { padding:20px; }
  .file-denied h1 { font-size:19px; }
}
@media(prefers-reduced-motion:reduce) { .file-share-recipients { transition:none; } }
