/* Beam: Shaiya Notorious theme.
   Tokens and components follow the Notorious site theme (blood-and-steel, chamfered edges,
   Cinzel crest / Tektur display / Geist body / Geist Mono data). Fonts are self-hosted. */

@font-face { font-family: "Cinzel"; font-weight: 600 900; font-display: swap; src: url("/fonts/cinzel-latin.woff2") format("woff2"); }
@font-face { font-family: "Tektur"; font-weight: 400 900; font-display: swap; src: url("/fonts/tektur-latin.woff2") format("woff2"); }
@font-face { font-family: "Geist"; font-weight: 300 700; font-display: swap; src: url("/fonts/geist-latin.woff2") format("woff2");
  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; }
@font-face { font-family: "Geist"; font-weight: 300 700; font-display: swap; src: url("/fonts/geist-latin-ext.woff2") format("woff2");
  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; }
@font-face { font-family: "Geist Mono"; font-weight: 400 600; font-display: swap; src: url("/fonts/geist-mono-latin.woff2") format("woff2"); }

/* 1. Tokens */
:root {
  color-scheme: dark;
  --void: #070405;
  --hull: #120a0c;
  --hull-2: #1d0f13;
  --line: rgba(230, 140, 150, .13);
  --line-2: rgba(230, 140, 150, .28);
  --ink: #f4eeec;
  --soft: #d9cecc;
  --mute: #a3918f;
  --faint: #6e5f60;
  --blood: #e01b35;
  --blood-hi: #ff3b52;
  --blood-deep: #7a0816;
  --steel: #c3cbd6;
  --ok: #5ff2a6;
  --bad: #ff5a6e;
  --ion: var(--blood);
  --flux: var(--steel);
  --on-ion: #fff6f4;

  --crest: "Cinzel", Georgia, "Times New Roman", serif;
  --display: "Tektur", "Bahnschrift", "Arial Narrow", system-ui, sans-serif;
  --body: "Geist", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "Geist Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;

  --step-0: clamp(.95rem, .92rem + .15vw, 1.03rem);
  --step-1: clamp(1.1rem, 1.02rem + .35vw, 1.3rem);
  --step-4: clamp(2.4rem, 1.6rem + 4vw, 4.4rem);
  --gutter: max(16px, env(safe-area-inset-left, 0px));
  --header-h: 64px;
  --cut: 10px;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

/* 2. Base */
*, *::before, *::after { box-sizing: border-box; }
html { background: var(--void); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--void); color: var(--ink);
  font: var(--step-0)/1.6 var(--body); -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
main { flex: 1; }
img { max-width: 100%; height: auto; }
a { color: inherit; }
p { margin: 0 0 1em; }
h1 { margin: 0; line-height: 1; }
button, input { font: inherit; color: inherit; }
::selection { background: var(--ion); color: var(--on-ion); }
:focus-visible { outline: 2px solid var(--flux); outline-offset: 3px; }
[hidden] { display: none !important; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: .01em; }
.muted { color: var(--mute); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 200; padding: 10px 16px; background: var(--ion); color: var(--on-ion); text-decoration: none; }
.skip-link:focus { top: 12px; }

/* 3. Atmosphere: static (no animation), so it never competes with transfer progress */
.atmo { position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(120% 90% at 50% 40%, transparent 55%, rgba(0, 0, 0, .65)),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, .016) 0 1px, transparent 1px 3px),
    radial-gradient(55% 45% at 78% 12%, rgba(224, 27, 53, .20), transparent 70%),
    radial-gradient(50% 50% at 10% 90%, rgba(122, 8, 22, .22), transparent 70%),
    var(--void); }

/* 4. Layout */
.wrap { width: 100%; max-width: 1180px; margin-inline: auto; padding-inline: var(--gutter); }
.wrap--narrow { max-width: 720px; }
.hud { position: sticky; top: 0; z-index: 60; border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(7, 4, 5, .94), rgba(7, 4, 5, .7));
  backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%); }
.hud__in { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: var(--header-h); }
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; min-width: 0; }
.brand img { display: block; width: 148px; }
.brand__tag { padding: 3px 9px; border: 1px solid var(--line-2); font: 700 11px var(--display); letter-spacing: .22em; text-transform: uppercase; color: var(--flux); }
.hud__link { font: 500 12px var(--mono); letter-spacing: .08em; color: var(--mute); text-decoration: none; white-space: nowrap; }
.hud__link:hover { color: var(--ink); }

