:root {
    color-scheme: dark;
    --text: #f2f1f0;
    --muted: #aaa7a9;
    --line: rgba(255, 255, 255, .11);
    --panel: rgba(24, 23, 25, .91);
    --strong: rgba(17, 16, 18, .97);
    --accent: #d8d3cd;
    font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

body {
    margin: 0;
    min-width: 320px;
    min-height: 100vh;
    color: var(--text);
    background: radial-gradient(ellipse at 78% 88%, #393638 0%, #282628 38%, #1b1a1c 70%, #141315 100%) fixed;
}
body.bg-plain { background: #19181a; }
body.bg-haze {
    background: radial-gradient(ellipse at 15% 20%, #474246 0%, transparent 38%), radial-gradient(ellipse at 85% 80%, #353234 0%, transparent 42%), #171618;
    background-size: 130% 130%, 145% 145%, auto;
    animation: background-haze 24s ease-in-out infinite alternate;
}
@keyframes background-haze { to { background-position: 18% 10%, 76% 90%, 0 0; } }

button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.guest-page { display: grid; place-items: center; }
.login-screen, .message-screen { display: grid; place-items: center; width: 100%; min-height: 100vh; padding: 24px 16px; }
.login-panel, .message-panel {
    width: min(350px, 100%);
    padding: 30px;
    background: rgba(20, 19, 21, .92);
    border: 1px solid var(--line);
    border-radius: 5px;
    backdrop-filter: blur(17px);
}

.wordmark { margin-bottom: 28px; font-size: 18px; font-weight: 600; letter-spacing: -.04em; }
.wordmark span { color: var(--muted); }
h1 { margin: 0; font-size: 25px; font-weight: 500; letter-spacing: -.035em; }
h2 { margin: 0 0 10px; font-size: 16px; font-weight: 500; }
.muted { margin: 8px 0 22px; color: var(--muted); font-size: 13px; }
.field { display: grid; gap: 7px; margin-bottom: 14px; color: var(--muted); font-size: 12px; }
.field input, .field select {
    width: 100%;
    height: 41px;
    padding: 0 12px;
    color: var(--text);
    background: rgba(255, 255, 255, .045);
    border: 1px solid var(--line);
    border-radius: 3px;
    outline: none;
}
.field textarea {
    width: 100%;
    padding: 10px 12px;
    resize: vertical;
    color: var(--text);
    background: rgba(255, 255, 255, .045);
    border: 1px solid var(--line);
    border-radius: 3px;
    outline: none;
    line-height: 1.55;
}
.field textarea:focus { border-color: rgba(255, 255, 255, .35); }
.field select { appearance: none; }
select { color-scheme: dark; }
select option, select optgroup { color: #f2f1f0; background-color: #242325; }
.field input:focus { border-color: rgba(255, 255, 255, .35); }
.primary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 40px;
    padding: 0 16px;
    margin-top: 4px;
    color: #222023;
    background: var(--accent);
    border: 1px solid var(--accent);
    border-radius: 3px;
    font-weight: 600;
    font-size: 13px;
    line-height: 1.3;
    text-align: center;
    cursor: pointer;
}
.primary-button:hover { filter: brightness(1.08); }
.link-button { display: inline-grid; place-items: center; width: auto; padding: 0 15px; text-decoration: none; font-size: 13px; }
.login-note { margin: 20px 0 0; color: #817e80; text-align: center; font-size: 11px; }
.form-error { padding: 10px 11px; color: #f0caca; background: rgba(130, 55, 55, .18); border: 1px solid rgba(219, 133, 133, .22); border-radius: 3px; font-size: 12px; }

.app-shell { display: grid; grid-template-columns: 58px minmax(0, 1fr); min-height: 100vh; transition: grid-template-columns .18s ease; }
body.nav-pinned .app-shell { grid-template-columns: 220px minmax(0, 1fr); }
.side-nav { position: sticky; top: 0; z-index: 40; display: grid; grid-template-rows: 58px 1fr auto; width: 58px; height: 100vh; overflow: hidden; background: var(--strong); border-right: 1px solid var(--line); transition: width .18s ease, box-shadow .18s ease; }
.side-nav:hover, body.nav-expanded .side-nav, body.nav-pinned .side-nav { width: 220px; box-shadow: 14px 0 32px rgba(0, 0, 0, .22); }
body.nav-pinned .side-nav { box-shadow: none; }
.nav-brand { display: grid; grid-template-columns: 58px 1fr; align-items: center; width: 220px; border-bottom: 1px solid var(--line); }
.nav-brand > span { display: grid; place-items: center; font-size: 15px; font-weight: 700; }
.nav-brand > button { display: grid; place-items: center; width: 58px; height: 58px; padding: 0; color: var(--text); background: transparent; border: 0; cursor: pointer; }
.nav-brand > button:hover { background: rgba(255,255,255,.06); }
.nav-brand svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }
.nav-brand strong { font-size: 13px; letter-spacing: -.02em; }
.nav-links { display: grid; align-content: start; gap: 0; padding: 0; }
.nav-item { position: relative; display: grid; grid-template-columns: 58px 1fr; align-items: center; width: 220px; min-height: 43px; padding: 0; overflow: hidden; color: var(--muted); background: transparent; border: 0; text-align: left; text-decoration: none; transition: color 140ms ease, background-color 140ms ease; }
.nav-item svg { width: 19px; height: 19px; margin: auto; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.nav-item > span { padding-right: 15px; white-space: nowrap; font-size: 12px; }
.nav-item:hover, .nav-item.active { color: var(--text); background: rgba(255, 255, 255, .075); }
.nav-item::before { content: ""; position: absolute; inset: 8px auto 8px 0; width: 2px; opacity: 0; background: rgba(255, 255, 255, .62); transition: opacity 140ms ease; }
.nav-item.active::before { opacity: 1; }
.nav-pin { border-top: 1px solid var(--line); }
body.nav-pinned .nav-pin { color: var(--text); }
.nav-scrim { display: none; }
.mobile-nav-button { display: none; width: 32px; height: 32px; padding: 0; color: var(--muted); background: transparent; border: 0; border-radius: 3px; font-size: 18px; }
.mobile-nav-button:hover { color: var(--text); background: rgba(255, 255, 255, .06); }
.app-main { min-width: 0; }
.page-loading { cursor: progress; }
.page-loading .app-main, .page-loading .side-nav { pointer-events: none; }
.topbar { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 58px; padding: 0 24px; background: rgba(17, 16, 18, .78); border-bottom: 1px solid var(--line); }
.topbar::after {
    content: "";
    position: absolute;
    inset: auto 0 -1px;
    height: 2px;
    pointer-events: none;
    opacity: 0;
    background: linear-gradient(100deg, rgba(216,211,205,.08) 30%, rgba(232,227,221,.55) 48%, rgba(216,211,205,.08) 66%);
    background-size: 250% 100%;
    transition: opacity 240ms ease;
}
.loading-indicator .topbar::after { opacity: 1; animation: loading-shimmer 2200ms linear infinite; }
@keyframes loading-shimmer {
    from { background-position: 120% 0; }
    to { background-position: -120% 0; }
}
.topbar-location { display: flex; align-items: center; gap: 12px; overflow: hidden; color: var(--muted); white-space: nowrap; text-overflow: ellipsis; font-size: 12px; }
.topbar-location strong { color: var(--text); font-size: 14px; }
.topbar-location > span { width: 1px; height: 17px; background: var(--line); }
.topbar-location a { color: var(--muted); text-decoration: none; }
.topbar-location a:hover { color: var(--text); }
.account-actions { display: flex; align-items: center; gap: 7px; }
.account-actions form { margin: 0; }
.profile-button { display: flex; align-items: center; gap: 8px; padding: 4px; color: var(--text); background: transparent; border: 0; border-radius: 4px; text-decoration: none; }
.profile-button:hover { background: rgba(255, 255, 255, .06); }
.logout-button { padding: 7px 9px; color: var(--muted); background: transparent; border: 0; border-radius: 3px; font-size: 11px; }
.logout-button:hover { color: var(--text); background: rgba(255, 255, 255, .06); }
.avatar { display: grid; place-items: center; width: 29px; height: 29px; flex: 0 0 auto; border-radius: 50%; object-fit: cover; background: #777274; color: #fff; font-size: 12px; }
.page-content { padding: 30px 32px; }
.eyebrow { margin: 0 0 8px; color: var(--muted); font-size: 12px; }
.content-panel { margin-top: 20px; padding: 22px; background: var(--panel); border: 1px solid var(--line); border-radius: 5px; }
.first-run-panel p { max-width: 650px; margin: 0; color: var(--muted); line-height: 1.6; font-size: 13px; }
.message-panel { text-align: left; }
.message-panel h1 { margin-bottom: 22px; }
.password-panel { width: min(390px, 100%); }
.quiet-link { display: block; margin-top: 16px; color: var(--muted); text-align: center; text-decoration: none; font-size: 12px; }
.quiet-link:hover { color: var(--text); }
.page-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; }
.counter { color: var(--muted); font-size: 12px; }
.notice { margin-top: 18px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 4px; font-size: 13px; }
.notice.success { color: #d4e5d7; background: rgba(62, 105, 70, .18); border-color: rgba(122, 174, 130, .24); }
.notice.error { color: #f0caca; background: rgba(130, 55, 55, .18); border-color: rgba(219, 133, 133, .22); }
.credential-card { display: flex; align-items: center; gap: 18px; margin-top: 18px; padding: 15px 17px; background: rgba(89, 78, 52, .22); border: 1px solid rgba(203, 182, 126, .24); border-radius: 4px; }
.credential-card div { margin-right: auto; }
.credential-card strong { font-size: 13px; }
.credential-card p { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.credential-card code { padding: 7px 9px; color: var(--text); background: rgba(0, 0, 0, .25); border-radius: 3px; user-select: all; }
.compact-panel { padding: 18px; }
.create-user-form { display: grid; grid-template-columns: 1fr 1fr; align-items: end; gap: 18px; }
.create-user-form .field { margin: 0; }
.create-user-form .permission-option, .create-user-form .form-actions { grid-column: 1 / -1; }
.action-button { width: auto; min-height: 40px; margin: 0; padding: 0 16px; text-decoration: none; }
.admin-page { max-width: 1380px; margin: 0 auto; }
.users-heading-actions { display: flex; align-items: center; gap: 18px; }
.user-create-panel { max-width: 780px; }
.user-list { display: grid; margin-top: 18px; border: 1px solid var(--line); border-radius: 5px; overflow: hidden; }
.user-row { display: grid; grid-template-columns: minmax(190px, 1fr) minmax(220px, auto) auto; align-items: center; gap: 18px; min-height: 76px; padding: 13px 17px; background: var(--panel); }
.user-row + .user-row { border-top: 1px solid var(--line); }
.user-identity { display: flex; align-items: center; gap: 11px; min-width: 0; }
.avatar.large { width: 36px; height: 36px; flex: 0 0 auto; }
.user-identity div { display: grid; gap: 3px; min-width: 0; }
.user-identity strong, .user-identity span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.user-identity strong { font-size: 13px; font-weight: 600; }
.user-identity span { color: var(--muted); font-size: 11px; }
.user-meta, .row-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.badge { padding: 4px 7px; color: var(--muted); background: rgba(255, 255, 255, .05); border: 1px solid var(--line); border-radius: 20px; font-size: 10px; }
.badge.online { color: #c5dec9; }
.badge.disabled { color: #d8baba; }
.badge.warning { color: #ddd0aa; }
.row-actions { justify-content: flex-end; }
.row-actions form { margin: 0; }
.text-button { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 0 14px; color: var(--muted); background: rgba(255,255,255,.025); border: 1px solid var(--line); border-radius: 3px; font-size: 13px; line-height: 1.3; text-align: center; text-decoration: none; cursor: pointer; }
.text-button:hover { color: var(--text); background: rgba(255, 255, 255, .07); }
.text-button.danger:hover { color: #efb8b8; background: rgba(125, 48, 48, .2); }
.module-toggle.granted { color: #c5dec9; }
.empty-state { margin-top: 18px; padding: 45px 20px; color: var(--muted); text-align: center; background: var(--panel); border: 1px solid var(--line); border-radius: 5px; }
.empty-state strong { color: var(--text); font-size: 14px; font-weight: 500; }
.empty-state p { margin: 7px 0 0; font-size: 12px; }
.editor-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 16px; border-top: 1px solid var(--line); }
.editor-footer span { color: var(--muted); font-size: 10px; }
.notes-page { width: 100%; max-width: none; margin: 0 auto; padding: 12px 16px; }
.notes-board-shell { border: 1px solid var(--line); border-radius: 6px; background: rgba(20,19,21,.76); }
.notes-board-toolbar { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-bottom: 1px solid var(--line); background: var(--panel); border-radius: 6px 6px 0 0; }
.notes-search { margin: 0; flex: 1; min-width: 0; }
.notes-search input { width: 100%; min-height: 34px; padding: 0 10px; color: var(--text); border: 1px solid var(--line); border-radius: 4px; background: rgba(255,255,255,.025); outline: none; font-size: 12px; }
.notes-search input:focus { border-color: rgba(255,255,255,.3); }
.notes-view-switch, .notes-filter-switch { display: flex; align-items: center; gap: 3px; }
.notes-view-switch { padding: 2px; flex-shrink: 0; border: 1px solid var(--line); border-radius: 5px; }
.notes-view-switch button, .notes-filter-switch button { min-height: 28px; padding: 0 10px; font: inherit; font-size: 12px; color: var(--muted); border: 0; border-radius: 3px; background: transparent; cursor: pointer; }
.notes-view-switch button[aria-pressed="true"], .notes-filter-switch button[aria-pressed="true"] { color: var(--text); background: rgba(255,255,255,.075); }
.notes-view-switch button:hover, .notes-filter-switch button:hover { color: var(--text); }
.notes-display-options { position: relative; flex: 0 0 auto; }
.notes-display-options summary { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 4px; color: var(--muted); cursor: pointer; list-style: none; }
.notes-display-options summary::-webkit-details-marker { display: none; }
.notes-display-options summary svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; }
.notes-display-options[open] summary, .notes-display-options.has-filter summary { background: rgba(255,255,255,.08); color: var(--text); }
.notes-display-menu { position: absolute; right: 0; top: calc(100% + 7px); z-index: 30; display: grid; gap: 12px; width: min(300px, calc(100vw - 48px)); padding: 12px; border: 1px solid var(--line); border-radius: 6px; background: #232123; box-shadow: 0 8px 24px #0005; }
.notes-display-menu .notes-filter-switch { flex-wrap: wrap; }
.notes-display-menu .notes-sort select { width: 100%; }
.notes-workarea { position: relative; display: flex; min-height: 240px; height: calc(100dvh - 134px); overflow: hidden; border-radius: 0 0 6px 6px; }
.notes-collection { display: flex; flex-direction: column; flex: 1; min-width: 0; min-height: 0; }
.notes-detail { flex: 1; min-width: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.notes-split-mode .notes-collection { flex: 0 0 clamp(260px, 30%, 340px); border-right: 1px solid var(--line); }
.notes-editor-mode .notes-collection { display: none; }
@media (max-width: 760px) {
    .notes-split-mode .notes-collection { display: none; }
    .notes-page.note-open .notes-board-toolbar { display: none; }
    .notes-page.note-open .notes-workarea { border-radius: 6px; }
}
.notes-create { position: absolute; z-index: 12; right: 20px; bottom: 20px; margin: 0; }
.notes-create button { display: grid; place-items: center; width: 46px; height: 46px; padding: 0; border: 1px solid #aaa5a1; border-radius: 50%; background: #dcd8d4; color: #272526; box-shadow: 0 3px 12px #0005; font-size: 27px; cursor: pointer; }
.notes-create button:hover { background: #eeebe7; }
.notes-sort select { min-height: 34px; max-width: 100%; padding: 0 28px 0 10px; font-size: 11px; color: var(--text); background: #262427; border: 1px solid var(--line); border-radius: 4px; }
.note-board-card [data-note-card-pin] { display: grid; place-items: center; width: 30px; height: 30px; padding: 0; color: #a39ea4; background: transparent; border: 0; border-radius: 4px; cursor: pointer; }
.note-board-card [data-note-card-pin] svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.note-board-card [data-note-card-pin][aria-pressed="true"] { color: #eee9ed; background: rgba(255,255,255,.08); }
.note-board-card[data-pinned="1"] { border-color: rgba(255,255,255,.26); }
.notes-list-mode .notes-board-viewport { cursor: auto; touch-action: pan-y; user-select: text; -webkit-user-select: text; }
.notes-list-mode .notes-board-space { min-height: 100%; }
.notes-list-mode .notes-board { position: relative; inset: auto; display: grid; gap: 0; padding: 0 0 64px; }
.notes-list-mode .note-board-card { position: relative; top: auto; left: auto; width: 100%; display: block; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; box-shadow: none; background: transparent; }
.notes-list-mode .note-board-card:hover { background: rgba(255,255,255,.035); }
.notes-list-mode .note-board-card.note-selected { background: rgba(255,255,255,.075); box-shadow: inset 2px 0 #bcb5ad; }
.notes-list-mode .note-board-card > a { min-width: 0; padding: 12px 78px 12px 14px; }
.notes-list-mode .note-board-card > header { position: absolute; right: 7px; top: 7px; padding: 0; cursor: default; touch-action: auto; }
.notes-list-mode .note-board-card > header > span { display: none; }
.notes-list-mode [data-note-drag] { display: none; }
.notes-list-mode .note-board-card h2 { font-size: 14px; }
.notes-list-mode .note-board-card h2 { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.notes-list-mode .note-board-card p { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; margin: 4px 0 6px; }
.notes-list-mode .note-board-card footer { justify-content: flex-start; flex-wrap: wrap; gap: 5px 15px; }
.notes-board-zoom { display: flex; align-items: center; gap: 3px; }
.notes-board-zoom button { min-height: 34px; padding: 0 10px; color: var(--muted); background: transparent; border: 0; border-radius: 4px; cursor: pointer; font-size: 12px; }
.notes-board-zoom button:hover { color: var(--text); background: rgba(255,255,255,.07); }
.notes-board-zoom span { min-width: 45px; color: var(--muted); text-align: center; font-size: 11px; }
.notes-board-viewport { position: relative; flex: 1; min-height: 0; overflow: auto; touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none; scrollbar-width: thin; scrollbar-color: #514e50 transparent; }
.notes-board-viewport.panning { cursor: grabbing; user-select: none; }
.notes-board-space { position: relative; min-width: 100%; min-height: 100%; }
.notes-board { position: absolute; inset: 0 auto auto 0; transform-origin: 0 0; }
.note-board-card { position: absolute; top: 0; left: 0; width: 300px; border: 1px solid rgba(255,255,255,.13); border-radius: 7px; background: #29272a; box-shadow: 0 7px 22px rgba(0,0,0,.15); cursor: default; }
.note-board-card:hover { border-color: rgba(255,255,255,.25); }
.note-board-card.dragging { z-index: 4; box-shadow: 0 14px 34px rgba(0,0,0,.3); user-select: none; }
.note-board-card > header { display: flex; align-items: center; gap: 3px; min-height: 35px; padding: 4px 8px 0 17px; cursor: grab; touch-action: none; }
.note-board-card > header > span { flex: 1; }
.note-board-card [data-note-card-delete] { display: grid; place-items: center; width: 30px; height: 30px; padding: 0; color: #a39ea4; background: transparent; border: 0; border-radius: 4px; cursor: pointer; }
.note-board-card [data-note-card-delete]:hover { color: #e4b7b7; background: rgba(255,255,255,.06); }
.note-board-card [data-note-card-delete] svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 1.6; }
.note-board-card > header > span { color: #a39ea4; font-size: 10px; }
.note-board-card [data-note-drag] { display: grid; place-items: center; width: 32px; height: 30px; padding: 0; color: var(--muted); background: transparent; border: 0; border-radius: 4px; cursor: grab; touch-action: none; font-size: 22px; }
.note-board-card [data-note-drag]:hover { background: rgba(255,255,255,.08); color: var(--text); }
.note-board-card [data-note-drag]:active { cursor: grabbing; }
.note-board-card [data-note-drag] svg { width: 18px; height: 18px; fill: currentColor; }
.note-board-card > a { display: block; padding: 8px 17px 16px; color: var(--text); text-decoration: none; }
.note-board-card h2 { margin: 0; font-size: 16px; line-height: 1.5; font-weight: 500; overflow-wrap: anywhere; }
.note-board-card p { margin: 10px 0 18px; color: var(--muted); font-size: 12px; line-height: 1.65; overflow-wrap: anywhere; }
.note-board-card footer { display: flex; justify-content: space-between; gap: 10px; color: #aaa4ac; font-size: 10px; }
.notes-board-empty { position: absolute; top: 22px; left: 24px; max-width: 280px; color: var(--muted); font-size: 13px; pointer-events: none; line-height: 1.7; }
.notes-board-hint { display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 28px; padding: 0 12px; color: #959095; border-top: 1px solid var(--line); font-size: 10px; }
.notes-list-mode .notes-board-hint { min-height: 26px; }
.note-document { min-height: 100%; background: var(--panel); }
.note-pane-toolbar { position: sticky; top: 0; z-index: 8; display: flex; align-items: center; gap: 8px; height: 52px; padding: 8px 12px; background: var(--strong); border-bottom: 1px solid var(--line); }
.note-pane-toolbar > .text-button { font-size: 12px; }
.note-save-status { flex: 1; color: var(--muted); text-align: right; font-size: 11px; }
.note-save-status.save-failed { color: #e0b7b7; }
.note-editor { margin: 0; }
.note-title-input, .note-body-input { width: 100%; color: var(--text); background: transparent; border: 0; outline: none; }
.note-title-input { padding: 20px 24px 18px; font-size: 24px; font-weight: 500; letter-spacing: -.025em; }
.note-format-toolbar { position: sticky; top: 52px; z-index: 7; display: flex; flex-wrap: wrap; align-items: center; gap: 3px; padding: 5px 14px; background: var(--strong); border-block: 1px solid rgba(255,255,255,.06); }
.note-format-toolbar button { min-height: 30px; padding: 0 11px; color: var(--muted); background: transparent; border: 0; border-radius: 3px; cursor: pointer; font-size: 12px; }
.note-format-toolbar button:hover { color: var(--text); background: rgba(255,255,255,.07); }
.note-format-toolbar button:disabled { opacity: .4; cursor: default; }
.note-format-toolbar span { color: var(--muted); font-size: 10px; overflow-wrap: anywhere; }
.note-body-input { min-height: 420px; padding: 24px 32px; resize: vertical; font-size: 14px; line-height: 1.8; }
.note-content { min-height: 52vh; padding: 18px 24px 84px; outline: none; font-size: 14px; line-height: 1.8; overflow-wrap: anywhere; }
.note-content p { min-height: 1.8em; }
.note-content > p:only-child:has(> br:only-child)::before { content: 'Начните писать…'; color: #858085; pointer-events: none; }
.note-content .note-attachment img { max-height: none; }
.note-content .note-attachment video { max-height: 70vh; }
.note-content [contenteditable="false"] { cursor: default; }
.note-attachment-caption button { flex: 0 0 auto; width: 26px; height: 26px; margin-left: auto; padding: 0; color: var(--muted); background: transparent; border: 0; border-radius: 3px; cursor: pointer; font-size: 18px; }
.note-attachment-caption button:hover { background: rgba(255,255,255,.06); }
.note-document-footer { padding: 12px 25px; color: #989299; border-top: 1px solid var(--line); font-size: 10px; }
.note-options { position: relative; }
.note-options summary { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 4px; color: var(--muted); cursor: pointer; font-size: 21px; list-style: none; }
.note-options summary::-webkit-details-marker { display: none; }
.note-options[open] summary { background: rgba(255,255,255,.08); }
.note-options > div { position: absolute; top: 40px; right: 0; z-index: 8; width: 210px; padding: 5px; border: 1px solid var(--line); border-radius: 5px; background: #252326; box-shadow: 0 10px 30px rgba(0,0,0,.3); }
.note-options form { margin: 0; }
.note-options button { width: 100%; min-height: 38px; padding: 0 10px; color: var(--text); border: 0; border-radius: 3px; background: transparent; text-align: left; font-size: 12px; cursor: pointer; }
.note-options button:hover { background: rgba(255,255,255,.06); }
.note-options button:disabled { opacity: .4; cursor: default; }
.note-options .danger { color: #dbb6b6; }
.note-content p { margin: 0 0 13px; white-space: pre-wrap; }
.note-content h2, .note-content h3, .note-content h4 { margin: 17px 0 10px; font-weight: 500; line-height: 1.4; }
.note-content a { color: #dcd5d8; text-decoration-color: #777277; text-underline-offset: 3px; }
.note-content code { padding: 2px 4px; background: rgba(255,255,255,.055); border-radius: 3px; font-size: 12px; }
.note-code-block { position: relative; margin: 0 0 16px; border: 1px solid var(--line); border-radius: 5px; overflow: hidden; background: rgba(0,0,0,.2); }
.note-code-block header { display: flex; justify-content: space-between; align-items: center; padding: 5px 11px; color: var(--muted); border-bottom: 1px solid var(--line); font-size: 10px; }
.note-code-block button { padding: 5px; color: var(--muted); background: transparent; border: 0; cursor: pointer; font-size: 10px; }
.note-code-block pre { margin: 0; padding: 13px; overflow-x: auto; tab-size: 4; line-height: 1.6; }
.note-code-block code { padding: 0; background: transparent; white-space: pre; }
.note-link-block { display: grid; gap: 3px; margin: 0 0 14px; padding: 13px 15px; border: 1px solid var(--line); border-radius: 5px; background: rgba(255,255,255,.02); text-decoration: none; }
.note-link-block strong { font-size: 12px; font-weight: 500; }
.note-link-block span { color: var(--muted); font-size: 11px; }
.note-attachment { margin: 0 0 17px; border: 1px solid var(--line); border-radius: 5px; overflow: hidden; }
.note-attachment-progress { display: block; appearance: none; width: 100%; height: 2px; border: 0; background: rgba(255,255,255,.06); color: #aaa6a8; }
.note-attachment-progress::-webkit-progress-bar { background: rgba(255,255,255,.06); }
.note-attachment-progress::-webkit-progress-value { background: #aaa6a8; transition: width .15s linear; }
.note-attachment-progress::-moz-progress-bar { background: #aaa6a8; }
.note-attachment-dialog { width: min(460px, calc(100vw - 32px)); padding: 22px; color: var(--text); background: #1b1a1c; border: 1px solid var(--line); border-radius: 5px; }
.note-attachment-dialog::backdrop { background: rgba(0,0,0,.65); }
.note-attachment-dialog h2 { margin: 0 0 12px; font-size: 17px; }
.note-attachment-dialog p { overflow-wrap: anywhere; line-height: 1.6; font-size: 13px; }
.note-remove-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0 14px; }
.note-attachment-dialog .danger { color: #e4a5a5; }
.note-attachment img, .note-attachment video { display: block; width: auto; max-width: 100%; max-height: 440px; margin: 0 auto; object-fit: contain; background: rgba(0,0,0,.12); }
.note-attachment audio { display: block; width: calc(100% - 24px); margin: 12px; }
.note-attachment-caption { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 13px; color: var(--muted); font-size: 11px; }
.note-attachment-caption span { min-width: 0; overflow-wrap: anywhere; }
.note-attachment-caption a { flex: 0 0 auto; }
.profile-page { max-width: 1050px; margin: 0 auto; }
.profile-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.profile-avatar-panel, .profile-settings-panel { align-self: stretch; min-width: 0; }
.profile-avatar-panel { display: grid; justify-items: start; align-content: start; }
.avatar.profile-avatar { width: 92px; height: 92px; margin-bottom: 18px; font-size: 30px; }
.profile-avatar-panel .muted { margin-bottom: 14px; }
.avatar-upload { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.avatar-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; width: 100%; }
.avatar-actions form, .avatar-actions button { margin: 0; }
.avatar-actions .file-button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.avatar-status { max-width: 100%; margin: 12px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.avatar-status.is-error { color: #e5afaf; }
.avatar-dialog { width: min(440px, calc(100vw - 28px)); max-height: calc(100dvh - 28px); padding: 22px; overflow-y: auto; color: var(--text); background: #1b1a1c; border: 1px solid var(--line); border-radius: 6px; }
.avatar-dialog::backdrop { background: rgba(0,0,0,.7); }
.avatar-dialog header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.avatar-dialog h2 { margin: 0; font-size: 16px; font-weight: 500; }
.avatar-dialog-close { width: 32px; height: 32px; padding: 0; color: var(--muted); background: transparent; border: 0; border-radius: 3px; font-size: 23px; cursor: pointer; }
.avatar-source { margin: 8px 0 16px; overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.avatar-dialog canvas { display: block; width: min(100%, 360px, 43dvh); height: auto; margin: auto; background: #242325; border-radius: 5px; cursor: grab; touch-action: none; }
.avatar-dialog canvas.is-dragging { cursor: grabbing; }
.avatar-dialog canvas:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.avatar-crop-hint { margin: 10px 0 18px; color: var(--muted); text-align: center; font-size: 11px; }
.avatar-zoom { display: grid; gap: 6px; }
.avatar-zoom > span { display: flex; justify-content: space-between; color: var(--muted); font-size: 12px; }
.avatar-zoom input { width: 100%; height: 32px; padding: 0; background: none; border: 0; accent-color: var(--accent); }
.avatar-dialog footer { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.avatar-dialog footer button { margin: 0; }
.avatar-crop-error { margin: 10px 0 0; color: #e5afaf; font-size: 12px; line-height: 1.5; }
.file-button { display: inline-grid; place-items: center; min-height: 40px; padding: 0 14px; color: var(--text); background: rgba(255, 255, 255, .055); border: 1px solid var(--line); border-radius: 3px; font-size: 13px; cursor: pointer; }
.file-button:hover { background: rgba(255, 255, 255, .09); }
.file-button input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.profile-settings-panel form { display: grid; }
.background-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 2px 0 16px; padding: 0; border: 0; }
.background-options legend { margin-bottom: 7px; color: var(--muted); font-size: 12px; }
.background-options label { position: relative; display: grid; gap: 7px; padding: 7px; color: var(--muted); border: 1px solid var(--line); border-radius: 4px; cursor: pointer; }
.background-options label:has(input:checked) { color: var(--text); border-color: rgba(255, 255, 255, .38); }
.background-options input { position: absolute; opacity: 0; }
.background-options b { font-size: 11px; font-weight: 500; }
.background-swatch { display: block; height: 48px; border-radius: 2px; }
.background-swatch.soft { background: radial-gradient(ellipse at 80% 90%, #4a4648, #1a191b 72%); }
.background-swatch.plain { background: #19181a; }
.background-swatch.haze { background: radial-gradient(circle at 20% 20%, #514b50, transparent 50%), #1a191b; }
.settings-link { display: block; margin-top: 13px; color: var(--muted); font-size: 12px; text-decoration: none; }
.settings-link:hover { color: var(--text); }
.security-page, .audit-page { max-width: 1180px; margin: 0 auto; }
.session-list, .audit-list { display: grid; margin-top: 18px; overflow: hidden; background: var(--panel); border: 1px solid var(--line); border-radius: 5px; }
.session-row { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(150px, auto) auto; align-items: center; gap: 18px; min-height: 72px; padding: 13px 17px; }
.session-row + .session-row, .audit-row + .audit-row { border-top: 1px solid var(--line); }
.admin-session-row { grid-template-columns: minmax(180px, 1fr) minmax(210px, 1fr) minmax(140px, auto) auto; }
.session-device, .session-time { display: grid; gap: 4px; }
.session-device strong { font-size: 12px; font-weight: 500; }
.session-device span, .session-time span { color: var(--muted); font-size: 10px; }
.session-time time { color: var(--text); font-size: 11px; }
.audit-row { display: grid; grid-template-columns: 135px minmax(210px, 1fr) minmax(200px, 1.4fr); align-items: center; gap: 18px; min-height: 66px; padding: 12px 16px; }
.audit-row > time { color: var(--muted); font-size: 10px; }
.audit-row > div { display: grid; gap: 4px; }
.audit-row strong { font-size: 12px; font-weight: 500; }
.audit-row span { color: var(--muted); font-size: 10px; }
.audit-row code { overflow: hidden; color: #aaa7a9; font-size: 10px; white-space: nowrap; text-overflow: ellipsis; }
.modules-page { max-width: 1050px; margin: 0 auto; }
.module-list { display: grid; margin-top: 18px; overflow: hidden; background: var(--panel); border: 1px solid var(--line); border-radius: 5px; }
.module-row { display: grid; grid-template-columns: minmax(220px, 1fr) auto auto; align-items: center; gap: 18px; min-height: 76px; padding: 14px 17px; }
.module-row + .module-row { border-top: 1px solid var(--line); }
.module-row > div { display: grid; gap: 4px; }
.module-row strong { font-size: 13px; font-weight: 500; }
.module-row span { color: var(--muted); font-size: 10px; }
.module-row form { display: flex; align-items: center; gap: 6px; }
.module-row select { min-height: 32px; padding: 0 28px 0 9px; color: var(--text); background: rgba(255,255,255,.05); border: 1px solid var(--line); border-radius: 3px; }
.module-status.active { color: #c5dec9; }
.module-status.disabled { color: #d8baba; }
.module-status.unavailable { color: #ddd0aa; }
.module-explanation { margin: 14px 2px 0; color: var(--muted); font-size: 11px; line-height: 1.55; }
.edit-user-page { max-width: 960px; margin: 0 auto; }
.settings-section-heading { margin-bottom: 24px; }
.settings-section-heading h2 { margin-bottom: 7px; }
.settings-section-heading p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.settings-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.settings-fields .field { margin: 0; }
.settings-fields .field:last-child { grid-column: 1 / -1; max-width: calc(50% - 9px); }
.access-row { display: grid; grid-template-columns: minmax(0, 1fr) 230px; align-items: center; gap: 24px; padding: 18px 0; }
.access-row + .access-row { border-top: 1px solid var(--line); }
.access-row strong { font-size: 14px; font-weight: 500; }
.access-row p { margin: 6px 0 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.access-row .field { margin: 0; }
.admin-access-message { display: none; margin: 0; color: var(--text); font-size: 13px; }
.admin-access .admin-access-message { display: block; }
.admin-access .access-row { display: none; }
.access-row:last-child { padding-bottom: 0; }
.settings-save { margin-top: 18px; }
.password-section { margin-top: 30px; }
.password-section .field { max-width: 420px; }
.field select { appearance: auto; }
.field input:disabled, .field select:disabled { opacity: .55; }
button:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.edit-user-panel { display: grid; gap: 22px; }
.edit-user-heading { display: flex; align-items: center; gap: 12px; }
.edit-user-heading > div { display: grid; gap: 4px; }
.edit-user-heading strong { font-size: 14px; font-weight: 500; }
.edit-user-heading span { color: var(--muted); font-size: 11px; }
.form-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }

.posts-page { width: 100%; max-width: 960px; margin: 0 auto; }
.post-preview { margin-top: 18px; }
.post-preview h2 { margin: 0; font-size: 20px; font-weight: 500; overflow-wrap: anywhere; }
.post-preview h2 a { color: inherit; text-decoration: none; }
.post-preview h2 a:hover { text-decoration: underline; text-underline-offset: 4px; }
.post-meta { margin: 12px 0 20px; color: var(--muted); font-size: 12px; }
.post-body, .post-excerpt { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.75; }
.post-excerpt { margin-bottom: 20px; font-size: 14px; }
.post-full { margin-top: 18px; }
.post-full h1 { overflow-wrap: anywhere; }
.post-actions { display: flex; align-items: center; gap: 18px; margin-top: 16px; }
.post-permissions { display: grid; gap: 14px; margin: 22px 0; padding: 18px; border: 1px solid var(--line); border-radius: 5px; }
.post-permissions legend { color: var(--muted); font-size: 12px; }
.post-permissions label { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.post-permissions input { accent-color: #c3c3c3; }
.post-permissions p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.permission-option { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.permission-option input { accent-color: #c3c3c3; }
.password-actions { flex-wrap: wrap; margin-top: 20px; }

.files-page { max-width: 1240px; width: 100%; margin: 0 auto; }
.files-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.files-caption { margin: 0; color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.files-page svg { width: 19px; height: 19px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.file-upload-button { gap: 9px; margin: 0; }
.file-upload-button svg:last-child { width: 14px; height: 14px; }
.file-icon-button { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; flex: 0 0 40px; padding: 0; color: var(--muted); background: transparent; border: 0; border-radius: 4px; text-decoration: none; cursor: pointer; }
.file-icon-button:hover, .file-icon-button[aria-expanded="true"] { color: var(--text); background: rgba(255,255,255,.07); }
.file-actions > .file-icon-button[data-file-menu-toggle] { color: #e3dfe5; background: rgba(255,255,255,.04); border: 1px solid var(--line); }
.file-actions > .file-icon-button[data-file-menu-toggle]:hover { background: rgba(255,255,255,.1); }
.file-icon-button[data-file-menu-toggle] circle { fill: currentColor; stroke: none; r: 1.6px; }
.files-page :is(button, a, input, select):focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.file-toolbar { display: flex; align-items: center; gap: 16px; margin: 12px 0; min-height: 40px; }
.file-context { flex: 1; min-width: 0; }
.file-tools { display: flex; align-items: center; gap: 4px; min-width: 0; flex: 0 1 auto; }
.file-search-toggle span { display: flex; }
.file-spaces { display: flex; align-items: center; min-width: 0; gap: 4px; overflow-x: auto; scrollbar-width: thin; }
.file-spaces a, .file-spaces button { display: inline-flex; align-items: center; flex-shrink: 0; white-space: nowrap; gap: 8px; min-height: 36px; padding: 7px 12px; color: var(--muted); background: transparent; border: 1px solid transparent; border-radius: 4px; font: inherit; font-size: 12px; text-decoration: none; cursor: pointer; }
.file-spaces .active { color: var(--text); background: rgba(255,255,255,.055); border-color: var(--line); }
.file-spaces a:hover, .file-spaces button:hover { color: var(--text); background: rgba(255,255,255,.035); }
.file-spaces svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.file-space-caption { margin: 14px 0 0; color: #969296; font-size: 11px; line-height: 1.7; overflow-wrap: anywhere; }
.file-owner-dialog { width: min(460px, calc(100vw - 32px)); }
.file-owner-dialog > .muted { font-size: 12px; line-height: 1.6; }
.file-owner-results { display: grid; gap: 4px; max-height: 45dvh; overflow-y: auto; margin: 16px 0; }
.file-owner-result { display: grid; gap: 4px; padding: 12px; color: var(--text); background: rgba(255,255,255,.025); border: 1px solid transparent; border-radius: 4px; text-decoration: none; }
.file-owner-result:hover, .file-owner-result:focus-visible { background: rgba(255,255,255,.06); border-color: var(--line); }
.file-owner-result strong { font-size: 13px; font-weight: 500; overflow-wrap: anywhere; }
.file-owner-result span { color: var(--muted); font-size: 11px; overflow-wrap: anywhere; }
.file-toolbar .field { margin: 0; min-width: 0; width: 150px; flex-shrink: 0; }
.file-tools select { height: 40px; border-color: transparent; background-color: transparent; }
.file-tools select:hover { background-color: rgba(255,255,255,.04); }
.file-toolbar select { appearance: none; padding-right: 30px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%23aaa7a9'%3E%3Cpath d='m3 4 3 3 3-3'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 11px center; text-overflow: ellipsis; }
.file-search { display: flex; align-items: center; width: clamp(160px, 22vw, 280px); min-width: 0; height: 40px; background: rgba(18,17,22,.65); border: 1px solid var(--line); border-radius: 4px; }
.file-search:focus-within { border-color: rgba(255,255,255,.35); }
.file-search input { min-width: 0; width: 100%; height: 100%; padding: 0 12px; font-size: 13px; color: var(--text); background: transparent; border: 0; border-radius: 3px; outline: none; }
.file-search input:focus-visible { outline: none; }
.file-workspace { position: relative; }
.file-list {
    background: rgba(18, 17, 22, 0.65);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 12px 32px rgba(0, 0, 0, 0.3);
    transition: background 0.2s ease, border-color 0.2s ease;
}
.file-columns, .file-row { display: grid; grid-template-columns: minmax(0, 1fr) 95px 115px 108px; align-items: center; gap: 16px; padding: 10px 16px; }
.file-columns { min-height: 40px; color: var(--muted); border-bottom: 1px solid rgba(255, 255, 255, 0.07); font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; }
.file-row { min-height: 64px; transition: background 0.15s ease; border-radius: 4px; }
.file-row + .file-row { border-top: 1px solid rgba(255, 255, 255, 0.05); }
.file-row:hover { background: rgba(255, 255, 255, 0.045); }
.file-identity { display: flex; align-items: center; gap: 13px; min-width: 0; }
.file-type-icon { position: relative; display: grid; place-items: center; width: 44px; height: 46px; flex-shrink: 0; padding: 0; color: #c3bec5; background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 6px; text-decoration: none; cursor: pointer; transition: transform 0.15s ease, border-color 0.15s ease; }
.file-type-icon:hover { border-color: rgba(255, 255, 255, 0.2); }
.file-type-icon small { position: absolute; bottom: 2px; padding: 1px 3px; color: #dedede; background: rgba(20, 19, 23, 0.9); border-radius: 2px; font-size: 7px; font-weight: 700; letter-spacing: .04em; }
.file-type-icon img { width: 100%; height: 100%; object-fit: cover; border-radius: 5px; }
.file-folder-icon { color: #e5c890; background: rgba(229, 200, 144, 0.08); border-color: rgba(229, 200, 144, 0.14); }
.file-folder-icon svg { width: 26px; height: 26px; }

/* File type accents */
.file-type-icon[data-file-type="image"] { color: #8ec07c; }
.file-type-icon[data-file-type="video"] { color: #d3869b; }
.file-type-icon[data-file-type="audio"] { color: #b16286; }
.file-type-icon[data-file-type="code"] { color: #83a598; }
.file-type-icon[data-file-type="table"] { color: #b8bb26; }
.file-type-icon[data-file-type="document"] { color: #83a598; }
.file-type-icon[data-file-type="archive"] { color: #fe8019; }

.file-breadcrumbs { display: flex; align-items: center; gap: 4px; margin: 0; padding: 0; overflow-x: auto; white-space: nowrap; color: var(--muted); font-size: 12px; scrollbar-width: thin; }
.file-crumb-separator { display: inline-flex; align-items: center; color: rgba(255, 255, 255, 0.22); }
.file-crumb-separator svg { width: 13px; height: 13px; stroke-width: 2; }
.file-breadcrumbs a { color: var(--muted); text-decoration: none; padding: 2px 6px; border-radius: 4px; transition: color 0.15s ease, background 0.15s ease; }
.file-breadcrumbs a:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); }
.file-breadcrumbs strong { color: var(--text); font-weight: 500; padding: 2px 6px; }
.file-breadcrumbs .file-parent-link { margin-left: auto; display: inline-flex; align-items: center; gap: 5px; font-size: 11px; color: var(--muted); padding: 3px 9px; background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.06); border-radius: 4px; text-decoration: none; transition: color 0.15s ease, background 0.15s ease; }
.file-breadcrumbs .file-parent-link:hover { color: var(--text); background: rgba(255, 255, 255, 0.08); }
.file-breadcrumbs .file-parent-link svg { width: 12px; height: 12px; }

.file-type-icon svg { width: 24px; height: 24px; stroke-width: 1.4; }
.file-name-block { min-width: 0; flex: 1; }
.file-name { display: block; max-width: 100%; padding: 2px 0; overflow: hidden; color: var(--text); background: transparent; border: 0; text-overflow: ellipsis; white-space: nowrap; text-align: left; text-decoration: none; font-size: 13px; font-weight: 500; line-height: 1.5; }
:is(a, button).file-name { cursor: pointer; }
:is(a, button).file-name:hover { text-decoration: underline; text-decoration-color: rgba(255,255,255,.3); text-underline-offset: 4px; }
.file-subtitle { display: flex; flex-wrap: wrap; gap: 5px 12px; color: var(--muted); font-size: 11px; line-height: 1.5; overflow-wrap: anywhere; }
.file-folder-path { margin: 0 0 3px; overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; font-size: 11px; line-height: 1.6; }
.file-read-status { margin: 14px 0; color: var(--muted); font-size: 12px; }
.file-mobile-size { display: none; }
.file-size, .file-date { color: var(--muted); font-size: 12px; white-space: nowrap; }
.file-pending { color: #d2c7ab; }

/* Actions & Quick Buttons */
.file-actions { display: flex; align-items: center; justify-content: flex-end; gap: 3px; position: relative; }
.file-quick-action { width: 34px; height: 34px; flex: 0 0 34px; color: var(--muted); background: rgba(255, 255, 255, 0.035); border: 1px solid rgba(255, 255, 255, 0.06); border-radius: 4px; opacity: 0.65; transition: opacity 0.15s ease, background 0.15s ease, color 0.15s ease, border-color 0.15s ease; }
.file-quick-action svg { width: 16px; height: 16px; }
.file-row:hover .file-quick-action { opacity: 1; }
.file-quick-action:hover { color: #fff; background: rgba(255, 255, 255, 0.12); border-color: rgba(255, 255, 255, 0.18); }
.file-actions > .file-icon-button[data-file-menu-toggle] { width: 34px; height: 34px; flex: 0 0 34px; color: #e3dfe5; background: rgba(255,255,255,.04); border: 1px solid var(--line); border-radius: 4px; }
.file-actions > .file-icon-button[data-file-menu-toggle]:hover { background: rgba(255,255,255,.1); }
.file-menu { position: absolute; top: calc(100% + 4px); right: 0; z-index: 20; width: 210px; padding: 6px; color: var(--text); background: rgba(24, 23, 28, 0.95); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 8px; box-shadow: 0 16px 36px rgba(0,0,0,.5); }
.file-actions.menu-up .file-menu { top: auto; bottom: calc(100% + 4px); }
.file-menu :is(button, a) { display: flex; align-items: center; width: 100%; min-height: 38px; padding: 8px 12px; color: inherit; background: transparent; border: 0; border-radius: 4px; font-size: 12px; text-align: left; text-decoration: none; cursor: pointer; transition: background 0.12s ease; }
.file-menu :is(button, a):hover { background: rgba(255,255,255,.08); }
.file-menu .file-menu-danger { margin-top: 4px; color: #e5afaf; border-top: 1px solid rgba(255, 255, 255, 0.08); border-radius: 0 0 4px 4px; }
.file-menu-hint { margin: 6px 11px; color: var(--muted); font-size: 11px; line-height: 1.5; }

/* View Switcher */
.file-view-switch { display: inline-flex; align-items: center; flex-shrink: 0; border-radius: 4px; padding: 2px; gap: 2px; }
.file-view-switch button { width: 34px; height: 34px; flex: 0 0 34px; border-radius: 3px; color: var(--muted); background: transparent; border: 0; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; transition: color 0.15s ease, background 0.15s ease; }
.file-view-switch button svg { width: 16px; height: 16px; }
.file-view-switch button:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); }
.file-view-switch button.active { color: #fff; background: rgba(255, 255, 255, 0.14); box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25); }

/* GRID VIEW */
.file-grid-section-title { display: none; }
.view-grid .file-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(186px, 1fr));
    gap: 12px;
    padding: 14px;
    background: transparent;
    border: 0;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}
.view-grid .file-columns { display: none; }
.view-grid .file-grid-section-title {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
    padding: 10px 4px 2px;
}
.view-grid .file-grid-section-title svg {
    width: 14px;
    height: 14px;
    opacity: 0.8;
}

/* Grid: Folder Row */
.view-grid .file-folder-row {
    grid-column: span 1;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    min-height: 60px;
    padding: 10px 12px;
    background: rgba(20, 19, 24, 0.65);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
}
.view-grid .file-folder-row:hover {
    background: rgba(26, 25, 31, 0.85);
    border-color: rgba(255, 255, 255, 0.18);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}
.view-grid .file-folder-row .file-identity { flex: 1; min-width: 0; }
.view-grid .file-folder-row .file-folder-icon { width: 36px; height: 36px; color: #e5c890; background: rgba(229, 200, 144, 0.08); border: 1px solid rgba(229, 200, 144, 0.15); border-radius: 6px; }
.view-grid .file-folder-row .file-folder-icon svg { width: 22px; height: 22px; }
.view-grid .file-folder-row .file-name { font-size: 12px; font-weight: 600; }
.view-grid .file-folder-row .file-size,
.view-grid .file-folder-row .file-date { display: none; }
.view-grid .file-folder-row .file-quick-action { display: none; }

/* Grid: File Tile */
.view-grid .file-row:not(.file-folder-row) {
    display: flex;
    flex-direction: column;
    min-height: 224px;
    padding: 10px;
    background: rgba(20, 19, 24, 0.62);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.22);
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    position: relative;
}
.view-grid .file-row:not(.file-folder-row):hover {
    transform: translateY(-3px);
    background: rgba(26, 25, 32, 0.82);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 12px 28px -6px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}
.view-grid .file-row:not(.file-folder-row) .file-identity { display: flex; flex-direction: column; width: 100%; min-width: 0; gap: 8px; }
.view-grid .file-row:not(.file-folder-row) .file-type-icon {
    width: 100%;
    height: 122px;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.32);
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    transition: border-color 0.2s ease;
}
.view-grid .file-row:not(.file-folder-row):hover .file-type-icon { border-color: rgba(255, 255, 255, 0.15); }
.view-grid .file-row:not(.file-folder-row) .file-type-icon svg { width: 38px; height: 38px; stroke-width: 1.3; }
.view-grid .file-row:not(.file-folder-row) .file-type-icon img { width: 100%; height: 100%; object-fit: cover; border-radius: 5px; transition: transform 0.25s ease; }
.view-grid .file-row:not(.file-folder-row):hover .file-type-icon img { transform: scale(1.04); }
.view-grid .file-row:not(.file-folder-row) .file-type-icon small { bottom: 5px; right: 5px; font-size: 8px; padding: 1px 5px; border-radius: 3px; background: rgba(20, 20, 25, 0.9); border: 1px solid rgba(255, 255, 255, 0.15); }
.view-grid .file-row:not(.file-folder-row) .file-name-block { width: 100%; min-width: 0; }
.view-grid .file-row:not(.file-folder-row) .file-name {
    font-size: 12px;
    font-weight: 500;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    white-space: normal;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 34px;
    padding: 0;
}
.view-grid .file-row:not(.file-folder-row) .file-subtitle { font-size: 11px; color: var(--muted); margin-top: 4px; display: flex; align-items: center; justify-content: space-between; }
.view-grid .file-row:not(.file-folder-row) .file-size,
.view-grid .file-row:not(.file-folder-row) .file-date { display: none; }
.view-grid .file-row:not(.file-folder-row) .file-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 2px;
    margin-top: auto;
    padding-top: 6px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    width: 100%;
}
.view-grid .file-row:not(.file-folder-row) .file-icon-button { width: 30px; height: 30px; flex: 0 0 30px; }
.view-grid .file-row:not(.file-folder-row) .file-icon-button svg { width: 14px; height: 14px; }
.view-grid .file-row:not(.file-folder-row) .file-quick-action { opacity: 0.8; }
.view-grid .file-row:not(.file-folder-row):hover .file-quick-action { opacity: 1; }
.file-operation-status { margin: 12px 0; color: var(--muted); font-size: 12px; }
.file-folder-picker { border: 1px solid var(--line); border-radius: 4px; overflow: hidden; }
.file-folder-location { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px; border-bottom: 1px solid var(--line); font-size: 12px; overflow-wrap: anywhere; }
.file-folder-location strong { min-width: 0; font-weight: 500; }
.file-folder-location button { flex: 0 0 auto; min-height: 30px; padding: 0 8px; font-size: 11px; }
.file-folder-options { max-height: 35dvh; min-height: 100px; overflow: auto; }
.file-folder-options button { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 43px; padding: 10px 12px; color: var(--text); background: none; border: 0; border-bottom: 1px solid var(--line); text-align: left; font-size: 12px; cursor: pointer; overflow-wrap: anywhere; }
.file-folder-options button:last-child { border-bottom: 0; }
.file-folder-options button:hover { background: rgba(255,255,255,.06); }
.file-folder-options svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.5; flex-shrink: 0; }
.file-folder-options p { margin: 22px 12px; color: var(--muted); font-size: 12px; }
.file-folder-new { display: flex; gap: 8px; margin-top: 12px; }
.file-folder-new input { width: 100%; min-width: 0; height: 40px; padding: 8px 10px; color: var(--text); background: rgba(255,255,255,.04); border: 1px solid var(--line); border-radius: 3px; font-size: 12px; }
.file-folder-new button { flex: 0 0 auto; font-size: 12px; }
.file-empty { display: grid; justify-items: center; align-content: center; min-height: 300px; padding: 35px 24px; text-align: center; background: var(--panel); border: 1px solid var(--line); border-radius: 5px; }
.file-empty-icon { margin-bottom: 18px; color: var(--muted); }
.file-empty-icon svg { width: 32px; height: 32px; stroke-width: 1.2; }
.file-empty h2 { font-size: 15px; }
.file-empty p { max-width: 340px; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.7; }
.file-empty .text-button { margin-top: 18px; }
.file-drop { position: absolute; inset: 0; z-index: 25; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; color: var(--muted); background: rgba(28,27,29,.96); border: 1px dashed var(--accent); border-radius: 5px; pointer-events: none; }
.file-drop strong { color: var(--text); font-size: 15px; font-weight: 500; }
.file-drop span { font-size: 12px; }
.file-drop svg { width: 28px; height: 28px; }
.file-pagination { display: flex; align-items: center; justify-content: center; gap: 18px; margin-top: 18px; font-size: 12px; }
.file-storage { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 14px; margin-top: 18px; color: var(--muted); font-size: 11px; }
.file-storage > div { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; }
.file-storage strong { font-weight: 400; }
.file-storage meter { width: 76px; height: 4px; appearance: none; }
.file-storage meter::-webkit-meter-bar { height: 4px; background: rgba(255,255,255,.09); border: 0; }
.file-storage meter::-webkit-meter-optimum-value { background: var(--accent); }
.file-storage meter::-moz-meter-bar { background: var(--accent); }
.upload-queue { margin-bottom: 14px; background: var(--panel); border: 1px solid var(--line); border-radius: 5px; }
.upload-queue-header { display: flex; align-items: center; gap: 8px; padding: 8px 12px; }
.upload-queue-header strong { flex: 1; font-size: 12px; font-weight: 500; }
.upload-queue-header button { width: auto; padding: 0 9px; font-size: 11px; }
.upload-items { max-height: 250px; overflow-y: auto; overscroll-behavior: contain; border-top: 1px solid var(--line); }
.upload-item { padding: 13px 16px; }
.upload-item + .upload-item { border-top: 1px solid var(--line); }
.upload-item > div { display: flex; justify-content: space-between; gap: 18px; font-size: 12px; }
.upload-item strong { font-weight: 400; overflow-wrap: anywhere; }
.upload-item span { color: var(--muted); text-align: right; font-size: 11px; }
.upload-item progress { display: block; width: 100%; height: 2px; margin-top: 10px; border: 0; accent-color: var(--accent); }
.upload-item progress::-webkit-progress-bar { background: rgba(255,255,255,.07); }
.upload-item progress::-webkit-progress-value { background: var(--accent); }
.upload-item.complete progress, .upload-item.failed progress { display: none; }
.upload-item.failed span { color: #efb8b8; }
.upload-item.failed > div { flex-direction: column; gap: 6px; }
.upload-item.failed span { text-align: left; line-height: 1.6; }
.file-dialog { width: min(900px, calc(100vw - 32px)); max-height: calc(100dvh - 48px); padding: 20px; color: var(--text); background: #1b1a1c; border: 1px solid var(--line); border-radius: 5px; }
.file-dialog.file-dialog-rename { width: min(460px, calc(100vw - 32px)); }
.file-dialog::backdrop { background: rgba(0,0,0,.7); }
.file-dialog header { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.file-dialog h2 { min-width: 0; margin: 0; overflow-wrap: anywhere; font-size: 15px; }
.file-dialog img, .file-dialog video { display: block; max-width: 100%; max-height: 70dvh; margin: auto; object-fit: contain; }
.file-dialog audio { display: block; width: 100%; }
.file-pdf-preview { display: block; width: 100%; height: 65dvh; border: 0; background: #29262c; }
.file-text-preview { max-height: 62dvh; margin: 0; padding: 17px; overflow: auto; color: var(--text); background: rgba(0,0,0,.16); border: 1px solid var(--line); border-radius: 4px; font: 12px/1.7 Consolas, monospace; tab-size: 4; white-space: pre-wrap; overflow-wrap: anywhere; }
.file-preview-limit { color: var(--muted); font-size: 11px; margin: 8px 16px; }
.file-properties { padding: 18px 8px; font-size: 13px; line-height: 1.7; }
.file-dialog-footer { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }

/* === Lyrae Minimal Media Preview Dialog === */
.file-dialog.file-dialog-preview {
    width: min(1040px, calc(100vw - 32px));
    max-height: calc(100dvh - 48px);
    padding: 0;
    color: var(--text);
    background: #171619;
    border: 1px solid var(--line);
    border-radius: 5px;
    box-shadow: 0 24px 64px -8px rgba(0, 0, 0, 0.75), 0 4px 16px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.06);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.file-dialog.file-dialog-preview.file-preview-audio {
    width: min(520px, calc(100vw - 32px));
}
.file-dialog.file-dialog-preview::backdrop {
    background: rgba(4, 3, 5, 0.82);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
.file-dialog.file-dialog-preview.is-fullscreen {
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    max-width: 100vw !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    z-index: 1000 !important;
}
.file-dialog.file-dialog-preview .file-dialog-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0 16px;
    background: #141316;
    border-bottom: 1px solid var(--line);
    margin-bottom: 0;
    flex-shrink: 0;
    height: 48px;
}
.file-dialog.file-dialog-preview .file-dialog-heading {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex: 1;
}
.file-dialog.file-dialog-preview .file-dialog-badge {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.05em;
    padding: 2px 7px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--muted);
    border: 1px solid var(--line);
    text-transform: uppercase;
    flex-shrink: 0;
}
.file-dialog.file-dialog-preview h2 {
    font-size: 13.5px;
    font-weight: 500;
    letter-spacing: -0.01em;
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin: 0;
}
.file-dialog.file-dialog-preview .file-dialog-header-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}
.file-dialog.file-dialog-preview .file-icon-button {
    width: 32px;
    height: 32px;
    padding: 0;
    color: var(--muted);
    background: transparent;
    border: 1px solid transparent;
    border-radius: 3px;
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: color 120ms ease, background-color 120ms ease, border-color 120ms ease;
    text-decoration: none;
}
.file-dialog.file-dialog-preview .file-icon-button:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--line);
}
.file-dialog.file-dialog-preview .file-icon-button svg {
    width: 15px;
    height: 15px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.5;
}
.file-dialog-rename .file-dialog-header-actions [data-file-dialog-download],
.file-dialog-rename .file-dialog-header-actions [data-file-dialog-fullscreen],
.file-dialog-rename .file-dialog-badge {
    display: none !important;
}
.file-dialog-body {
    position: relative;
    flex: 1;
    min-height: 200px;
    max-height: calc(100dvh - 100px);
    overflow: auto;
    display: flex;
    flex-direction: column;
}
.file-dialog-body::-webkit-scrollbar,
.code-text::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
.file-dialog-body::-webkit-scrollbar-track,
.code-text::-webkit-scrollbar-track {
    background: transparent;
}
.file-dialog-body::-webkit-scrollbar-thumb,
.code-text::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.16);
    border-radius: 3px;
}
.file-dialog-body::-webkit-scrollbar-thumb:hover,
.code-text::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.28);
}
.file-dialog.is-fullscreen .file-dialog-body {
    flex: 1 !important;
    height: calc(100dvh - 48px) !important;
    max-height: calc(100dvh - 48px) !important;
}
.file-dialog.is-fullscreen .lyrae-video-player,
.file-dialog.is-fullscreen .lyrae-image-viewer,
.file-dialog.is-fullscreen .lyrae-code-viewer,
.file-dialog.is-fullscreen .lyrae-pdf-viewer {
    width: 100% !important;
    height: 100% !important;
    max-height: 100% !important;
    flex: 1 !important;
}
.file-dialog.is-fullscreen .lyrae-audio-player {
    max-width: 520px;
    margin: auto;
    padding: 40px 32px 32px;
    background: rgba(22, 21, 24, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
}
.file-preview-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 60px 20px;
    color: var(--muted);
    font-size: 13px;
    flex: 1;
}
.file-preview-spinner {
    width: 28px;
    height: 28px;
    border: 2px solid rgba(255, 255, 255, 0.12);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: lyrae-spin 0.75s linear infinite;
}
@keyframes lyrae-spin {
    to { transform: rotate(360deg); }
}

/* === Lyrae Refined Audio Player === */
.lyrae-audio-player {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 24px 24px 22px;
    max-width: 440px;
    margin: auto;
    width: 100%;
}
.audio-cover-stage {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 4px auto 14px;
    position: relative;
    padding-right: 18px;
}
.audio-cover-wrap {
    position: relative;
    width: 144px;
    height: 144px;
}
.audio-vinyl-edge {
    position: absolute;
    right: -24px;
    top: 7px;
    width: 130px;
    height: 130px;
    border-radius: 50%;
    background: radial-gradient(circle, #242226 0%, #151417 38%, #1f1e22 40%, #121114 62%, #1b1a1d 64%, #0a090b 100%);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.6), inset 0 0 0 1px rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    transition: right 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    animation: lyrae-spin 10s linear infinite;
    animation-play-state: paused;
}
.audio-vinyl-edge.is-playing {
    animation-play-state: running;
    right: -28px;
}
.audio-vinyl-inner {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: radial-gradient(circle, #0e0d10 20%, #2f2c33 22%, #222026 80%, #161519 100%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: inset 0 0 0 2px rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
}
.audio-vinyl-inner::after {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #0e0d10;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.15);
}
.audio-cover-jacket {
    position: relative;
    width: 144px;
    height: 144px;
    border-radius: 6px;
    overflow: hidden;
    background: #18171b;
    border: 1px solid rgba(255, 255, 255, 0.09);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
}
.audio-cover-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.audio-cover-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #222026 0%, #151417 100%);
    color: rgba(255, 255, 255, 0.22);
}
.audio-cover-placeholder svg {
    width: 52px;
    height: 52px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.2;
}
.audio-track-info {
    text-align: center;
    margin-bottom: 12px;
    padding: 0 8px;
}
.audio-track-title {
    font-size: 14.5px;
    font-weight: 600;
    color: #ede9e6;
    letter-spacing: -0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 380px;
    margin: 0 auto;
}
.audio-track-artist {
    font-size: 12px;
    color: var(--muted);
    margin-top: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 380px;
    margin: 3px auto 0;
}
.audio-waveform-wrap {
    position: relative;
    width: 100%;
    height: 54px;
    margin-bottom: 6px;
    cursor: pointer;
    background: transparent;
    border: none;
    padding: 0;
    display: flex;
    align-items: center;
    outline: none;
}
.audio-waveform-canvas {
    width: 100%;
    height: 100%;
    display: block;
}
.audio-time-row {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    font-variant-numeric: tabular-nums;
    color: var(--muted);
    letter-spacing: 0.02em;
    margin-bottom: 14px;
    padding: 0 2px;
}
.audio-controls-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
}
.ctrl-btn {
    border: 0;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: color 120ms ease, background-color 120ms ease, transform 120ms ease;
}
.ctrl-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text);
}
.ctrl-btn.active {
    color: var(--accent);
}
.ctrl-btn.round-btn {
    width: 38px;
    height: 38px;
    padding: 0;
}
.ctrl-btn.round-btn svg {
    width: 17px;
    height: 17px;
    stroke: currentColor;
    fill: currentColor;
}
.ctrl-btn.speed-btn {
    font-size: 11px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: var(--muted);
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.ctrl-btn.speed-btn:hover {
    color: var(--text);
    border-color: rgba(255, 255, 255, 0.2);
}
.play-main-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--accent);
    border: 1px solid var(--accent);
    color: #1a191c;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
    transition: transform 120ms ease, filter 120ms ease;
}
.play-main-btn:hover {
    filter: brightness(1.08);
    transform: scale(1.04);
    color: #000;
}
.play-main-btn:active {
    transform: scale(0.96);
}
.play-main-btn svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    fill: currentColor;
    margin-left: 2px;
}
.audio-volume-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 14px;
}
.vol-mute-btn {
    width: 30px !important;
    height: 30px !important;
}
.vol-mute-btn svg {
    width: 15px !important;
    height: 15px !important;
}
.volume-percent {
    font-size: 11px;
    font-variant-numeric: tabular-nums;
    color: var(--muted);
    width: 32px;
    text-align: left;
}
.volume-range {
    -webkit-appearance: none;
    appearance: none;
    width: 84px;
    height: 3px;
    background: rgba(255, 255, 255, 0.16);
    border-radius: 2px;
    outline: none;
    cursor: pointer;
    transition: background 120ms ease;
}
.volume-range:hover {
    background: rgba(255, 255, 255, 0.28);
}
.volume-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    cursor: pointer;
    transition: transform 120ms ease;
}
.volume-range::-webkit-slider-thumb:hover {
    transform: scale(1.25);
}
.volume-range::-moz-range-thumb {
    width: 10px;
    height: 10px;
    border: none;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    cursor: pointer;
}

/* === Lyrae Refined Scrubber & Tooltip === */
.player-scrubber {
    position: relative;
    height: 16px;
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
    touch-action: none;
}
.scrubber-track {
    position: relative;
    width: 100%;
    height: 3px;
    background: rgba(255, 255, 255, 0.16);
    border-radius: 2px;
    transition: height 120ms ease;
}
.player-scrubber:hover .scrubber-track {
    height: 5px;
}
.scrubber-buffer {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0%;
    background: rgba(255, 255, 255, 0.25);
    border-radius: inherit;
    pointer-events: none;
}
.scrubber-progress {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0%;
    background: var(--accent);
    border-radius: inherit;
    pointer-events: none;
}
.scrubber-handle {
    position: absolute;
    top: 50%;
    left: 0%;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
    transform: translate(-50%, -50%) scale(0);
    transition: transform 120ms ease;
    pointer-events: none;
}
.player-scrubber:hover .scrubber-handle,
.player-scrubber:focus-visible .scrubber-handle {
    transform: translate(-50%, -50%) scale(1);
}
.player-tooltip {
    position: absolute;
    bottom: calc(100% + 6px);
    transform: translateX(-50%);
    padding: 3px 6px;
    background: rgba(17, 16, 18, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 3px;
    color: var(--text);
    font-size: 11px;
    font-variant-numeric: tabular-nums;
    pointer-events: none;
    white-space: nowrap;
    z-index: 20;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

/* === Lyrae Refined Video Player === */
.lyrae-video-player {
    position: relative;
    width: 100%;
    height: 65dvh;
    max-height: calc(100dvh - 120px);
    background: #08070a;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.video-element {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}
.video-overlay-play {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    pointer-events: none;
    transition: opacity 160ms ease;
}
.big-play-btn {
    pointer-events: auto;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(18, 17, 21, 0.75);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.16);
    display: grid;
    place-items: center;
    color: var(--accent);
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transition: transform 150ms ease, background-color 150ms ease, color 150ms ease;
}
.big-play-btn:hover {
    transform: scale(1.08);
    background: rgba(28, 27, 31, 0.9);
    color: #fff;
}
.big-play-btn svg {
    width: 24px;
    height: 24px;
    stroke: currentColor;
    fill: currentColor;
    margin-left: 2px;
}
.lyrae-video-player.is-playing .video-overlay-play {
    opacity: 0;
    pointer-events: none;
}
.player-flash-badge {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 8px 14px;
    border-radius: 3px;
    background: rgba(17, 16, 18, 0.9);
    border: 1px solid var(--line);
    color: var(--text);
    font-size: 13px;
    font-weight: 500;
    pointer-events: none;
    z-index: 15;
    opacity: 0;
    transition: opacity 160ms ease;
}
.player-flash-badge.visible {
    opacity: 1;
}
.video-controls-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 36px 16px 12px;
    background: linear-gradient(to top, rgba(12, 11, 14, 0.96) 0%, rgba(12, 11, 14, 0.5) 60%, transparent 100%);
    display: flex;
    flex-direction: column;
    gap: 4px;
    transition: opacity 220ms ease, transform 220ms ease;
    z-index: 10;
}
.lyrae-video-player.controls-hidden .video-controls-bar {
    opacity: 0;
    pointer-events: none;
    transform: translateY(4px);
}
.video-scrubber {
    height: 14px;
    margin-bottom: 2px;
}
.video-controls-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.vctrl-left, .vctrl-right {
    display: flex;
    align-items: center;
    gap: 4px;
}
.vctrl-btn {
    border: 0;
    background: transparent;
    color: var(--muted);
    width: 28px;
    height: 28px;
    border-radius: 3px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: color 120ms ease, background-color 120ms ease;
}
.vctrl-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text);
}
.vctrl-btn svg {
    width: 15px;
    height: 15px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.5;
}
.vctrl-btn.play-btn {
    color: var(--text);
}
.vctrl-btn.pill-btn {
    width: auto;
    padding: 2px 7px;
    font-size: 11px;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
}
.vctrl-volume-wrap {
    display: flex;
    align-items: center;
    gap: 4px;
}
.video-time-display {
    font-size: 11px;
    font-variant-numeric: tabular-nums;
    color: var(--muted);
    margin-left: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
    letter-spacing: 0.02em;
}
.video-time-display .sep {
    opacity: 0.5;
}

/* === Lyrae Refined Image Viewer === */
.lyrae-image-viewer {
    position: relative;
    width: 100%;
    height: 68dvh;
    max-height: calc(100dvh - 120px);
    background: #111013;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
}
.image-viewport {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: default;
}
.image-viewport.can-pan {
    cursor: grab;
}
.image-viewport.is-dragging {
    cursor: grabbing;
}
.viewer-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transform-origin: center center;
    will-change: transform;
}
.image-toolbar-floating {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    background: rgba(18, 17, 21, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 5px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    z-index: 10;
}
.image-meta-pill {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-variant-numeric: tabular-nums;
    color: var(--muted);
    padding: 0 8px 0 4px;
    border-right: 1px solid var(--line);
}
.image-tools-group {
    display: flex;
    align-items: center;
    gap: 3px;
}
.itool-btn {
    border: 0;
    background: transparent;
    color: var(--muted);
    width: 28px;
    height: 28px;
    border-radius: 3px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: color 120ms ease, background-color 120ms ease;
}
.itool-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text);
}
.itool-btn svg {
    width: 15px;
    height: 15px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.5;
}
.itool-btn.text {
    width: auto;
    padding: 2px 7px;
    font-size: 11px;
    font-weight: 500;
}
.gallery-counter {
    font-size: 11.5px;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
    color: var(--accent);
    padding: 0 8px 0 4px;
    border-right: 1px solid var(--line);
}
.gallery-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(18, 17, 21, 0.72);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    color: var(--text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
    z-index: 12;
    transition: background 150ms ease, border-color 150ms ease, transform 150ms ease, opacity 150ms ease;
    opacity: 0.85;
}
.gallery-nav-btn:hover:not(:disabled) {
    background: rgba(30, 28, 34, 0.95);
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-50%) scale(1.06);
    opacity: 1;
}
.gallery-nav-btn:active:not(:disabled) {
    transform: translateY(-50%) scale(0.96);
}
.gallery-nav-btn:disabled {
    opacity: 0.2;
    cursor: default;
    pointer-events: none;
}
.gallery-nav-btn.prev {
    left: 18px;
}
.gallery-nav-btn.next {
    right: 18px;
}
.gallery-nav-btn svg {
    width: 22px;
    height: 22px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* === Lyrae Refined Code & Text Viewer === */
.lyrae-code-viewer {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 70dvh;
    max-height: calc(100dvh - 120px);
    background: #131215;
}
.code-viewer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 16px;
    background: rgba(18, 17, 21, 0.95);
    border-bottom: 1px solid var(--line);
    font-size: 11px;
    flex-shrink: 0;
}
.code-meta-tags {
    display: flex;
    align-items: center;
    gap: 6px;
}
.code-lang-badge, .code-lines-badge, .code-size-badge {
    padding: 2px 7px;
    border-radius: 3px;
    font-size: 10px;
    letter-spacing: 0.03em;
    font-variant-numeric: tabular-nums;
}
.code-lang-badge {
    background: rgba(255, 255, 255, 0.07);
    color: var(--text);
    font-weight: 600;
    text-transform: uppercase;
}
.code-lines-badge, .code-size-badge {
    background: rgba(255, 255, 255, 0.035);
    color: var(--muted);
}
.code-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}
.code-act-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 3px;
    background: transparent;
    border: 1px solid var(--line);
    color: var(--muted);
    cursor: pointer;
    transition: color 120ms ease, background-color 120ms ease, border-color 120ms ease;
}
.code-act-btn:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
    border-color: rgba(255, 255, 255, 0.18);
}
.code-act-btn.active {
    color: var(--accent);
    border-color: var(--accent);
}
.code-act-btn.copied {
    color: #a6e3a1;
    border-color: rgba(166, 227, 161, 0.4);
}
.code-act-btn svg {
    width: 13px;
    height: 13px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.5;
}
.code-content-wrap {
    display: flex;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}
.code-gutters {
    padding: 16px 12px 16px 16px;
    user-select: none;
    text-align: right;
    color: rgba(255, 255, 255, 0.28);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 12.5px;
    line-height: 1.6;
    white-space: pre !important;
    overflow: hidden;
    background: rgba(14, 13, 16, 0.55);
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    min-width: 44px;
}
.code-text {
    flex: 1;
    margin: 0;
    padding: 16px 20px;
    overflow: auto;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 12.5px;
    line-height: 1.6;
    color: #ede9e6;
    background: transparent;
    outline: none;
    white-space: pre !important;
}
.code-text code {
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
    white-space: inherit;
}
.lyrae-code-viewer.wrap-lines .code-text {
    white-space: pre-wrap !important;
    word-break: break-all;
}
.lyrae-code-viewer.wrap-lines .code-text code {
    white-space: pre-wrap !important;
    word-break: break-all;
}

/* === Lyrae Refined PDF & Generic Viewers === */
.lyrae-pdf-viewer {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 68dvh;
    max-height: calc(100dvh - 120px);
}
.pdf-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 16px;
    background: #141316;
    border-bottom: 1px solid var(--line);
    font-size: 11px;
}
.pdf-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
}
.pdf-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}
.pdf-actions .text-button {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    padding: 3px 8px;
    border: 1px solid var(--line);
    border-radius: 3px;
    color: var(--muted);
    text-decoration: none;
}
.pdf-actions .text-button:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.06);
}
.pdf-actions svg {
    width: 13px;
    height: 13px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.5;
}
.pdf-iframe {
    width: 100%;
    flex: 1;
    border: none;
    background: #141316;
}
.lyrae-generic-viewer {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 50px 20px;
    width: 100%;
}
.generic-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 380px;
    width: 100%;
}
.generic-icon-wrap {
    width: 58px;
    height: 58px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--line);
    display: grid;
    place-items: center;
    color: var(--accent);
    margin-bottom: 18px;
}
.generic-icon-wrap svg {
    width: 28px;
    height: 28px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.5;
}
.generic-name {
    font-size: 15px;
    font-weight: 500;
    color: var(--text);
    margin: 0 0 14px;
    overflow-wrap: anywhere;
}
.generic-details {
    width: 100%;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--line);
    border-radius: 4px;
    padding: 10px 14px;
    margin-bottom: 20px;
    font-size: 11px;
}
.generic-row {
    display: flex;
    justify-content: space-between;
    padding: 3px 0;
}
.generic-row span {
    color: var(--muted);
}
.generic-download-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0 18px;
    min-height: 38px;
    background: var(--accent);
    color: #1a191c;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid var(--accent);
    border-radius: 3px;
    text-decoration: none;
    cursor: pointer;
    transition: filter 120ms ease;
}
.generic-download-btn:hover {
    filter: brightness(1.08);
}
.generic-download-btn svg {
    width: 15px;
    height: 15px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.5;
}

@media (max-width: 620px) {
    .file-dialog.file-dialog-preview {
        width: 100vw;
        max-width: 100vw;
        height: 100dvh;
        max-height: 100dvh;
        border-radius: 0;
        border: none;
    }
    .file-dialog-body {
        max-height: calc(100dvh - 50px);
    }
    .lyrae-video-player, .lyrae-image-viewer, .lyrae-code-viewer, .lyrae-pdf-viewer {
        height: calc(100dvh - 50px);
        max-height: calc(100dvh - 50px);
    }
    .lyrae-audio-player {
        padding: 20px 14px;
    }
    .volume-range {
        width: 44px;
    }
    .image-toolbar-floating {
        width: calc(100% - 20px);
        justify-content: space-between;
    }
}
button:disabled { opacity: .5; cursor: default; }

.site-backdrop { position: fixed; inset: 0; z-index: 0; pointer-events: none; background: inherit; }
.app-shell, .message-screen { position: relative; z-index: 1; }
.site-backdrop::after, .appearance-preview::before { content: ""; position: absolute; inset: 0; background: #000; opacity: 0; pointer-events: none; }
.dim-10 .site-backdrop::after, .appearance-preview.dim-10::before { opacity: .1; }
.dim-20 .site-backdrop::after, .appearance-preview.dim-20::before { opacity: .2; }
.dim-30 .site-backdrop::after, .appearance-preview.dim-30::before { opacity: .3; }
.dim-40 .site-backdrop::after, .appearance-preview.dim-40::before { opacity: .4; }
.dim-50 .site-backdrop::after, .appearance-preview.dim-50::before { opacity: .5; }
.dim-60 .site-backdrop::after, .appearance-preview.dim-60::before { opacity: .6; }
body.bg-graphite, .appearance-preview.bg-graphite, .background-swatch.graphite { background: linear-gradient(125deg, #151517 10%, #454549 48%, #242426 68%, #171719 100%) fixed; }
body.bg-sand, .appearance-preview.bg-sand, .background-swatch.sand { background: radial-gradient(ellipse at 12% 95%, #5c5750, transparent 57%), radial-gradient(ellipse at 90% 18%, #383631, transparent 66%), #1c1b1a; }
body.bg-aurora, .appearance-preview.bg-aurora,
body.bg-orbit, .appearance-preview.bg-orbit,
body.bg-silk, .appearance-preview.bg-silk,
body.bg-lens, .appearance-preview.bg-lens { background: #08070b; }
.background-swatch.aurora { background: linear-gradient(135deg, #182230 0%, #10b981 35%, #06b6d4 60%, #6366f1 100%); }
.background-swatch.orbit { background: radial-gradient(circle at 50% 120%, #4a6d8c 0%, #1a2634 50%, #0c1017 100%); box-shadow: inset 0 -2px 6px rgba(130, 190, 255, 0.4); }
.background-swatch.silk { background: linear-gradient(135deg, #16151a 0%, #353340 45%, #18171f 65%, #2a2833 100%); }
.background-swatch.lens { background: radial-gradient(circle at 50% 50%, #000 30%, #5d4285 55%, #14111d 85%); box-shadow: inset 0 0 8px rgba(180, 140, 255, 0.35); }
.appearance-preview.bg-soft { background: radial-gradient(ellipse at 78% 88%, #393638 0%, #282628 38%, #1b1a1c 70%, #141315 100%); }
.appearance-preview.bg-plain { background: #19181a; }
.appearance-preview.bg-haze { background: radial-gradient(ellipse at 15% 20%, #474246 0%, transparent 38%), radial-gradient(ellipse at 85% 80%, #353234 0%, transparent 42%), #171618; background-size: 130% 130%, 145% 145%, auto; animation: background-haze 24s ease-in-out infinite alternate; }
.background-swatch.random { background: linear-gradient(135deg, #343134 0%, #343134 32%, #201f22 33%, #201f22 66%, #45423d 67%); }
.site-backdrop canvas.aurora-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; pointer-events: none; z-index: 0; }
.appearance-preview canvas.aurora-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; pointer-events: none; z-index: 0; }
.aurora-palette-section { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.aurora-palette-label { display: block; font-size: 11px; font-weight: 500; color: var(--muted); margin-bottom: 8px; text-transform: uppercase; letter-spacing: .04em; }
.aurora-palettes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.aurora-palette-option { position: relative; display: flex; align-items: center; gap: 7px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 4px; cursor: pointer; font-size: 11px; color: var(--muted); transition: color 120ms ease, border-color 120ms ease, background 120ms ease; }
.aurora-palette-option:hover { color: var(--text); border-color: rgba(255, 255, 255, .3); }
.aurora-palette-option:has(input:checked) { color: var(--text); border-color: var(--accent); background: rgba(255, 255, 255, .05); }
.aurora-palette-option input { position: absolute; opacity: 0; }
.aurora-palette-swatch { width: 13px; height: 13px; border-radius: 50%; flex-shrink: 0; box-shadow: 0 0 5px rgba(0,0,0,.4); }
.aurora-palette-swatch.swatch-silver { background: linear-gradient(135deg, #c4cbd4, #6e737c); }
.aurora-palette-swatch.swatch-steel { background: linear-gradient(135deg, #8fa3b7, #3f4e61); }
.aurora-palette-swatch.swatch-petrol { background: linear-gradient(135deg, #245c50, #132b26); }
.aurora-palette-swatch.swatch-nordic { background: linear-gradient(135deg, #10b981, #4338ca); }
.aurora-palette-swatch.swatch-polardusk { background: linear-gradient(135deg, #2563eb, #7c3aed); }
.aurora-palette-swatch.swatch-ocean { background: linear-gradient(135deg, #06b6d4, #1e3a8a); }
.appearance-panel { margin-top: 20px; }
.appearance-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 1fr); gap: 30px; align-items: start; }
.appearance-themes { grid-template-columns: repeat(3, 1fr); gap: 10px; }
.appearance-themes .background-swatch { height: 62px; background-attachment: scroll; }
.appearance-themes label:focus-within { outline: 2px solid var(--accent); outline-offset: 3px; }
.dim-control > span { display: flex; justify-content: space-between; align-items: center; }
.dim-control input[type="range"] { padding: 0; height: 30px; background: none; border: 0; accent-color: var(--accent); }
.appearance-note, .appearance-pending { margin: 14px 0 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.appearance-pending { margin: 0 0 20px; }
.appearance-actions { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }
.appearance-preview { position: relative; display: grid; place-items: center; min-height: 275px; padding: 25px 20px 40px; overflow: hidden; border: 1px solid var(--line); border-radius: 5px; background-attachment: scroll !important; }
.preview-window { position: relative; z-index: 1; display: flex; width: 100%; min-height: 174px; overflow: hidden; border: 1px solid rgba(255,255,255,.14); border-radius: 4px; box-shadow: 0 14px 30px rgba(0,0,0,.22); }
.preview-navigation { display: grid; justify-items: center; align-content: start; gap: 16px; width: 34px; padding: 14px 0; background: rgba(17,16,18,.97); border-right: 1px solid var(--line); }
.preview-navigation span { font-size: 11px; }
.preview-navigation i { width: 10px; height: 10px; border: 1px solid var(--muted); border-radius: 2px; }
.preview-main { flex: 1; background: rgba(24,23,25,.84); }
.appearance-preview.bg-aurora .preview-main,
.appearance-preview.bg-orbit .preview-main,
.appearance-preview.bg-silk .preview-main,
.appearance-preview.bg-lens .preview-main { background: rgba(18, 17, 21, .65); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.preview-main header { padding: 12px 15px; font-size: 10px; background: rgba(17,16,18,.6); border-bottom: 1px solid var(--line); }
.preview-main > div { padding: 20px 15px; }
.preview-main strong { font-size: 13px; font-weight: 500; }
.preview-main p { color: var(--muted); font-size: 10px; }
.preview-content { display: block; margin-top: 20px; color: var(--muted); font-size: 10px; }
.preview-caption { position: absolute; inset: auto 0 14px; z-index: 1; text-align: center; color: var(--muted); font-size: 10px; }
.profile-security-panel { display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.profile-security-panel p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.motion-off.bg-haze, .appearance-preview.motion-off { animation: none; }
body.motion-off .app-shell, body.motion-off .side-nav, body.motion-off .nav-item, body.motion-off .nav-item::before, body.motion-off .nav-scrim { transition: none; }
body.motion-off.loading-indicator .topbar::after { animation: none; }

.home-page { max-width: 1180px; margin: 0 auto; }
.administration-page { max-width: 1180px; margin: 0 auto; }
.admin-navigation { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 24px; padding: 0 0 12px; border-bottom: 1px solid var(--line); }
.admin-nav-link { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 8px 14px; color: var(--muted); border: 1px solid transparent; border-radius: 3px; font-size: 13px; text-decoration: none; }
.admin-nav-link:hover, .admin-nav-link.active { color: var(--text); background: rgba(255, 255, 255, .055); }
.admin-nav-link.active { border-color: var(--line); }
.admin-nav-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.home-sections { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin-top: 24px; overflow: hidden; border: 1px solid var(--line); border-radius: 5px; background: var(--panel); }
.home-sections a { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 88px; padding: 18px 20px; color: var(--text); text-decoration: none; box-shadow: 1px 0 0 var(--line), 0 1px 0 var(--line); }
.home-sections a:hover { background: rgba(255,255,255,.04); }
.home-sections a > div { display: grid; gap: 6px; }
.home-sections strong { font-size: 14px; font-weight: 500; }
.home-sections span { color: var(--muted); font-size: 12px; }
.home-recent-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }
.home-section-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.home-section-heading h2 { margin: 0; }
.home-entry { display: grid; gap: 7px; padding: 17px 0; color: var(--text); text-decoration: none; }
.home-entry + .home-entry { border-top: 1px solid var(--line); }
.home-entry strong { font-size: 14px; font-weight: 400; overflow-wrap: anywhere; }
.home-entry span, .home-empty { color: var(--muted); font-size: 12px; line-height: 1.6; }
.home-entry:hover strong { text-decoration: underline; text-underline-offset: 3px; }
.home-entry:last-child { padding-bottom: 0; }
.home-empty { margin-bottom: 0; }

@media (max-width: 760px) {
    .profile-grid { grid-template-columns: 1fr; }
    .appearance-grid { grid-template-columns: 1fr; }
    .profile-security-panel { align-items: stretch; flex-direction: column; }
    .profile-security-panel .form-actions { justify-content: flex-start; }
}
@media (max-width: 620px) {
    .home-sections, .home-recent-grid { grid-template-columns: 1fr; }
    .admin-navigation { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .admin-nav-link { padding-left: 8px; padding-right: 8px; }
    .home-section-heading .text-button { padding: 0 10px; font-size: 12px; }
    .appearance-themes { grid-template-columns: repeat(3, 1fr); }
    .appearance-themes .background-swatch { height: 50px; }
}
@media (prefers-reduced-motion: reduce) {
    .appearance-preview { animation: none !important; }
}

.vault-dialog { width: min(520px, calc(100vw - 32px)); max-height: calc(100dvh - 40px); overflow: auto; border: 1px solid #3b3b3b; border-radius: 12px; background: #1c1c1d; color: #ededed; padding: 24px; }
.vault-dialog::backdrop { background: rgb(0 0 0 / .65); }
.vault-dialog h2 { margin: 0 0 14px; font-size: 19px; }
.vault-dialog p, .vault-recovery-help p { line-height: 1.6; }
.vault-recovery-code { width: 100%; resize: none; margin: 12px 0; padding: 12px; font-family: ui-monospace, monospace; font-size: 13px; overflow-wrap: anywhere; }
.vault-dialog form { margin-top: 20px; }
.vault-dialog .permission-option { margin-bottom: 16px; }
.vault-dialog footer { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
.vault-recovery-help { margin: 18px 0; }
.vault-recovery-help summary { cursor: pointer; color: #b8b8bc; font-size: 12px; line-height: 1.6; }
.notes-protection { margin-bottom: 14px; color: #a5a5ab; font-size: 11px; line-height: 1.6; }
.notes-protection a { color: #dedede; }
.notes-protection .text-button { min-height: 30px; padding: 0 10px; font-size: 11px; }

@media (max-width: 800px) {
    .file-columns, .file-row { grid-template-columns: minmax(0, 1fr) 80px 108px; gap: 12px; }
    .file-date, .file-columns > span:nth-child(3) { display: none; }
    .file-toolbar.search-open .file-context { display: none; }
    .file-toolbar.search-open .file-tools { width: 100%; }
    .file-toolbar.search-open .file-search { width: auto; flex: 1; }
    .view-grid .file-list { grid-template-columns: repeat(auto-fill, minmax(146px, 1fr)); gap: 10px; padding: 10px; }
}
@media (max-width: 620px) {
    .file-columns, .file-size { display: none; }
    .file-row { grid-template-columns: minmax(0, 1fr) auto; padding: 12px 10px; gap: 8px; }
    .file-quick-action { display: none; }
    .file-name { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; white-space: normal; overflow-wrap: anywhere; }
    .file-identity { gap: 8px; }
    .file-type-icon { width: 36px; height: 38px; }
    .file-mobile-size { display: inline; }
    .file-subtitle { margin-top: 2px; gap: 4px 9px; }
    .files-header { gap: 8px; }
    .file-spaces a, .file-spaces button { padding-inline: 9px; }
    .file-upload-button { padding-inline: 10px; }
    .file-toolbar { flex-wrap: wrap; gap: 8px; }
    .file-tools { gap: 2px; }
    .file-toolbar .file-sort { width: 116px; }
    .file-tools > .file-icon-button { width: 32px; flex-basis: 32px; }
    .file-tools .file-refresh { display: none; }
    .file-toolbar.search-open :is(.file-sort, .file-view-switch, .file-refresh) { display: none; }
    .file-storage > span { display: none; }
    .file-empty { min-height: 280px; }
    .upload-item > div { flex-direction: column; gap: 6px; }
    .upload-item span { text-align: left; }
    .file-dialog { padding: 14px; }
    .view-grid .file-list { grid-template-columns: repeat(2, 1fr); gap: 8px; padding: 8px; }
    .view-grid .file-folder-row { grid-column: span 2; }
}

@media (max-width: 620px) {
    .login-panel, .message-panel { padding: 25px 22px; }
    .app-shell, body.nav-pinned .app-shell { grid-template-columns: 1fr; }
    .side-nav, .side-nav:hover, body.nav-expanded .side-nav, body.nav-pinned .side-nav { position: fixed; width: min(280px, 84vw); transform: translateX(-101%); box-shadow: 18px 0 42px rgba(0, 0, 0, .48); transition: transform .2s ease; }
    body.nav-mobile-open .side-nav { transform: translateX(0); }
    .nav-brand, .nav-item { width: min(280px, 84vw); }
    .nav-pin { display: none; }
    .nav-scrim { position: fixed; inset: 0; z-index: 35; display: block; visibility: hidden; opacity: 0; background: rgba(0, 0, 0, .52); border: 0; transition: opacity .2s ease, visibility .2s ease; }
    body.nav-mobile-open .nav-scrim { visibility: visible; opacity: 1; }
    .mobile-nav-button { display: grid; place-items: center; flex: 0 0 auto; }
    .topbar { padding: 0 13px; }
    .topbar-location > span, .topbar-location { gap: 8px; }
    .profile-button { font-size: 0; }
    .logout-button { padding-left: 5px; padding-right: 5px; }
    .page-content { padding: 23px 14px; }
    .page-heading { align-items: center; }
    .create-user-form { grid-template-columns: 1fr; }
    .create-user-form .permission-option { grid-column: 1 / -1; }
    .users-heading-actions { flex-direction: column; align-items: flex-end; gap: 10px; }
    .users-heading-actions .counter { display: none; }
    .users-heading-actions .action-button { max-width: 170px; padding: 8px 12px; }
    .settings-fields, .access-row { grid-template-columns: 1fr; }
    .settings-fields .field:last-child { max-width: none; }
    .access-row { gap: 12px; }
    .settings-section { padding: 18px; }
    .form-actions { flex-wrap: wrap; }
    .user-row { grid-template-columns: 1fr; gap: 10px; }
    .row-actions { justify-content: flex-start; }
    .credential-card { align-items: stretch; flex-direction: column; gap: 10px; }
    .notes-page { padding: 8px; }
    .notes-board-toolbar { gap: 5px; padding: 7px; }
    .notes-view-switch button { padding: 0 7px; font-size: 11px; }
    .notes-search input { padding: 0 8px; }
    .notes-board-zoom { margin-left: auto; }
    .notes-board-zoom button { min-height: 32px; }
    .notes-board-hint { padding: 0 8px; }
    .note-pane-toolbar { display: flex; height: 52px; padding: 8px; gap: 5px; }
    .note-pane-toolbar > .text-button { justify-self: start; min-height: 36px; padding: 0 9px; font-size: 11px; }
    .note-pane-toolbar > .action-button { min-height: 36px; padding: 0 10px; font-size: 12px; }
    .note-save-status { font-size: 10px; }
    .note-title-input { padding: 18px 17px; font-size: 23px; }
    .note-format-toolbar { top: 52px; padding: 5px; }
    .note-format-toolbar button { padding: 0 8px; }
    .note-content, .note-body-input { padding: 18px 17px 84px; }
    .note-document-footer { padding: 11px 17px; line-height: 1.6; }
    .profile-grid { grid-template-columns: 1fr; }
    .background-options { grid-template-columns: 1fr; }
    .aurora-palettes { grid-template-columns: 1fr; }
    .background-swatch { height: 38px; }
    .session-row, .admin-session-row, .audit-row { grid-template-columns: 1fr; gap: 9px; padding: 15px; }
    .module-row { grid-template-columns: 1fr; gap: 10px; }
    .module-row form { align-items: stretch; flex-direction: column; }
    .audit-row code { white-space: normal; overflow-wrap: anywhere; }
}

@media (prefers-reduced-motion: reduce) {
    .loading-indicator .topbar::after { animation: none; }
    .topbar::after { transition: none; }
    body.bg-haze { animation: none; }
    .app-shell, .side-nav, .nav-scrim { transition: none; }
    .nav-item, .nav-item::before { transition: none; }
}

@media (min-width: 621px) and (max-width: 1050px) {
    .create-user-form { grid-template-columns: 1fr 1fr; }
    .user-row { grid-template-columns: minmax(180px, 1fr) auto; }
    .row-actions { grid-column: 1 / -1; justify-content: flex-start; }
}
