/* geist-cyrillic-ext-wght-normal */
@font-face {
  font-family: 'Geist Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(/assets/geist-cyrillic-ext-wght-normal.141916beb91c487496c8.woff2) format('woff2-variations');
  unicode-range: U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F;
}

/* geist-cyrillic-wght-normal */
@font-face {
  font-family: 'Geist Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(/assets/geist-cyrillic-wght-normal.e1e85cd9eab54096528f.woff2) format('woff2-variations');
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}

/* geist-vietnamese-wght-normal */
@font-face {
  font-family: 'Geist Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(/assets/geist-vietnamese-wght-normal.ed8ddc5c3f2df573fa57.woff2) format('woff2-variations');
  unicode-range: U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB;
}

/* geist-latin-ext-wght-normal */
@font-face {
  font-family: 'Geist Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(/assets/geist-latin-ext-wght-normal.b29dbc4234e76289a5b9.woff2) format('woff2-variations');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

/* geist-latin-wght-normal */
@font-face {
  font-family: 'Geist Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(/assets/geist-latin-wght-normal.ee5d167b615cdb197f4a.woff2) format('woff2-variations');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
:root {
  color-scheme: light dark;
  --bg: light-dark(#f8f9fc, #10141d);
  --side: light-dark(#eff2f7, #141923);
  --panel: light-dark(#fff, #1a2130);
  --hover: light-dark(#e7ecf6, #222b3d);
  --line: light-dark(#ccd5e4, #2a3445);
  --line-soft: light-dark(#dbe1eb, #252e3e);
  --text: light-dark(#192034, #edf0f8);
  --muted: light-dark(#48556c, #a1adc0);
  --quiet: light-dark(#56647b, #838fa4);
  --accent: light-dark(#354fae, #b0beff);
  --on-accent: light-dark(#fff, #162046);
  --accent-panel: light-dark(#dfe7fc, #232d49);
  --glass: light-dark(rgb(249 251 255 / 93%), rgb(23 29 42 / 91%));
  --glass-line: light-dark(#c7d2e3, #384458);
  --danger: light-dark(#8d2434, #ffb7ba);
  --danger-panel: light-dark(#fae6e9, #3f252f);
  --scrim: light-dark(#19203466, #080d1ab0);
  --shadow: light-dark(#19203430, #080b14a0);
  --up: light-dark(#236449, #98d7bd);
  --down: light-dark(#903e19, #ffc391);
  --bar-up: light-dark(#3b8b72, #579c86);
  --bar-down: light-dark(#b85e36, #d89563);
}
:root[data-theme='dark'] { color-scheme: dark; }
:root[data-theme='light'] { color-scheme: light; }

:root { font-family: 'Geist Variable', system-ui, sans-serif; }
.side { position: sticky; top: 0; display: flex; flex-direction: column; height: 100dvh; border-right: 1px solid var(--line-soft); }
.side-brand { display: flex; align-items: center; justify-content: space-between; }
.brand { display: inline-flex; align-items: center; width: fit-content; }
.switch { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; text-align: left; width: 100%; color: var(--text); border: 1px solid var(--line); }
.nav { display: grid; }
.nav a { display: flex; align-items: center; gap: 11px; min-width: 0; border-radius: 8px; color: var(--muted); }
.side-label { display: flex; align-items: center; justify-content: space-between; padding: 0 5px 4px 10px; color: var(--quiet); }
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.main { margin-inline: auto; }
h1 { line-height: 1.05; overflow-wrap: anywhere; }
.page-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 18px 14px; }
.primary { color: var(--on-accent); background: var(--accent); }
.search { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 0 9px 0 12px; border: 1px solid var(--line); border-radius: 9px; color: var(--quiet); }
.file { display: block; min-width: 0; padding: 0; text-align: left; }
.cover { position: relative; display: grid; place-items: center; overflow: hidden; }
.cover img { width: 100%; height: 100%; position: absolute; inset: 0; }
.file-info { display: grid; min-width: 0; }
.file-info strong { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rows { gap: 5px; }
.empty { min-height: clamp(210px, 40vh, 380px); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 15px; text-align: center; padding: 34px 14px; border: 1px solid var(--line-soft); border-radius: 12px; }
.entries { display: grid; }
.entry { display: flex; gap: 12px; align-items: center; min-height: 60px; }

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); min-width: 0; font-size: 14px; }
button, input, select { font: inherit; }
button, input, select, a { -webkit-tap-highlight-color: transparent; }
button, a { color: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .65; cursor: wait; }
a { text-decoration: none; }
img { display: block; max-width: 100%; }
svg { flex: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
h1, h2, p { margin: 0; }
h2 { font-size: 19px; letter-spacing: -.028em; font-weight: 630; overflow-wrap: anywhere; }
small { font-size: 12px; color: var(--quiet); }

.shell { min-height: 100dvh; display: grid; grid-template-columns: var(--side-width) minmax(0, 1fr); }
.wordmark { object-fit: contain; object-position: left; }
[data-theme='light'] .wordmark { filter: brightness(.48) saturate(1.8); }
.switch-wrap { position: relative; }
.switch:hover { background: var(--hover); }
.workspace-icon, .entry-icon, .avatar { display: grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 9px; background: var(--accent-panel); color: var(--accent); }
.switch strong, .switch small, .account strong, .account small { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.switch small, .account small { margin-top: 3px; }
.switch > svg { color: var(--quiet); }
.switch-list { position: absolute; z-index: 2; top: calc(100% + 6px); width: 100%; display: grid; padding: 5px; max-height: 45dvh; overflow: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 28px var(--shadow); }
.switch-list button { display: flex; gap: 8px; align-items: center; text-align: left; padding: 10px 8px; background: transparent; border: 0; border-radius: 6px; overflow-wrap: anywhere; }
.switch-list button:hover { background: var(--hover); }
.nav a span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav a:hover { background: var(--hover); color: var(--text); }
.side-folders { min-height: 0; overflow: auto; padding: 1px; scrollbar-width: thin; }
.side-folders .nav a { min-height: 36px; font-size: 13px; }
.avatar { font-size: 11px; font-weight: 680; letter-spacing: .035em; }
.account { flex: 1; min-width: 0; }
.account strong { font-size: 13px; }
.body { min-width: 0; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.icon, .primary, .outline, .danger { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 8px 13px; border: 1px solid transparent; border-radius: 8px; font-weight: 570; line-height: 1.2; }
.icon { min-width: 40px; padding-inline: 8px; background: transparent; color: var(--muted); }
.icon:hover, .outline:hover { background: var(--hover); color: var(--text); }
.icon.small { min-height: 30px; min-width: 30px; padding: 4px; }
.primary:hover { filter: brightness(.92); }
.outline { background: var(--panel); border-color: var(--line); }
.danger { color: var(--danger); background: var(--danger-panel); border-color: var(--danger); }
.danger:hover { filter: brightness(1.12); }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding-bottom: 19px; margin-bottom: 22px; border-bottom: 1px solid var(--line-soft); }
.search:focus-within { border-color: var(--accent); }
.search input { flex: 1; width: 0; min-width: 0; margin: 0; padding: 8px 0; background: transparent; border: 0; outline: none; color: var(--text); }
.search input::placeholder { color: var(--quiet); }
kbd { flex: none; font: inherit; font-size: 11px; line-height: 1; padding: 4px 5px; border: 1px solid var(--line); border-radius: 4px; }
.views, .pills { flex: none; display: inline-flex; align-items: center; gap: 2px; padding: 3px; background: var(--side); border: 1px solid var(--line); border-radius: 9px; }
.views button { min-height: 34px; min-width: 36px; padding: 4px; border-radius: 6px; }
.views [aria-pressed='true'], .pills [aria-pressed='true'] { background: var(--accent-panel); color: var(--accent); }
.pills { margin-bottom: 20px; }
.pills button { padding: 7px 12px; min-height: 36px; border-radius: 6px; border: 0; background: transparent; }
.files { display: grid; gap: 13px; }
.file-info small span, .meta span { padding-inline: 2px; }
.rows .cover svg { width: 21px; }
.empty-icon { display: grid; place-items: center; width: 48px; height: 48px; border: 1px solid var(--line); border-radius: 13px; background: var(--accent-panel); color: var(--accent); }
.empty .primary { margin-top: 5px; }
.more { margin-top: 18px; }
.entry-text { flex: 1; min-width: 0; display: grid; gap: 3px; overflow-wrap: anywhere; }
.entry .outline { min-height: 34px; padding: 6px 9px; }
.role { text-transform: capitalize; color: var(--muted); font-size: 12px; }
.event > small { flex: none; }
.access { min-height: 100dvh; display: grid; place-items: center; padding: 96px 20px 45px; background: radial-gradient(ellipse at 50% 30%, var(--accent-panel), transparent 61%), var(--bg); }
.access-top { position: absolute; top: 0; inset-inline: 0; display: flex; justify-content: space-between; align-items: center; padding: 20px clamp(18px, 4vw, 42px); }
.access-card { padding: clamp(22px, 5vw, 39px); width: min(100%, 410px); background: var(--side); border: 1px solid var(--line); border-radius: 15px; box-shadow: 0 24px 75px var(--shadow); }
.access-card h1 { font-size: clamp(28px, 6vw, 39px); margin-bottom: 25px; }
.access-card .primary { width: 100%; margin-top: 3px; }
.quiet-link { display: inline-block; margin-top: 18px; color: var(--accent); }
.sign-in-links { display: flex; flex-wrap: wrap; column-gap: 16px; }
.sign-in-links button { border: 0; background: none; padding: 0; }
.sign-in-links button:hover { text-decoration: underline; }
.form, .stack { display: grid; gap: 15px; }
label { display: grid; gap: 6px; font-weight: 530; }
label input:not([type='checkbox']), label select { width: 100%; min-width: 0; min-height: 43px; padding: 8px 10px; background: var(--bg); border: 1px solid var(--line); border-radius: 7px; color: var(--text); }
label.check { display: flex; align-items: center; gap: 8px; min-height: 34px; }
input[type='checkbox'] { accent-color: var(--accent); width: 16px; height: 16px; }
.modal { max-height: calc(100dvh - 28px); width: min(calc(100% - 22px), 460px); padding: 0; color: var(--text); background: var(--side); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 24px 64px var(--shadow); }
.modal.wide { width: min(calc(100% - 22px), 740px); }
.modal::backdrop { background: var(--scrim); }
.modal article { padding: clamp(15px, 4vw, 23px); }
.dialog-head { display: flex; align-items: start; justify-content: space-between; gap: 10px; margin-bottom: 18px; }
.dialog-head h2 { padding-top: 7px; }
.detail-preview { display: grid; place-items: center; max-height: 58dvh; min-height: 124px; margin-bottom: 12px; background: var(--bg); border: 1px solid var(--line-soft); border-radius: 9px; color: var(--accent); overflow: hidden; }
.detail-preview img, .detail-preview video { max-width: 100%; max-height: 57dvh; object-fit: contain; }
.detail-preview audio { width: min(100% - 20px, 430px); }
.meta { margin-bottom: 12px; color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.stack .meta { margin-bottom: 0; }
.detail-actions { margin-top: 15px; }
.copy-field { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 7px; }
.copy-field .icon { min-height: 43px; }
.copy-field + .meta { margin-top: 10px; }
.error { margin-block: 10px; color: var(--danger); overflow-wrap: anywhere; white-space: pre-line; }
.skip { position: fixed; z-index: 5; top: 10px; left: 10px; padding: 9px 11px; background: var(--accent); color: var(--on-accent); transform: translateY(-150%); }
.skip:focus { transform: none; }
.sr { position: absolute; height: 1px; width: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.mobile-only, .scrim { display: none; }

@media (max-width: 760px) {
  .shell { display: block; }
  .side { display: none; position: fixed; z-index: 4; inset: 0 auto 0 0; width: min(280px, calc(100% - 42px)); box-shadow: 10px 0 40px var(--shadow); }
  .side.open { display: flex; }
  .mobile-only { display: inline-flex; }
  .scrim { display: block; position: fixed; z-index: 3; inset: 0; width: 100%; border: 0; background: var(--scrim); }
  .top { min-height: 56px; padding-inline: 11px; }
  .main { padding-top: 25px; }
  .page-head { margin-bottom: 18px; }
  .toolbar { margin-bottom: 15px; padding-bottom: 13px; }
  .files.grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 145px), 1fr)); gap: 8px; }
}
@media (max-width: 375px) {
  .main { padding-inline: 12px; }
  kbd { display: none; }
  .entry { gap: 7px; }
  .entry .avatar, .entry .profile-avatar, .entry-icon { display: none; }
}
.target { max-width: min(180px, 46vw); min-height: 40px; padding: 7px 10px; border: 1px solid var(--line); background: var(--panel); color: var(--text); border-radius: 8px; text-overflow: ellipsis; }
@media (pointer: coarse) {
  .icon, .primary, .outline, .danger { min-height: 44px; }
  kbd { display: none; }
}
@media (max-height: 510px) {
  .side { gap: 13px; padding-block: 12px; overflow-y: auto; }
}

@supports (backdrop-filter: blur(8px)) or (-webkit-backdrop-filter: blur(8px)) {
  :is(.access-card, .switch-list, .modal) {
    background: var(--glass);
    border-color: var(--glass-line);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
  }

  @media (prefers-reduced-transparency: reduce), (forced-colors: active) {
    :is(.access-card, .switch-list, .modal) {
      background: var(--side);
      border-color: var(--line);
      -webkit-backdrop-filter: none;
      backdrop-filter: none;
    }

    .switch-list { background: var(--panel); }
  }
}

.pending-invites { display: grid; gap: .75rem; margin-block-start: 2rem; }
.pending-invites > p:not(.error) { color: var(--muted); }
.invite-actions { display: flex; gap: .4rem; flex-wrap: wrap; }
.pending-invite .entry-text strong { overflow-wrap: anywhere; }
@media (max-width: 720px) {
  .entry.pending-invite { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
  .invite-actions { grid-column: 1 / -1; }
}

/* Workspace layout and gallery */
:root { --side-width: 252px; }
.side { padding: 28px 18px 16px; gap: 26px; background: var(--side); }
.side-brand { padding-inline: 8px; }
.brand { gap: 9px; }
.brand > img:first-child { width: 30px; height: 30px; }
.brand .wordmark { width: 80px; }
.switch { min-height: 66px; padding: 12px; background: var(--bg); border-color: var(--line-soft); border-radius: 12px; }
.workspace-icon { background: var(--side); color: var(--muted); }
.nav { gap: 6px; }
.nav a { min-height: 44px; padding-inline: 12px; font-size: 13px; font-weight: 550; }
.nav a.active { background: var(--accent-panel); color: var(--text); }
.nav a.active svg { color: var(--accent); }
.side-label { font-size: 11px; letter-spacing: .04em; }
.account small { max-width: 100%; }
.top { min-height: 72px; border-bottom: 0; padding-inline: clamp(24px, 4vw, 64px); }
.top > .icon { border: 1px solid var(--line-soft); border-radius: 50%; }
.main { max-width: 1320px; padding: 32px clamp(24px, 4vw, 64px) 72px; }
h1 { font-size: clamp(30px, 3vw, 40px); letter-spacing: -.05em; font-weight: 600; }
.page-head { margin-bottom: 32px; }
.primary, .outline, .danger { border-radius: 9px; min-height: 42px; }
.primary { box-shadow: 0 2px 8px var(--shadow); }
.library-toolbar { gap: 16px; padding: 0; margin-bottom: 30px; border: 0; }
.search { width: min(100%, 400px); min-height: 44px; background: transparent; border-color: var(--line-soft); }
.library-controls { display: flex; align-items: center; gap: 12px; }
.views { background: transparent; border-color: var(--line-soft); }
.views [aria-pressed='true'] { background: var(--hover); color: var(--text); }
.files.grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 28px 22px; }
.file { border: 0; border-radius: 0; background: transparent; overflow: visible; }
.file:hover { background: transparent; }
.cover { aspect-ratio: 4 / 3; border: 1px solid var(--line-soft); border-radius: 13px; background: var(--side); color: var(--muted); }
.cover img { object-fit: contain; padding: 12px; }
.file:hover .cover { border-color: var(--quiet); background: var(--panel); }
.file:focus-visible { border-radius: 13px; outline-offset: 5px; }
.file-info { padding: 13px 2px 0; gap: 7px; }
.file-info strong { font-size: 13px; font-weight: 550; letter-spacing: -.01em; }
.file-meta { display: flex; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 11px; }
.file-info .file-meta span { padding: 0; }
.file-folder { font-size: 11px; color: var(--quiet); }
.rows { gap: 0; border-top: 1px solid var(--line-soft); }
.rows .file { padding: 14px 0; border-bottom: 1px solid var(--line-soft); gap: 16px; }
.rows .cover { width: 64px; border-radius: 8px; }
.rows .cover img { padding: 4px; }
.rows .file-info { flex: 1; padding: 0; gap: 6px; }
.rows .file-meta { justify-content: flex-start; gap: 20px; }
.empty { background: transparent; border-style: dashed; }
.entries { gap: 0; border-top: 1px solid var(--line-soft); }
.entry { background: transparent; border: 0; border-bottom: 1px solid var(--line-soft); border-radius: 0; padding: 16px 4px; }
@media (max-width: 1000px) and (min-width: 761px) {
  :root { --side-width: 200px; }
  .main { padding-inline: 28px; }
  .files.grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); gap: 22px 16px; }
}
@media (max-width: 760px) {
  .side { background: var(--side); }
  .top { min-height: 64px; padding-inline: 16px; }
  .main { padding: 22px 20px 48px; }
  .page-head { margin-bottom: 24px; }
  .library-toolbar { flex-wrap: wrap; margin-bottom: 24px; gap: 12px; }
  .library-toolbar .search { width: 100%; }
  .library-controls { width: 100%; justify-content: space-between; }
  .files.grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 12px; }
  .cover { border-radius: 10px; }
  .cover img { padding: 7px; }
  .file-info { gap: 6px; }
  .file-meta { flex-wrap: wrap; gap: 3px 8px; }
}
@media (max-width: 350px) {
  .main { padding-inline: 14px; }
  .files.grid { grid-template-columns: 1fr; }
}


.profile-avatar { display: grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 12px; background: var(--accent-panel); color: var(--accent); }
.profile-avatar[data-tone='1'] { background: light-dark(#e0ede9, #213b36); color: light-dark(#2d6053, #a5cdbf); }
.profile-avatar[data-tone='2'] { background: light-dark(#eee5da, #3a3027); color: light-dark(#76562f, #d6bea0); }
.profile-avatar[data-tone='3'] { background: light-dark(#ece3ed, #352c3d); color: light-dark(#715377, #c9b3d3); }
.top { display: none; }
.main { padding-top: 48px; }
@media (max-width: 1000px) and (min-width: 761px) {
  :root { --side-width: 232px; }
  .side { padding-inline: 14px; }
}
@media (max-width: 760px) {
  .top { display: flex; min-height: 60px; }
  .main { padding-top: 14px; }
  .side { padding-top: 22px; }
}
@media (max-height: 510px) {
  .side { gap: 14px; }
}

.top { display: flex; justify-content: flex-end; min-height: 72px; }
.top > .mobile-only { margin-right: auto; }
.main { padding-top: 12px; }
.profile-menu { position: relative; }
.profile-menu > summary { display: flex; align-items: center; gap: 8px; padding: 4px; cursor: pointer; list-style: none; border-radius: 12px; color: var(--muted); }
.profile-menu > summary::-webkit-details-marker { display: none; }
.profile-menu > summary:hover, .profile-menu[open] > summary { background: var(--hover); }
.profile-avatar img { width: 100%; height: 100%; border-radius: inherit; object-fit: cover; }
.profile-dropdown { position: absolute; z-index: 4; right: 0; top: calc(100% + 10px); width: min(280px, calc(100vw - 32px)); padding: 8px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 16px 48px var(--shadow); }
.profile-dropdown .account { padding: 12px 10px 16px; margin-bottom: 5px; border-bottom: 1px solid var(--line-soft); }
.profile-dropdown .account small { white-space: normal; overflow-wrap: anywhere; }
.profile-dropdown > button, .profile-dropdown > a { display: flex; align-items: center; gap: 10px; min-height: 44px; width: 100%; padding: 10px; border: 0; border-radius: 7px; color: var(--text); background: transparent; text-align: left; }
.profile-dropdown > button:hover, .profile-dropdown > a:hover { background: var(--hover); }
.profile-theme { display: flex; align-items: center; justify-content: space-between; padding-inline: 10px 2px; min-height: 44px; color: var(--muted); font-size: 13px; }
.picture-settings { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.picture-settings .profile-avatar { width: 56px; height: 56px; border-radius: 16px; }
.picture-upload { position: relative; cursor: pointer; }
.picture-upload:focus-within { outline: 2px solid var(--accent); outline-offset: 3px; }
.picture-upload input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
@media (max-width: 760px) { .top { min-height: 68px; } }

/* Compact navigation leaves the working area to media. */
:root { --side-width: 208px; }
.side { padding: 22px 12px; gap: 22px; }
.side-brand { padding-inline: 8px; }
.brand .wordmark { width: 76px; }
.brand > img:first-child { width: 28px; height: 28px; }
.switch { min-height: 56px; padding: 10px 8px; gap: 8px; border-radius: 10px; }
.switch .workspace-icon { width: 28px; height: 28px; border-radius: 8px; }
.switch strong { font-size: 12px; font-weight: 560; }
.switch small { font-size: 10px; }
.nav { gap: 4px; }
.nav a { min-height: 40px; padding: 9px 10px; font-size: 12px; border-radius: 7px; }
.side-folders .nav a { min-height: 36px; font-size: 12px; }
.side-label { padding-inline: 10px 2px; letter-spacing: .02em; }
.top { min-height: 64px; padding-inline: clamp(20px, 2.2vw, 40px); }
.main { max-width: none; padding: 14px clamp(20px, 2.2vw, 40px) 56px; }
h1 { font-size: clamp(28px, 2.5vw, 36px); letter-spacing: -.045em; }
.page-head { margin-bottom: 26px; }
.library-toolbar { margin-bottom: 24px; }
.files.grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 236px), 1fr)); gap: 26px 18px; }
.cover { aspect-ratio: 16 / 11; border-radius: 10px; }
.file-info { padding-top: 11px; }
.search { background: var(--side); border-color: var(--line-soft); }
.outline { background: transparent; }
.back-link { display: inline-flex; gap: 8px; align-items: center; color: var(--muted); margin-bottom: 18px; font-size: 12px; min-height: 32px; }
.back-link:hover { color: var(--text); }
.upload-page { width: min(100%, 1000px); margin-inline: auto; }
.upload-page .page-head { margin-bottom: 24px; }
.storage-meter { margin-bottom: 24px; display: grid; gap: 7px; }
.storage-meter > div, .upload-summary { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.storage-meter small { font-size: 11px; }
.storage-meter meter, progress { width: 100%; height: 5px; border: 0; border-radius: 5px; overflow: hidden; background: var(--line-soft); accent-color: var(--accent); }
progress::-webkit-progress-bar { background: var(--line-soft); }
progress::-webkit-progress-value, meter::-webkit-meter-optimum-value { background: var(--accent); }
progress::-moz-progress-bar { background: var(--accent); }
.storage-meter meter { height: 9px; }
.storage-meter meter::-webkit-meter-bar { background: var(--line-soft); border: 0; }
.upload-drop { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 40px 20px; border: 1px dashed var(--quiet); border-radius: 12px; background: var(--side); color: var(--muted); margin-bottom: 26px; }
.upload-drop > span { font-size: 12px; }
.upload-summary { margin-bottom: 10px; }
.batch-progress { margin-bottom: 18px; }
.upload-queue { border-top: 1px solid var(--line-soft); }
.upload-entry { display: flex; align-items: center; gap: 14px; padding: 18px 0; border-bottom: 1px solid var(--line-soft); }
.upload-entry > svg { color: var(--muted); flex: none; }
.upload-file { flex: 1; min-width: 0; display: grid; gap: 7px; }
.upload-file strong { font-size: 13px; font-weight: 550; overflow-wrap: anywhere; }
.upload-file-meta { display: flex; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 11px; }
.upload-file .error { margin: 0; font-size: 12px; }
.upload-actions { margin-top: 24px; }
.storage-settings { max-width: 660px; }
.storage-totals { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-block: 12px 28px; padding-block: 16px; border-bottom: 1px solid var(--line-soft); }
.storage-totals > div { display: grid; gap: 8px; }
.storage-totals span { color: var(--muted); font-size: 12px; }
.storage-totals strong { font-size: 24px; font-weight: 550; letter-spacing: -.035em; }
@media (max-width: 1000px) and (min-width: 761px) {
  :root { --side-width: 192px; }
  .files.grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); }
}
@media (max-width: 760px) {
  .side { width: min(256px, calc(100% - 44px)); padding: 22px 14px; }
  .top { min-height: 60px; padding-inline: 16px; }
  .main { padding: 12px 18px 40px; }
  .files.grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 12px; }
  .cover { aspect-ratio: 4 / 3; }
  .upload-drop { padding-block: 28px; }
  .upload-entry { gap: 10px; }
  .upload-file strong { font-size: 12px; }
}
@media (max-width: 350px) {
  .main { padding-inline: 12px; }
  .files.grid { grid-template-columns: 1fr; }
  .storage-totals { grid-template-columns: 1fr; }
}

.settings-page { min-height: 100dvh; background: var(--bg); }
.settings-header { display: flex; align-items: center; justify-content: space-between; padding: 18px clamp(20px, 4vw, 48px); border-bottom: 1px solid var(--line-soft); }
.settings-main { width: min(100% - 40px, 1040px); margin: 0 auto; padding: 35px 0 80px; }
.settings-back { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.settings-back:hover { color: var(--text); }
.settings-heading { margin: 42px 0 36px; }
.settings-heading h1 { font-size: clamp(30px, 4vw, 42px); letter-spacing: -.04em; margin-bottom: 12px; }
.settings-layout { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 40px; align-items: start; }
.settings-nav { display: grid; gap: 4px; }
.settings-nav a { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 8px; color: var(--muted); }
.settings-nav a:hover { color: var(--text); background: var(--hover); }
.settings-content { display: grid; gap: 20px; min-width: 0; }
.settings-section { padding: clamp(20px, 3vw, 30px); border: 1px solid var(--line); border-radius: 14px; background: var(--side); scroll-margin-top: 20px; }
.settings-section-head { padding-bottom: 22px; margin-bottom: 24px; border-bottom: 1px solid var(--line-soft); }
.settings-section-head h2 { margin-bottom: 7px; }
.settings-section .form { max-width: 460px; }
.settings-section .form .primary { justify-self: start; }
.settings-section .form .meta { margin: 0; line-height: 1.5; }
.settings-notice { padding: 12px 15px; border: 1px solid var(--line); border-radius: 8px; background: var(--accent-panel); color: var(--text); }
.picture-settings { padding-bottom: 26px; margin-bottom: 24px; border-bottom: 1px solid var(--line-soft); }
.picture-settings > div { flex: 1; min-width: 130px; }
.picture-settings strong, .picture-settings small { display: block; }
.picture-settings small { margin-top: 5px; }
@media (max-width: 650px) {
  .settings-main { width: min(100% - 32px, 1040px); padding-top: 25px; }
  .settings-heading { margin: 32px 0 25px; }
  .settings-layout { grid-template-columns: 1fr; gap: 18px; }
  .settings-nav { display: flex; border-bottom: 1px solid var(--line-soft); }
  .settings-nav a { padding: 10px 12px; }
}