.page-head { padding-block: clamp(36px, 7vw, 80px) clamp(22px, 4vw, 36px); }
.page-head__title { font: 800 var(--step-4)/.95 var(--crest); text-transform: uppercase; letter-spacing: .01em; }
.page-head__lede { color: var(--mute); max-width: 52ch; margin: 14px 0 0; font-size: var(--step-1); line-height: 1.5; }
.glow { color: var(--blood-hi); text-shadow: 0 0 28px rgba(224, 27, 53, .55); }
.eyebrow { display: flex; align-items: center; gap: 12px; margin: 0 0 16px; font: 500 12px var(--mono); letter-spacing: .22em; text-transform: uppercase; color: var(--flux); }
.eyebrow::before { content: ""; width: 28px; height: 1px; background: currentColor; }

.footer { display: flex; justify-content: space-between; gap: 12px; margin-top: 56px; padding-block: 20px 28px; border-top: 1px solid var(--line); font: 12px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }

/* 5. Components */
.btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 44px; padding: 0 20px;
  font: 700 13px var(--display); letter-spacing: .14em; text-transform: uppercase; white-space: nowrap; text-decoration: none; cursor: pointer;
  border: 0; color: var(--on-ion); background: var(--ion);
  clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));
  transition: filter .2s, transform .2s var(--ease), background .3s; }
.btn:hover { filter: brightness(1.12) saturate(1.1); transform: translateY(-1px); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; filter: none; }
.btn--ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-2); }
.btn--ghost:hover { background: color-mix(in srgb, var(--flux) 8%, transparent); box-shadow: inset 0 0 0 1px var(--flux); }
.btn.pulse { animation: pulse 1.4s var(--ease) infinite; }
@keyframes pulse { 50% { filter: brightness(1.35) drop-shadow(0 0 10px rgba(255, 59, 82, .8)); } }

.panel { position: relative; border: 1px solid var(--line); background: rgba(18, 10, 12, .78); padding: clamp(18px, 3vw, 28px); min-width: 0; }
.panel--accent { border-color: color-mix(in srgb, var(--ion) 55%, transparent);
  background: linear-gradient(170deg, color-mix(in srgb, var(--ion) 12%, transparent), rgba(18, 10, 12, .88) 55%); }
.panel__title { margin: 0 0 14px; font: 500 11px var(--mono); letter-spacing: .18em; text-transform: uppercase; color: var(--mute); }
.corners::before, .corners::after { content: ""; position: absolute; width: 16px; height: 16px; border: 0 solid var(--blood-hi); pointer-events: none; }
.corners::before { top: -1px; left: -1px; border-top-width: 2px; border-left-width: 2px; }
.corners::after { right: -1px; bottom: -1px; border-right-width: 2px; border-bottom-width: 2px; }

.field { display: grid; gap: 7px; min-width: 0; }
.field__label { font: 500 11px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--mute); }
.input { width: 100%; min-width: 0; min-height: 46px; padding: 0 14px; background: rgba(7, 4, 5, .75); border: 1px solid var(--line-2); border-radius: 0; color: var(--ink); font-size: 15px; transition: border-color .2s, box-shadow .2s; }
.input:focus { outline: none; border-color: var(--flux); box-shadow: 0 0 0 3px color-mix(in srgb, var(--flux) 18%, transparent); }
.input--file { padding: 10px 14px; }
.pw-row { margin-bottom: 18px; }

.drop { position: relative; display: grid; justify-items: center; gap: 10px; cursor: pointer; text-align: center;
  padding: clamp(44px, 9vw, 72px) 20px; border: 1px dashed var(--line-2); background: rgba(18, 10, 12, .6);
  transition: border-color .2s, background .2s; }
.drop:hover, .drop.over, .drop:focus-within { border-color: var(--blood-hi); background: rgba(224, 27, 53, .07); }
.drop:focus-within { outline: 2px solid var(--flux); outline-offset: 3px; }
.drop__icon { width: 44px; height: 44px; fill: none; stroke: var(--blood-hi); stroke-width: 2; stroke-linecap: square; filter: drop-shadow(0 0 10px rgba(224, 27, 53, .6)); }
.drop__title { font: 700 clamp(15px, 1.2rem, 19px) var(--display); letter-spacing: .12em; text-transform: uppercase; }
.drop__limits { font-size: 12px; color: var(--mute); }

