:root{
  --bg:#fff;--sidebar:#f3f3f5;--toolbar:#fbfbfc;--surface:#fff;--surface-2:#f6f6f8;--surface-3:#ececef;
  --text:#1d1d1f;--muted:#74747a;--line:#dedee3;--line-soft:#ececf0;
  --accent:#4f5ee8;--accent-hover:#4251dc;--accent-soft:#e9ebff;--folder:#e5a82a;
  --good:#28a56e;--warn:#d68c16;--bad:#d94b5d;--sidebar-width:252px;
  --shadow:0 16px 42px rgba(25,25,38,.12);
  color-scheme:light;font-family:-apple-system,BlinkMacSystemFont,"SF Pro Text","Segoe UI",Inter,Roboto,Arial,sans-serif
}
html[data-theme="dark"]{
  --bg:#171719;--sidebar:#202022;--toolbar:#1b1b1d;--surface:#232325;--surface-2:#2b2b2e;--surface-3:#343438;
  --text:#f5f5f7;--muted:#aaaab0;--line:#39393e;--line-soft:#303034;--accent:#7a82ff;--accent-hover:#8b92ff;
  --accent-soft:#31334b;--folder:#e4ad3e;--shadow:0 18px 50px rgba(0,0,0,.38);color-scheme:dark
}
*{box-sizing:border-box}
html,body{height:100%;margin:0;background:var(--bg);color:var(--text)}
body{overflow:hidden;-webkit-font-smoothing:antialiased}
button,input,textarea,select{font:inherit;color:inherit}button{cursor:pointer}
svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.75;stroke-linecap:round;stroke-linejoin:round}
.svg-sprite{position:absolute;width:0;height:0;overflow:hidden}.hidden{display:none!important}

