@font-face {
    font-family: "IBM Plex Mono";
    src: url("fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2");
    font-weight: 400;
    font-display: swap;
}
:root {
    color-scheme: dark;
    font: 15px/1.5 "IBM Plex Mono", ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    --base: #081610;
    --surface: #10271b;
    --ink: #ecfff0;
    --muted: #a3bdad;
    --accent: #a3fbb8;
    --line: #30533f;
    --glow: #1a3e2b;
    --mast: #0a1912;
    --control: #152e20;
    --control-hover: #1c3e2a;
    --active: #1b462c;
    --field: #0a1c13;
    --row: #0c2117;
    --border: #52785c;
    --edge: #568463;
    --edge-bright: #9adea9;
    --focus: #d3ffde;
    --on-accent: #0a1c0f;
    --grid-line: #a3ffb905;
    --layer: #122b1ed9;
    --card-top: #1c3929f7;
    --card-bottom: #0b1b14f5;
    --shine: #b3ffbf21;
    --soft: #bed2c3;
}
[data-theme="cian"] {
    --base: #08151a;
    --surface: #102731;
    --ink: #edfcff;
    --muted: #a3bec8;
    --line: #305460;
    --glow: #164452;
    --mast: #0a181f;
    --control: #14313c;
    --control-hover: #1b414f;
    --active: #174858;
    --field: #0a1b23;
    --row: #0c212b;
    --border: #517c8a;
    --edge: #558493;
    --edge-bright: #9ad8e9;
    --focus: #ccf5ff;
    --on-accent: #0b2028;
    --grid-line: #99ebff0a;
    --layer: #122932d9;
    --card-top: #1b3a47f7;
    --card-bottom: #0a1b22f5;
    --shine: #aeecff25;
    --soft: #bed6de;
}
[data-theme="ambar"] {
    --base: #1a140a;
    --surface: #302410;
    --ink: #fff8e9;
    --muted: #c7b799;
    --line: #5f4b2b;
    --glow: #493618;
    --mast: #1c150b;
    --control: #382a16;
    --control-hover: #493719;
    --active: #533b18;
    --field: #1f170c;
    --row: #271c0e;
    --border: #846942;
    --edge: #927447;
    --edge-bright: #e6c88e;
    --focus: #ffedbf;
    --on-accent: #2b1b05;
    --grid-line: #ffe4a20a;
    --layer: #30220ed9;
    --card-top: #443119f7;
    --card-bottom: #241a0cf5;
    --shine: #ffe6ac24;
    --soft: #dfd0b5;
}
[data-theme="violeta"] {
    --base: #140e20;
    --surface: #271d38;
    --ink: #faf3ff;
    --muted: #beb0d0;
    --line: #534269;
    --glow: #3f2856;
    --mast: #191025;
    --control: #302140;
    --control-hover: #402c57;
    --active: #4a2f65;
    --field: #1d1329;
    --row: #21182f;
    --border: #796592;
    --edge: #876fa3;
    --edge-bright: #d5b6f0;
    --focus: #f4ddff;
    --on-accent: #291638;
    --grid-line: #e7c5ff0a;
    --layer: #281c3ad9;
    --card-top: #3b2952f7;
    --card-bottom: #1d142af5;
    --shine: #edcbff24;
    --soft: #d7c9e4;
}
[data-theme="fosforo"], [data-swatch="fosforo"] { --accent: #a3fbb8; }
[data-theme="cian"], [data-swatch="cian"] { --accent: #91e8fc; }
[data-theme="ambar"], [data-swatch="ambar"] { --accent: #ffcf78; }
[data-theme="violeta"], [data-swatch="violeta"] { --accent: #dfb2ff; }
* { box-sizing: border-box; }
html { height: 100%; overflow: hidden; }
body {
    margin: 0;
    height: 100dvh;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    color: var(--ink);
    background: radial-gradient(ellipse at 74% 22%, var(--glow), transparent 57%), var(--base);
}
a { color: var(--accent); text-underline-offset: .22em; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, video:focus-visible {
    outline: 2px solid var(--focus); outline-offset: 3px;
}
button, input, select { font: inherit; }
.masthead {
    display: flex; justify-content: space-between; align-items: center; gap: 12px;
    flex: none; padding: 13px clamp(16px, 3vw, 48px); border-bottom: 1px solid var(--line); background: var(--mast);
}
@media (display-mode: window-controls-overlay) {
    .masthead { padding-top: calc(13px + env(titlebar-area-height, 0px)); }
    body::before {
        content: ""; position: absolute; top: 0;
        left: env(titlebar-area-x, 0px); width: env(titlebar-area-width, 100%);
        height: env(titlebar-area-height, 0px); -webkit-app-region: drag; app-region: drag;
    }
}
.brand, .account { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; }
.brand { font-size: 1.06rem; }
.brand-name {
    color: #a3fbb8; font-weight: 700; letter-spacing: -.048em;
    -webkit-text-stroke: .28px currentColor; text-shadow: 0 0 14px #a3fbb82c;
}
.brand-mark { display: block; flex: none; }
.login-brand { display: flex; align-items: center; gap: 12px; margin: 0 0 20px; }
.login-brand .brand-name { font-size: clamp(1.45rem, 6vw, 2.2rem); overflow-wrap: anywhere; }
.account { color: var(--muted); font-size: .82rem; overflow-wrap: anywhere; }
.account-avatar, .profile-avatar { display: grid; place-items: center; flex: none; border: 1px solid var(--edge); border-radius: 50%; object-fit: cover; }
.account-avatar { width: 32px; height: 32px; }
.masthead-tools { display: flex; align-items: center; gap: 7px; min-width: 0; }
.rail-logout { width: 100%; margin: auto 0 0; }
.rail-logout button[type=submit] { display: flex; justify-content: flex-start; width: 100%; min-height: 40px; padding: 9px 8px; color: #ff9b93; background: #351d1c; border: 1px solid #925450; font-size: .7rem; font-weight: 400; }
.rail-logout button[type=submit]:hover { background: #522522; color: #ffd0cb; }
.notification-bell { position: relative; display: grid; place-items: center; width: 40px; min-height: 40px; flex: none; border: 1px solid var(--line); border-radius: 9px; background: var(--control); }
.notification-bell:hover { background: var(--control-hover); }
.notification-bell .icon { width: 20px; height: 20px; }
.notification-menu { position: relative; flex: none; }
.notification-panel { position: absolute; z-index: 100; top: calc(100% + 8px); right: 0; width: min(380px, calc(100vw - 24px)); max-height: min(70vh, 580px); overflow-y: auto; padding: 16px; border: 1px solid var(--edge); border-radius: 12px; background: rgba(11, 27, 20, .88); background: color-mix(in srgb, var(--card-bottom) 85%, transparent); box-shadow: 0 12px 30px #02090790; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.notification-panel[hidden] { display: none; }
.notification-panel h2 { margin: 0 0 12px; font-size: 1rem; }
.notification-panel p, .notification-panel small { color: var(--soft); }
.notification-panel .activity-list { padding: 0; margin: 12px 0; list-style: none; }
.notification-panel .activity-list li { background: var(--row); }
.notification-panel form { margin: 0; }
.notification-panel button, .notification-panel .activity-nav a { min-height: 36px; padding: 6px 10px; font-size: .75rem; }
.notification-panel .activity-nav:empty { display: none; }
.notification-badge { position: absolute; top: -5px; right: -4px; padding: 0 4px; border-radius: 8px; background: var(--accent); color: var(--on-accent); font-size: .71rem; }
.status-dot { width: 6px; height: 6px; flex: none; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--edge-bright); }
.icon { width: 1.15em; height: 1.15em; flex: none; fill: none; stroke: currentColor; }
.button, button, .back, .pager a {
    display: inline-flex; align-items: center; justify-content: center; gap: .55em;
    min-height: 42px; padding: 8px 13px; border-radius: 9px; border: 1px solid var(--border);
    background: var(--control); color: var(--accent); text-decoration: none; cursor: pointer; font-size: .85rem;
}
.button:hover, button:hover, .back:hover, .pager a:hover, .file:hover { background: var(--control-hover); border-color: var(--edge-bright); }
.primary, button[type=submit] { background: var(--accent); color: var(--on-accent); font-weight: 600; border-color: var(--accent); }
.primary:hover, button[type=submit]:hover { background: var(--focus); }
.back { border-radius: 16px 6px 16px 6px; background: linear-gradient(115deg, var(--control-hover), var(--field)); font-size: .74rem; text-transform: uppercase; letter-spacing: .04em; }
.library { display: grid; grid-template-columns: clamp(163px, 12.5vw, 193px) minmax(0, 1fr); min-height: calc(100vh - 64px); }
body > main.library { flex: 1 1 0; min-height: 0; grid-template-rows: minmax(0, 1fr); overflow: hidden; }
.rail { display: flex; flex-direction: column; gap: 16px; align-items: start; padding: 20px 6px; border-right: 1px solid var(--line); background: var(--mast); }
body > main.library .rail { min-height: 0; overflow-y: auto; }
.rail-secondary { border-top: 1px solid var(--line); padding-top: 16px; }
.filters { display: grid; gap: 7px; width: 100%; }
.filters a { display: flex; align-items: center; gap: 5px; padding: 10px 5px; border: 1px solid transparent; border-radius: 8px; color: var(--muted); text-decoration: none; font-size: .7rem; }
.filters a span { min-width: 0; overflow-wrap: anywhere; }
.filters a:hover { color: var(--ink); background: var(--control); }
.filters a[aria-current] { color: var(--accent); border-color: var(--line); background: linear-gradient(90deg, var(--active), var(--surface)); box-shadow: inset 2px 0 var(--edge-bright); }
.workspace {
    display: block;
    gap: clamp(20px, 3vw, 54px); padding: clamp(22px, 3vw, 52px); min-width: 0; min-height: 0; overflow-y: auto;
    background-image: linear-gradient(var(--grid-line) 1px, transparent 1px), linear-gradient(90deg, var(--grid-line) 1px, transparent 1px); background-size: 27px 22px;
}
@media (min-width: 781px) { .workspace { padding-top: 20px; } }
.path, .visor-head { color: var(--accent); text-transform: uppercase; letter-spacing: .13em; font-size: .76rem; }
h1, h2, p { overflow-wrap: anywhere; }
h1 { font-weight: 500; font-size: clamp(1.9rem, 3.4vw, 3.3rem); letter-spacing: -.07em; line-height: 1.12; margin: 8px 0 16px; }
.cursor { display: inline-block; width: .42em; height: .72em; margin-left: .1em; background: var(--accent); animation: blink 1.3s steps(1) 3; }
@keyframes blink { 50% { opacity: 0; } }
.catalog { width: 100%; min-width: 0; }
.catalog h1 { font-size: clamp(1.2rem, 1.7vw, 1.65rem); }
.account-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(145px, 180px)); gap: 14px; margin-top: 24px; }
.account-card { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; min-height: 150px; padding: 18px 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--row); color: var(--accent); text-align: center; text-decoration: none; font-size: .85rem; }
.account-card:hover { background: var(--control-hover); border-color: var(--edge-bright); }
.account-card .icon { width: 38px; height: 38px; }
.catalog-tools, .visor-head, .viewer-actions, .pager { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; }
.catalog-tools { width: calc(52.9% - 70px); min-width: min(100%, 490px); flex-wrap: nowrap; padding-bottom: 18px; color: var(--muted); font-size: .8rem; }
.catalog-divider { border-top: 1px solid var(--line); margin-bottom: 14px; }
.trash-heading-space { height: 66px; }
.library:not([data-view="list"]) .trash-catalog .trash-list { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.library[data-view="list"] .trash-catalog .trash-list { grid-template-columns: minmax(0, 1fr); }
.trash-catalog .trash-list { margin-block: 1rem; }
.trash-catalog .trash-list li { position: relative; min-width: 0; }
.trash-catalog .trash-list .file-check:not([hidden]) { position: absolute; top: 6px; right: 6px; z-index: 2; width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 8px; background: var(--control); }
.trash-catalog .trash-entry { min-width: 0; width: 100%; }
.trash-catalog .trash-entry strong { overflow-wrap: anywhere; }
.trash-catalog .catalog-tools { width: min(100%, calc(52.9% + 90px)); min-width: min(100%, 620px); }
.trash-empty { flex: none; min-height: 36px; white-space: nowrap; }
.trash-catalog [data-selecting] .trash-entry strong { display: block; padding-right: 35px; }
.catalog-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; min-height: 42px; }
.catalog-actions { display: flex; gap: 7px; }
.selection-toggle { width: 36px; min-height: 36px; padding: 0; flex: none; }
.selection-toggle[hidden] { display: none; }
.selection-toggle[aria-pressed="true"] { background: var(--active); border-color: var(--edge-bright); }
.mobile-search-toggle { display: none; width: 44px; min-height: 44px; padding: 0; flex: none; }
.mobile-search-toggle[hidden] { display: none; }
.mobile-search-toggle[aria-expanded="true"] { background: var(--active); border-color: var(--edge-bright); }
.view-toggle { width: 36px; min-height: 36px; padding: 0; flex: none; }
.add-menu { position: relative; z-index: 2; }
.add-menu summary { width: 36px; min-height: 36px; padding: 0; list-style: none; font-size: 1.3rem; line-height: 1; }
.add-menu summary::-webkit-details-marker { display: none; }
.add-menu summary:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.add-options { position: absolute; top: calc(100% + 6px); right: 0; display: grid; gap: 4px; min-width: 180px; padding: 6px; border: 1px solid var(--border); border-radius: 10px; background: var(--field); box-shadow: 0 8px 20px #02090790; }
.catalog-actions > .add-menu:first-child:not(.filter-menu) .add-options { left: 0; right: auto; }
.add-menu .add-option { justify-content: flex-start; white-space: nowrap; }
.file-tabs { display: flex; align-items: stretch; gap: 5px; border-bottom: 1px solid var(--line); }
.file-tabs a {
    display: block; align-content: center; min-height: 36px; padding: 6px 8px;
    margin-bottom: -1px; border: 1px solid var(--line); border-radius: 10px 10px 0 0;
    background: var(--row); color: var(--muted); font-size: .7rem; text-decoration: none;
    text-wrap: pretty;
}
.file-tabs a:hover { background: var(--control); color: var(--ink); }
.file-tabs a[aria-current] {
    border-color: var(--edge); border-bottom-color: var(--control);
    background: linear-gradient(180deg, var(--active), var(--control)); color: var(--accent);
    box-shadow: inset 0 1px var(--edge);
}
.file-tabs a span { white-space: nowrap; }
.library-search { display: flex; flex: 1; min-width: 0; margin: 0; }
.library-search input { width: 100%; min-width: 0; min-height: 36px; padding: 6px 10px; border: 1px solid var(--border); border-radius: 9px; background: var(--field); color: var(--ink); font: inherit; font-size: 13px; }
.sort-menu summary { font-size: inherit; }
.filter-menu summary { font-size: inherit; }
.filter-active { border-color: var(--edge-bright); background: var(--active); }
.filter-options { min-width: 190px; gap: 8px; padding: 12px; }
.filter-options label { display: flex; align-items: center; gap: 8px; color: var(--ink); min-height: 32px; white-space: nowrap; }
.filter-options input[type=checkbox] { width: 17px; height: 17px; accent-color: var(--accent); }
.sort-option, .sort-option[type=submit] { justify-content: flex-start; background: var(--control); color: var(--accent); border-color: var(--border); font-weight: normal; }
.sort-option[aria-current] { background: var(--active); border-color: var(--edge-bright); }
.search-feedback { color: var(--muted); font-size: .8rem; }
.library-search label, .catalog-order label, .search-summary { color: var(--muted); font-size: .82rem; }
.search-fields { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.search-fields input, .search-fields select {
    width: 100%; min-width: 0; min-height: 44px; padding: 8px 10px; font-size: 16px;
    border: 1px solid var(--border); border-radius: 9px; background: var(--field); color: var(--ink);
}
.search-fields input::placeholder { color: var(--muted); }
.search-summary { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 12px; }
.search-summary a { display: inline-flex; align-items: center; min-height: 42px; }
.file-group { padding-top: 13px; }
.files-scroll { max-height: max(80px, calc(100dvh - var(--files-top, 300px) - var(--files-bottom-space, 24px) - env(safe-area-inset-bottom, 0px))); overflow-y: auto; overscroll-behavior-y: auto; padding: 2px 8px 8px 2px; scrollbar-color: var(--edge) var(--field); }
.files-scroll:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.empty { font-size: .82rem; color: var(--muted); }
.files, .document-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.files { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.files > .folder-row + .file-row:not(.folder-row) { grid-column-start: 1; }
.library:not([data-view="list"]) .files > .folder-row { width: 90%; }
.library[data-view="list"] .files { grid-template-columns: minmax(0, 1fr); }
.file { display: grid; grid-template-columns: 35px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 11px; border-radius: 10px; border: 1px solid var(--line); background: var(--row); text-decoration: none; color: var(--ink); }
.file[aria-current] { border-color: var(--edge-bright); background: linear-gradient(110deg, var(--control-hover), var(--surface)); }
.file-selection-bar:not([hidden]) { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 10px; }
.file-selection-bar span { font-size: .7rem; color: var(--muted); }
.library .file-selection-bar button { min-height: 36px; padding: 6px 10px; font-size: .7rem; }
.file-selection-bar [data-selection-share-hint], .file-selection-bar [data-selection-limit] { flex-basis: 100%; }
.file-row { display: flex; align-items: stretch; gap: 6px; min-width: 0; }
.file-row { position: relative; }
.item-menu { position: absolute; right: 4px; top: 4px; z-index: 3; }
.item-menu summary { display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 8px; background: var(--control); color: var(--accent); cursor: pointer; list-style: none; font-size: 1.2rem; }
.item-menu summary::-webkit-details-marker { display: none; }
.item-menu[open] { z-index: 5; }
.item-options { position: absolute; right: 0; top: calc(100% + 4px); min-width: 160px; padding: 6px; border: 1px solid var(--border); border-radius: 9px; background: var(--field); box-shadow: 0 8px 20px #02090790; }
.item-options.is-positioned { position: fixed; right: auto; z-index: 20; }
.item-options a { display: block; padding: 9px; border-radius: 6px; color: var(--accent); text-decoration: none; font-size: .8rem; white-space: nowrap; }
.item-options a:hover { background: var(--control-hover); }
.file-row .file { flex: 1; min-width: 0; }
.file-art { position: relative; display: grid; place-items: center; }
.file-thumbnail { display: block; width: 100%; height: 100%; object-fit: cover; }
.file-thumbnail[hidden] { display: none; }
.video-play { position: absolute; z-index: 1; inset: 50% auto auto 50%; transform: translate(-50%, -50%); display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid #ffffffb3; border-radius: 50%; background: #00180bc2; color: white; pointer-events: none; }
.video-play svg { width: 19px; height: 19px; fill: currentColor; }
.library[data-view="list"] .video-play { width: 24px; height: 24px; }
.library[data-view="list"] .video-play svg { width: 12px; height: 12px; }
.file:has(.file-thumbnail:not([hidden])) .file-icon { display: none; }
.library:not([data-view="list"]) .file { display: flex; flex-direction: column; align-items: stretch; gap: 0; padding: 0; overflow: hidden; }
.library:not([data-view="list"]) .file-art { width: 100%; aspect-ratio: 1.4; background: var(--field); overflow: hidden; }
.library:not([data-view="list"]) .folder-row .file-art { aspect-ratio: 3.6; min-height: 48px; }
.folder-row .item-menu { top: auto; bottom: 4px; }
.library:not([data-view="list"]) .folder-row .file-art .file-icon { width: 64px; height: 64px; border: 0; background: transparent; }
.library:not([data-view="list"]) .folder-row .file-art .icon { width: 48px; height: 48px; }
.library:not([data-view="list"]) .file-info { padding: 10px; }
.library:not([data-view="list"]) .file .arrow { display: none; }
.library[data-view="list"] .file-art { width: 35px; height: 38px; overflow: hidden; border-radius: 7px; }
.file-check:not([hidden]) { display: grid; place-items: center; flex: 0 0 42px; cursor: pointer; }
.files .file-check:not([hidden]) { position: absolute; top: 6px; left: 6px; z-index: 2; width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 8px; background: var(--control); }
.library[data-view="list"] [data-selecting] .file { padding-left: 48px; }
.file-check input, .card .file-check input { width: 17px; height: 17px; padding: 0; margin: 0; accent-color: var(--accent); cursor: pointer; }
.file-check:has(input:checked) + .file { border-color: var(--accent); }
.file-selection-bar [hidden], [data-share-single][hidden], .share-sheet [hidden], .card .file-check[hidden],
[data-file-selection][data-selecting] [data-single-action],
.share-sheet:not([open]) { display: none; }
.file-selection-bar button:disabled, .share-sheet button:disabled { opacity: .55; cursor: default; }
.file strong, .file small { display: block; overflow-wrap: anywhere; }
.file strong { font-size: .88rem; font-weight: 500; }
.file small, .permission { color: var(--muted); font-size: .77rem; }
.file-icon { display: grid; place-items: center; width: 35px; height: 38px; color: var(--accent); border: 1px solid var(--line); border-radius: 8px; background: var(--control); }
.arrow { color: var(--accent); }
.bay { min-width: 0; margin: 16px 0; }
.visor, .card { border: 1px solid var(--edge); border-radius: 21px; background: linear-gradient(145deg, var(--card-top), var(--card-bottom) 82%); box-shadow: 0 16px 46px #02090790, inset 0 1px var(--shine); }
.visor { padding: clamp(16px, 2vw, 30px); border-right-color: var(--edge-bright); }
.visor-head { justify-content: flex-end; padding-bottom: 0; }
.visor-head > span { display: inline-flex; align-items: center; gap: 8px; }
.visor h2 { font-weight: 500; font-size: clamp(1rem, 1.55vw, 1.45rem); letter-spacing: -.035em; margin: 15px 0; }
.screen { position: relative; display: grid; place-items: center; min-height: 135px; padding: 8px; border: 1px solid var(--line); border-radius: 13px; background: var(--base); overflow: hidden; }
.screen img, .screen video { display: block; width: 100%; max-height: 55vh; object-fit: contain; border-radius: 6px; }
.screen img[data-preview-url]:not([src]), [data-clear-preview-cache][hidden] { display: none; }
.screen .pdf { width: auto; max-width: 100%; }
.sheet { width: 100%; min-height: 155px; max-height: 50vh; margin: 0; overflow: auto; padding: clamp(14px, 2vw, 32px); border-radius: 6px; background: #dfebda; color: #233629; font: inherit; font-size: .9rem; line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; }
.pager { justify-content: center; margin-top: 8px; font-size: .8rem; }
.pager a { min-width: 44px; }
.close-view, .preview-step { display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid var(--border); border-radius: 9px; background: var(--control); color: var(--accent); text-decoration: none; font-size: 1.5rem; line-height: 1; }
.close-view:hover, .preview-step:hover { background: var(--control-hover); }
.preview-step { position: absolute; z-index: 2; top: 50%; transform: translateY(-50%); background: #00180bd9; font-size: 2rem; }
.preview-previous { left: 8px; }
.preview-next { right: 8px; }
#mobile-view { width: min(680px, calc(100% - 26px)); }
.card { width: min(540px, calc(100% - 32px)); margin: clamp(28px, 8vh, 115px) auto; padding: clamp(20px, 4vw, 40px); }
body > main.card { flex: 0 1 auto; min-height: 0; max-height: calc(100% - 32px); overflow-y: auto; }
.card.login-card { width: min(320px, calc(100% - 32px)); padding: 20px; }
.login-card .login-brand { gap: 8px; margin-bottom: 14px; }
.login-card .login-brand .brand-mark { width: 40px; height: 40px; }
.login-card .login-brand .brand-name { font-size: 1.4rem; }
.card.login-card > h1 { font-size: calc(clamp(1.65rem, 3vw, 2.3rem) / 2); }
.login-card > form { margin: 14px 0; gap: 12px; }
.card h1 { font-size: clamp(1.65rem, 3vw, 2.3rem); }
.card h2 { font-size: 1.05rem; }
.card p, .card small { color: var(--soft); }
.card form, .card label { display: grid; gap: 8px; }
.card form { gap: 15px; margin: 20px 0; }
.card input, .card select { width: 100%; min-width: 0; padding: 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--field); color: var(--ink); }
.password-field { position: relative; display: block; min-width: 0; }
.card .password-field input, .folder-dialog-panel .password-field input { padding-right: 50px; }
.password-field button.password-visibility { position: absolute; top: 50%; right: 4px; transform: translateY(-50%); display: grid; place-items: center; width: 40px; min-height: 40px; padding: 0; border: 0; background: transparent; color: var(--accent); }
.password-field button.password-visibility:hover { background: var(--control-hover); }
.password-visibility svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.password-visibility[aria-pressed="false"] .password-eye-slash { display: none; }
.pwa-install summary { color: var(--accent); cursor: pointer; width: fit-content; }
.pwa-install summary:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.pwa-install button { margin-top: 10px; }
.pwa-install button[hidden] { display: none; }
.pwa-install p { font-size: .9rem; }
.profile-section { border-top: 1px solid var(--line); margin-top: 22px; padding-top: 8px; }
.profile-identity { display: flex; align-items: center; gap: 14px; overflow-wrap: anywhere; }
.profile-avatar { width: 64px; height: 64px; color: var(--accent); background: var(--control); font-size: 1.4rem; }
.theme-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 146px), 1fr)); gap: 8px; }
.theme-options label { display: flex; align-items: center; gap: 7px; min-height: 44px; padding: 8px; border: 1px solid var(--border); border-radius: 9px; cursor: pointer; }
.theme-options label:has(input:checked) { border-color: var(--edge-bright); background: var(--control); }
.theme-options input { width: auto; flex: none; margin: 0; accent-color: var(--accent); }
.theme-swatch { width: 12px; height: 12px; flex: none; border-radius: 50%; background: var(--accent); }
.storage-breakdown { margin-block: 10px 16px; }
.storage-breakdown > div { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0 12px; padding: 7px 0; }
.storage-breakdown dd { margin: 0; }
.storage-breakdown .storage-total { border-top: 1px solid var(--line); color: var(--accent); }
.profile-heading { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; margin: 8px 0 16px; }
.profile-heading h1 { margin: 0; }
.card.profile-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: stretch; gap: 0; width: 100%; margin: 0; padding: 0; }
.profile-grid .profile-section { min-width: 0; margin: 0; padding: clamp(14px, 1.5vw, 22px); border: 0; }
.profile-grid .profile-section + .profile-section { border-left: 1px solid var(--line); }
.profile-grid .profile-section h2 { margin: 0 0 14px; }
.profile-grid .profile-section form { gap: 10px; margin: 14px 0 0; }
.profile-grid .storage-breakdown { margin: 0; }
@media (max-width: 1000px) {
    .card.profile-grid { grid-template-columns: 1fr; }
    .profile-grid .profile-section + .profile-section { border-left: 0; border-top: 1px solid var(--line); }
}
.access-list li { overflow-wrap: anywhere; padding-block: 10px; border-bottom: 1px solid var(--line); }
.activity-list li { display: grid; gap: 4px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; overflow-wrap: anywhere; }
.activity-list .activity-unread { border-color: var(--edge); background: var(--surface); }
.activity-list li form { margin: 4px 0 0; justify-items: start; }
.activity-nav { margin-top: 16px; }
.card.activity-section { width: 100%; margin: 0; padding: clamp(14px, 1.5vw, 22px); }
.trash-list { margin-block: 1rem; }
.trash-list li { display: flex; align-items: stretch; gap: 6px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; }
.trash-entry { display: grid; gap: 4px; min-width: 0; overflow-wrap: anywhere; }
.trash-list li form { margin: 6px 0 0; justify-items: start; }
.card .batch-form[hidden] { display: none; }
.move-details { margin-block: 8px; overflow-wrap: anywhere; }
.move-details summary { cursor: pointer; }
button:is(.move-change, .secondary)[type=submit] { background: var(--control); color: var(--accent); border-color: var(--border); font-weight: 400; }
button:is(.move-change, .secondary)[type=submit]:hover { background: var(--control-hover); border-color: var(--edge-bright); }
.upload-queue { margin-block: 1rem; }
.upload-native:not([hidden]) { display: grid; gap: 15px; }
[data-upload-native][hidden], [data-upload-open][hidden], .upload-sources:not([open]) { display: none; }
.card .upload-wake:not([hidden]) { display: flex; align-items: center; }
.card .upload-wake input { width: auto; accent-color: var(--accent); }
.card [data-upload-wake][hidden], .card [data-upload-wake-status]:empty,
.card [data-upload-status] button[hidden] { display: none; }
.upload-tip:not([hidden]) {
    display: flex; align-items: center; gap: 10px; padding: 10px 12px;
    border: 1px solid var(--line); border-radius: 10px; background: var(--control); font-size: .85rem;
}
.upload-tip-icon {
    flex: 0 0 32px; display: grid; place-items: center; width: 32px; height: 32px;
    border-radius: 8px; color: var(--accent); background: var(--control-hover); box-shadow: inset 0 1px var(--shine);
}
.upload-tip-icon svg { width: 22px; height: 22px; }
.upload-queue li { display: grid; gap: 4px; padding-block: 10px; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.upload-queue progress { width: 100%; accent-color: var(--accent); }
.upload-queue li button { justify-self: start; }
.upload-check progress, .upload-current progress { width: 100%; accent-color: var(--accent); }
.upload-check p { margin-bottom: 6px; }
.upload-current { display: grid; gap: 6px; margin-top: 14px; overflow-wrap: anywhere; }
.upload-current[hidden], .upload-issues[hidden], .upload-check[hidden] { display: none; }
.upload-issues { margin-top: 12px; }
.upload-issues summary { color: var(--accent); cursor: pointer; }
.upload-issues .upload-queue { max-height: 180px; overflow-y: auto; }
.upload-queue li[hidden] { display: none; }
.access-list button[value=revoke] { color: #e3d2bf; background: transparent; border-color: #706656; }
.button.danger, button.danger[type=submit] { color: #ffe0d0; background: #38261e; border-color: #825945; }
.button.danger:hover, button.danger[type=submit]:hover { background: #573623; }
.notice { border-left: 3px solid #f0bc80; padding: 8px 12px; }
dialog { border: 0; padding: 0; background: transparent; color: var(--ink); width: min(400px, calc(100% - 26px)); max-height: 85dvh; border-radius: 20px; }
dialog::backdrop { background: #020806d4; backdrop-filter: blur(4px); }
dialog[open] { animation: appear .15s ease-out; }
.folder-dialog { width: min(400px, calc(100% - 32px)); border: 1px solid var(--edge); background: var(--card-bottom); box-shadow: 0 16px 46px #02090790; }
.folder-dialog-panel { padding: 22px; }
.folder-dialog-panel h2 { margin: 0 0 16px; font-size: 1.15rem; font-weight: 500; }
.folder-dialog-panel form { display: grid; gap: 10px; }
.folder-dialog-panel form[hidden] { display: none; }
.folder-dialog-panel label { display: grid; gap: 6px; }
.folder-dialog-panel label { color: var(--soft); font-size: .85rem; }
.folder-dialog-panel input { width: 100%; min-height: 44px; padding: 9px; border: 1px solid var(--border); border-radius: 8px; background: var(--field); color: var(--ink); font: inherit; font-size: 16px; }
.folder-dialog-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.folder-error { margin: 0; color: var(--ink); font-size: .8rem; }
.action-dialog { width: min(520px, calc(100% - 32px)); border: 1px solid var(--edge); background: var(--card-bottom); box-shadow: 0 16px 46px #02090790; }
.action-dialog-panel { padding: 20px; }
.action-dialog-panel > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.action-dialog-panel > header h2 { margin: 0; font-size: 1.15rem; font-weight: 500; }
.action-dialog-panel > header button { min-width: 42px; padding: 0; font-size: 1.3rem; }
.action-dialog-body p, .action-dialog-body small { color: var(--soft); }
.action-dialog-body form, .action-dialog-body label { display: grid; gap: 8px; }
.action-dialog-body form { gap: 15px; margin: 14px 0; }
.action-dialog-body form[hidden] { display: none; }
.action-dialog-body input:not([type=checkbox]), .action-dialog-body select { width: 100%; min-width: 0; padding: 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--field); color: var(--ink); }
.quota-control { display: grid; gap: 10px; }
.action-dialog-body .quota-unlimited { display: flex; align-items: center; gap: 8px; }
.quota-unlimited input { width: auto; accent-color: var(--accent); }
.quota-range-label output { color: var(--accent); }
.action-dialog-body .quota-range-label input[type=range] { padding: 0; border: 0; background: transparent; accent-color: var(--accent); cursor: pointer; }
.action-dialog-body .quota-range-label input[type=range]:disabled { opacity: .45; cursor: default; }
.account-management-dialog .access-list, .account-management-dialog li { list-style: none; }
.account-management-dialog [data-account-result] { overflow-wrap: anywhere; }
.action-dialog-body .upload-wake { display: flex; align-items: center; }
.action-dialog-body [data-upload-wake][hidden], .action-dialog-body [data-upload-status] button[hidden] { display: none; }
.upload-indicator { margin-bottom: 12px; }
.upload-indicator[hidden] { display: none; }
.upload-sources, .share-sheet {
    border: 1px solid var(--line); background: var(--surface); box-shadow: 0 16px 48px #020806ad;
}
.upload-source-panel, .share-sheet-panel { display: grid; gap: 14px; padding: 18px; }
.upload-source-panel h2, .share-sheet-panel h2, .share-sheet-panel p { margin: 0; }
.share-file-list { max-height: 32dvh; overflow-y: auto; }
.share-file-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; padding-block: 6px; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.share-file-list a { font-size: .8rem; padding: 8px 2px; }
.upload-source-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.upload-source-list button {
    flex-direction: column; gap: 8px; min-height: 88px; padding: 10px;
    text-align: center; text-wrap: balance;
}
.upload-source-list svg { width: 26px; height: 26px; flex: none; }
.upload-source-panel > button { justify-self: end; }
@media (max-width: 600px) {
    .upload-sources, .share-sheet { inset: auto 0 0; margin: 0; width: 100%; max-width: none; border-radius: 20px 20px 0 0; }
    .upload-source-panel, .share-sheet-panel { padding-bottom: max(18px, env(safe-area-inset-bottom)); }
}
@media (max-width: 480px) {
    .account-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .catalog-tools { flex-wrap: wrap; }
    .library-search { flex: 1 1 0; }
    .catalog-actions { width: 100%; justify-content: flex-end; }
}
@keyframes appear { from { opacity: .25; transform: translateY(5px); } }
@media (max-width: 780px) {
    .notification-panel { position: fixed; top: 66px; right: 12px; left: 12px; width: auto; }
    body > main.library { display: flex; flex-direction: column; }
    body > main.library .rail { flex: none; overflow: visible; }
    .rail { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 2px; align-items: stretch; border: 0; border-bottom: 1px solid var(--line); padding: 8px 12px; }
    .rail > .filters:first-child { grid-column: span 3; grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .filters { display: grid; grid-template-columns: 1fr; gap: 2px; }
    .filters a { flex-direction: column; justify-content: center; gap: 3px; padding: 6px 1px; font-size: .65rem; text-align: center; }
    .rail-secondary { grid-column: auto; grid-template-columns: 1fr; border-top: 0; border-left: 1px solid var(--line); margin: 0; padding: 0 0 0 4px; }
    .rail-secondary a { justify-content: center; min-height: 44px; }
    .rail-logout { margin: 0; }
    .rail-logout button[type=submit] { flex-direction: column; justify-content: center; gap: 3px; min-height: 44px; height: 100%; padding: 6px 1px; font-size: .65rem; text-align: center; }
    .files { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .library:not([data-view="list"]) .trash-catalog .trash-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .library:not([data-view="list"]) .files > .folder-row { width: 100%; }
    .workspace { display: block; flex: 1 1 0; padding: 22px 16px; }
    .catalog { width: 100%; min-width: 0; }
    .catalog-tools { width: 100%; min-width: 0; }
    .trash-catalog .catalog-tools { width: 100%; }
    .trash-empty { width: 44px; min-height: 44px; padding: 0; }
    .trash-empty span { display: none; }
    .catalog-tools[data-mobile-search] { flex-wrap: wrap; justify-content: flex-start; gap: 5px; }
    .catalog-tools[data-mobile-search] .selection-toggle { order: 0; }
    .catalog-tools[data-mobile-search] .mobile-search-toggle:not([hidden]) { display: inline-flex; order: 1; }
    .catalog-tools[data-mobile-search] .catalog-actions { order: 2; width: auto; margin-left: auto; gap: 4px; }
    .catalog-tools[data-mobile-search] .library-search { display: none; order: 3; flex: 1 0 100%; }
    .catalog-tools[data-mobile-search][data-search-open="true"] .library-search { display: flex; }
    .file-tabs a { min-height: 44px; }
    .library-search input { min-height: 44px; font-size: 16px; }
    .view-toggle, .add-menu summary, .selection-toggle { width: 44px; min-height: 44px; }
    .library .file-selection-bar button { min-height: 44px; }
    .bay { position: static; margin: 16px 0 0; }
    .bay:not([data-open]), .bay:empty, .bay::before { display: none; }
    .bay .visor { transform: none; }
    .screen img, .screen video, .sheet { max-height: 43dvh; }
    .masthead { padding: 10px 14px; }
    .account { gap: 6px; }
    .compact-action { width: 44px; min-height: 44px; padding: 0; }
    .compact-action .icon { width: 20px; height: 20px; }
    .compact-action .action-label { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; }
}