.file { margin-bottom: 18px; font-size: var(--step-1); word-break: break-word; }
.file b { font-weight: 600; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 18px; }
.row .input { flex: 1 1 220px; }
.row.row-flush { margin-top: 0; }
.status { margin: 20px 0 10px; min-height: 1.6em; color: var(--soft); }
.prog { margin: 8px 0 0; min-height: 1.4em; font-size: 12.5px; color: var(--mute); }
.note { margin: 18px 0 0; font-size: 13.5px; color: var(--mute); }
.note b { color: var(--soft); font-weight: 600; }
.note--secure { color: var(--ok); font-size: 12.5px; }
.note--secure:empty { display: none; }

.bar { height: 6px; background: var(--line); overflow: hidden; }
.bar > i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--blood-deep), var(--ion), var(--blood-hi)); box-shadow: 0 0 12px rgba(224, 27, 53, .6); transition: width .25s linear; }

.alert { margin: 18px 0 0; padding: 12px 16px; border: 1px solid color-mix(in srgb, var(--bad) 55%, transparent); border-left-width: 3px; background: rgba(255, 90, 110, .08); color: var(--bad); }

/* 5b. Drive */
.wrap--drive { max-width: 1280px; }
.wrap--drive .page-head { padding-block: 22px 18px; }
.wrap--drive .page-head__title { font-size: clamp(1.9rem, 1.3rem + 2vw, 2.8rem); }
.wrap--drive .page-head__lede { margin-top: 8px; font-size: var(--step-0); }
.hud__nav { display: flex; align-items: center; gap: 22px; }
.hud__link--app { color: var(--ink); padding: 4px 10px; border: 1px solid var(--line-2); }
.hud__link--app:hover { border-color: var(--flux); }
.dform { display: grid; gap: 14px; }
.dform .row, .dform .note { margin-top: 4px; }
.dform .panel__title, .dform .status { margin: 0; }
.dform .status:empty { display: none; }
.rkey { margin: 0 0 16px; padding: 16px; border: 1px dashed var(--blood-hi); background: rgba(7, 4, 5, .75); font-size: clamp(14px, 1rem + .3vw, 19px); letter-spacing: .08em; word-spacing: .35em; line-height: 1.8; user-select: all; word-break: break-word; }
.check { display: flex; gap: 10px; align-items: center; margin-top: 18px; cursor: pointer; color: var(--soft); }
.check input { width: 18px; height: 18px; accent-color: var(--blood); }
.people .check { margin-top: 0; flex-basis: 100%; }
.dsub { margin-top: 16px; }
.btn--sm { height: 32px; padding: 0 12px; font-size: 11px; letter-spacing: .1em; --cut: 6px; }
.btn--danger { color: var(--bad); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--bad) 55%, transparent); }
.btn.btn--danger:not(.btn--ghost) { background: var(--blood-deep); color: var(--on-ion); }
.btn .ico { width: 18px; height: 18px; flex: none; }
.input--sm { min-height: 34px; width: auto; padding: 0 10px; font-size: 13px; }
.lbl { display: inline-block; width: 10px; height: 10px; margin-left: 8px; border-radius: 50%; vertical-align: middle; flex: none; }
.lbl--red { background: #ff4d5e; } .lbl--orange { background: #ff9640; } .lbl--yellow { background: #f5d547; } .lbl--green { background: #5ff2a6; }
.lbl--blue { background: #56a8ff; } .lbl--purple { background: #b57bff; } .lbl--grey { background: #9a8f8d; }
.lblpick { display: grid; gap: 4px; margin: 12px 0; }
.lblpick__opt { display: flex; align-items: center; gap: 10px; padding: 6px 4px; cursor: pointer; color: var(--soft); }
.lblpick__opt .lbl { margin-left: 0; }
.lblpick__opt input { accent-color: var(--blood); }
.dinfo__act { margin-left: 8px; vertical-align: middle; }
.dinfo { margin: 0 0 16px; padding: 12px 16px; border: 1px solid color-mix(in srgb, var(--ok) 45%, transparent); border-left-width: 3px; background: rgba(95, 242, 166, .07); color: var(--ok); }
.dverify p { margin: 0 0 12px; }
.dverify .dform { margin-top: 14px; }
kbd { padding: 0 5px; border: 1px solid var(--line-2); font: 11px var(--mono); color: var(--soft); }

/* icons: drawn on a 48 grid, stroke only, like the drop-zone arrow */
.ico { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: square; stroke-linejoin: miter; }
.iconbtn { display: inline-grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 1px solid transparent; background: none; color: var(--soft); cursor: pointer; transition: color .15s, border-color .15s, background .15s; }
.iconbtn:hover { color: var(--ink); border-color: var(--line-2); background: rgba(255, 255, 255, .03); }
.iconbtn:disabled { opacity: .35; cursor: default; }
.iconbtn--sm { width: 28px; height: 28px; }
.iconbtn--sm .ico { width: 16px; height: 16px; }

/* layout: sidebar + pane */
.dapp { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 28px; align-items: start; }
.dside { position: sticky; top: calc(var(--header-h) + 16px); display: grid; gap: 10px; }
.dup { position: relative; }
.dup__btn, .dside__btn { width: 100%; justify-content: flex-start; }
.dup__menu { position: absolute; left: 0; right: 0; top: calc(100% + 6px); }
.dnav { display: grid; gap: 2px; margin-top: 8px; }
.dnav__item { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border: 0; border-left: 2px solid transparent; background: none; color: var(--soft); font-weight: 500; text-align: left; cursor: pointer; }
.dnav__item:hover { color: var(--ink); background: rgba(255, 255, 255, .03); }
.dnav__item[aria-current="true"] { color: var(--ink); border-left-color: var(--blood-hi); background: linear-gradient(90deg, rgba(224, 27, 53, .14), transparent); }
.dnav__item.is-droptarget { outline: 2px solid var(--blood-hi); outline-offset: -2px; }
.dnav__count { margin-left: auto; font-size: 11px; color: var(--mute); }
.dnav__invite { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 14px; }
.dquota { margin-top: 14px; padding: 14px 12px; border-top: 1px solid var(--line); display: grid; gap: 6px; }
.dquota__title { margin: 0; font: 500 11px var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--mute); }
.dquota__used { margin: 0; color: var(--ink); font-size: 13px; }
.dquota__sub { margin: 0; font-size: 12px; color: var(--mute); }
.dpane { min-width: 0; }

/* top bar */
.dtop { display: flex; align-items: center; gap: 10px; }
.dsearch { position: relative; flex: 1; min-width: 0; }
.dsearch > .ico { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--mute); pointer-events: none; }
.dsearch input { width: 100%; min-height: 40px; padding: 0 14px 0 42px; border: 1px solid var(--line-2); background: rgba(7, 4, 5, .75); color: var(--ink); font-size: 15px; }
.dsearch input:focus { outline: none; border-color: var(--flux); box-shadow: 0 0 0 3px color-mix(in srgb, var(--flux) 18%, transparent); }
.dsort { min-height: 40px; }
.dacct { position: relative; }
.dacct__btn { display: flex; align-items: center; gap: 8px; max-width: 220px; height: 40px; padding: 0 12px; border: 1px solid var(--line-2); background: none; color: var(--soft); cursor: pointer; }
.dacct__btn:hover { color: var(--ink); border-color: var(--flux); }
.dacct__email { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.dacct__menu { position: absolute; right: 0; top: calc(100% + 6px); min-width: 210px; }

.dhead { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 20px; min-height: 36px; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; min-width: 0; font-size: var(--step-1); }
.crumb { padding: 2px 6px; border: 1px solid transparent; background: none; color: var(--mute); font-weight: 600; text-align: left; word-break: break-word; cursor: pointer; }
.crumb:hover { color: var(--ink); }
.crumb[aria-current="page"], .crumb--static { color: var(--ink); cursor: default; }
.crumb.is-droptarget { border-color: var(--blood-hi); }
.crumb__sep { color: var(--faint); }

.dselbar { position: sticky; top: calc(var(--header-h) + 8px); z-index: 5; display: flex; align-items: center; gap: 12px; margin-top: 10px; padding: 8px 10px 8px 14px; border: 1px solid color-mix(in srgb, var(--ion) 55%, transparent); background: rgba(29, 15, 19, .96); }
.dselbar__count { font-size: 12px; color: var(--ink); white-space: nowrap; }
.dselbar__acts { display: flex; flex-wrap: wrap; gap: 6px; flex: 1; }

/* the list: rows (list) or cards (grid) */
.dlist-wrap { position: relative; margin-top: 12px; border: 1px solid var(--line); background: rgba(18, 10, 12, .6); min-height: 220px; }
.dlist { list-style: none; margin: 0; padding: 0; outline: none; }
.dit { position: relative; cursor: default; user-select: none; outline: none; }
.dit:focus-visible { box-shadow: inset 0 0 0 2px var(--flux); }
.dit[aria-selected="true"] { background: linear-gradient(90deg, rgba(224, 27, 53, .18), rgba(224, 27, 53, .06)); }
.dit.is-droptarget { box-shadow: inset 0 0 0 2px var(--blood-hi); }
.dit.is-bad { opacity: .6; }
.dit__check { width: 16px; height: 16px; margin: 0; accent-color: var(--blood); cursor: pointer; }
.dit__vis { display: grid; place-items: center; overflow: hidden; color: var(--soft); }
.dit--folder .dit__vis { color: var(--blood-hi); }
.dit__vis img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dit__name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.dit--folder .dit__name { font-weight: 600; }
.dit__badge { display: inline-flex; vertical-align: -3px; margin-left: 8px; color: var(--ok); }
.dit__badge .ico { width: 16px; height: 16px; }
.dit__sub { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; color: var(--mute); }
.dit__more { opacity: 0; }
.dit:hover .dit__more, .dit:focus-within .dit__more, .dit[aria-selected="true"] .dit__more { opacity: 1; }

.dlist--list .dit { display: grid; grid-template-columns: 18px 40px minmax(0, 2fr) minmax(0, 1.4fr) 36px; align-items: center; gap: 14px; padding: 6px 10px 6px 14px; border-bottom: 1px solid var(--line); }
.dlist--list .dit:last-child { border-bottom: 0; }
.dlist--list .dit:hover:not([aria-selected="true"]) { background: rgba(255, 255, 255, .025); }
.dlist--list .dit__vis { width: 40px; height: 40px; }
.dlist--list .dit__vis .ico { width: 26px; height: 26px; }
.dlist--list .dit__check { opacity: .35; }
.dlist--list .dit:hover .dit__check, .dlist--list .dit[aria-selected="true"] .dit__check { opacity: 1; }

.dlist--grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 14px; padding: 14px; }
.dlist--grid .dit { display: grid; grid-template-rows: auto auto auto; border: 1px solid var(--line); background: rgba(7, 4, 5, .55);
  clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut)); }