.app-shell{height:100vh;display:grid;grid-template-columns:var(--sidebar-width) minmax(0,1fr);overflow:hidden}
.sidebar{z-index:30;display:flex;flex-direction:column;background:var(--sidebar);border-right:1px solid var(--line);padding:16px 11px 12px}
.brand{display:flex;align-items:center;gap:10px;padding:2px 9px 16px}
.brand-mark{width:34px;height:34px;border-radius:10px;display:grid;place-items:center;background:linear-gradient(155deg,#5965f3,#6767e7);color:#fff;box-shadow:0 5px 14px rgba(79,94,232,.22)}
.brand-mark svg{width:21px;height:21px;fill:currentColor;stroke:none}
.brand strong{display:block;font-size:13px;font-weight:650}.brand small{display:block;font-size:9px;color:var(--muted);margin-top:1px}
.nav-list{display:flex;flex-direction:column;gap:1px;overflow:auto}
.nav-list button{min-height:35px;padding:0 9px;border:0;border-radius:8px;background:transparent;display:flex;align-items:center;gap:9px;color:var(--muted);text-align:left}
.nav-list button:hover{background:rgba(120,120,128,.10);color:var(--text)}
.nav-list button.active{background:rgba(120,120,128,.16);color:var(--text)}
.nav-list button.active svg{color:var(--accent)}
.nav-list button svg{width:17px;height:17px}.nav-list button span{flex:1;font-size:12px;font-weight:500}
.nav-list button em{font-style:normal;font-size:9px;color:var(--muted)}
.nav-caption{padding:17px 9px 6px;color:#909095;font-size:9px;font-weight:650;letter-spacing:.72px;text-transform:uppercase}
.nav-separator{height:1px;background:var(--line);margin:10px 9px}
.space-color{width:7px;height:7px;border-radius:50%}.space-color.personal,.space-color[class*="personal-"]{background:#7567ee}
.space-color.family{background:#eb6f96}.space-color.work{background:#408de6}
.sidebar-footer{margin-top:auto;padding:10px 9px 1px;color:var(--muted);font-size:9px;opacity:.58}

.main-area{min-width:0;display:flex;flex-direction:column;background:var(--bg)}
.topbar{height:58px;display:flex;align-items:center;gap:12px;padding:8px 18px;background:var(--toolbar);border-bottom:1px solid var(--line);z-index:20}
.topbar-left,.top-actions{display:flex;align-items:center;gap:7px}.topbar-left{min-width:240px}.top-actions{margin-left:auto}
.icon-button{width:34px;height:34px;border:0;border-radius:8px;background:transparent;color:var(--muted);display:grid;place-items:center}
.icon-button:hover{background:var(--surface-3);color:var(--text)}
.navigation-button{border:1px solid var(--line);background:var(--surface)}
.toolbar-create{height:34px;border:1px solid var(--line);border-radius:9px;padding:0 11px 0 8px;display:flex;align-items:center;gap:6px;background:var(--surface);font-size:11px;font-weight:600}
.toolbar-create:hover{background:var(--surface-2)}.toolbar-create svg{width:16px;height:16px;color:var(--accent)}
.search-box{width:min(420px,42vw);height:34px;margin-left:auto;display:flex;align-items:center;gap:7px;padding:0 10px;background:var(--surface-2);border:1px solid transparent;border-radius:9px}
.search-box:focus-within{background:var(--surface);border-color:#bfc4ff;box-shadow:0 0 0 3px var(--accent-soft)}
.search-box svg{width:16px;height:16px;color:var(--muted)}.search-box input{flex:1;min-width:0;border:0;outline:0;background:transparent;font-size:11px}
.search-box kbd{font-size:8px;color:var(--muted);border:1px solid var(--line);border-radius:5px;padding:1px 5px;background:var(--surface)}
.search-clear{display:none;border:0;background:transparent;color:var(--muted);padding:2px}.search-box.has-value .search-clear{display:grid}
.avatar{width:34px;height:34px;border:0;border-radius:50%;background:#2b2b31;color:#fff;font-size:11px;font-weight:700}.mobile-menu{display:none}

.content-area{flex:1;min-height:0;overflow:auto;padding:24px 28px 38px}
.content-head{min-height:64px;display:flex;align-items:flex-end;justify-content:space-between;gap:18px}
.breadcrumbs{min-height:16px;display:flex;align-items:center;flex-wrap:wrap;gap:1px}
.breadcrumbs button{border:0;background:transparent;padding:0 2px;color:var(--muted);font-size:10px}.breadcrumbs button:hover{color:var(--accent)}
.breadcrumbs svg{width:11px;height:11px;color:var(--muted)}
.title-block h1{margin:5px 0 2px;font-size:27px;line-height:1.12;letter-spacing:-.65px;font-weight:690}.title-block p{margin:0;color:var(--muted);font-size:10px}
.head-actions{display:flex;gap:6px}.head-actions #headUploadButton{display:none}
.primary-button,.soft-button,.secondary-button,.danger-button{min-height:35px;border-radius:9px;padding:0 12px;display:inline-flex;align-items:center;justify-content:center;gap:7px;font-size:11px;font-weight:600;border:1px solid transparent}
.primary-button{background:var(--accent);color:#fff}.primary-button:hover{background:var(--accent-hover)}
.soft-button,.secondary-button{background:var(--surface);border-color:var(--line)}.soft-button:hover,.secondary-button:hover{background:var(--surface-2)}
.danger-button{background:var(--bad);color:#fff}.head-actions .soft-button{background:transparent}

.toolbar{min-height:44px;margin-top:12px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between}
.toolbar-left,.toolbar-right{display:flex;align-items:center;gap:7px}.item-count{font-size:10px;color:var(--muted)}
.sort-control{height:30px;display:flex;align-items:center;gap:4px;padding:0 7px;border:0;border-radius:7px;background:transparent;color:var(--muted)}
.sort-control:hover{background:var(--surface-2)}.sort-control svg{width:14px;height:14px}
.sort-control select{border:0;background:transparent;outline:0;font-size:10px;color:var(--muted)}
.view-switch{display:flex;gap:1px}.view-button{width:29px;height:29px;border:0;background:transparent;color:var(--muted);border-radius:7px;display:grid;place-items:center}
.view-button:hover{background:var(--surface-2)}.view-button.active{background:var(--surface-3);color:var(--text)}.view-button svg{width:15px;height:15px}
.items-host{margin-top:16px}

/* Finder-like list */
.file-table{width:100%;border-collapse:separate;border-spacing:0;background:transparent}
.file-table thead th{height:30px;text-align:left;padding:0 10px;color:var(--muted);font-size:9px;font-weight:500;border-bottom:1px solid var(--line)}
.file-table thead th:last-child{text-align:center}
.file-row{height:48px}.file-row:hover{background:var(--surface-2)}.file-row.selected{background:var(--accent-soft)}
.file-row td{padding:0 10px;border-bottom:1px solid var(--line-soft);font-size:11px}
.name-cell{display:flex;align-items:center;gap:9px;min-width:0}
.item-icon{width:30px;height:30px;border-radius:8px;display:grid;place-items:center;color:#777c87;background:#f0f1f4;flex:none}
.item-icon.folder{background:transparent;color:var(--folder)}.item-icon.image{background:#edf3ff;color:#4e7dd9}.item-icon.video{background:#fff0ed;color:#dc6b4e}.item-icon.audio{background:#edf8f4;color:#2f9d7e}.item-icon.archive{background:#f4eefc;color:#8961c8}
.item-icon svg{width:19px;height:19px}.item-icon.folder svg{width:25px;height:25px;stroke-width:1.55}
.item-name{min-width:0;flex:1}.item-name b{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:500}.item-name small{display:none}
.cell-muted{color:var(--muted)}.cell-actions{width:42px;text-align:right}
.row-more{width:29px;height:29px;border:0;background:transparent;color:var(--muted);display:grid;place-items:center;border-radius:7px;margin-left:auto}
.row-more:hover{background:var(--surface-3);color:var(--text)}.star-mini,.replica-badge{display:none}

/* iCloud/Finder grid: no dashboard cards */
.grid-view{display:grid;grid-template-columns:repeat(auto-fill,minmax(142px,1fr));gap:22px 16px;align-items:start}
.grid-card{position:relative;min-width:0;padding:8px 7px 10px;border:0;border-radius:10px;background:transparent;text-align:center}
.grid-card:hover{background:var(--surface-2)}.grid-card.selected{background:var(--accent-soft);box-shadow:inset 0 0 0 1px #c9cdfd}
.grid-card>.row-more{position:absolute;top:5px;right:5px;opacity:0;background:var(--surface);box-shadow:0 1px 3px rgba(0,0,0,.08)}
.grid-card:hover>.row-more,.grid-card.selected>.row-more{opacity:1}
.grid-preview{height:98px;margin:0 auto 7px;border-radius:10px;background:transparent;display:grid;place-items:center}
.grid-card:not([data-item-type="folder"]) .grid-preview{width:min(118px,100%);background:var(--surface-2);border:1px solid var(--line-soft)}
.grid-preview .item-icon{width:60px;height:60px;border-radius:13px;background:transparent}
.grid-card[data-item-type="folder"] .grid-preview .item-icon{width:84px;height:68px;color:var(--folder)}
.grid-card[data-item-type="folder"] .grid-preview .item-icon svg{width:72px;height:58px;stroke-width:1.25}
.grid-card:not([data-item-type="folder"]) .grid-preview .item-icon svg{width:35px;height:35px}
.grid-card h3{margin:0 auto;max-width:100%;font-size:11px;line-height:1.32;font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.grid-card p{margin:3px 0 0;color:var(--muted);font-size:9px;min-height:12px}

.empty-state{min-height:420px;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;color:var(--muted)}
.empty-illustration{width:82px;height:66px;display:grid;place-items:center;color:var(--folder);margin-bottom:12px}
.empty-illustration svg{width:72px;height:58px;stroke-width:1.25}
.empty-state h2{margin:0;color:var(--text);font-size:17px;font-weight:620}.empty-state p{margin:6px 0 16px;font-size:10px}.empty-actions{display:flex;gap:7px}
.loading-state{min-height:300px;display:flex;align-items:center;justify-content:center;gap:5px}.loading-state span{width:6px;height:6px;border-radius:50%;background:var(--muted)}

.context-menu,.popover{position:fixed;z-index:90;display:none;background:var(--surface);border:1px solid var(--line);border-radius:11px;box-shadow:var(--shadow);padding:5px}
.context-menu.open,.popover.open{display:block}.context-menu{width:210px}.create-popover{width:190px}
.context-menu button,.create-popover button{width:100%;min-height:34px;border:0;background:transparent;border-radius:7px;display:flex;align-items:center;gap:8px;padding:6px 8px;text-align:left;font-size:11px}
.context-menu button:hover,.create-popover button:hover{background:var(--surface-2)}.context-menu hr{border:0;border-top:1px solid var(--line);margin:4px}.context-menu .danger{color:var(--bad)}
.create-popover b{font-weight:520}.action-icon{width:27px;height:27px;border-radius:7px;display:grid;place-items:center}.action-icon.upload{background:#edf1ff;color:#5870e8}.action-icon.folder{background:#fff4d7;color:#d19722}

.details-panel{position:fixed;right:0;top:58px;bottom:0;width:350px;z-index:55;background:var(--surface);border-left:1px solid var(--line);box-shadow:-12px 0 35px rgba(20,20,30,.07);transform:translateX(102%);transition:.2s}
.details-panel.open{transform:none}.details-head{padding:16px;display:flex;justify-content:space-between;border-bottom:1px solid var(--line)}.details-head small{font-size:9px;color:var(--muted)}.details-head h2{margin:3px 0 0;font-size:16px}.details-body{height:calc(100% - 66px);overflow:auto;padding:16px}

.modal{position:fixed;inset:0;z-index:100;display:none;place-items:center;padding:18px}.modal.open{display:grid}
.modal-backdrop{position:absolute;inset:0;background:rgba(10,10,14,.28);backdrop-filter:blur(9px)}
.modal-card{position:relative;width:min(500px,100%);max-height:min(760px,92vh);overflow:hidden;background:var(--surface);border:1px solid var(--line);border-radius:16px;box-shadow:var(--shadow);display:flex;flex-direction:column}
.modal-card.wide{width:min(720px,100%)}.modal-head{padding:15px 16px 12px;display:flex;justify-content:space-between;border-bottom:1px solid var(--line)}.modal-head small{font-size:8px;color:var(--muted)}.modal-head h2{margin:3px 0 0;font-size:17px}.modal-body{padding:16px;overflow:auto}.modal-foot{display:flex;justify-content:flex-end;gap:7px;padding:12px 16px;border-top:1px solid var(--line)}
.field{display:block;margin-bottom:12px}.field span{display:block;font-size:9px;font-weight:600;margin-bottom:5px}.field input,.field textarea,.field select{width:100%;border:1px solid var(--line);background:var(--surface-2);border-radius:9px;padding:9px 10px;outline:0}.field textarea{min-height:90px}
.confirm-note{padding:11px;border-radius:9px;background:#fff7df;color:#946514;font-size:10px}.confirm-note.danger{background:#fff0f1;color:var(--bad)}

.upload-layout{display:grid;grid-template-columns:220px 1fr;min-height:360px}.upload-hero{padding:24px 20px;background:var(--surface-2);border-right:1px solid var(--line);display:flex;flex-direction:column;align-items:center;text-align:center;justify-content:center}
.upload-orb{width:62px;height:62px;border-radius:18px;background:var(--accent-soft);color:var(--accent);display:grid;place-items:center}.upload-orb svg{width:30px;height:30px}.upload-hero h3{font-size:15px;margin:15px 0 5px}.upload-hero p{font-size:9px;color:var(--muted)}
.upload-content{padding:20px}.upload-step{display:flex;gap:9px;margin-bottom:13px}.step-number{width:24px;height:24px;border-radius:7px;background:var(--accent-soft);color:var(--accent);display:grid;place-items:center;font-size:9px;font-weight:700}
.target-card{border:1px solid var(--line);background:var(--surface-2);border-radius:9px;padding:9px;margin:10px 0;display:flex;align-items:center;gap:8px}.upload-buttons{display:flex;gap:6px;flex-wrap:wrap;margin:12px 0}.upload-session-status{border-top:1px solid var(--line);margin-top:13px;padding-top:13px}
.drop-zone{position:fixed;inset:12px;z-index:150;display:none;place-items:center;border:2px dashed var(--accent);border-radius:18px;background:var(--accent-soft);pointer-events:none}.drop-zone.open{display:grid}

.account-menu{position:absolute;right:14px;top:51px;width:215px;padding:5px;background:var(--surface);border:1px solid var(--line);border-radius:11px;box-shadow:var(--shadow);z-index:70;display:none}.account-menu.open{display:block}.account-menu-head{padding:8px 9px 10px;border-bottom:1px solid var(--line)}.account-menu button{width:100%;border:0;background:transparent;text-align:left;padding:8px 9px;border-radius:7px;font-size:10px}.account-menu button:hover{background:var(--surface-2)}.danger-text{color:var(--bad)!important}
.account-modal-card{width:min(740px,calc(100vw - 30px))}.account-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}.account-box{border:1px solid var(--line);border-radius:10px;padding:12px}

.toast-stack{position:fixed;right:14px;bottom:14px;z-index:200}.toast{background:var(--surface);border:1px solid var(--line);border-radius:10px;box-shadow:var(--shadow);padding:10px 11px}
.sidebar-shade,.mobile-tabs{display:none}

@media(max-width:760px){
  .app-shell{display:block}.sidebar{position:fixed;inset:0 auto 0 0;width:min(300px,84vw);transform:translateX(-105%);transition:.22s;box-shadow:var(--shadow)}.sidebar.open{transform:none}
  .sidebar-shade{display:block;position:fixed;inset:0;z-index:25;background:rgba(10,10,14,.32);opacity:0;pointer-events:none}.sidebar-shade.open{opacity:1;pointer-events:auto}
  .mobile-menu{display:grid}.navigation-button{display:none}.toolbar-create{width:34px;padding:0;justify-content:center}.toolbar-create span{display:none}
  .topbar{height:56px;padding:7px 9px;gap:6px}.topbar-left{min-width:auto}.search-box{width:auto;flex:1;margin-left:0}.search-box kbd{display:none}.avatar{display:none}
  .content-area{padding:15px 12px 86px}.title-block h1{font-size:24px}.head-actions .soft-button{font-size:0;width:34px;padding:0}
  .grid-view{grid-template-columns:repeat(2,minmax(0,1fr));gap:14px 7px}.grid-preview{height:82px}
  .file-table thead{display:none}.file-table td:nth-child(2),.file-table td:nth-child(3){display:none}.file-row{height:55px}
  .details-panel{top:7vh;width:100%;border-radius:18px 18px 0 0}.upload-layout{display:block}.upload-hero{min-height:145px;border-right:0;border-bottom:1px solid var(--line)}
  .account-grid{grid-template-columns:1fr}
  .mobile-tabs{position:fixed;left:8px;right:8px;bottom:8px;height:58px;z-index:40;display:grid;grid-template-columns:repeat(4,1fr);background:var(--surface);border:1px solid var(--line);border-radius:16px;box-shadow:var(--shadow);padding:4px}
  .mobile-tabs button{border:0;background:transparent;color:var(--muted);border-radius:11px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px;font-size:8px}.mobile-tabs button.active{background:var(--surface-2);color:var(--accent)}
}


/* ===================== 0.5.1 COMFORT SCALE ===================== */
:root{
  --sidebar-width:282px;
  --shadow:0 18px 48px rgba(28,28,40,.13);
}
.sidebar{padding:20px 14px 16px}
.brand{gap:12px;padding:2px 10px 22px}
.brand-mark{width:42px;height:42px;border-radius:13px}
.brand-mark svg{width:25px;height:25px}
.brand strong{font-size:15px;letter-spacing:-.2px}
.brand small{margin-top:2px;font-size:10.5px}
.nav-list{gap:3px}
.nav-list button{min-height:43px;padding:0 11px;border-radius:10px;gap:11px}
.nav-list button span{font-size:14px;font-weight:520}
.nav-list button svg{width:19px;height:19px}
.nav-list button em{font-size:11px}
.nav-caption{padding:21px 11px 8px;font-size:10px;letter-spacing:.78px}
.nav-separator{margin:13px 10px}
.space-color{width:8px;height:8px}
.sidebar-footer{display:none}

.topbar{
  height:70px;padding:11px 24px;gap:16px;
  background:color-mix(in srgb,var(--toolbar) 94%,transparent);
  backdrop-filter:blur(18px) saturate(150%);
}
.topbar-left{min-width:270px;gap:9px}
.icon-button{width:40px;height:40px;border-radius:10px}
.icon-button svg{width:20px;height:20px}
.navigation-button{border-color:var(--line-soft);box-shadow:0 1px 2px rgba(0,0,0,.03)}
.toolbar-create{
  height:40px;padding:0 15px 0 11px;gap:8px;border-radius:11px;
  font-size:13px;box-shadow:0 1px 3px rgba(0,0,0,.04)
}
.toolbar-create svg{width:18px;height:18px}
.search-box{width:min(520px,44vw);height:42px;padding:0 13px;gap:9px;border-radius:12px}
.search-box svg{width:18px;height:18px}
.search-box input{font-size:13px}
.search-box kbd{font-size:10px;padding:2px 7px;border-radius:6px}
.avatar{width:40px;height:40px;font-size:13px}

.content-area{padding:34px 42px 54px}
.content-head{min-height:82px;align-items:flex-end}
.breadcrumbs{min-height:19px}
.breadcrumbs button{font-size:12px}
.breadcrumbs svg{width:12px;height:12px}
.title-block h1{
  margin:7px 0 4px;font-size:34px;line-height:1.08;
  letter-spacing:-.85px;font-weight:690
}
.title-block p{font-size:13px;line-height:1.4}
.primary-button,.soft-button,.secondary-button,.danger-button{
  min-height:41px;padding:0 15px;gap:8px;border-radius:11px;font-size:13px
}
.primary-button svg,.soft-button svg,.secondary-button svg{width:18px;height:18px}

.toolbar{min-height:54px;margin-top:17px}
.item-count{font-size:12px}
.sort-control{height:36px;padding:0 9px;gap:6px;border-radius:9px}
.sort-control svg{width:16px;height:16px}
.sort-control select{font-size:12px}
.view-button{width:36px;height:36px;border-radius:9px}
.view-button svg{width:17px;height:17px}
.items-host{margin-top:24px}

.file-table thead th{height:38px;padding:0 13px;font-size:11px}
.file-row{height:59px}
.file-row td{padding:0 13px;font-size:13px}
.name-cell{gap:12px}
.item-icon{width:36px;height:36px;border-radius:9px}
.item-icon svg{width:22px;height:22px}
.item-icon.folder svg{width:30px;height:30px}
.item-name b{font-size:13.5px}
.cell-muted{font-size:12px}
.row-more{width:34px;height:34px;border-radius:9px}

.grid-view{grid-template-columns:repeat(auto-fill,minmax(178px,1fr));gap:30px 22px}
.grid-card{padding:12px 10px 13px;border-radius:13px}
.grid-card.selected{box-shadow:inset 0 0 0 1.5px #c4c9ff}
.grid-card>.row-more{top:8px;right:8px}
.grid-preview{height:124px;margin-bottom:11px;border-radius:13px}
.grid-card:not([data-item-type="folder"]) .grid-preview{width:min(145px,100%);border-radius:13px}
.grid-preview .item-icon{width:72px;height:72px}
.grid-card[data-item-type="folder"] .grid-preview .item-icon{width:105px;height:84px}
.grid-card[data-item-type="folder"] .grid-preview .item-icon svg{width:94px;height:76px;stroke-width:1.2}
.grid-card:not([data-item-type="folder"]) .grid-preview .item-icon svg{width:43px;height:43px}
.grid-card h3{font-size:13.5px;line-height:1.35;font-weight:540}
.grid-card p{margin-top:4px;font-size:11px;min-height:15px}

.empty-state{min-height:500px}
.empty-illustration{width:116px;height:91px;margin-bottom:17px}
.empty-illustration svg{width:104px;height:84px}
.empty-state h2{font-size:22px;letter-spacing:-.35px}
.empty-state p{margin:8px 0 20px;font-size:13px;line-height:1.45}
.empty-actions{gap:9px}

.context-menu{width:238px}
.create-popover{width:225px}
.context-menu,.popover{border-radius:13px;padding:7px}
.context-menu button,.create-popover button{
  min-height:42px;gap:10px;padding:8px 10px;border-radius:9px;font-size:13px
}
.create-popover b{font-size:13px}
.action-icon{width:31px;height:31px;border-radius:9px}

.details-panel{top:70px;width:395px}
.details-head{padding:20px}
.details-head small{font-size:11px}
.details-head h2{font-size:19px}
.details-body{height:calc(100% - 78px);padding:20px}
.modal-card{border-radius:18px}
.modal-head{padding:18px 20px 15px}
.modal-head small{font-size:10px}
.modal-head h2{font-size:20px}
.modal-body{padding:20px}
.modal-foot{padding:14px 20px}
.field span{font-size:11px;margin-bottom:7px}
.field input,.field textarea,.field select{padding:11px 12px;border-radius:10px;font-size:13px}
.confirm-note{font-size:12px}

.account-menu{top:60px;width:245px;padding:7px;border-radius:13px}
.account-menu-head{padding:10px 11px 12px}
.account-menu-head b{font-size:13px}
.account-menu-head small{font-size:10px}
.account-menu button{padding:10px 11px;font-size:12px;border-radius:9px}

.toast{min-width:290px;padding:13px 14px;border-radius:12px}
.toast svg{width:19px;height:19px}
.toast b{font-size:13px}
.toast p{font-size:11px;line-height:1.4}

.upload-layout{grid-template-columns:250px 1fr;min-height:400px}
.upload-hero{padding:30px 24px}
.upload-orb{width:72px;height:72px;border-radius:20px}
.upload-orb svg{width:34px;height:34px}
.upload-hero h3{font-size:18px;margin-top:18px}
.upload-hero p{font-size:11.5px;line-height:1.5}
.upload-content{padding:24px}
.upload-step b{font-size:13px}
.upload-step p{font-size:11px}
.step-number{width:29px;height:29px;font-size:11px;border-radius:8px}
.target-card{padding:12px;border-radius:11px}
.target-card b{font-size:12px}

@media(max-width:1250px){
  :root{--sidebar-width:250px}
  .sidebar{padding:16px 11px}
  .nav-list button{min-height:39px}
  .nav-list button span{font-size:13px}
  .topbar{height:64px;padding:9px 16px}
  .topbar-left{min-width:225px}
  .content-area{padding:28px 30px 46px}
  .title-block h1{font-size:31px}
  .grid-view{grid-template-columns:repeat(auto-fill,minmax(160px,1fr));gap:24px 16px}
}
@media(max-width:760px){
  :root{--sidebar-width:282px}
  .topbar{height:58px;padding:7px 9px}
  .toolbar-create{width:40px;height:40px}
  .search-box{height:40px}
  .content-area{padding:20px 15px 88px}
  .title-block h1{font-size:27px}
  .title-block p{font-size:12px}
  .grid-view{grid-template-columns:repeat(2,minmax(0,1fr));gap:18px 8px}
  .grid-preview{height:100px}
  .grid-card h3{font-size:13px}
  .empty-state{min-height:390px}
  .details-panel{top:7vh;width:100%}
}

/* ===================== 0.6.0 NOTES ===================== */
.content-area.notes-mode{padding:0;overflow:hidden}
.notes-app{height:100%;min-height:0;display:grid;grid-template-columns:235px 350px minmax(420px,1fr);background:var(--bg)}
.notes-folders-pane,.notes-list-pane,.notes-editor-pane{min-height:0;overflow:hidden}
.notes-folders-pane{display:flex;flex-direction:column;background:var(--sidebar);border-right:1px solid var(--line);padding:24px 14px 16px}
.notes-pane-title{display:flex;align-items:center;justify-content:space-between;padding:0 8px 18px}.notes-pane-title small{display:block;font-size:9px;letter-spacing:.8px;color:var(--muted);font-weight:700}.notes-pane-title h2{margin:4px 0 0;font-size:24px;letter-spacing:-.5px}
.notes-mini-button,.notes-new-button{border:0;background:var(--surface);color:var(--accent);display:grid;place-items:center;box-shadow:0 1px 2px rgba(0,0,0,.05)}
.notes-mini-button{width:32px;height:32px;border-radius:9px;font-size:21px}.notes-new-button{width:36px;height:36px;border-radius:10px}.notes-new-button:hover,.notes-mini-button:hover{background:var(--accent-soft)}
.notes-folder-nav{display:flex;flex:1;min-height:0;flex-direction:column;overflow:auto;gap:3px}.notes-folder-nav>button,.note-folder-row>button:first-child{width:100%;min-height:40px;border:0;background:transparent;color:var(--muted);border-radius:9px;padding:0 9px;display:flex;align-items:center;gap:9px;text-align:left}.notes-folder-nav button:hover,.note-folder-row.active>button:first-child,.notes-folder-nav>button.active{background:rgba(120,120,128,.13);color:var(--text)}
.notes-folder-nav svg{width:17px;height:17px}.notes-folder-nav span{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px}.notes-folder-nav em{font-style:normal;font-size:10px;color:var(--muted)}
.notes-nav-caption{padding:18px 9px 6px;font-size:9px;font-weight:700;letter-spacing:.7px;text-transform:uppercase;color:#909095}.notes-nav-spacer{flex:1;min-height:14px}
.note-folder-row{position:relative;display:flex;align-items:center}.note-folder-row>button:first-child{padding-right:34px}.note-folder-more{position:absolute;right:4px;width:28px;height:28px;border:0;border-radius:7px;background:transparent;color:var(--muted);display:none;place-items:center}.note-folder-row:hover .note-folder-more,.note-folder-row.active .note-folder-more{display:grid}.note-folder-more:hover{background:var(--surface-3)}.note-folder-more svg{width:15px;height:15px}

.notes-list-pane{position:relative;display:flex;flex-direction:column;background:var(--surface);border-right:1px solid var(--line)}
.notes-list-head{height:82px;flex:none;display:flex;align-items:center;justify-content:space-between;padding:18px 18px 12px;border-bottom:1px solid var(--line)}.notes-list-head h2{margin:0 0 4px;font-size:20px;letter-spacing:-.35px}.notes-list-head small{font-size:10px;color:var(--muted)}.notes-new-button svg{width:18px;height:18px}
.notes-list{flex:1;min-height:0;overflow:auto;padding:7px}
.note-list-item{min-height:106px;padding:13px 13px 11px;border-radius:11px;border:1px solid transparent;cursor:pointer}.note-list-item:hover{background:var(--surface-2)}.note-list-item.selected{background:var(--accent-soft);border-color:color-mix(in srgb,var(--accent) 18%,transparent)}
.note-list-title{display:flex;align-items:center;gap:7px}.note-list-title b{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px}.note-list-title svg{width:14px;height:14px;color:var(--accent);fill:color-mix(in srgb,var(--accent) 15%,transparent)}
.note-list-item p{height:34px;margin:7px 0 8px;overflow:hidden;color:var(--muted);font-size:10.5px;line-height:1.55}.note-list-meta{display:flex;gap:9px;min-width:0;color:var(--muted);font-size:9px}.note-list-meta span:last-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.notes-list-empty{position:absolute;inset:82px 0 0;display:flex;flex-direction:column;align-items:center;justify-content:center;color:var(--muted);text-align:center;padding:20px;pointer-events:none}.notes-list-empty svg{width:42px;height:42px;margin-bottom:12px}.notes-list-empty b{color:var(--text);font-size:13px}.notes-list-empty span{margin-top:5px;font-size:10px}

.notes-editor-pane{background:var(--bg);position:relative}
.notes-editor-empty{height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;color:var(--muted);padding:40px}.notes-editor-empty>svg{width:58px;height:58px;color:var(--accent);margin-bottom:16px}.notes-editor-empty h2{margin:0;color:var(--text);font-size:24px}.notes-editor-empty p{margin:8px 0 20px;font-size:12px}
.notes-editor{height:100%;display:flex;flex-direction:column;min-height:0;padding:0 34px}
.notes-editor-head{height:66px;flex:none;display:flex;align-items:center;gap:10px;border-bottom:1px solid var(--line-soft)}.notes-editor-head select{max-width:220px;height:34px;border:1px solid var(--line);border-radius:9px;background:var(--surface-2);padding:0 9px;font-size:10px;outline:0}.notes-save-state{font-size:9px;color:var(--muted)}.notes-editor-actions{margin-left:auto;display:flex;gap:3px}.notes-editor-actions .icon-button.active{background:var(--accent-soft);color:var(--accent)}
.note-title-input{flex:none;width:100%;border:0;outline:0;background:transparent;padding:29px 3px 4px;font-size:30px;line-height:1.15;font-weight:690;letter-spacing:-.65px}.note-title-input::placeholder{color:color-mix(in srgb,var(--muted) 55%,transparent)}.note-title-input:disabled{opacity:1;color:var(--text)}
.note-meta-line{flex:none;padding:5px 4px 13px;color:var(--muted);font-size:9.5px}
.note-format-toolbar{flex:none;display:flex;align-items:center;gap:3px;padding:7px 0;border-top:1px solid var(--line-soft);border-bottom:1px solid var(--line-soft)}.note-format-toolbar>span{width:1px;height:20px;margin:0 5px;background:var(--line)}.note-format-toolbar button{min-width:31px;height:31px;border:0;border-radius:8px;background:transparent;color:var(--muted);font-size:11px}.note-format-toolbar button:hover{background:var(--surface-2);color:var(--text)}
.note-body-editor{flex:1;min-height:0;overflow:auto;outline:0;padding:22px 4px 80px;font-size:14px;line-height:1.68;word-break:break-word}.note-body-editor:empty::before{content:attr(data-placeholder);color:color-mix(in srgb,var(--muted) 65%,transparent);pointer-events:none}.note-body-editor h1{font-size:28px}.note-body-editor h2{font-size:22px}.note-body-editor h3{font-size:18px}.note-body-editor p{margin:0 0 10px}.note-body-editor blockquote{margin:12px 0;padding:2px 0 2px 14px;border-left:3px solid var(--line);color:var(--muted)}.note-body-editor pre{white-space:pre-wrap;background:var(--surface-2);padding:12px;border-radius:9px}.note-body-editor a{color:var(--accent)}
.note-check-row{display:flex;align-items:flex-start;gap:8px;min-height:27px}.note-check-row input{margin-top:5px;accent-color:var(--accent)}.note-check-row input:checked+.note-check-text{text-decoration:line-through;color:var(--muted)}
.note-history-list{display:flex;flex-direction:column;gap:8px}.note-history-row{display:flex;align-items:center;justify-content:space-between;gap:15px;border:1px solid var(--line);border-radius:10px;padding:11px}.note-history-row>div{min-width:0}.note-history-row b{font-size:11px}.note-history-row small{display:block;margin-top:3px;color:var(--muted);font-size:9px}.note-history-row p{margin:6px 0 0;color:var(--muted);font-size:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.app-toggle-row{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:12px 0;border-top:1px solid var(--line-soft)}.app-toggle-row>span{display:block}.app-toggle-row b{display:block;font-size:12px}.app-toggle-row small{display:block;margin-top:3px;color:var(--muted);font-size:9px}.app-toggle-row input{width:18px;height:18px;accent-color:var(--accent)}

@media(max-width:1250px){
  .notes-app{grid-template-columns:205px 310px minmax(360px,1fr)}.notes-editor{padding:0 26px}.note-title-input{font-size:27px}
}
@media(max-width:900px){
  .notes-app{grid-template-columns:190px 300px minmax(330px,1fr)}.notes-folders-pane{padding-left:8px;padding-right:8px}.notes-editor{padding:0 20px}
}
@media(max-width:760px){
  .content-area.notes-mode{padding:0 0 74px}.notes-app{height:100%;display:block;overflow:auto}.notes-folders-pane{display:none}.notes-list-pane{height:42%;min-height:250px;border-right:0;border-bottom:1px solid var(--line)}.notes-editor-pane{height:58%;min-height:360px}.notes-list-head{height:62px;padding:10px 13px}.notes-list-empty{inset:62px 0 0}.note-list-item{min-height:88px;padding:10px}.note-list-item p{height:30px;margin:5px 0}.notes-editor{padding:0 14px}.notes-editor-head{height:51px}.note-title-input{padding-top:17px;font-size:23px}.note-format-toolbar{overflow-x:auto}.note-body-editor{font-size:13px;padding-top:14px}.notes-editor-empty{padding:25px}.notes-new-button{width:34px;height:34px}
}

/* 0.6.0 Notes mobile navigation: keep folders/pinned/trash reachable on phones. */
@media(max-width:760px){
  .notes-app{display:flex;flex-direction:column;height:100%;overflow:hidden}
  .notes-folders-pane{display:block;flex:none;padding:7px 9px 6px;border-right:0;border-bottom:1px solid var(--line);overflow:hidden}
  .notes-pane-title{display:none}
  .notes-folder-nav{display:flex;flex-direction:row;align-items:center;gap:5px;overflow-x:auto;overflow-y:hidden;scrollbar-width:none;padding:0 1px}
  .notes-folder-nav::-webkit-scrollbar{display:none}
  .notes-folder-nav>button,.note-folder-row>button:first-child{width:auto;min-width:max-content;min-height:36px;padding:0 10px;border-radius:9px}
  .notes-folder-nav span{font-size:11px;max-width:125px}
  .notes-folder-nav em{font-size:9px}
  .notes-nav-caption,.notes-nav-spacer{display:none}
  #noteFolderList{display:flex;align-items:center;gap:5px}
  .note-folder-row{flex:none}
  .note-folder-row>button:first-child{padding-right:29px}
  .note-folder-more{display:grid;right:2px;width:25px;height:25px}
  .notes-list-pane{height:36%;min-height:220px;flex:none}
  .notes-editor-pane{height:auto;min-height:0;flex:1}
}
@media(max-width:760px){
  .notes-folders-pane{display:flex;flex-direction:row;align-items:center;gap:5px}
  .notes-pane-title{display:block;order:2;flex:none;padding:0}
  .notes-pane-title>div{display:none}
  .notes-pane-title .notes-mini-button{display:grid;width:35px;height:35px}
  .notes-folder-nav{order:1;flex:1}
}

/* ===================== 0.7.0 PRIVATE CLOUD ECOSYSTEM ===================== */
html[data-accent="blue"]{--accent:#2f80ed;--accent-hover:#2672d7;--accent-soft:#e7f1ff}
html[data-accent="violet"]{--accent:#8b5cf6;--accent-hover:#7b4ee0;--accent-soft:#f0eaff}
html[data-accent="rose"]{--accent:#e85d8b;--accent-hover:#d94e7b;--accent-soft:#ffeaf1}
html[data-accent="green"]{--accent:#2e9d72;--accent-hover:#278964;--accent-soft:#e7f7f0}
html[data-accent="orange"]{--accent:#df8737;--accent-hover:#ca762c;--accent-soft:#fff0df}
html[data-theme="dark"][data-accent="blue"]{--accent:#64a3ff;--accent-hover:#78afff;--accent-soft:#24354c}
html[data-theme="dark"][data-accent="violet"]{--accent:#a882ff;--accent-hover:#b593ff;--accent-soft:#392f50}
html[data-theme="dark"][data-accent="rose"]{--accent:#ff82aa;--accent-hover:#ff96b9;--accent-soft:#4a2d38}
html[data-theme="dark"][data-accent="green"]{--accent:#54c69a;--accent-hover:#68d3aa;--accent-soft:#263f36}
html[data-theme="dark"][data-accent="orange"]{--accent:#f0a45f;--accent-hover:#f3b170;--accent-soft:#493626}

html[data-background]:not([data-background="none"]) body::before{
  content:"";position:fixed;inset:0;z-index:-2;background-size:cover;background-position:center;filter:saturate(1.06);transform:scale(1.02)
}
html[data-background="aurora"] body::before{background:radial-gradient(circle at 18% 18%,rgba(105,235,207,.66),transparent 35%),radial-gradient(circle at 82% 22%,rgba(109,102,246,.68),transparent 40%),linear-gradient(145deg,#c8efe8,#d8d4fb 48%,#f5d4ec)}
html[data-background="ocean"] body::before{background:radial-gradient(circle at 24% 20%,rgba(255,255,255,.7),transparent 30%),linear-gradient(150deg,#9bd7ef,#4e9dd4 48%,#315aa1)}
html[data-background="dusk"] body::before{background:radial-gradient(circle at 72% 18%,rgba(255,197,133,.75),transparent 24%),linear-gradient(155deg,#665d9c,#b77ca8 48%,#f0a979)}
html[data-background="forest"] body::before{background:radial-gradient(circle at 65% 15%,rgba(204,235,187,.45),transparent 26%),linear-gradient(150deg,#325a4e,#68866a 48%,#a5b88b)}
html[data-background]:not([data-background="none"]) .main-area{background:color-mix(in srgb,var(--bg) 76%,transparent);backdrop-filter:blur(26px) saturate(135%)}
html[data-background]:not([data-background="none"]) .sidebar{background:color-mix(in srgb,var(--sidebar) 82%,transparent);backdrop-filter:blur(34px) saturate(145%)}
html[data-background]:not([data-background="none"]) .topbar{background:color-mix(in srgb,var(--toolbar) 76%,transparent)}

.ecosystem-nav{padding-top:2px}.ecosystem-nav .space-subnav{display:flex;flex-direction:column;gap:2px;margin:1px 0 5px 12px;padding-left:8px;border-left:1px solid var(--line)}
.ecosystem-nav .space-subnav button{min-height:38px;padding-left:9px}.ecosystem-nav .space-subnav button span:nth-child(2){font-size:13px}.space-glyph{width:23px;height:23px;border-radius:7px;display:grid!important;place-items:center!important;flex:none;background:color-mix(in srgb,var(--space-color) 14%,transparent);color:var(--space-color)}
.space-glyph svg{width:15px!important;height:15px!important}.space-glyph.large{width:42px;height:42px;border-radius:12px}.space-glyph.large svg{width:24px!important;height:24px!important}

.app-launcher{width:350px;padding:10px;right:18px}.app-launcher-head{display:flex;align-items:flex-end;justify-content:space-between;padding:5px 6px 11px}.app-launcher-head b{font-size:14px}.app-launcher-head small{font-size:10px;color:var(--muted)}
.app-launcher-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:6px}.app-launcher-grid button{border:0;background:transparent;border-radius:12px;min-height:86px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;color:var(--text)}.app-launcher-grid button:hover{background:var(--surface-2)}.app-launcher-grid button svg{width:29px;height:29px;color:var(--accent)}.app-launcher-grid button b{font-size:11px;font-weight:600}

.ecosystem-view{min-height:100%;max-width:1420px;margin:0 auto}.home-view{padding-top:2px}.home-hero{min-height:160px;border-radius:26px;padding:28px 30px;display:flex;align-items:center;justify-content:space-between;gap:20px;background:linear-gradient(135deg,color-mix(in srgb,var(--accent) 16%,var(--surface)),color-mix(in srgb,var(--surface) 91%,transparent));border:1px solid color-mix(in srgb,var(--accent) 16%,var(--line));box-shadow:0 18px 55px rgba(25,25,40,.08)}
.home-hero small,.ecosystem-page-head small,.home-card-head small,.storage-hero-card small{font-size:10px;letter-spacing:.11em;color:var(--muted);font-weight:700}.home-hero h1{font-size:34px;letter-spacing:-1px;margin:6px 0 5px}.home-hero p{margin:0;color:var(--muted);font-size:13px}.home-quick-actions{display:flex;gap:8px;flex-wrap:wrap}.home-loading{min-height:180px;display:grid;place-items:center;color:var(--muted);font-size:13px}
.home-grid{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));gap:16px;margin-top:16px}.home-card{grid-column:span 6;min-height:265px;background:color-mix(in srgb,var(--surface) 94%,transparent);border:1px solid var(--line);border-radius:22px;padding:20px;box-shadow:0 12px 42px rgba(23,24,39,.055);overflow:hidden}.home-card:hover{border-color:color-mix(in srgb,var(--accent) 25%,var(--line))}.home-photos-card{grid-column:span 7}.home-storage-card{grid-column:span 5;min-height:220px;cursor:pointer}.home-card-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:14px}.home-card-head h2{font-size:20px;margin:3px 0 0;letter-spacing:-.35px}.card-arrow{width:34px;height:34px;border:0;background:var(--surface-2);border-radius:10px;color:var(--muted);display:grid;place-items:center}.card-arrow:hover{color:var(--accent)}
.home-photo-mosaic{display:grid;grid-template-columns:repeat(3,1fr);grid-auto-rows:88px;gap:5px;border-radius:14px;overflow:hidden}.home-photo-placeholder{position:relative;display:grid;place-items:center;color:rgba(255,255,255,.82);overflow:hidden}.home-photo-placeholder svg{width:27px;height:27px}.home-photo-placeholder span{position:absolute;left:7px;right:7px;bottom:6px;font-size:9px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-shadow:0 1px 5px rgba(0,0,0,.35)}.tone-0{background:linear-gradient(145deg,#8ebce8,#6d75cb)}.tone-1{background:linear-gradient(145deg,#e5b291,#cb6e7e)}.tone-2{background:linear-gradient(145deg,#86c6ae,#4a8f7d)}.tone-3{background:linear-gradient(145deg,#c6a2dd,#8776bd)}.tone-4{background:linear-gradient(145deg,#d4c27e,#a99052)}
.home-file-list,.home-note-list{display:flex;flex-direction:column}.home-file-list button,.home-note-list button{border:0;background:transparent;border-radius:10px;text-align:left;padding:9px 6px;display:flex;align-items:center;gap:10px}.home-file-list button:hover,.home-note-list button:hover{background:var(--surface-2)}.home-file-list button>span:nth-child(2){min-width:0;flex:1}.home-file-list b,.home-note-list b{font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block}.home-file-list small,.home-note-list small{display:block;font-size:9.5px;color:var(--muted);margin-top:2px}.mini-file-icon{width:32px;height:32px;border-radius:9px;background:var(--surface-2);color:var(--accent);display:grid;place-items:center;flex:none}.mini-file-icon svg{width:18px;height:18px}.home-note-list button{display:block;border-bottom:1px solid var(--line-soft);border-radius:0;padding:9px 4px}.home-note-list p{margin:3px 0;font-size:10.5px;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.home-space-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.home-space-grid button{border:1px solid var(--line-soft);background:var(--surface-2);border-radius:13px;padding:10px;display:grid;grid-template-columns:auto 1fr;grid-template-rows:auto auto;column-gap:10px;text-align:left;align-items:center}.home-space-grid button:hover{border-color:color-mix(in srgb,var(--accent) 30%,var(--line))}.home-space-grid .space-glyph{grid-row:1/3}.home-space-grid b{font-size:12px}.home-space-grid small{font-size:9px;color:var(--muted)}.widget-empty{min-height:80px;display:grid;place-items:center;color:var(--muted);font-size:11px;text-align:center;padding:15px}
.storage-summary-line{display:flex;align-items:center;justify-content:space-between;gap:8px;background:var(--surface-2);padding:12px;border-radius:12px;margin:22px 0}.storage-summary-line span{display:flex;align-items:center;gap:7px;font-size:11px}.storage-summary-line b{font-size:11px;color:var(--good)}.storage-metrics{display:grid;grid-template-columns:repeat(3,1fr);gap:7px}.storage-metrics>div{background:var(--surface-2);padding:12px;border-radius:12px}.storage-metrics b{display:block;font-size:20px}.storage-metrics small{font-size:9px;color:var(--muted)}

.ecosystem-page-head{display:flex;justify-content:space-between;align-items:flex-end;margin-bottom:22px}.ecosystem-page-head h1{font-size:32px;margin:5px 0 3px;letter-spacing:-.7px}.ecosystem-page-head p{margin:0;color:var(--muted);font-size:12px}.shared-grid{display:grid;gap:18px}.shared-section{background:var(--surface);border:1px solid var(--line);border-radius:20px;padding:18px}.section-title{display:flex;align-items:center;gap:8px;margin-bottom:11px}.section-title h2{margin:0;font-size:17px}.section-title span{background:var(--surface-2);color:var(--muted);border-radius:999px;padding:2px 7px;font-size:9px}.shared-cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:8px}.shared-cards>button{border:1px solid var(--line-soft);background:var(--surface-2);border-radius:14px;padding:11px;display:grid;grid-template-columns:auto 1fr auto;gap:11px;align-items:center;text-align:left}.shared-cards>button:hover{border-color:color-mix(in srgb,var(--accent) 30%,var(--line))}.shared-cards b{display:block;font-size:12px}.shared-cards small{display:block;font-size:9.5px;color:var(--muted);margin-top:3px}.shared-cards>button>svg{width:15px;height:15px;color:var(--muted)}

.storage-dashboard{display:grid;gap:16px}.storage-hero-card{display:flex;align-items:center;gap:20px;background:var(--surface);border:1px solid var(--line);border-radius:22px;padding:24px}.storage-hero-card h2{font-size:34px;margin:4px 0}.storage-hero-card p{font-size:11px;color:var(--muted);margin:0;max-width:680px;line-height:1.55}.storage-orb{width:72px;height:72px;border-radius:20px;background:var(--accent-soft);color:var(--accent);display:grid;place-items:center;flex:none}.storage-orb svg{width:34px;height:34px}.storage-stat-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:10px}.storage-stat-grid>div{background:var(--surface);border:1px solid var(--line);border-radius:16px;padding:18px}.storage-stat-grid b{display:block;font-size:25px}.storage-stat-grid span{font-size:10px;color:var(--muted)}.architecture-flow{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin-top:14px}.architecture-flow span{background:var(--surface-2);border-radius:10px;padding:10px 12px;font-size:11px}.architecture-flow svg{width:14px;height:14px;color:var(--muted)}

.settings-layout{display:grid;gap:14px}.settings-card{background:var(--surface);border:1px solid var(--line);border-radius:20px;padding:18px}.settings-card-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}.settings-card-head h3{margin:0;font-size:17px}.settings-card-head p{margin:4px 0 0;font-size:10px;color:var(--muted)}.settings-card-head>svg{width:24px;height:24px;color:var(--accent)}.settings-subtitle{font-size:10px;font-weight:700;margin:18px 0 9px}.theme-choice{display:grid;grid-template-columns:repeat(3,1fr);gap:9px;margin-top:15px}.theme-choice button{border:1px solid var(--line);background:transparent;border-radius:14px;padding:8px;text-align:left}.theme-choice button.selected{border-color:var(--accent);box-shadow:0 0 0 2px var(--accent-soft)}.theme-choice b{display:block;margin:7px 2px 2px;font-size:10px}.theme-preview{height:70px;border-radius:9px;display:block;border:1px solid var(--line-soft)}.theme-preview.light{background:linear-gradient(90deg,#f0f0f3 28%,#fff 28%)}.theme-preview.dark{background:linear-gradient(90deg,#202022 28%,#161618 28%)}.theme-preview.system{background:linear-gradient(135deg,#f6f6f8 49%,#202022 51%)}.accent-choice{display:flex;gap:9px;flex-wrap:wrap}.accent-choice button{width:34px;height:34px;border-radius:50%;background:var(--swatch);border:4px solid var(--surface);box-shadow:0 0 0 1px var(--line)}.accent-choice button.selected{box-shadow:0 0 0 2px var(--accent)}.background-choice{display:grid;grid-template-columns:repeat(5,1fr);gap:8px}.background-choice button{border:1px solid var(--line);background:transparent;border-radius:13px;padding:6px;text-align:left}.background-choice button.selected{border-color:var(--accent);box-shadow:0 0 0 2px var(--accent-soft)}.background-choice button span{display:block;height:65px;border-radius:9px;background:var(--surface-2)}.background-choice button b{display:block;font-size:9px;margin:6px 2px 2px}.background-choice .bg-aurora span{background:radial-gradient(circle at 25% 20%,#82e4cc,transparent 36%),linear-gradient(145deg,#94a5ef,#e0a5cd)}.background-choice .bg-ocean span{background:linear-gradient(145deg,#a7e0f0,#4e98d1,#31589c)}.background-choice .bg-dusk span{background:linear-gradient(145deg,#655c9e,#b978a8,#efa579)}.background-choice .bg-forest span{background:linear-gradient(145deg,#315c4d,#6e8d6b,#a7b98a)}.settings-actions{display:flex;gap:8px;margin-top:13px}.space-admin-list{display:flex;flex-direction:column;margin-top:14px}.space-admin-row{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:11px;align-items:center;padding:10px 0;border-top:1px solid var(--line-soft)}.space-admin-row:first-child{border-top:0}.space-admin-row b{font-size:12px}.space-admin-row small{display:block;font-size:9.5px;color:var(--muted);margin-top:3px}.space-admin-row.archived{opacity:.62}.system-pill,.role-pill{padding:3px 7px;border-radius:999px;background:var(--surface-2);color:var(--muted);font-size:8px;font-weight:700}.danger-zone{border-color:color-mix(in srgb,var(--bad) 22%,var(--line))}

.users-overview{display:grid;grid-template-columns:repeat(3,1fr);gap:9px;margin-bottom:12px}.users-overview>div{background:var(--surface-2);border-radius:12px;padding:12px}.users-overview b{display:block;font-size:22px}.users-overview span{font-size:9px;color:var(--muted)}.users-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:8px}.users-head h4{margin:0}.account-user-row.modern{display:grid;grid-template-columns:auto 1fr auto;gap:10px;align-items:center;padding:10px 0;border-top:1px solid var(--line-soft)}.account-user-row.modern:first-child{border-top:0}.account-user-row.modern>div b{font-size:11px}.account-user-row.modern small{display:block;color:var(--muted);font-size:9px;margin-top:3px}.user-list-avatar{width:34px;height:34px;display:grid;place-items:center}.invite-step{display:flex;gap:9px;margin:17px 0 8px}.invite-step:first-child{margin-top:0}.invite-step>span{width:26px;height:26px;border-radius:8px;background:var(--accent-soft);color:var(--accent);display:grid;place-items:center;font-size:10px;font-weight:700}.invite-step h4{margin:0;font-size:12px}.invite-step p{margin:2px 0 0;font-size:9px;color:var(--muted)}.invite-space-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:7px}.invite-space-grid label{border:1px solid var(--line);border-radius:11px;padding:8px;display:flex;align-items:center;gap:8px}.invite-space-grid input{accent-color:var(--accent)}.invite-space-grid b{font-size:10px}.invite-success{padding:13px;border-radius:12px;background:var(--accent-soft)}.invite-success p{font-size:9px;color:var(--muted)}.invite-url{padding:9px;background:var(--surface);border:1px solid var(--line);border-radius:8px;font-size:9px;word-break:break-all;margin:8px 0}.user-settings-hero{display:flex;align-items:center;gap:12px;margin-bottom:14px}.large-avatar{width:48px;height:48px;display:grid;place-items:center;font-size:16px}.user-settings-hero h3{margin:0;font-size:17px}.user-settings-hero p{margin:3px 0 0;font-size:9px;color:var(--muted)}.user-space-access{display:flex;flex-direction:column}.user-space-access label,.space-member-row{display:grid;grid-template-columns:auto minmax(0,1fr) 150px;gap:9px;align-items:center;padding:8px 0;border-top:1px solid var(--line-soft)}.user-space-access label:first-child{border-top:0}.user-space-access b,.space-member-row b{font-size:10px}.user-space-access small,.space-member-row small{font-size:8.5px;color:var(--muted);display:block}.user-space-access select,.space-member-row select,.share-user-row select{border:1px solid var(--line);background:var(--surface-2);border-radius:8px;padding:7px;font-size:9px}
.share-folder-head{display:flex;align-items:center;gap:12px;margin-bottom:13px}.share-folder-head h3{margin:0;font-size:16px}.share-folder-head p{margin:3px 0 0;font-size:9px;color:var(--muted)}.share-user-list{display:flex;flex-direction:column}.share-user-row{display:grid;grid-template-columns:auto minmax(0,1fr) 145px;gap:10px;align-items:center;padding:9px 0;border-top:1px solid var(--line-soft)}.share-user-row:first-child{border-top:0}.mini.avatar{width:32px;height:32px;display:grid;place-items:center;font-size:10px}.share-user-row b{font-size:10px}.share-user-row small{font-size:8.5px;color:var(--muted);display:block}

@media(max-width:1050px){.home-card,.home-photos-card,.home-storage-card{grid-column:span 12}.background-choice{grid-template-columns:repeat(3,1fr)}.storage-stat-grid{grid-template-columns:repeat(2,1fr)}}
@media(max-width:760px){
  .app-launcher{width:min(340px,calc(100vw - 20px));right:10px!important}.home-hero{min-height:200px;padding:22px;align-items:flex-start;flex-direction:column}.home-hero h1{font-size:27px}.home-grid{display:block}.home-card{margin-top:11px;min-height:auto;padding:15px;border-radius:18px}.home-photo-mosaic{grid-auto-rows:70px}.home-space-grid{grid-template-columns:1fr}.ecosystem-page-head h1{font-size:26px}.shared-section,.settings-card,.storage-hero-card{border-radius:17px;padding:14px}.storage-hero-card{align-items:flex-start}.storage-orb{width:54px;height:54px;border-radius:15px}.storage-hero-card h2{font-size:25px}.storage-stat-grid{grid-template-columns:repeat(2,1fr)}.theme-choice{grid-template-columns:1fr}.theme-preview{height:55px}.background-choice{grid-template-columns:repeat(2,1fr)}.users-overview{grid-template-columns:repeat(3,1fr)}.users-head{align-items:flex-start;flex-direction:column}.account-user-row.modern{grid-template-columns:auto 1fr}.account-user-row.modern .manage-user{grid-column:2}.invite-space-grid{grid-template-columns:1fr}.user-space-access label,.space-member-row,.share-user-row{grid-template-columns:auto 1fr}.user-space-access select,.space-member-row select,.share-user-row select{grid-column:2}.space-admin-row{grid-template-columns:auto 1fr}.space-admin-row>button,.space-admin-row>.system-pill{grid-column:2;width:max-content}.ecosystem-nav .space-subnav{margin-left:10px}
}


/* 0.7.0 Home widget customization */
.home-widget-config{display:flex;flex-direction:column;gap:8px;margin-top:14px}
.home-widget-config-row{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:12px 14px;border:1px solid var(--line);border-radius:14px;background:var(--surface-2)}
.home-widget-config-row>label{display:flex;align-items:center;gap:12px;min-width:0;flex:1;cursor:pointer}
.home-widget-config-row>label input{width:18px;height:18px;accent-color:var(--accent)}
.home-widget-config-row>label span{display:flex;flex-direction:column;gap:2px;min-width:0}
.home-widget-config-row>label small{color:var(--muted);font-size:12px;font-weight:600}
.home-widget-config-row>div{display:flex;gap:6px}
.home-widget-config-row .icon-button{width:34px;height:34px;font-size:16px;font-weight:800}
.home-all-hidden{grid-column:1/-1;min-height:180px;display:grid;place-items:center;text-align:center;padding:28px}

/* ===================== 0.7.1 UI REPAIR / PREMIUM ECOSYSTEM ===================== */
:root{
  --content-max:1380px;
  --panel-radius:22px;
  --panel-shadow:0 12px 34px rgba(28,30,48,.055);
  --focus-ring:0 0 0 3px color-mix(in srgb,var(--accent) 18%,transparent);
}

/* Prevent native/browser button appearance from leaking into dynamically rendered UI. */
.ecosystem-view button,.account-modal-card button,.settings-layout button,.app-launcher button,
.ecosystem-view input,.ecosystem-view select,.account-modal-card input,.account-modal-card select{
  -webkit-appearance:none;appearance:none
}
.ecosystem-view button,.account-modal-card button,.settings-layout button{font:inherit}

.content-area:not(.notes-mode){scrollbar-gutter:stable}
.ecosystem-view{width:100%;max-width:var(--content-max);margin:0 auto;padding-bottom:24px}

/* Top navigation: quieter Finder/iCloud feel. */
.topbar{box-shadow:0 1px 0 rgba(0,0,0,.015)}
.search-box{transition:border-color .16s ease,box-shadow .16s ease,background .16s ease}
.search-box:focus-within{box-shadow:var(--focus-ring)}
.icon-button,.toolbar-create,.primary-button,.soft-button,.secondary-button,.danger-button{transition:transform .12s ease,background .14s ease,border-color .14s ease,box-shadow .14s ease,color .14s ease}
.primary-button:active,.soft-button:active,.secondary-button:active,.toolbar-create:active{transform:scale(.985)}
.primary-button{box-shadow:0 4px 12px color-mix(in srgb,var(--accent) 22%,transparent)}
.primary-button:hover{box-shadow:0 6px 18px color-mix(in srgb,var(--accent) 28%,transparent)}

/* Sidebar: system areas and user spaces read as one coherent hierarchy. */
.ecosystem-nav{gap:4px}
.ecosystem-nav>button{font-weight:560}
.ecosystem-nav .space-subnav{
  margin:0 0 7px 14px;padding:3px 0 3px 11px;border-left:1px solid color-mix(in srgb,var(--line) 82%,transparent);gap:2px
}
.ecosystem-nav .space-subnav button{min-height:36px;border-radius:9px;padding:0 9px;color:var(--muted)}
.ecosystem-nav .space-subnav button:hover{background:rgba(120,120,128,.09);color:var(--text)}
.ecosystem-nav .space-subnav button.active{background:color-mix(in srgb,var(--accent-soft) 70%,transparent);color:var(--text)}
.space-glyph{box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--space-color) 12%,transparent)}

/* App launcher. */
.app-launcher{width:390px;border-radius:19px;padding:12px;box-shadow:0 22px 60px rgba(18,18,27,.18)}
.app-launcher-head{padding:8px 8px 14px}.app-launcher-head b{font-size:16px}.app-launcher-head small{font-size:11px}
.app-launcher-grid{gap:7px}.app-launcher-grid button{min-height:100px;border-radius:16px;gap:10px}
.app-launcher-grid button:hover{background:var(--surface-2);transform:translateY(-1px)}
.app-launcher-grid button svg{width:34px;height:34px}.app-launcher-grid button b{font-size:12.5px}

/* Home */
.home-view{padding-top:4px}
.home-hero{
  min-height:190px;padding:31px 34px;border-radius:28px;
  background:
    radial-gradient(circle at 86% 8%,color-mix(in srgb,var(--accent) 19%,transparent),transparent 32%),
    linear-gradient(135deg,color-mix(in srgb,var(--accent) 10%,var(--surface)),color-mix(in srgb,var(--surface) 98%,transparent));
  border:1px solid color-mix(in srgb,var(--accent) 14%,var(--line));
  box-shadow:0 20px 58px rgba(24,26,46,.075)
}
.home-hero>div:first-child{max-width:760px}
.home-hero small,.ecosystem-page-head small,.home-card-head small,.storage-hero-card small{font-size:10.5px;letter-spacing:.115em}
.home-hero h1{margin:8px 0 7px;font-size:38px;line-height:1.08;letter-spacing:-1.2px}
.home-hero p{font-size:14px;line-height:1.5;color:var(--muted)}
.home-quick-actions{max-width:460px;justify-content:flex-end}
.home-quick-actions .primary-button,.home-quick-actions .soft-button{min-height:43px;padding:0 16px}
.home-grid{gap:18px;margin-top:18px}
.home-card{
  min-height:282px;padding:21px;border-radius:24px;background:color-mix(in srgb,var(--surface) 96%,transparent);
  border:1px solid color-mix(in srgb,var(--line) 96%,transparent);box-shadow:var(--panel-shadow);
  transition:transform .14s ease,border-color .14s ease,box-shadow .14s ease
}
.home-card:hover{transform:translateY(-1px);box-shadow:0 17px 44px rgba(25,27,45,.075)}
.home-card-head{margin-bottom:16px}.home-card-head h2{font-size:21px;letter-spacing:-.45px}
.card-arrow{width:38px;height:38px;border-radius:12px;border:1px solid var(--line-soft)}
.home-photos-card{grid-column:span 7}.home-card:not(.home-photos-card):not(.home-storage-card){grid-column:span 5}
.home-storage-card{grid-column:span 12;min-height:200px}
.home-photo-mosaic{grid-auto-rows:104px;gap:6px;border-radius:17px}
.home-photo-placeholder{border-radius:0}.home-photo-placeholder svg{width:29px;height:29px}.home-photo-placeholder span{font-size:10px;left:9px;right:9px;bottom:8px}
.home-file-list button,.home-note-list button{padding:11px 8px;border-radius:12px}
.home-file-list b,.home-note-list b{font-size:13px}.home-file-list small,.home-note-list small{font-size:10.5px}
.home-note-list button{border-radius:10px;border-bottom:0;margin-bottom:2px}.home-note-list p{font-size:11px}
.mini-file-icon{width:38px;height:38px;border-radius:11px}.mini-file-icon svg{width:20px;height:20px}
.home-space-grid{gap:10px}.home-space-grid button{min-height:69px;padding:11px 12px;border-radius:15px}
.home-space-grid b{font-size:13px}.home-space-grid small{font-size:10px;margin-top:2px}
.widget-empty{min-height:110px;border:1px dashed var(--line);border-radius:14px;background:color-mix(in srgb,var(--surface-2) 74%,transparent);font-size:12px}
.storage-summary-line{margin:12px 0 16px;padding:13px 14px}.storage-summary-line span,.storage-summary-line b{font-size:12px}
.storage-metrics{grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}.storage-metrics>div{padding:14px;border-radius:14px}.storage-metrics b{font-size:22px}.storage-metrics small{font-size:10px}

/* Ecosystem page heads */
.ecosystem-page-head{min-height:91px;margin-bottom:20px;align-items:flex-end}
.ecosystem-page-head h1{font-size:35px;line-height:1.08;margin:7px 0 5px;letter-spacing:-.9px}
.ecosystem-page-head p{font-size:13px;line-height:1.45}

/* Shared + storage */
.shared-grid,.storage-dashboard{gap:16px}
.shared-section,.settings-card,.storage-hero-card{border-radius:23px;border-color:var(--line);box-shadow:var(--panel-shadow)}
.shared-section{padding:20px}.section-title{margin-bottom:14px}.section-title h2{font-size:18px}.section-title span{font-size:10px;padding:3px 8px}
.shared-cards{gap:10px;grid-template-columns:repeat(auto-fill,minmax(300px,1fr))}
.shared-cards>button{min-height:77px;padding:12px 13px;border-radius:15px}.shared-cards b{font-size:13px}.shared-cards small{font-size:10.5px;line-height:1.4}
.storage-hero-card{padding:26px 28px;min-height:150px}.storage-hero-card h2{font-size:37px;letter-spacing:-1px}.storage-hero-card p{font-size:12px}
.storage-stat-grid{gap:12px}.storage-stat-grid>div{border-radius:18px;padding:20px}.storage-stat-grid b{font-size:27px}.storage-stat-grid span{font-size:11px}
.architecture-flow span{font-size:12px;padding:11px 14px;border:1px solid var(--line-soft)}

/* Settings: clear hierarchy instead of a long unstyled document. */
.settings-layout{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));gap:16px;align-items:start}
.settings-card{grid-column:span 12;padding:22px;background:color-mix(in srgb,var(--surface) 97%,transparent)}
.settings-card.appearance-card{grid-column:span 8}
.settings-card.account-card{grid-column:span 4}
.settings-card.users-settings-card{grid-column:span 12}
.settings-card.space-admin-card{grid-column:span 12}
.settings-card-head{align-items:center}.settings-card-head h3{font-size:19px;letter-spacing:-.25px}.settings-card-head p{font-size:11.5px;line-height:1.45;margin-top:5px}.settings-card-head>svg{width:27px;height:27px}
.settings-subtitle{font-size:11px;margin:20px 0 10px;color:var(--muted);letter-spacing:.02em}
.theme-choice{gap:10px;margin-top:18px}.theme-choice button{border-radius:16px;padding:8px;transition:border-color .14s ease,box-shadow .14s ease,transform .14s ease}.theme-choice button:hover{transform:translateY(-1px);border-color:color-mix(in srgb,var(--accent) 25%,var(--line))}.theme-choice b{font-size:11px;margin:8px 3px 3px}.theme-preview{height:82px;border-radius:11px}
.accent-choice{gap:11px}.accent-choice button{width:37px;height:37px;box-shadow:0 0 0 1px var(--line),0 2px 8px rgba(0,0,0,.05)}.accent-choice button.selected{box-shadow:0 0 0 3px var(--surface),0 0 0 5px var(--accent)}
.background-choice{grid-template-columns:repeat(5,minmax(0,1fr));gap:9px}.background-choice button{border-radius:15px;padding:7px}.background-choice button span{height:74px;border-radius:10px}.background-choice button b{font-size:10px;margin:7px 3px 2px}
.settings-actions{flex-wrap:wrap;gap:9px;margin-top:18px}.settings-actions .secondary-button,.settings-actions .primary-button{min-height:41px}
.settings-account-summary{display:flex;align-items:center;gap:12px;margin-top:18px;padding:14px;border-radius:16px;background:var(--surface-2)}
.settings-account-summary .avatar{flex:none;width:42px;height:42px;font-size:14px}.settings-account-summary b{display:block;font-size:13px}.settings-account-summary small{display:block;margin-top:3px;color:var(--muted);font-size:10px}
.admin-summary-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:9px;margin-top:16px}.admin-summary-grid>div{padding:13px 14px;background:var(--surface-2);border-radius:14px}.admin-summary-grid b{display:block;font-size:23px;line-height:1}.admin-summary-grid span{display:block;margin-top:5px;color:var(--muted);font-size:10px}

/* Spaces management */
.space-admin-list{gap:8px;margin-top:17px}.space-admin-row{border:1px solid var(--line-soft)!important;border-radius:16px;padding:12px 13px!important;background:var(--surface-2);grid-template-columns:auto minmax(0,1fr) auto;min-height:72px}
.space-admin-row:hover{border-color:color-mix(in srgb,var(--accent) 20%,var(--line))!important}.space-admin-row b{font-size:13px}.space-admin-row small{font-size:10px;line-height:1.4;margin-top:4px}.space-admin-row.archived{opacity:.68}.system-pill,.role-pill,.status-pill{font-size:9px;padding:4px 8px;border-radius:999px;font-weight:750;letter-spacing:.02em}.system-pill,.role-pill{background:var(--surface);border:1px solid var(--line-soft)}
.status-pill.active{background:color-mix(in srgb,var(--good) 12%,transparent);color:var(--good)}.status-pill.blocked{background:color-mix(in srgb,var(--bad) 12%,transparent);color:var(--bad)}

/* Account/users modal */
.account-modal-card{width:min(980px,calc(100vw - 36px));max-height:min(830px,91vh);border-radius:22px}
.account-modal-card .modal-head{padding:20px 22px 17px}.account-modal-card .modal-head h2{font-size:22px}.account-modal-card .modal-body{padding:20px 22px 24px}
.account-grid{gap:14px}.account-box{border-radius:16px;padding:16px;background:var(--surface);border-color:var(--line)}
.account-box h4{margin:0 0 8px;font-size:14px;letter-spacing:-.1px}.account-box>p{line-height:1.45}
.users-overview{gap:10px;margin-bottom:14px}.users-overview>div{border:1px solid var(--line-soft);border-radius:15px;padding:14px 15px}.users-overview b{font-size:25px}.users-overview span{font-size:10.5px;margin-top:4px;display:block}
.users-head{margin-bottom:12px}.users-head h4{font-size:15px}.users-head small{font-size:10.5px;line-height:1.4;display:block;margin-top:4px}
.user-list-modern{display:flex;flex-direction:column;gap:7px}
.account-user-row.modern{border:1px solid var(--line-soft)!important;background:var(--surface-2);border-radius:15px;padding:11px 12px!important;min-height:66px;grid-template-columns:auto minmax(0,1fr) auto}
.account-user-row.modern>div b{font-size:13px}.account-user-row.modern small{font-size:10px;line-height:1.45;margin-top:4px}.user-list-avatar{width:40px;height:40px;font-size:13px}
.account-user-row.modern .manage-user{min-height:36px;padding:0 12px}
.user-meta-line{display:flex;align-items:center;gap:6px;flex-wrap:wrap;margin-bottom:2px}
.user-meta-sub{display:flex;align-items:center;gap:7px;flex-wrap:wrap;color:var(--muted);font-size:10px}
.user-meta-sub>span:not(:last-child)::after{content:"·";margin-left:7px;color:var(--muted)}

/* Invite / user settings */
.invite-step{margin:19px 0 9px;gap:11px}.invite-step>span{width:30px;height:30px;border-radius:9px;font-size:11px}.invite-step h4{font-size:13px}.invite-step p{font-size:10.5px;line-height:1.4}
.invite-space-grid{gap:8px}.invite-space-grid label{min-height:54px;border-radius:13px;padding:10px}.invite-space-grid b{font-size:11px}
.invite-url{font-size:10.5px;padding:11px;border-radius:10px}.invite-success{border-radius:14px;padding:15px}.invite-success p{font-size:10.5px}
.user-settings-hero{padding:2px 2px 14px;margin-bottom:4px;border-bottom:1px solid var(--line-soft)}.large-avatar{width:54px;height:54px;font-size:18px}.user-settings-hero h3{font-size:19px}.user-settings-hero p{font-size:10.5px}
.app-toggle-row{min-height:57px;padding:11px 0}.app-toggle-row b{font-size:12.5px}.app-toggle-row small{font-size:10px;line-height:1.4}.app-toggle-row input{width:20px;height:20px}
.user-space-access{gap:6px}.user-space-access label,.space-member-row,.share-user-row{border:1px solid var(--line-soft)!important;border-radius:13px;padding:10px 11px!important;background:var(--surface-2);grid-template-columns:auto minmax(0,1fr) 160px}
.user-space-access b,.space-member-row b,.share-user-row b{font-size:11.5px}.user-space-access small,.space-member-row small,.share-user-row small{font-size:9.5px;line-height:1.35;margin-top:3px}
.user-space-access select,.space-member-row select,.share-user-row select{font-size:10.5px;padding:8px 9px;border-radius:9px;background:var(--surface)}
.share-folder-head{padding-bottom:13px;border-bottom:1px solid var(--line-soft)}.share-folder-head h3{font-size:18px}.share-folder-head p{font-size:10.5px}
.share-user-list{gap:7px;margin-top:12px}

/* Form controls in management screens. */
.field{display:block;margin-bottom:12px}.field span{display:block;font-size:10.5px;font-weight:650;color:var(--muted);margin-bottom:6px}
.field input,.field textarea,.field select{width:100%;min-height:41px;border:1px solid var(--line);border-radius:10px;background:var(--surface-2);padding:9px 11px;font-size:12px;outline:0}
.field input:focus,.field textarea:focus,.field select:focus{border-color:color-mix(in srgb,var(--accent) 60%,var(--line));box-shadow:var(--focus-ring);background:var(--surface)}

/* Better empty/loading states on ecosystem pages. */
.home-loading{min-height:220px;border:1px dashed var(--line);border-radius:18px;background:var(--surface-2)}
.confirm-note{border-radius:12px;padding:12px 13px;line-height:1.45}.confirm-note.danger{background:color-mix(in srgb,var(--bad) 10%,var(--surface));color:var(--bad);border:1px solid color-mix(in srgb,var(--bad) 20%,var(--line))}

@media(max-width:1180px){
  .settings-card.appearance-card,.settings-card.account-card{grid-column:span 12}
  .home-photos-card,.home-card:not(.home-photos-card):not(.home-storage-card){grid-column:span 12}
  .home-storage-card{grid-column:span 12}
}
@media(max-width:900px){
  .content-area{padding:26px 22px 46px}
  .home-hero{padding:25px;align-items:flex-start;flex-direction:column}.home-quick-actions{justify-content:flex-start;max-width:none}
  .home-hero h1{font-size:32px}.background-choice{grid-template-columns:repeat(3,1fr)}
}
@media(max-width:760px){
  .content-area{padding:18px 13px 88px}
  .ecosystem-page-head{min-height:72px}.ecosystem-page-head h1{font-size:28px}
  .home-hero{min-height:0;padding:20px;border-radius:21px}.home-hero h1{font-size:28px}.home-hero p{font-size:12px}
  .home-quick-actions{width:100%;display:grid;grid-template-columns:1fr 1fr}.home-quick-actions .primary-button,.home-quick-actions .soft-button{width:100%;padding:0 10px}.home-quick-actions button:last-child:nth-child(3){grid-column:1/-1}
  .home-card{padding:15px;border-radius:19px;margin-top:0}.home-photo-mosaic{grid-auto-rows:78px}.home-space-grid{grid-template-columns:1fr}
  .settings-card{padding:15px;border-radius:18px}.theme-choice{grid-template-columns:1fr 1fr 1fr}.theme-preview{height:50px}.background-choice{grid-template-columns:repeat(2,1fr)}
  .account-modal-card{width:calc(100vw - 16px);max-height:94vh;border-radius:18px}.account-modal-card .modal-head{padding:15px}.account-modal-card .modal-body{padding:14px}
  .users-overview{grid-template-columns:repeat(3,1fr)}.users-overview>div{padding:10px}.users-overview b{font-size:20px}.users-overview span{font-size:9px}
  .account-user-row.modern{grid-template-columns:auto minmax(0,1fr)}.account-user-row.modern .manage-user{grid-column:2;justify-self:start}
  .user-space-access label,.space-member-row,.share-user-row{grid-template-columns:auto minmax(0,1fr)}.user-space-access select,.space-member-row select,.share-user-row select{grid-column:2;width:100%}
  .space-admin-row{grid-template-columns:auto minmax(0,1fr)}.space-admin-row>button,.space-admin-row>.system-pill{grid-column:2;justify-self:start}
  .admin-summary-grid{grid-template-columns:repeat(3,1fr)}
}

/* ===================== 0.7.2 UPDATE ENGINE / SELF-TEST FIX ===================== */

/* ===================== 0.8.0 PRIVACY / SHARING / SIDEBAR PINS ===================== */
.owner-view-badge{display:inline-flex;align-items:center;gap:6px;min-height:28px;padding:0 10px;border-radius:999px;background:color-mix(in srgb,#E5A82A 15%,var(--surface));border:1px solid color-mix(in srgb,#E5A82A 32%,var(--line));color:#9b6611;font-size:9px;font-weight:800;letter-spacing:.06em;white-space:nowrap}
.owner-view-badge.hidden{display:none}.owner-view-all .topbar{box-shadow:inset 0 -2px 0 color-mix(in srgb,#E5A82A 42%,transparent)}

.app-launcher-grid button{position:relative}.launcher-pin{position:absolute;top:7px;right:8px;display:flex;align-items:center;justify-content:center;width:22px;height:22px;border-radius:999px;background:var(--surface-2);border:1px solid var(--line-soft);color:var(--muted);font-size:12px;line-height:1;transition:.14s ease;z-index:2}
.launcher-pin svg{width:13px;height:13px;pointer-events:none}.launcher-pin:hover{border-color:color-mix(in srgb,var(--accent) 38%,var(--line));color:var(--accent);transform:scale(1.04)}.launcher-pin.pinned{background:color-mix(in srgb,var(--accent) 12%,var(--surface));border-color:color-mix(in srgb,var(--accent) 34%,var(--line));color:var(--accent)}

.shared-create-section{padding:16px 18px}.shared-create-copy{display:flex;align-items:center;justify-content:space-between;gap:24px}.shared-create-copy>div{min-width:0}.shared-create-copy small{display:block;color:var(--accent);font-size:9px;font-weight:800;letter-spacing:.08em;margin-bottom:5px}.shared-create-copy h2{margin:0;font-size:18px}.shared-create-copy p{margin:5px 0 0;color:var(--muted);font-size:10.5px;line-height:1.45}.shared-create-copy .primary-button{flex:none}
.shared-cards>button[data-my-share]{background:linear-gradient(135deg,color-mix(in srgb,var(--accent) 3%,var(--surface-2)),var(--surface-2))}.shared-cards>button[data-my-share] small{white-space:normal}

@media(max-width:760px){.owner-view-badge{font-size:8px;padding:0 8px}.shared-create-copy{align-items:flex-start;flex-direction:column;gap:13px}.shared-create-copy .primary-button{width:100%}.launcher-pin{top:6px;right:6px}}

/* Direct Client Transport 0.9 */
.transport-note{display:flex;align-items:center;gap:8px;color:var(--muted);font-size:10.5px;margin-top:8px}.transport-dot{width:8px;height:8px;border-radius:50%;background:#21b36b;box-shadow:0 0 0 4px rgba(33,179,107,.12)}
.transport-setup-card{display:grid;grid-template-columns:50px 1fr;gap:14px;align-items:start;border:1px solid var(--line);background:var(--surface-2);border-radius:14px;padding:16px;margin:12px 0}.transport-setup-card h3{margin:1px 0 6px;font-size:15px}.transport-setup-card p{margin:0;color:var(--muted);font-size:11px;line-height:1.55}.transport-setup-icon{width:48px;height:48px;border-radius:14px;background:var(--accent-soft);color:var(--accent);display:grid;place-items:center}.transport-setup-icon svg{width:24px;height:24px}
.direct-progress{height:10px;border-radius:999px;background:var(--surface-3,#e9e9ef);overflow:hidden;margin:18px 0 8px}.direct-progress-bar{height:100%;width:0;border-radius:inherit;background:var(--accent);transition:width .25s ease}.direct-progress-meta{display:flex;align-items:center;justify-content:space-between;font-size:10.5px;color:var(--muted);margin-bottom:13px}.direct-progress-meta b{color:var(--text);font-size:11px}.replica-progress{display:flex;align-items:center;justify-content:space-between;padding:10px 0;border-top:1px solid var(--line);font-size:11px}.fallback-details{margin-top:18px;border-top:1px solid var(--line);padding-top:12px;color:var(--muted);font-size:10px}.fallback-details summary{cursor:pointer;user-select:none}.fallback-details .text-button{margin-top:9px;color:var(--muted)}
@media(max-width:700px){.transport-setup-card{grid-template-columns:42px 1fr;padding:13px}.transport-setup-icon{width:42px;height:42px}}
/* ===================== 1.0 FOUNDATION · DIRECT DEVICE TRANSPORT ===================== */

/* ===================== 1.1 UNIVERSAL BROWSER RELAY · NO LOCAL HELPER ===================== */

/* ===================== 1.1.2 FILE UX / NAVIGATION / APPEARANCE ===================== */

/* Visible, browser-like folder navigation. */
.navigation-cluster{display:flex;align-items:center;gap:4px;margin-right:4px}
.navigation-cluster .navigation-button{width:39px;height:39px;border-radius:11px;background:color-mix(in srgb,var(--surface) 94%,transparent);border:1px solid var(--line-soft)}
.navigation-cluster .navigation-button svg{width:20px;height:20px;stroke-width:2}
.navigation-cluster .navigation-button:hover:not(:disabled){background:var(--surface-2);color:var(--text);border-color:color-mix(in srgb,var(--accent) 25%,var(--line))}
.navigation-cluster .navigation-button:disabled{opacity:.28;cursor:default}
.breadcrumbs{gap:3px;min-height:28px;margin-bottom:2px}
.breadcrumbs button{min-height:28px;padding:0 7px;border-radius:8px;font-size:13.5px;font-weight:580;color:var(--muted)}
.breadcrumbs button:hover{background:var(--surface-2);color:var(--accent)}
.breadcrumbs svg{width:14px;height:14px}

/* Dragging a local file over a folder uploads directly into that folder. */
.file-row.drop-target,.grid-card.drop-target{background:color-mix(in srgb,var(--accent-soft) 82%,var(--surface));box-shadow:inset 0 0 0 2px color-mix(in srgb,var(--accent) 72%,transparent)!important}
.grid-card.drop-target{transform:translateY(-2px)}
.file-row.drop-target .item-icon,.grid-card.drop-target .item-icon{color:var(--accent)!important}
.drop-zone{background:color-mix(in srgb,var(--accent-soft) 58%,transparent);backdrop-filter:blur(6px);border-width:2px}
.drop-zone>div{padding:25px 32px;border-radius:18px;background:color-mix(in srgb,var(--surface) 92%,transparent);box-shadow:0 18px 50px rgba(25,25,38,.12)}

/* Non-modal upload manager. */
.quick-upload-stack{position:fixed;right:22px;bottom:22px;z-index:170;width:min(390px,calc(100vw - 28px));display:flex;flex-direction:column;gap:9px;pointer-events:none}
.quick-upload-card{pointer-events:auto;border:1px solid var(--line);background:color-mix(in srgb,var(--surface) 96%,transparent);backdrop-filter:blur(24px) saturate(135%);border-radius:16px;padding:13px 14px;box-shadow:0 20px 54px rgba(23,24,39,.18);transition:opacity .18s ease,transform .18s ease,border-color .18s ease}
.quick-upload-card.success{border-color:color-mix(in srgb,var(--good) 35%,var(--line))}.quick-upload-card.warning,.quick-upload-card.error{border-color:color-mix(in srgb,var(--bad) 34%,var(--line))}
.quick-upload-head{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:10px}.quick-upload-head>div{min-width:0}.quick-upload-head b{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12.5px}.quick-upload-head small{display:flex;align-items:center;gap:5px;margin-top:3px;color:var(--muted);font-size:9.5px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.quick-upload-head small svg{width:12px;height:12px;flex:none}
.quick-upload-icon{width:36px;height:36px;border-radius:11px;display:grid;place-items:center;background:var(--accent-soft);color:var(--accent)}.quick-upload-icon svg{width:19px;height:19px}.quick-upload-close{width:28px;height:28px;border:0;border-radius:8px;background:transparent;color:var(--muted);display:grid;place-items:center}.quick-upload-close:hover{background:var(--surface-2);color:var(--text)}.quick-upload-close svg{width:15px;height:15px}
.quick-upload-status{margin-top:11px;font-size:10.5px;color:var(--muted)}.quick-upload-progress{height:7px;border-radius:999px;background:var(--surface-3);overflow:hidden;margin:7px 0 5px}.quick-upload-progress span{display:block;height:100%;width:0;background:var(--accent);border-radius:inherit;transition:width .18s linear}.quick-upload-card.success .quick-upload-progress span{background:var(--good)}
.quick-upload-meta{display:flex;align-items:center;justify-content:space-between;gap:10px;font-size:9.5px;color:var(--muted)}.quick-upload-meta span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.quick-upload-meta b{color:var(--text);font-size:10px}
.quick-upload-error{margin-top:10px;padding:9px 10px;border-radius:10px;background:color-mix(in srgb,var(--bad) 9%,var(--surface));color:var(--bad)}.quick-upload-error b,.quick-upload-error span{display:block;font-size:10px}.quick-upload-error span{margin-top:3px;line-height:1.4}.quick-upload-retry{margin-top:8px;min-height:31px}

/* File open is an editor/inspector; download is a separate action. */
.file-editor-shell{display:grid;gap:14px}.file-editor-hero{display:flex;align-items:center;gap:14px;padding:4px 2px 8px}.file-editor-icon{width:64px;height:64px;border-radius:18px;display:grid;place-items:center;background:var(--accent-soft);color:var(--accent);flex:none}.file-editor-icon svg{width:33px;height:33px}.file-editor-hero small{font-size:9px;color:var(--muted);letter-spacing:.1em;font-weight:800}.file-editor-hero h3{margin:4px 0 3px;font-size:22px;line-height:1.15}.file-editor-hero p{margin:0;color:var(--muted);font-size:10.5px}
.file-editor-grid{display:grid;grid-template-columns:minmax(0,1.45fr) minmax(260px,.8fr);gap:13px}.file-editor-main .field textarea{min-height:120px}.file-editor-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:15px}.file-editor-side .info-row{padding:8px 0;border-bottom:1px solid var(--line-soft)}.file-version-list{display:flex;flex-direction:column;gap:7px}.file-version-list>div{padding:8px 9px;border-radius:10px;background:var(--surface-2)}.file-version-list b{display:block;font-size:10.5px}.file-version-list small{display:block;margin-top:2px;font-size:9px;color:var(--muted)}

/* Appearance settings: wallpaper really changes the app, and accent is visible everywhere. */
html[data-background="aurora"]{--cloud-wallpaper:radial-gradient(circle at 18% 18%,rgba(105,235,207,.72),transparent 35%),radial-gradient(circle at 82% 22%,rgba(109,102,246,.72),transparent 40%),linear-gradient(145deg,#c8efe8,#d8d4fb 48%,#f5d4ec)}
html[data-background="ocean"]{--cloud-wallpaper:radial-gradient(circle at 24% 20%,rgba(255,255,255,.72),transparent 30%),linear-gradient(150deg,#9bd7ef,#4e9dd4 48%,#315aa1)}
html[data-background="dusk"]{--cloud-wallpaper:radial-gradient(circle at 72% 18%,rgba(255,197,133,.76),transparent 24%),linear-gradient(155deg,#665d9c,#b77ca8 48%,#f0a979)}
html[data-background="forest"]{--cloud-wallpaper:radial-gradient(circle at 65% 15%,rgba(204,235,187,.48),transparent 26%),linear-gradient(150deg,#325a4e,#68866a 48%,#a5b88b)}
html[data-background]:not([data-background="none"]) body{background:var(--cloud-wallpaper) fixed center/cover!important}
html[data-background]:not([data-background="none"]) body::before{display:none!important}
html[data-background]:not([data-background="none"]) .app-shell{background:transparent}
html[data-background]:not([data-background="none"]) .main-area{background:color-mix(in srgb,var(--bg) 78%,transparent);backdrop-filter:blur(19px) saturate(130%)}
html[data-background]:not([data-background="none"]) .content-area{background:linear-gradient(180deg,color-mix(in srgb,var(--bg) 38%,transparent),color-mix(in srgb,var(--bg) 60%,transparent))}
html[data-background]:not([data-background="none"]) .sidebar{background:color-mix(in srgb,var(--sidebar) 86%,transparent)}
html[data-background]:not([data-background="none"]) .topbar{background:color-mix(in srgb,var(--toolbar) 84%,transparent)}
.brand-mark{background:linear-gradient(155deg,color-mix(in srgb,var(--accent) 96%,white 4%),color-mix(in srgb,var(--accent) 72%,#302f73));box-shadow:0 5px 14px color-mix(in srgb,var(--accent) 30%,transparent)}

@media(max-width:900px){
  .navigation-cluster{display:none}
  .quick-upload-stack{right:10px;bottom:78px;width:calc(100vw - 20px)}
  .file-editor-grid{grid-template-columns:1fr}.file-editor-hero h3{font-size:19px}
  .breadcrumbs button{font-size:12.5px;min-height:30px}
}

/* 1.1.2 drag target: keep the catalogue visible while choosing a folder. */
.drop-zone{background:transparent!important;backdrop-filter:none!important;border:2px solid color-mix(in srgb,var(--accent) 58%,transparent)!important;box-shadow:inset 0 0 0 5px color-mix(in srgb,var(--accent) 7%,transparent)}
.drop-zone>div{position:absolute;left:50%;bottom:24px;transform:translateX(-50%);width:max-content;max-width:calc(100vw - 48px);padding:10px 16px!important;border-radius:13px!important;background:color-mix(in srgb,var(--surface) 94%,transparent)!important;box-shadow:0 12px 34px rgba(20,22,35,.16)!important;backdrop-filter:blur(18px) saturate(130%)}
.drop-zone>div>svg{display:none}.drop-zone>div h2{margin:0!important;font-size:13px!important}.drop-zone>div p{margin:3px 0 0!important;font-size:9.5px!important}
