/* File lister – UI */

:root, [data-theme="dark"] {
  --bg: #0F1115; --bar: #12151B; --surface: #151820; --surface-2: #171A21; --raised: #1A1E27; --hover: #1B1F29;
  --line: #232733; --line-soft: #1E222C; --line-strong: #2A2F3A; --chip: #262B36;
  --text: #E7E9EE; --text-2: #C9CED8; --muted: #9AA1AE; --faint: #8A91A0; --dim: #5F6675;
  --accent: #F2B84B; --on-accent: #1A1300; --accent-text: #F2D08F; --accent-soft: rgba(242,184,75,.10); --accent-line: rgba(242,184,75,.35);
  --ok: #86EFAC; --ok-soft: rgba(134,239,172,.12); --err: #FCA5A5; --err-soft: rgba(252,165,165,.12);
  --shadow: 0 18px 40px rgba(0,0,0,.45); --overlay: rgba(5,6,8,.72);
  --k-dir: #F2B84B; --k-dir-bg: rgba(242,184,75,.12);
  --k-image: #7DD3FC; --k-image-bg: rgba(125,211,252,.12);
  --k-video: #C4B5FD; --k-video-bg: rgba(196,181,253,.12);
  --k-audio: #86EFAC; --k-audio-bg: rgba(134,239,172,.12);
  --k-archive: #FDBA74; --k-archive-bg: rgba(253,186,116,.12);
  --k-pdf: #FCA5A5; --k-pdf-bg: rgba(252,165,165,.12);
  --k-doc: #CBD5E1; --k-doc-bg: rgba(203,213,225,.10);
  color-scheme: dark;
}
[data-theme="light"] {
  --bg: #F5F6F8; --bar: #FFFFFF; --surface: #FFFFFF; --surface-2: #FFFFFF; --raised: #FFFFFF; --hover: #F0F2F5;
  --line: #E3E6EB; --line-soft: #EDEFF2; --line-strong: #D5DAE1; --chip: #E9ECF0;
  --text: #14171C; --text-2: #3D4452; --muted: #5B6372; --faint: #687080; --dim: #9AA1AE;
  --accent: #F2B84B; --on-accent: #1A1300; --accent-text: #8A5A0E; --accent-soft: rgba(242,184,75,.14); --accent-line: rgba(186,117,23,.45);
  --ok: #23703F; --ok-soft: #E3F4E8; --err: #B42318; --err-soft: #FDECEA;
  --shadow: 0 14px 34px rgba(20,23,28,.14); --overlay: rgba(20,23,28,.55);
  --k-dir: #9A6412; --k-dir-bg: #FBF1E1;
  --k-image: #2F6E93; --k-image-bg: #E6F2FA;
  --k-video: #6B55B0; --k-video-bg: #F1EDFB;
  --k-audio: #2E7A4B; --k-audio-bg: #E8F5EC;
  --k-archive: #A3501A; --k-archive-bg: #FDEEE3;
  --k-pdf: #B42318; --k-pdf-bg: #FDECEA;
  --k-doc: #475467; --k-doc-bg: #EEF0F3;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; background: var(--bg); color: var(--text);
  font: 15px/1.45 Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--text-2); }