.dlist--grid .dit:hover { border-color: var(--line-2); }
.dlist--grid .dit__vis { grid-row: 1; aspect-ratio: 4 / 3; background: rgba(18, 10, 12, .9); border-bottom: 1px solid var(--line); }
.dlist--grid .dit__vis .ico { width: 54px; height: 54px; stroke-width: 2; }
.dlist--grid .dit__name { grid-row: 2; padding: 10px 12px 0; }
.dlist--grid .dit__sub { grid-row: 3; padding: 2px 12px 12px; }
.dlist--grid .dit__check { position: absolute; top: 10px; left: 10px; opacity: 0; }
.dlist--grid .dit:hover .dit__check, .dlist--grid .dit[aria-selected="true"] .dit__check { opacity: 1; }
.dlist--grid .dit__more { position: absolute; top: 6px; right: 6px; background: rgba(7, 4, 5, .8); }

.flist .dit { grid-template-columns: 40px minmax(0, 2fr) minmax(0, 1fr) 36px; }
.dit__open { padding: 0; border: 0; background: none; color: var(--ink); text-align: left; cursor: pointer; }
.dit__open:hover { color: var(--blood-hi); }
#fZip .mono { opacity: .75; margin-left: 4px; }
.dempty { margin: 0; padding: 64px 16px; text-align: center; color: var(--mute); }
.drophint { position: absolute; inset: 0; z-index: 4; display: grid; place-items: center; border: 2px dashed var(--blood-hi); background: rgba(12, 6, 8, .88); pointer-events: none; }
.drophint p { display: flex; align-items: center; gap: 12px; margin: 0; font: 700 15px var(--display); letter-spacing: .1em; text-transform: uppercase; }
.drophint .ico { width: 36px; height: 36px; color: var(--blood-hi); }

/* menus */
.cmenu { position: fixed; z-index: 80; display: grid; min-width: 200px; padding: 6px; border: 1px solid var(--line-2); background: #160c0f; box-shadow: 0 18px 50px rgba(0, 0, 0, .6); }
.dup__menu, .dacct__menu { position: absolute; }
.cmenu__item { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border: 0; background: none; color: var(--soft); text-align: left; cursor: pointer; font-size: 14px; }
.cmenu__item:hover, .cmenu__item:focus-visible { outline: none; background: rgba(224, 27, 53, .14); color: var(--ink); }
.cmenu__item.is-danger { color: var(--bad); }
.cmenu__item .ico { width: 18px; height: 18px; }

/* dialogs */
dialog { color: var(--ink); }
dialog::backdrop { background: rgba(4, 2, 3, .78); backdrop-filter: blur(4px); }
.ddlg { width: min(520px, calc(100vw - 32px)); padding: 24px; border: 1px solid color-mix(in srgb, var(--ion) 55%, transparent); background: linear-gradient(170deg, #26121a, #120a0c 60%); }
.ddlg p { margin: 0; color: var(--soft); }
.ddetails { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px 18px; margin: 0; }
.ddetails dt { font: 500 11px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--mute); padding-top: 3px; }
.ddetails dd { margin: 0; color: var(--ink); word-break: break-word; }
.dsec__head { display: flex; justify-content: space-between; align-items: center; }
.dsec__head .panel__title { margin: 0; }
.dsec__sub { margin: 26px 0 6px; }
.dsec .rkey { margin: 14px 0 10px; }
.tfaqr { width: 212px; margin: 12px 0; line-height: 0; }
.tfaqr svg { width: 100%; height: auto; display: block; }
.seclist { list-style: none; margin: 12px 0 14px; padding: 0; border: 1px solid var(--line); }
.seclist li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.seclist li:last-child { border-bottom: 0; }
.seclist__what { flex: 1; min-width: 0; }
.seclist__what b { display: block; font-weight: 600; }
.seclist__what span { font-size: 12px; color: var(--mute); }
.seclist__me { font: 500 11px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--ok); }
.ftree { list-style: none; margin: 0; padding: 4px; max-height: 50vh; overflow: auto; border: 1px solid var(--line); background: rgba(7, 4, 5, .6); }
.ftree__item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 10px; border: 0; background: none; color: var(--soft); text-align: left; cursor: pointer; }
.ftree__item:hover { background: rgba(255, 255, 255, .04); color: var(--ink); }
.ftree__item[aria-selected="true"] { background: rgba(224, 27, 53, .2); color: var(--ink); }
.ftree__item .ico { width: 18px; height: 18px; color: var(--blood-hi); }