a:hover { color: var(--accent); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }
code, .mono { font-family: "JetBrains Mono", ui-monospace, monospace; }
h1, h2, h3 { font-family: "Space Grotesk", Inter, sans-serif; font-weight: 600; letter-spacing: -.01em; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.i { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.i-xs { width: 13px; height: 13px; } .i-sm { width: 15px; height: 15px; } .i-lg { width: 24px; height: 24px; } .i-xl { width: 44px; height: 44px; stroke-width: 1.5; }

.muted { color: var(--muted); } .small { font-size: 13px; } .strong { font-weight: 600; } .block { display: block; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.show-sm, .show-sm-inline { display: none !important; }

/* ---- Buttons, fields ---- */
.btn, .btn-icon, .btn-ghost {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line-strong);
  background: var(--surface-2); color: var(--text); text-decoration: none; white-space: nowrap; font-size: 15px;
  transition: background .15s, border-color .15s, transform .05s;
}
.btn:hover, .btn-icon:hover { background: var(--hover); color: var(--text); }
.btn:active, .btn-icon:active { transform: scale(.98); }
.btn-primary { background: var(--accent); border-color: transparent; color: var(--on-accent); font-weight: 600; }
.btn-primary:hover { background: #F5C566; color: var(--on-accent); }
.btn-icon { width: 44px; padding: 0; }
.btn-ghost { border-color: transparent; background: transparent; height: 40px; padding: 0 12px; font-size: 14px; }
.btn-ghost:hover { background: var(--hover); }
.btn-sm { height: 40px; padding: 0 12px; font-size: 14px; border-radius: 10px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .6; cursor: progress; }
.danger { color: var(--err) !important; }
.link { background: none; border: 0; color: var(--accent-text); text-decoration: underline; padding: 8px; }

.pill { display: inline-flex; align-items: center; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; line-height: 1.5; }
.pill-ok { background: var(--ok-soft); color: var(--ok); }
.pill-err { background: var(--err-soft); color: var(--err); }
.pill-accent { background: var(--accent); color: var(--on-accent); }
.dot { width: 10px; height: 10px; border-radius: 99px; display: inline-block; background: var(--dim); flex: none; }
.dot-ok { background: var(--ok); }

.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
.field input, .select, .field textarea {
  height: 44px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 10px;
  background: var(--bg); color: var(--text); font-size: 15px; width: 100%; min-width: 0;
}
.field input:focus, .select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.field .hint { font-size: 12px; color: var(--faint); }
.field .opt { color: var(--faint); }
.input-row { display: flex; gap: 8px; }
.input-row input { flex: 1; }
.check { display: flex; align-items: center; gap: 10px; min-height: 44px; font-size: 14px; color: var(--text-2); cursor: pointer; }
.check input, .sel input { width: 18px; height: 18px; accent-color: var(--accent); margin: 0; cursor: pointer; }
.select { width: auto; padding-right: 34px; appearance: none; cursor: pointer; background-color: var(--surface);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239AA1AE' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; background-size: 16px; font-size: 14px; }
.otp { font-family: "JetBrains Mono", monospace; font-size: 24px !important; letter-spacing: .3em; text-align: center; height: 56px !important; }

.card { border: 1px solid var(--line); border-radius: 16px; background: var(--surface); padding: 22px 24px; }
.card-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 4px; }
.card-head .card-title { margin-right: auto; }
.card-title { margin: 0 0 12px; font-size: 20px; }
.card-head .card-title { margin-bottom: 0; }
.sub-title { margin: 18px 0 6px; font-size: 15px; }
.alert { padding: 12px 14px; border-radius: 12px; background: var(--accent-soft); border: 1px solid var(--accent-line); color: var(--accent-text); font-size: 14px; }
.alert-err { background: var(--err-soft); border-color: transparent; color: var(--err); }

/* ---- Top bar ---- */
.topbar { position: sticky; top: 0; z-index: 30; background: var(--bar); border-bottom: 1px solid var(--line); }
.topbar-in { max-width: 1248px; margin: 0 auto; padding: 12px 24px; display: flex; align-items: center; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); min-width: 0; margin-right: auto; flex: 0 1 auto; }
.brand:hover { color: var(--text); }
.brand-mark { width: 38px; height: 38px; border-radius: 11px; background: var(--accent); color: var(--on-accent); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.brand-mark-lg { width: 56px; height: 56px; border-radius: 16px; }
.brand-name { font-family: "Space Grotesk", sans-serif; font-weight: 600; font-size: 19px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search { flex: 1 1 260px; max-width: 440px; display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--bg); color: var(--faint); }
.search:focus-within { border-color: var(--accent); }
.search input { flex: 1; min-width: 0; border: 0; background: transparent; outline: none; color: var(--text); }
.search input::placeholder { color: var(--faint); }
.search input::-webkit-search-cancel-button { -webkit-appearance: none; display: none; }

.search-close { display: none; width: 36px; height: 36px; margin-right: -8px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); align-items: center; justify-content: center; }
.search.open .search-close { display: inline-flex; }
kbd { font-family: "JetBrains Mono", monospace; font-size: 12px; padding: 1px 7px; border: 1px solid var(--line-strong); border-radius: 6px; color: var(--faint); }
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.topbar-actions form { margin: 0; display: flex; }
#theme-toggle > span { display: none; }
[data-theme-pref="dark"] #theme-toggle .pref-dark, [data-theme-pref="light"] #theme-toggle .pref-light, [data-theme-pref="system"] #theme-toggle .pref-system { display: inline-flex; }
.menu { position: relative; }
.menu-btn { position: relative; }
.menu-btn .dot { position: absolute; top: 9px; right: 9px; width: 8px; height: 8px; background: var(--accent); }
.menu-pop { position: absolute; right: 0; top: 50px; min-width: 220px; padding: 6px; border: 1px solid var(--line-strong); border-radius: 14px; background: var(--raised); box-shadow: var(--shadow); z-index: 40; }
.menu-pop a, .menu-pop button { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 0 12px; border: 0; border-radius: 10px; background: none; color: var(--text); text-decoration: none; font-size: 15px; text-align: left; }
.menu-pop a:hover, .menu-pop button:hover { background: var(--hover); color: var(--text); }
.menu-pop .pill { margin-left: auto; }
.menu-pop form { display: block; }

/* ---- Page ---- */
body { display: flex; flex-direction: column; }
body > main { flex: 1 0 auto; width: 100%; }
.site-foot { flex-shrink: 0; max-width: 1248px; width: 100%; margin: 0 auto; padding: 18px 24px calc(22px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line-soft); text-align: center; font-size: 12.5px; line-height: 1.6; color: var(--muted); }
.site-foot p { margin: 0; }
.site-foot-text { color: var(--text-2); margin-bottom: 4px !important; overflow-wrap: anywhere; }
.site-foot a { color: inherit; text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.site-foot a:hover { color: var(--text); text-decoration-color: currentColor; }
.wrap { max-width: 1248px; margin: 0 auto; padding: 26px 24px 64px; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 14px; color: var(--faint); }
.crumbs a { color: var(--faint); text-decoration: none; }
.crumbs a:hover { color: var(--accent); }
.crumbs [aria-current] { color: var(--text); }
.titlebar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; margin: 8px 0 20px; }
.titlebar-text { flex: 1 1 280px; min-width: 0; }
.titlebar h1 { margin: 0; font-size: 34px; letter-spacing: -.02em; overflow-wrap: anywhere; }
.meta { margin: 6px 0 0; color: var(--muted); font-size: 13px; }
.titlebar-tools { display: flex; gap: 10px; align-items: center; }
.titlebar-tools .select { height: 44px; border-radius: 12px; }

.dropzone { width: 100%; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 14px; padding: 14px 18px; margin-bottom: 16px; border: 1.5px dashed var(--accent-line); border-radius: 16px; background: var(--accent-soft); color: var(--accent-text); text-align: center; }
.dz-main { font-weight: 500; }
.dz-btns { display: flex; gap: 8px; }
.dz-btns .btn { background: var(--surface); }
.title-link { width: 36px; height: 36px; margin-left: 8px; vertical-align: middle; border: 0; background: transparent; color: var(--muted); }
.title-link .i { width: 18px; height: 18px; }
.folder-pick { max-height: 50vh; overflow-y: auto; margin: 6px -6px 0; display: flex; flex-direction: column; gap: 2px; }
.folder-pick button { display: flex; align-items: center; gap: 10px; min-height: 42px; padding: 0 10px; border: 0; border-radius: 10px; background: transparent; color: var(--text); text-align: left; font-size: 14px; }
.folder-pick button:hover { background: var(--hover); }
.folder-pick button.picked { background: var(--accent-soft); color: var(--text); font-weight: 600; }
.folder-pick button:disabled { opacity: .4; cursor: not-allowed; }
.folder-pick .i { color: var(--k-dir); }

.selbar { position: sticky; top: 70px; z-index: 20; display: flex; flex-wrap: wrap; align-items: center; gap: 4px; padding: 6px 8px 6px 18px; margin-bottom: 12px; border-radius: 14px; background: var(--chip); box-shadow: var(--shadow); }
.selbar-count { font-weight: 600; margin-right: auto; }
.selbar .btn-icon { border: 0; background: transparent; width: 40px; height: 40px; }

/* ---- List ---- */
.list { border: 1px solid var(--line); border-radius: 16px; background: var(--surface); overflow: hidden; }
.list-head, .row { display: grid; grid-template-columns: minmax(0,1fr) 100px 170px 96px 96px; gap: 16px; align-items: center; padding: 0 20px; }
.list-head.has-sel, .row.has-sel { grid-template-columns: 24px minmax(0,1fr) 100px 170px 96px 96px; }
.list-head { height: 44px; border-bottom: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.c-size, .c-dl { text-align: right; }
.c-size { font-size: 13px; color: var(--text-2); }
.c-date { font-size: 14px; color: var(--muted); }
.c-dl { font-size: 13px; color: var(--muted); }
.c-act { display: flex; justify-content: flex-end; gap: 2px; }
.c-act .btn-icon { border: 0; background: transparent; color: var(--muted); }
.c-act .btn-icon:hover { background: var(--hover); color: var(--text); }
.row { min-height: 58px; border-bottom: 1px solid var(--line-soft); }
.row:last-child { border-bottom: 0; }
.row:hover { background: var(--hover); }
.row.is-dir + .row:not(.is-dir) { border-top: 1px solid var(--line-strong); }
.row.selected { background: var(--accent-soft); }
.row-up { text-decoration: none; color: var(--text); }
.name { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 9px 0; text-decoration: none; color: var(--text); }
.name:hover { color: var(--text); }
.ico { width: 38px; height: 38px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; flex: none; background: var(--k-doc-bg); color: var(--k-doc); }
.k-dir { background: var(--k-dir-bg); color: var(--k-dir); } .k-dir .i { width: 20px; height: 20px; }
.k-image { background: var(--k-image-bg); color: var(--k-image); }
.k-video { background: var(--k-video-bg); color: var(--k-video); }
.k-audio { background: var(--k-audio-bg); color: var(--k-audio); }
.k-archive, .k-disc { background: var(--k-archive-bg); color: var(--k-archive); }
.k-pdf { background: var(--k-pdf-bg); color: var(--k-pdf); }
.k-up { background: var(--chip); color: var(--text-2); }
.label { min-width: 0; display: flex; flex-direction: column; }
.label .n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.is-dir .label .n, .row-up .n { font-weight: 600; }
.label .sub { display: none; font-size: 12px; color: var(--muted); margin-top: 2px; }
.row-up .label .sub { display: inline; font-size: 14px; }
.row-up .label { flex-direction: row; align-items: baseline; gap: 10px; }
.sel { display: flex; align-items: center; }
.empty { padding: 48px 20px; text-align: center; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 6px; }
.empty .i-xl { color: var(--dim); margin-bottom: 6px; }
.empty-title { margin: 0; font-weight: 600; color: var(--text); font-size: 17px; }
.empty-sub { margin: 0 0 12px; }
.empty-page { padding-top: 15vh; }

/* Search results */
.search-results { margin-bottom: 20px; }
.sr-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; color: var(--muted); font-size: 14px; }
.sr-path { font-size: 12px; color: var(--muted); }

/* README */
.readme { margin-top: 20px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); padding: 20px 24px; }
.readme-head { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.md { color: var(--text-2); line-height: 1.65; overflow-wrap: anywhere; }
.md > :first-child { margin-top: 0; }
.md > :last-child { margin-bottom: 0; }
.md h2, .md h3, .md h4, .md h5, .md h6 { color: var(--text); margin: 1.2em 0 .4em; line-height: 1.25; }
.md h2 { font-size: 22px; } .md h3 { font-size: 18px; } .md h4, .md h5, .md h6 { font-size: 16px; }
.md p, .md ul, .md ol, .md blockquote, .md pre { margin: 0 0 .9em; }
.md a { color: var(--accent-text); }
.md code { font-size: .9em; padding: 2px 6px; border-radius: 6px; background: var(--hover); }
.md pre { padding: 14px 16px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); overflow-x: auto; }
.md pre code { padding: 0; background: none; }
.md blockquote { padding: 4px 0 4px 14px; border-left: 3px solid var(--line-strong); color: var(--muted); }
.md img { max-width: 100%; border-radius: 10px; }
.md hr { border: 0; border-top: 1px solid var(--line); margin: 1.2em 0; }

/* Mobile upload button, drop overlay */
.fab { position: fixed; right: 16px; bottom: calc(20px + env(safe-area-inset-bottom)); z-index: 25; height: 56px; padding: 0 22px; border: 0; border-radius: 18px; background: var(--accent); color: var(--on-accent); font-weight: 600; display: inline-flex; align-items: center; gap: 10px; box-shadow: 0 10px 24px rgba(154,100,18,.3); }
.fab .i { width: 20px; height: 20px; }
.drop-overlay { position: fixed; inset: 0; z-index: 60; background: var(--overlay); display: flex; align-items: center; justify-content: center; padding: 24px; }
.drop-overlay > div { border: 2px dashed var(--accent); border-radius: 24px; padding: 48px 64px; text-align: center; color: var(--accent-text); background: var(--surface); font-size: 18px; font-weight: 500; }
.drop-overlay p { margin: 12px 0 0; }

/* Upload panel */
.uploads { position: fixed; right: 24px; bottom: 24px; z-index: 50; width: 380px; max-width: calc(100vw - 32px); border: 1px solid var(--line-strong); border-radius: 16px; background: var(--raised); box-shadow: var(--shadow); overflow: hidden; }
.uploads-head { display: flex; align-items: center; gap: 8px; padding: 10px 10px 10px 16px; border-bottom: 1px solid var(--line); }
.uploads-head strong { margin-right: auto; }
.uploads-head .btn-icon { width: 36px; height: 36px; border: 0; background: transparent; color: var(--muted); }
.uploads-list { max-height: 300px; overflow-y: auto; padding: 6px 16px 12px; }
.uploads.collapsed .uploads-list { display: none; }
.up { padding: 10px 0; border-bottom: 1px solid var(--line-soft); }
.up:last-child { border-bottom: 0; }
.up-top { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.up-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.up-pct { font-family: "JetBrains Mono", monospace; font-size: 12px; color: var(--accent-text); flex: none; }
.bar { height: 6px; border-radius: 99px; background: var(--line-strong); margin-top: 8px; overflow: hidden; }
.bar > span { display: block; height: 100%; width: 0; border-radius: 99px; background: var(--accent); transition: width .2s; }
.up-sub { margin-top: 6px; font-size: 12px; color: var(--muted); font-family: "JetBrains Mono", monospace; }
.up.done .up-pct { color: var(--ok); } .up.done .bar > span { background: var(--ok); }
.up.err .up-pct, .up.err .up-sub { color: var(--err); } .up.err .bar > span { background: var(--err); }
.up.skip .up-pct { color: var(--muted); }

/* Dialog */
.modal { position: fixed; inset: 0; z-index: 70; background: var(--overlay); display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal-box { width: 100%; max-width: 460px; border: 1px solid var(--line-strong); border-radius: 20px; background: var(--surface-2); box-shadow: var(--shadow); padding: 22px; }
.modal-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.modal-head h2 { margin: 0; font-size: 20px; }
.modal-head p { margin: 2px 0 0; font-size: 13px; color: var(--muted); }
.modal-ico { width: 44px; height: 44px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.modal-ico.danger { background: var(--err-soft); }
.modal-body { color: var(--text-2); font-size: 15px; }
.modal-body p { margin: 0 0 12px; }
.modal-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.modal-error { color: var(--err); font-size: 13px; margin-top: 8px; }
.compare { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; margin: 4px 0 6px; }
.compare > div { padding: 12px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); min-width: 0; }
.compare > div.new { background: var(--accent-soft); border-color: var(--accent-line); }
.compare small { display: block; font-size: 12px; color: var(--muted); }
.compare .new small { color: var(--accent-text); }
.compare b { display: block; margin-top: 4px; font-weight: 500; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.compare span { font-family: "JetBrains Mono", monospace; font-size: 12px; color: var(--muted); }
.conflict-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.conflict-actions .btn { height: auto; min-height: 50px; padding: 6px 14px; }
.conflict-actions .btn-stack { flex-direction: column; gap: 0; }
.conflict-actions .btn small { font-family: "JetBrains Mono", monospace; font-weight: 400; font-size: 12px; color: var(--muted); }
.codes { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; list-style: none; padding: 0; margin: 14px 0; }
.codes li { padding: 10px; border-radius: 10px; background: var(--bg); border: 1px solid var(--line); text-align: center; font-size: 15px; letter-spacing: .05em; }

/* Toasts */
.toasts { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 90; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: max-content; max-width: calc(100vw - 32px); }
.toast { padding: 11px 16px; border-radius: 12px; background: var(--text); color: var(--bg); font-size: 14px; font-weight: 500; box-shadow: var(--shadow); animation: toast-in .2s ease-out; }
.toast.err { background: var(--err); color: #fff; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

/* ---- Preview (lightbox) ---- */
.lb { position: fixed; inset: 0; z-index: 80; background: #08090C; color: #E7E9EE; display: flex; flex-direction: column; }
.lb-top { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid #1A1D25; padding-top: max(12px, env(safe-area-inset-top)); }
.lb-title { flex: 1; min-width: 0; }
.lb-title b { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-title span { font-family: "JetBrains Mono", monospace; font-size: 12px; color: #9AA1AE; }
.lb .btn, .lb .btn-icon { background: #12151B; border-color: #2A2F3A; color: #E7E9EE; }
.lb .btn-primary { background: #F2B84B; color: #1A1300; border-color: transparent; }
.lb-stage { position: relative; flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 16px 84px; }
.lb-stage > img, .lb-stage > video { max-width: 100%; max-height: 100%; border-radius: 8px; object-fit: contain; }
.lb-stage > iframe { width: 100%; height: 100%; border: 0; border-radius: 8px; background: #fff; }
.lb-stage > audio { width: min(560px, 100%); }
.lb-audio { display: flex; flex-direction: column; align-items: center; gap: 20px; width: min(560px, 100%); }
.lb-audio .ico { width: 120px; height: 120px; border-radius: 28px; }
.lb-audio .ico .i { width: 52px; height: 52px; stroke-width: 1.4; }
.lb-audio audio { width: 100%; }
.lb-text { width: 100%; height: 100%; overflow: auto; margin: 0; padding: 18px 20px; border-radius: 10px; background: #0F1115; border: 1px solid #1E222C; font-size: 13px; line-height: 1.55; tab-size: 4; }
.lb-text code { background: none !important; padding: 0 !important; font-family: "JetBrains Mono", monospace; white-space: pre; }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 56px !important; height: 56px !important; border-radius: 99px !important; }
.lb-prev { left: 16px; } .lb-next { right: 16px; }
.lb-bottom { display: flex; align-items: center; gap: 20px; padding: 12px 16px; padding-bottom: max(12px, env(safe-area-inset-bottom)); border-top: 1px solid #1A1D25; font-family: "JetBrains Mono", monospace; font-size: 12px; color: #9AA1AE; }
.lb-bottom span + span::before { content: "·"; margin-right: 20px; color: #5F6675; }
.lb-loading { color: #9AA1AE; }
.lb-editor { width: 100%; height: 100%; display: flex; flex-direction: column; gap: 10px; }
.lb-editor textarea { flex: 1; width: 100%; resize: none; padding: 16px 18px; border-radius: 10px; border: 1px solid #2A2F3A; background: #0F1115; color: #E7E9EE; font: 13px/1.55 "JetBrains Mono", monospace; tab-size: 4; outline: none; }
.lb-editor textarea:focus { border-color: #F2B84B; }
.lb-editor-bar { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.lb-ed-tabs { align-self: flex-start; display: inline-flex; gap: 2px; padding: 3px; border-radius: 10px; background: #1A1D24; border: 1px solid #2A2F3A; }
.lb-ed-tabs button { border: 0; background: transparent; color: #9AA1AE; font: inherit; font-size: 13px; padding: 6px 12px; border-radius: 7px; cursor: pointer; }
.lb-ed-tabs button.on { background: #2A2F3A; color: #E7E9EE; }
.lb-ed-preview { flex: 1; overflow: auto; margin: 0; }
.lb-editor textarea[hidden], .lb-ed-preview[hidden] { display: none; }
.lb-editor-bar .muted { margin-right: auto; color: #9AA1AE; }
.lb-note { text-align: center; color: #9AA1AE; display: flex; flex-direction: column; gap: 14px; align-items: center; }

/* ---- Login, installer ---- */
.auth { min-height: 0; max-width: 440px; margin: 0 auto; padding: 16px 20px 28px; display: flex; flex-direction: column; }
.auth-wide { max-width: 520px; }
.auth-back { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; color: var(--muted); text-decoration: none; font-size: 14px; }
.auth-center { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 20px; padding: 20px 0; }
.auth-head { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; }
.auth-head h1 { margin: 0; font-size: 26px; letter-spacing: -.02em; }
.auth-head p { margin: 0; color: var(--muted); line-height: 1.5; }
.auth-card { display: flex; flex-direction: column; gap: 16px; border-radius: 20px; }
.auth-foot { margin: 0; text-align: center; font-size: 14px; color: var(--muted); }
.auth-foot a { color: var(--accent-text); }
.auth-note { margin: 0; display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 12px; color: var(--faint); }
.steps { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 13px; color: var(--muted); }
.steps li { display: flex; align-items: center; gap: 6px; }
.steps li > span { width: 22px; height: 22px; border-radius: 99px; background: var(--chip); color: var(--muted); font-weight: 600; font-size: 12px; display: inline-flex; align-items: center; justify-content: center; }
.steps .cur { color: var(--text); } .steps .cur > span { background: var(--accent); color: var(--on-accent); }
.steps .done { color: var(--ok); } .steps .done > span { background: var(--ok-soft); color: var(--ok); }
.steps .sep { width: 24px; height: 1px; background: var(--line-strong); }
.checks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.checks li { display: flex; align-items: center; gap: 10px; }
.checks .ok .dot { background: var(--ok); } .checks .bad .dot { background: var(--err); } .checks .warn .dot { background: var(--accent); }
.checks em { color: var(--faint); font-style: normal; }
.howto { margin: 0; padding-left: 20px; color: var(--text-2); font-size: 14px; line-height: 1.6; }
.qr { align-self: center; width: 208px; height: 208px; padding: 12px; border-radius: 14px; background: #fff; }
.qr svg { width: 100%; height: 100%; display: block; }
.secret { margin: 0; text-align: center; font-size: 15px; letter-spacing: .08em; color: var(--text-2); word-break: break-all; }

/* ---- Settings ---- */
.settings-title { margin: 0 0 18px; font-size: 30px; letter-spacing: -.02em; }
.settings { display: flex; gap: 28px; align-items: flex-start; }
.settings-nav { width: 240px; flex: none; position: sticky; top: 92px; display: flex; flex-direction: column; gap: 4px; padding: 8px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
.settings-tab { display: flex; flex-direction: column; gap: 1px; min-height: 52px; justify-content: center; padding: 8px 14px; border-radius: 12px; text-decoration: none; color: var(--text-2); }
.settings-tab:hover { background: var(--hover); color: var(--text); }
.settings-tab.active { background: var(--accent-soft); color: var(--text); }
.settings-tab b { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 15px; }
.settings-tab small { font-size: 12px; color: var(--muted); }
.tab-dot { width: 8px; height: 8px; border-radius: 99px; background: var(--accent); }
.settings-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.about { display: grid; grid-template-columns: 160px minmax(0,1fr); gap: 10px 16px; margin: 0; font-size: 14px; }
.about dt { color: var(--muted); }
.about dd { margin: 0; overflow-wrap: anywhere; }
.errlog { margin: 12px 0 0; max-height: 420px; overflow: auto; padding: 12px 14px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); font-family: "JetBrains Mono", monospace; font-size: 12px; line-height: 1.55; color: var(--text-2); white-space: pre-wrap; word-break: break-word; }
.update-box { margin-top: 14px; padding: 16px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); }
.update-box[data-state="new"] { background: var(--accent-soft); border-color: var(--accent-line); }
.update-box > p { margin: 0 0 12px; }
.update-title { font-weight: 600; color: var(--accent-text); margin-bottom: 6px; }
.update-notes { font-size: 14px; margin-bottom: 14px; }
.update-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; margin-top: 18px; }
.split { display: flex; flex-wrap: wrap; gap: 24px; }
.split > * { flex: 1 1 280px; }
.stack { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.stack .field { width: 100%; }
.stack-wide { align-items: stretch; gap: 22px; }
.tfa-box { padding: 16px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); align-self: flex-start; }
.tfa-box p { margin: 8px 0 14px; font-size: 14px; }
.row-flex { display: flex; align-items: center; gap: 8px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; }
.line { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line-soft); }
.line .grow { flex: 1; min-width: 0; }
.line-ico { width: 40px; height: 40px; border-radius: 10px; background: var(--hover); color: var(--text-2); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.empty-line { margin: 10px 0 0; color: var(--faint); font-size: 14px; }
.log-row { display: grid; grid-template-columns: 160px 140px minmax(0,1fr) auto; gap: 14px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line-soft); font-size: 14px; }
.log-row .mono { font-size: 13px; }
.backups { margin-top: 6px; }

/* ---- Phone ---- */
@media (max-width: 760px) {
  .hide-sm { display: none !important; }
  .show-sm { display: flex !important; }
  .show-sm-inline { display: inline-flex !important; }
  .topbar-in { padding: 10px 12px 10px 16px; gap: 4px; }
  .brand-mark:not(.brand-mark-lg) { width: 34px; height: 34px; border-radius: 10px; }
  .brand-name { font-size: 17px; }
  .topbar .btn-icon { border: 0; background: transparent; }
  .btn-login { width: 44px; padding: 0; }
  .search { display: none; }
  .search.open { display: flex; position: absolute; left: 12px; right: 12px; top: 10px; max-width: none; z-index: 2; background: var(--bar); }
  .wrap { padding: 16px 16px 100px; }
  .titlebar { margin: 4px 0 14px; gap: 10px; }
  .titlebar h1 { font-size: 28px; }
  .titlebar-text { flex-basis: 100%; }
  .titlebar-tools { width: 100%; justify-content: space-between; gap: 8px; }
  .titlebar-tools .sort { flex: 1; min-width: 0; }
  .titlebar-tools .select { width: 100%; }
  .titlebar-tools .btn-sm { height: 38px; padding: 0 10px; font-size: 13px; gap: 6px; }
  .titlebar-tools .select { height: 38px; border-radius: 10px; font-size: 13px; }
  .dropzone { display: none; }
  .list { border: 0; background: transparent; margin: 0 -8px; overflow: visible; }
  .list-head { display: none; }
  .row, .row.has-sel { grid-template-columns: minmax(0,1fr) auto; gap: 8px; padding: 0 8px; border-radius: 12px; border-bottom: 0; min-height: 60px; }
  .row.has-sel { grid-template-columns: auto minmax(0,1fr) auto; }
  .row[data-i] { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
  .row.is-dir + .row:not(.is-dir) { border-top: 1px solid var(--line-strong); border-radius: 0 0 12px 12px; margin-top: 4px; }
  .list:not(.selecting) .row:not(.selected) .sel { display: none; }
  .list:not(.selecting) .row.has-sel { grid-template-columns: minmax(0,1fr) auto; }
  .c-size, .c-date, .c-dl { display: none; }
  .c-act .btn-icon { display: none; }
  .ico { width: 42px; height: 42px; border-radius: 11px; }
  .label .sub { display: block; }
  .row-up .label { flex-direction: column; align-items: flex-start; gap: 0; }
  .row-up .label .sub { font-size: 12px; }
  .selbar { top: 66px; padding-left: 14px; }
  .selbar .btn-ghost span { display: none; }
  .selbar { gap: 0; padding-right: 4px; }
  .selbar .btn-ghost, .selbar .btn-icon { width: 36px; padding: 0; }
  .uploads { right: 12px; left: 12px; width: auto; bottom: calc(88px + env(safe-area-inset-bottom)); }
  .readme { padding: 16px 18px; }
  .lb-stage { padding: 8px; }
  .lb-nav { display: none !important; }
  .lb-top .btn span { display: none; }
  .lb-top .btn { width: 44px; padding: 0; }
  .lb-bottom { gap: 12px; flex-wrap: wrap; }
  .lb-bottom span + span::before { margin-right: 12px; }
  .modal { align-items: flex-end; padding: 0; }
  .modal-box { max-width: none; border-radius: 24px 24px 0 0; padding: 20px 20px calc(24px + env(safe-area-inset-bottom)); }
  .settings-title { font-size: 24px; margin-bottom: 12px; }
  .settings { flex-direction: column; gap: 16px; }
  .settings-nav { position: static; width: auto; max-width: none; flex-direction: row; gap: 8px; overflow-x: auto; margin: 0 -16px; padding: 0 16px 4px; border: 0; border-radius: 0; background: none; scrollbar-width: none; align-self: stretch; }
  .settings-tab { flex: none; min-height: 0; height: 40px; padding: 0 16px; border-radius: 99px; border: 1px solid var(--line-strong); }
  .settings-tab b { font-size: 14px; }
  .settings-tab small { display: none; }
  .settings-tab.active { background: var(--accent); color: var(--on-accent); border-color: transparent; }
  .settings-tab.active .tab-dot { background: var(--on-accent); }
  .settings-main { width: 100%; }
  .about { grid-template-columns: 1fr; gap: 2px; }
  .about dd { margin-bottom: 10px; }
  .card { padding: 18px; }
  .card-title { font-size: 18px; }
  .grid-2 { grid-template-columns: 1fr; }
  .update-actions .btn, .stack .btn { width: 100%; }
  .stack { align-items: stretch; }
  .btn-row { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); }
  .btn-row .btn { font-size: 13px; padding: 0 8px; }
  .log-row { grid-template-columns: minmax(0,1fr) auto; gap: 2px 10px; }
  .log-row > :nth-child(1) { grid-column: 1; }
  .log-row > :nth-child(4) { grid-column: 2; grid-row: 1 / span 3; }
  .log-row > :nth-child(2), .log-row > :nth-child(3) { grid-column: 1; font-size: 12px; }
  .line .btn-sq { width: 44px; padding: 0; }
  .toasts { bottom: calc(92px + env(safe-area-inset-bottom)); }
}

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ---- 0.6: access badges, links, player, drop page ---- */
.acc-badge { display: inline-flex; align-items: center; gap: 4px; margin-left: 8px; padding: 1px 7px; border-radius: 999px; background: var(--chip); color: var(--muted); font-size: 11px; font-weight: 500; vertical-align: 2px; white-space: nowrap; }
.acc-badge .i-xs { width: 12px; height: 12px; }
.acc-note { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 16px; margin-bottom: 14px; border: 1px solid var(--accent-line); border-radius: 14px; background: var(--accent-soft); color: var(--text-2); font-size: 14px; }
.acc-note > .i { color: var(--accent-text); flex-shrink: 0; }
.acc-note .grow { flex: 1; min-width: 200px; }
.link-out { display: flex; gap: 8px; }
.link-out input { flex: 1; min-width: 0; height: 44px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--bg); color: var(--text); font-size: 13px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field-row .select, .modal .field .select { width: 100%; margin-top: 6px; }
.radios { display: grid; gap: 8px; margin-bottom: 12px; }
.radio { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.radio:has(input:checked) { border-color: var(--accent-line); background: var(--accent-soft); }
.radio input { margin-top: 3px; accent-color: var(--accent); }
.radio b { display: block; font-size: 14px; color: var(--text); }
.radio small { display: block; font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.skip-list { max-height: 240px; overflow: auto; padding-left: 18px; margin: 8px 0 0; }
.line.is-dead { opacity: .55; }

.player { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(14px + env(safe-area-inset-bottom)); z-index: 30; width: min(720px, calc(100% - 24px));
  display: grid; grid-template-columns: minmax(0, 1fr) auto auto; grid-template-areas: "info ctrl close" "seek seek seek"; align-items: center; gap: 2px 10px;
  padding: 10px 10px 8px 16px; border-radius: 16px; background: var(--raised); border: 1px solid var(--line-strong); box-shadow: var(--shadow); }
.pl-info { grid-area: info; display: flex; flex-direction: column; min-width: 0; }
.pl-title { font-weight: 600; font-size: 14px; }
.pl-sub { font-size: 11.5px; color: var(--muted); }
.pl-ctrl { grid-area: ctrl; display: flex; align-items: center; gap: 2px; }
.pl-ctrl .btn-icon { border: 0; background: transparent; }
.pl-main.btn-icon { background: var(--accent); color: var(--on-accent); border-radius: 999px; }
.pl-close { grid-area: close; border: 0; background: transparent; }
.pl-seek { grid-area: seek; width: 100%; height: 18px; accent-color: var(--accent); margin: 0; }
body.has-player .wrap { padding-bottom: 130px; }
body.has-player .fab { bottom: calc(108px + env(safe-area-inset-bottom)); }
body.has-player .uploads { margin-bottom: 96px; }
body.has-player .toasts { bottom: 120px; }

.drop-page .auth-card { padding: 16px; }
.drop-zone { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 34px 16px; border: 2px dashed var(--line-strong); border-radius: 14px; text-align: center; cursor: pointer; color: var(--muted); }
.drop-zone .i-xl { color: var(--accent-text); width: 40px; height: 40px; }
.drop-zone.over { border-color: var(--accent); background: var(--accent-soft); }
.drop-list { display: grid; gap: 10px; margin-top: 12px; }
.drop-list:empty { display: none; }
.drop-row { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; }
.drop-item .bar { height: 4px; border-radius: 4px; background: var(--chip); margin-top: 6px; overflow: hidden; }
.drop-item .bar span { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s; }
.drop-item.ok .bar span { background: var(--ok); }
.drop-item.err .bar span { background: var(--err); width: 100%; }
.drop-item.err .drop-st { color: var(--err); }
@media (max-width: 720px) {
  .field-row { grid-template-columns: 1fr; }
  .player { padding-left: 12px; }
}

/* ---- 0.6.2: statistics, storage ---- */
:root { --chart-bar: #C98F2E; }
[data-theme="light"] { --chart-bar: #B7791F; }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) { --chart-bar: #B7791F; } }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin: 4px 0 18px; }
.tile { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.tile-label { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--muted); }
.tile-num { font-size: 24px; font-weight: 650; color: var(--text); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.tile-sub { font-size: 12px; color: var(--muted); }
.tile-warn { border-color: var(--accent-line); background: var(--accent-soft); }
.tile-warn .tile-label { color: var(--accent-text); }
.chart { margin: 0; }
.chart-title { font-size: 13px; font-weight: 600; color: var(--text-2); margin-bottom: 8px; }
.chart-wrap { display: flex; gap: 8px; }
.chart-y { display: flex; flex-direction: column; justify-content: space-between; height: 194px; font-size: 11px; line-height: 14px; color: var(--muted); text-align: right; min-width: 22px; margin-top: -7px; font-variant-numeric: tabular-nums; }
.chart-box { position: relative; flex: 1; min-width: 0; }
.chart svg { display: block; width: 100%; height: 180px; }
.chart-x { position: relative; height: 22px; }
.chart-x span { position: absolute; top: 6px; transform: translateX(-50%); font-size: 11px; color: var(--muted); white-space: nowrap; }
.chart-x span:first-child { transform: none; left: 0 !important; }
.chart-x span:last-child { transform: translateX(-100%); left: 100% !important; }
.chart .grid { stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.chart .ax { fill: var(--muted); font-size: 11px; font-family: inherit; }
.chart .cbar { fill: var(--chart-bar); }
.chart .hit { fill: transparent; }
.chart .bar-g { outline: none; cursor: default; }
.chart .bar-g.on .hit { fill: var(--hover); }
.chart-tip { position: absolute; top: -6px; transform: translateY(-100%); pointer-events: none; display: flex; flex-direction: column; padding: 7px 10px; border-radius: 9px; background: var(--raised); border: 1px solid var(--line-strong); box-shadow: var(--shadow); font-size: 12.5px; white-space: nowrap; color: var(--text-2); }
.chart-tip b { color: var(--text); font-weight: 600; }
.top-line .grow { min-width: 0; }
.top-rank { width: 22px; text-align: right; color: var(--muted); font-size: 12.5px; flex: none; }
.top-count { font-size: 14px; color: var(--text); min-width: 32px; text-align: right; }
.top-bar { display: block; height: 3px; margin-top: 6px; border-radius: 3px; background: var(--chip); overflow: hidden; }
.top-bar span { display: block; height: 100%; background: var(--chart-bar); border-radius: 3px; }
.meter { height: 8px; border-radius: 8px; background: var(--chip); overflow: hidden; margin: 2px 0 6px; }
.meter span { display: block; height: 100%; background: var(--text-2); border-radius: 8px; }
.meter-warn span { background: var(--chart-bar); }
.disk-warn { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; padding: 9px 16px; background: var(--accent-soft); border-bottom: 1px solid var(--accent-line); color: var(--accent-text); font-size: 13.5px; text-align: center; }
.disk-warn a { color: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 720px) {
  .tiles { grid-template-columns: 1fr 1fr; }
  .chart svg { height: 150px; }
  .chart-y { height: 164px; }
}
.alert-warn { display: flex; gap: 8px; align-items: flex-start; margin-bottom: 12px; }
.alert-warn .i { flex-shrink: 0; margin-top: 1px; }
.act-gap { display: inline-block; width: 44px; height: 1px; flex: none; }
@media (max-width: 720px) { .act-gap { display: none; } }
.tile-link { text-decoration: none; transition: border-color .15s; }
.tile-link:hover { border-color: var(--line-strong); }
.trash-page .crumbs { margin-bottom: 4px; }
.trash-wrap { max-width: 860px; }
.topbar-actions .btn-icon.is-on { background: var(--hover); color: var(--text); }
.menu-pop-left { right: auto; left: 0; }
.menu-caret { margin-left: 2px; opacity: .6; }

/* The site name never gets cut: the search box gives way instead. */
.brand-name { max-width: 34vw; }
.topbar-actions { flex: none; }
.search { min-width: 160px; }
@media (min-width: 721px) and (max-width: 1140px) {
  .topbar.is-admin .search:not(.open) { display: none; }
  .topbar.is-admin #search-toggle { display: inline-flex !important; }
  .topbar.is-admin .search.open { position: absolute; left: 24px; right: 24px; top: 12px; max-width: none; z-index: 2; background: var(--bar); }
}
@media (min-width: 721px) and (max-width: 980px) {
  .topbar.is-admin .btn-label { display: none !important; }
  .topbar.is-admin .topbar-actions .btn:has(.btn-label) { width: 44px; padding: 0; justify-content: center; }
}
/* Receive (Android Share menu) */
.receive-wrap { max-width: 760px; }
.rc-list { display: grid; gap: 12px; margin-bottom: 16px; }
.rc-row { display: flex; align-items: center; gap: 12px; min-width: 0; }
.rc-row .grow { min-width: 0; flex: 1; }
.rc-thumb { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; flex: none; background: var(--chip); }
.rc-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }
.rc-done { margin-top: 8px; }