/* viewer */
.viewer { width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(4, 2, 3, .96); display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.viewer:not([open]) { display: none; }
.viewer__bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.viewer__title { flex: 1; min-width: 0; margin: 0 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.viewer__stage { position: relative; display: grid; place-items: center; min-height: 0; padding: 16px; overflow: auto; }
.viewer__media { max-width: 100%; max-height: 100%; }
img.viewer__media, video.viewer__media { object-fit: contain; }
img.viewer__zoom { touch-action: none; cursor: zoom-in; user-select: none; transform-origin: center; will-change: transform; }
img.viewer__zoom.is-zoomed { cursor: grab; }
.viewer__stage:has(> img.viewer__zoom.is-zoomed) { overflow: hidden; }
iframe.viewer__media { width: 100%; height: 100%; border: 0; background: #fff; }
pre.viewer__media { align-self: start; width: 100%; margin: 0; padding: 16px; white-space: pre-wrap; word-break: break-word; font: 13px/1.55 var(--mono); color: var(--soft); background: rgba(18, 10, 12, .8); border: 1px solid var(--line); }
textarea.viewer__media { align-self: stretch; width: 100%; resize: none; margin: 0; padding: 16px; font: 13px/1.55 var(--mono); color: var(--soft); background: rgba(18, 10, 12, .8); border: 1px solid var(--line); }
audio.viewer__media { width: min(560px, 100%); }
.viewer__thumb { max-width: 60%; max-height: 60%; filter: blur(6px) brightness(.7); }
.viewer__status { margin: 0; padding: 8px 16px 14px; min-height: 2.4em; text-align: center; font-size: 12px; color: var(--mute); }

/* transfer panel */
.xfer { position: fixed; right: 16px; bottom: 16px; z-index: 70; width: min(400px, calc(100vw - 32px)); border: 1px solid color-mix(in srgb, var(--ion) 55%, transparent); background: rgba(22, 12, 15, .97); box-shadow: 0 18px 50px rgba(0, 0, 0, .6); }
.xfer__head { display: flex; align-items: center; gap: 8px; padding: 10px 10px 10px 16px; border-bottom: 1px solid var(--line); }
.xfer__title { flex: 1; margin: 0; font: 500 12px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--soft); }
.xfer__list { list-style: none; margin: 0; padding: 0; max-height: 46vh; overflow: auto; }
.xfer.is-min .xfer__list { display: none; }
.xrow { display: grid; grid-template-columns: 22px minmax(0, 1fr) 28px; align-items: center; gap: 4px 10px; padding: 10px 12px 12px 14px; border-bottom: 1px solid var(--line); }
.xrow:last-child { border-bottom: 0; }
.xrow > .ico { color: var(--blood-hi); }
.xrow__name { margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.xrow__text { grid-column: 2 / 4; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11.5px; color: var(--mute); }
.xrow .bar { grid-column: 2 / 4; height: 3px; }
.xrow[data-state="done"] .bar > i { background: var(--ok); box-shadow: none; }
.xrow[data-state="failed"] .xrow__text { color: var(--bad); white-space: normal; }
.xrow[data-state="cancelled"], .xrow[data-state="queued"] { opacity: .7; }

/* 6. Responsive & motion */
@media (max-width: 520px) {
  .brand img { width: 118px; }
  .hud__link:not(.hud__link--app) { display: none; }
  .row .btn { flex: 1 1 auto; }
}
@media (max-width: 860px) {
  .dapp { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .dside { position: static; grid-template-columns: 1fr 1fr; }
  .dnav { grid-column: 1 / -1; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; }
  .dnav__item { justify-content: center; padding: 9px 6px; border-left: 0; border-bottom: 2px solid transparent; font-size: 13px; }
  .dnav__item[aria-current="true"] { border-bottom-color: var(--blood-hi); background: rgba(224, 27, 53, .1); }
  .dquota { grid-column: 1 / -1; margin: 0; padding: 8px 0 0; }
  .dtop { flex-wrap: wrap; }
  .dsearch { flex-basis: 100%; }
  .dsort { flex: 1; }
  .dacct__btn { max-width: 160px; }
  .dlist--list .dit { grid-template-columns: 18px 36px minmax(0, 1fr) 36px; }
  .dlist--list .dit__sub { grid-column: 3; grid-row: 2; margin-top: -4px; }
  .dlist--list .dit__vis { grid-row: 1 / 3; width: 36px; height: 36px; }
  .dlist--list .dit__check { grid-row: 1 / 3; opacity: 1; }
  .dlist--list .dit__more { grid-column: 4; grid-row: 1 / 3; opacity: 1; }
  .dlist--grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; padding: 10px; }
  .dlist--grid .dit__more, .dlist--grid .dit__check { opacity: 1; }
  .dhints { display: none; }
  .dnav__invite { grid-column: 1 / -1; margin-top: 6px; padding-top: 10px; border-top: 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Versions dialog */
.vlist { list-style: none; margin: 0 0 12px; padding: 0; max-height: 50vh; overflow: auto; }
.vlist__row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.vlist__label { margin: 0; font-weight: 600; }
.vlist__sub { margin: 0; grid-column: 1; font-size: 12px; color: var(--mute); }
.vlist__acts { grid-column: 2; grid-row: 1 / span 2; display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 560px) { .vlist__row { grid-template-columns: 1fr; } .vlist__acts { grid-column: 1; grid-row: auto; justify-content: flex-start; } }
