/* sync10 — red edition */
:root {
  --bg: #090506;
  --bg2: #0f0809;
  --panel: #150b0e;
  --panel2: #1c1013;
  --panel3: #241418;
  --line: #2b191d;
  --line2: #3a2227;
  --text: #f6eeef;
  --text2: #d9cbcd;
  --muted: #9c878b;
  --red: #e5243b;
  --red2: #ff4a5c;
  --red3: #ff7a87;
  --red-dim: rgba(229, 36, 59, .14);
  --red-glow: rgba(229, 36, 59, .38);
  --ok: #3ddc84;
  --warn: #ffb547;
  --radius: 14px;
  --radius-sm: 9px;
  --sidebar: 248px;
  --player: 84px;
  --shadow: 0 18px 50px rgba(0, 0, 0, .55);
  --font: "Inter", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  --mono: "Cascadia Code", "JetBrains Mono", Consolas, ui-monospace, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.45 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
a { color: var(--red3); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--red); color: #fff; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #3a2227; border-radius: 10px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #5a2c33; }
::-webkit-scrollbar-track { background: transparent; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); font-size: 12.5px; }
.grow { flex: 1; min-width: 0; }
.row { display: flex; align-items: center; gap: 10px; }
.wrap { flex-wrap: wrap; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
svg.i { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
svg.i.fill { fill: currentColor; stroke: none; }

/* ---------- buttons + inputs ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 36px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line2);
  background: var(--panel2); color: var(--text); cursor: pointer; white-space: nowrap;
  transition: background .15s, border-color .15s, transform .08s, box-shadow .15s;
}
.btn:hover { background: var(--panel3); border-color: #4a2a30; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: default; }
.btn.primary { background: linear-gradient(180deg, var(--red2), var(--red)); border-color: transparent; color: #fff; box-shadow: 0 6px 20px -6px var(--red-glow); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.danger { color: var(--red3); border-color: #5a222b; background: rgba(229, 36, 59, .08); }
.btn.danger:hover { background: rgba(229, 36, 59, .18); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--panel2); }
.btn.sm { height: 30px; padding: 0 10px; font-size: 13px; border-radius: 8px; }
.icon-btn {
  width: 36px; height: 36px; display: inline-grid; place-items: center; border-radius: 10px;
  background: transparent; border: 0; color: var(--text2); cursor: pointer; transition: background .15s, color .15s;
}
.icon-btn:hover { background: var(--panel2); color: var(--text); }
.icon-btn.on { color: var(--red2); }
.icon-btn.sm { width: 30px; height: 30px; border-radius: 8px; }
.input, select.input, textarea.input {
  width: 100%; height: 38px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line2);
  background: var(--bg2); color: var(--text); outline: none; transition: border-color .15s, box-shadow .15s;
}
textarea.input { height: auto; padding: 10px 12px; resize: vertical; }
.input:focus { border-color: var(--red); box-shadow: 0 0 0 3px var(--red-dim); }
label.field { display: grid; gap: 6px; margin-bottom: 14px; }
label.field > span { font-size: 12.5px; color: var(--muted); font-weight: 600; letter-spacing: .02em; }
.check { display: flex; align-items: center; gap: 10px; cursor: pointer; margin-bottom: 12px; user-select: none; }
.check input { accent-color: var(--red); width: 16px; height: 16px; }
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 99px; font-size: 12px; background: var(--panel3); color: var(--text2); border: 1px solid var(--line2); }
.pill.red { background: var(--red-dim); color: var(--red3); border-color: #5a222b; }
.pill.ok { background: rgba(61, 220, 132, .1); color: var(--ok); border-color: rgba(61, 220, 132, .25); }
kbd { font-family: var(--mono); font-size: 11.5px; padding: 1px 6px; border: 1px solid var(--line2); border-bottom-width: 2px; border-radius: 5px; background: var(--panel2); }

/* ---------- layout ---------- */
.app { display: grid; grid-template-columns: var(--sidebar) 1fr; height: calc(100% - var(--player)); }
.app.no-player { height: 100%; }
.sidebar {
  background: linear-gradient(180deg, #120709 0%, #0b0506 100%);
  border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0;
}
.brand { display: flex; align-items: center; gap: 11px; padding: 20px 20px 16px; }
.brand img { width: 34px; height: 34px; filter: drop-shadow(0 4px 14px var(--red-glow)); }
.brand b { font-size: 19px; letter-spacing: -.02em; }
.brand b span { color: var(--red2); }
.brand small { display: block; color: var(--muted); font-size: 11px; margin-top: -2px; }
.nav { padding: 6px 12px; display: grid; gap: 2px; }
.nav a, .nav button.navbtn {
  display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 10px; color: var(--text2);
  font-weight: 500; text-decoration: none; background: none; border: 0; width: 100%; cursor: pointer; text-align: left;
}
.nav a:hover, .nav button.navbtn:hover { background: var(--panel2); color: var(--text); }
.nav a.active { background: linear-gradient(90deg, var(--red-dim), transparent); color: #fff; box-shadow: inset 3px 0 0 var(--red); }
.nav a.active svg { color: var(--red2); }
.nav-title { display: flex; align-items: center; justify-content: space-between; padding: 16px 24px 6px; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.nav-title button { color: var(--muted); }
.pl-list { overflow-y: auto; padding: 0 12px 10px; flex: 1; min-height: 60px; }
.pl-list a { display: flex; align-items: center; gap: 10px; padding: 7px 12px; border-radius: 9px; color: var(--text2); font-size: 13.5px; }
.pl-list a:hover { background: var(--panel2); text-decoration: none; color: var(--text); }
.pl-list a.active { color: #fff; background: var(--panel2); }
.pl-dot { width: 10px; height: 10px; border-radius: 3px; background: hsl(var(--h, 350) 80% 55%); flex: none; box-shadow: 0 0 10px hsl(var(--h, 350) 80% 55% / .5); }
.pl-list .count { margin-left: auto; color: var(--muted); font-size: 12px; }
.storage { padding: 14px 20px 18px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.meter { height: 6px; border-radius: 6px; background: var(--panel3); overflow: hidden; margin: 8px 0 6px; }
.meter > i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--red), var(--red2)); border-radius: 6px; transition: width .6s; }

.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; position: relative; }
.topbar {
  display: flex; align-items: center; gap: 12px; padding: 12px 22px; border-bottom: 1px solid var(--line);
  background: rgba(9, 5, 6, .85); backdrop-filter: blur(14px); position: sticky; top: 0; z-index: 5; min-height: 64px;
}
.menu-btn { display: none; }
.crumbs { display: flex; align-items: center; gap: 2px; min-width: 0; flex: 1; overflow: hidden; }
.crumbs a, .crumbs span.cur { padding: 5px 8px; border-radius: 8px; color: var(--text2); white-space: nowrap; font-weight: 500; }
.crumbs a:hover { background: var(--panel2); color: #fff; text-decoration: none; }
.crumbs span.cur { color: #fff; font-weight: 650; overflow: hidden; text-overflow: ellipsis; }
.crumbs .sep { color: #5a4146; }
.crumbs.drop-target a.over { background: var(--red-dim); color: #fff; }
.search { position: relative; width: min(340px, 34vw); }
.search svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--muted); width: 16px; height: 16px; }
.search input { padding-left: 34px; padding-right: 40px; background: var(--panel); }
.search kbd { position: absolute; right: 9px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.view { flex: 1; overflow-y: auto; padding: 18px 22px 40px; min-height: 0; }
.view-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; margin-bottom: 16px; flex-wrap: wrap; }
.view-head h1 { margin: 0; font-size: 26px; letter-spacing: -.025em; line-height: 1.15; }
.view-head p { margin: 4px 0 0; color: var(--muted); }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.seg { display: inline-flex; background: var(--panel); border: 1px solid var(--line2); border-radius: 10px; padding: 3px; }
.seg button { border: 0; background: none; height: 28px; padding: 0 9px; border-radius: 7px; color: var(--muted); cursor: pointer; display: grid; place-items: center; }
.seg button.on { background: var(--panel3); color: #fff; }

.mb { margin-bottom: 12px; }
.drop-over { background: var(--red-dim) !important; outline: 1px dashed var(--red); outline-offset: -1px; border-radius: 8px; }
.card.drop-over { outline: 2px dashed var(--red); }

/* ---------- hero (music / playlist) ---------- */
.hero {
  display: flex; gap: 22px; align-items: flex-end; padding: 26px; border-radius: 20px; margin-bottom: 18px;
  background: radial-gradient(120% 140% at 0% 0%, hsl(var(--h, 352) 75% 32% / .85), transparent 60%), linear-gradient(180deg, var(--panel2), var(--panel));
  border: 1px solid var(--line); position: relative; overflow: hidden;
}
.hero .art { width: 132px; height: 132px; border-radius: 16px; flex: none; display: grid; place-items: center; background: linear-gradient(135deg, hsl(var(--h, 352) 80% 55%), hsl(calc(var(--h, 352) + 30) 70% 25%)); box-shadow: var(--shadow); }
.hero .art svg { width: 54px; height: 54px; color: rgba(255, 255, 255, .9); }
.hero h1 { margin: 2px 0 6px; font-size: 34px; letter-spacing: -.03em; line-height: 1.1; }
.hero .kicker { font-size: 11px; text-transform: uppercase; letter-spacing: .14em; font-weight: 700; color: var(--text2); }
.hero .actions { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.play-fab { width: 48px; height: 48px; border-radius: 50%; border: 0; display: grid; place-items: center; background: var(--red); color: #fff; cursor: pointer; box-shadow: 0 10px 28px -6px var(--red-glow); transition: transform .12s, filter .12s; }
.play-fab:hover { transform: scale(1.06); filter: brightness(1.1); }
.play-fab svg { width: 22px; height: 22px; }

/* ---------- file table ---------- */
.table { width: 100%; border-collapse: separate; border-spacing: 0; }
.table.files { table-layout: fixed; }
.table.files th.c-check { width: 40px; }
.table.files th.c-num { width: 52px; }
.table.files th.c-size { width: 100px; }
.table.files th.c-date { width: 130px; }
.table.files th.c-dur { width: 72px; }
.table.files th.c-act { width: 52px; }
.table.files th.c-album { width: 24%; }
.table.files th.c-folder { width: 20%; }
.table th { position: sticky; top: -18px; background: var(--bg); z-index: 2; text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--line); user-select: none; white-space: nowrap; }
.table th.sortable { cursor: pointer; }
.table th.sortable:hover { color: var(--text); }
.table th .arrow { color: var(--red2); margin-left: 3px; }
.table td { padding: 7px 10px; border-bottom: 1px solid rgba(43, 25, 29, .55); vertical-align: middle; }
.table tr.item { cursor: default; transition: background .1s; }
.table tr.item:hover td { background: rgba(28, 16, 19, .9); }
.table tr.item.sel td { background: rgba(229, 36, 59, .12); }
.table tr.item.playing td { color: var(--red2); }
.table tr.item.drop-over td { background: rgba(229, 36, 59, .22); }
.table td.c-check, .table th.c-check { width: 36px; padding-right: 0; }
.table td.c-size, .table td.c-date, .table td.c-dur { color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.table td.c-size, .table th.c-size, .table td.c-dur, .table th.c-dur { text-align: right; }
.table td.c-act { width: 44px; text-align: right; }
.table td.c-num { width: 38px; color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.name-cell { display: flex; align-items: center; gap: 12px; min-width: 0; }
.name-cell .nm { min-width: 0; }
.name-cell .nm b { display: block; font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.name-cell .nm small { display: block; color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.name-cell a.open { color: inherit; }
.name-cell a.open:hover { color: #fff; text-decoration: underline; text-decoration-color: var(--red); }
.ficon { width: 36px; height: 36px; border-radius: 9px; display: grid; place-items: center; flex: none; background: var(--panel2); color: var(--text2); overflow: hidden; position: relative; }
.ficon img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.ficon.k-folder { background: rgba(229, 36, 59, .14); color: var(--red2); }
.ficon.k-audio { background: rgba(255, 92, 140, .12); color: #ff6f9a; }
.ficon.k-video { background: rgba(160, 110, 255, .12); color: #b18cff; }
.ficon.k-image { background: rgba(255, 170, 70, .12); color: #ffb35c; }
.ficon.k-pdf { background: rgba(255, 80, 60, .12); color: #ff7b66; }
.ficon.k-text { background: rgba(120, 200, 255, .1); color: #8cd0ff; }
.ficon.k-archive { background: rgba(240, 220, 90, .1); color: #f0dc5a; }
.ficon .eq { display: none; }
tr.playing .ficon .eq { display: flex; }
tr.playing .ficon > svg.i, tr.playing .ficon img { opacity: 0; }
.cb { width: 18px; height: 18px; border-radius: 5px; border: 1.5px solid #5a4146; display: grid; place-items: center; cursor: pointer; background: transparent; padding: 0; color: transparent; }
.cb:hover { border-color: var(--red2); }
.sel .cb, .cb.on { background: var(--red); border-color: var(--red); color: #fff; }
.cb svg { width: 12px; height: 12px; stroke-width: 3; }
.empty { text-align: center; padding: 70px 20px; color: var(--muted); }
.empty svg { width: 56px; height: 56px; color: #4a2a30; margin-bottom: 10px; }
.empty h3 { color: var(--text2); margin: 0 0 6px; font-size: 17px; }
.more-sentinel { height: 1px; }

/* grid view */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; cursor: pointer; transition: transform .12s, border-color .12s, box-shadow .12s; position: relative; }
.card:hover { transform: translateY(-2px); border-color: #4a2a30; box-shadow: 0 12px 30px -12px rgba(0, 0, 0, .7); }
.card.sel { border-color: var(--red); box-shadow: 0 0 0 2px var(--red-dim); }
.card .thumb { aspect-ratio: 1; display: grid; place-items: center; background: var(--panel2); position: relative; overflow: hidden; }
.card .thumb img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.card .thumb.ficon { width: 100%; height: auto; border-radius: 0; }
.card .thumb svg.i { width: 44px; height: 44px; opacity: .85; }
.card .meta { padding: 9px 11px 11px; }
.card .meta b { display: block; font-weight: 550; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card .meta small { color: var(--muted); font-size: 11.5px; }
.card .cb { position: absolute; top: 8px; left: 8px; z-index: 2; background: rgba(0, 0, 0, .45); opacity: 0; transition: opacity .12s; }
.card:hover .cb, .card.sel .cb, .grid.selecting .cb { opacity: 1; }
.card .playover { position: absolute; right: 10px; bottom: 10px; width: 40px; height: 40px; border-radius: 50%; background: var(--red); color: #fff; display: grid; place-items: center; opacity: 0; transform: translateY(6px); transition: .15s; box-shadow: 0 8px 20px -4px var(--red-glow); border: 0; cursor: pointer; }
.card:hover .playover { opacity: 1; transform: none; }

/* equalizer animation */
.eq { gap: 2px; align-items: flex-end; height: 14px; position: absolute; inset: 0; margin: auto; width: 16px; z-index: 3; }
.eq i { width: 3px; background: var(--red2); border-radius: 1px; animation: eq 0.9s ease-in-out infinite; }
.eq i:nth-child(2) { animation-delay: -.3s; }
.eq i:nth-child(3) { animation-delay: -.6s; }
.paused .eq i { animation-play-state: paused; }
@keyframes eq { 0%, 100% { height: 3px; } 50% { height: 14px; } }

/* ---------- selection bar ---------- */
.selbar {
  position: absolute; left: 50%; bottom: 18px; transform: translate(-50%, 140%); z-index: 20;
  display: flex; align-items: center; gap: 6px; padding: 8px 10px 8px 16px; border-radius: 14px;
  background: rgba(30, 16, 19, .96); border: 1px solid #4a2a30; box-shadow: var(--shadow); backdrop-filter: blur(10px);
  transition: transform .22s cubic-bezier(.2, .9, .3, 1.2), visibility .22s; max-width: calc(100% - 24px); overflow-x: auto;
  visibility: hidden; transform: translate(-50%, calc(100% + 60px));
}
.selbar.show { transform: translate(-50%, 0); visibility: visible; }
.selbar .count { font-weight: 650; margin-right: 8px; white-space: nowrap; }

/* ---------- player ---------- */
.player {
  position: fixed; left: 0; right: 0; bottom: 0; height: var(--player); z-index: 30;
  display: grid; grid-template-columns: minmax(180px, 1fr) minmax(320px, 2fr) minmax(180px, 1fr); align-items: center; gap: 18px;
  padding: 0 18px; background: linear-gradient(180deg, #160a0d, #0d0607); border-top: 1px solid var(--line);
}
.player.hidden-player { display: none; }
.np { display: flex; align-items: center; gap: 12px; min-width: 0; cursor: pointer; }
.np .cover { width: 54px; height: 54px; border-radius: 10px; flex: none; background: var(--panel3); display: grid; place-items: center; overflow: hidden; position: relative; box-shadow: 0 6px 18px rgba(0, 0, 0, .5); }
.np .cover img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.np .t { min-width: 0; }
.np .t b { display: block; font-weight: 600; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.np .t small { display: block; color: var(--muted); font-size: 12.5px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.pc { display: grid; gap: 4px; justify-items: center; }
.pc .btns { display: flex; align-items: center; gap: 6px; }
.pc .playbtn { width: 42px; height: 42px; border-radius: 50%; border: 0; background: #fff; color: #120709; display: grid; place-items: center; cursor: pointer; transition: transform .1s; }
.pc .playbtn:hover { transform: scale(1.06); }
.pc .playbtn svg { width: 20px; height: 20px; }
.pc .seek { display: flex; align-items: center; gap: 10px; width: 100%; max-width: 640px; font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.pr { display: flex; align-items: center; justify-content: flex-end; gap: 4px; }
.pr .vol { width: 110px; }
.pill-badge { font-size: 9px; font-weight: 800; position: absolute; transform: translate(9px, -9px); color: var(--red2); }
.icon-btn.has-badge { position: relative; }

input[type=range].range {
  -webkit-appearance: none; appearance: none; width: 100%; height: 16px; background: transparent; cursor: pointer; margin: 0;
  --p: 0%; --b: 0%;
}
input[type=range].range::-webkit-slider-runnable-track {
  height: 4px; border-radius: 4px;
  background: linear-gradient(90deg, var(--red) var(--p), rgba(255, 255, 255, .22) var(--p), rgba(255, 255, 255, .22) var(--b), rgba(255, 255, 255, .1) var(--b));
}
input[type=range].range::-moz-range-track { height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .12); }
input[type=range].range::-moz-range-progress { height: 4px; border-radius: 4px; background: var(--red); }
input[type=range].range::-webkit-slider-thumb { -webkit-appearance: none; width: 12px; height: 12px; border-radius: 50%; background: #fff; margin-top: -4px; opacity: 0; transition: opacity .12s; box-shadow: 0 0 0 4px var(--red-dim); }
input[type=range].range:hover::-webkit-slider-thumb, input[type=range].range:active::-webkit-slider-thumb { opacity: 1; }
input[type=range].range::-moz-range-thumb { width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 0; }
input[type=range].range:hover::-webkit-slider-runnable-track { background: linear-gradient(90deg, var(--red2) var(--p), rgba(255, 255, 255, .25) var(--p), rgba(255, 255, 255, .25) var(--b), rgba(255, 255, 255, .1) var(--b)); }

/* now playing drawer */
.drawer {
  position: fixed; top: 0; right: 0; bottom: var(--player); width: min(420px, 100%); z-index: 25;
  background: linear-gradient(180deg, #150a0d, #0c0607); border-left: 1px solid var(--line); box-shadow: var(--shadow);
  transform: translateX(105%); transition: transform .25s cubic-bezier(.2, .8, .2, 1); display: flex; flex-direction: column;
}
.drawer.open { transform: none; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.drawer-head h3 { margin: 0; font-size: 15px; }
.np-big { padding: 18px 22px 10px; text-align: center; }
.np-big .bigart { width: min(300px, 70vw); aspect-ratio: 1; margin: 0 auto 14px; border-radius: 18px; background: var(--panel3); display: grid; place-items: center; position: relative; overflow: hidden; box-shadow: 0 30px 60px -20px rgba(229, 36, 59, .35), var(--shadow); }
.np-big .bigart img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.np-big .bigart svg.i { width: 70px; height: 70px; color: #5a2c33; }
.np-big b { display: block; font-size: 18px; }
.np-big small { color: var(--muted); }
.np-big .mob-controls { display: none; }
.queue { overflow-y: auto; flex: 1; padding: 6px 10px 16px; }
.queue h4 { margin: 12px 8px 6px; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; }
.qitem { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 9px; cursor: pointer; user-select: none; }
.qitem:hover { background: var(--panel2); }
.qitem.cur { background: var(--red-dim); }
.qitem.cur b { color: var(--red2); }
.qitem .n { width: 22px; text-align: right; color: var(--muted); font-size: 12px; flex: none; font-variant-numeric: tabular-nums; }
.qitem .t { min-width: 0; flex: 1; }
.qitem .t b { display: block; font-weight: 550; font-size: 13.5px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.qitem .t small { display: block; color: var(--muted); font-size: 12px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.qitem .icon-btn { opacity: 0; }
.qitem:hover .icon-btn { opacity: 1; }
.qitem.dragging { opacity: .4; }
.qitem.drag-over { box-shadow: inset 0 2px 0 var(--red); }

/* ---------- modal / viewer ---------- */
.backdrop { position: fixed; inset: 0; background: rgba(5, 2, 3, .72); backdrop-filter: blur(6px); z-index: 50; display: grid; place-items: center; padding: 20px; animation: fade .15s; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } }
.modal { width: min(480px, 100%); max-height: calc(100vh - 40px); overflow: auto; background: var(--panel); border: 1px solid var(--line2); border-radius: 18px; box-shadow: var(--shadow); animation: pop .18s; }
.modal.wide { width: min(760px, 100%); }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px 8px; }
.modal-head h3 { margin: 0; font-size: 17px; }
.modal-body { padding: 8px 20px 4px; }
.modal-body p { color: var(--text2); margin: 0 0 14px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px 18px; }
.secret-box { display: flex; gap: 8px; align-items: center; background: var(--bg2); border: 1px dashed #5a2c33; padding: 10px 12px; border-radius: 10px; margin-bottom: 14px; word-break: break-all; }
.picker { border: 1px solid var(--line2); border-radius: 12px; max-height: 300px; overflow: auto; margin-bottom: 12px; }
.picker .prow { display: flex; align-items: center; gap: 10px; padding: 8px 12px; cursor: pointer; border-bottom: 1px solid var(--line); }
.picker .prow:hover { background: var(--panel2); }
.picker .prow svg { color: var(--red2); }

.viewer { position: fixed; inset: 0; z-index: 45; background: rgba(4, 2, 2, .94); display: flex; flex-direction: column; animation: fade .15s; }
.viewer-head { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid rgba(255, 255, 255, .06); }
.viewer-head b { font-weight: 600; }
.viewer-body { flex: 1; min-height: 0; display: grid; place-items: center; padding: 18px; position: relative; }
.viewer-body img, .viewer-body video { max-width: 100%; max-height: 100%; border-radius: 8px; box-shadow: var(--shadow); }
.viewer-body video { width: min(1200px, 100%); background: #000; }
.viewer-body iframe { width: min(1100px, 100%); height: 100%; border: 0; border-radius: 10px; background: #fff; }
.viewer-body pre { width: min(1100px, 100%); height: 100%; overflow: auto; margin: 0; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; font: 13px/1.55 var(--mono); color: var(--text2); white-space: pre-wrap; word-break: break-word; }
.viewer-body .doc { width: min(900px, 100%); max-height: 100%; overflow: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 6px 0; }
.viewer-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 46px; height: 46px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .08); color: #fff; cursor: pointer; display: grid; place-items: center; }
.viewer-nav:hover { background: var(--red); }
.viewer-nav.prev { left: 16px; }
.viewer-nav.next { right: 16px; }
.nopreview { text-align: center; color: var(--muted); }
.nopreview svg.i { width: 64px; height: 64px; color: #5a2c33; }

/* ---------- context menu ---------- */
.ctx { position: fixed; z-index: 60; min-width: 210px; background: #1b0f12; border: 1px solid #4a2a30; border-radius: 12px; padding: 6px; box-shadow: var(--shadow); animation: pop .1s; }
.ctx button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; background: none; border: 0; border-radius: 8px; cursor: pointer; color: var(--text2); text-align: left; }
.ctx button:hover { background: var(--panel3); color: #fff; }
.ctx button.danger { color: var(--red3); }
.ctx button.danger:hover { background: rgba(229, 36, 59, .15); }
.ctx hr { border: 0; border-top: 1px solid var(--line2); margin: 5px 4px; }
.ctx .sub { max-height: 240px; overflow: auto; }

/* ---------- toasts + uploads ---------- */
.toasts { position: fixed; right: 18px; bottom: calc(var(--player) + 16px); z-index: 70; display: grid; gap: 8px; width: min(380px, calc(100% - 36px)); }
.toast { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; background: #1d1013; border: 1px solid #4a2a30; box-shadow: var(--shadow); animation: pop .18s; }
.toast.err { border-color: #7a2531; background: #24090e; }
.toast.ok svg { color: var(--ok); }
.toast.err svg { color: var(--red2); }
.toast .grow { word-break: break-word; }
.uploads { position: fixed; left: calc(var(--sidebar) + 18px); bottom: calc(var(--player) + 16px); z-index: 40; width: min(400px, calc(100% - 36px)); background: #170b0e; border: 1px solid #4a2a30; border-radius: 14px; box-shadow: var(--shadow); overflow: hidden; animation: pop .18s; }
.uploads .uh { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.uploads .ul { max-height: 260px; overflow: auto; }
.uploads.collapsed .ul { display: none; }
.uitem { padding: 8px 14px; border-bottom: 1px solid rgba(43, 25, 29, .6); font-size: 13px; }
.uitem .bar { height: 4px; border-radius: 4px; background: var(--panel3); overflow: hidden; margin-top: 6px; }
.uitem .bar i { display: block; height: 100%; width: 0; background: var(--red); transition: width .2s; }
.uitem.done .bar i { background: var(--ok); }
.uitem.failed .bar i { background: #7a2531; }
.dropzone { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; background: rgba(229, 36, 59, .1); border: 3px dashed var(--red); pointer-events: none; font-size: 22px; font-weight: 700; backdrop-filter: blur(3px); }
.dropzone div { background: var(--panel); padding: 22px 30px; border-radius: 18px; box-shadow: var(--shadow); display: flex; gap: 12px; align-items: center; }

/* ---------- settings / cards ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 16px; align-items: start; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; }
.panel h2 { margin: 0 0 4px; font-size: 16px; display: flex; align-items: center; gap: 9px; }
.panel h2 svg { color: var(--red2); }
.panel > p { margin: 0 0 14px; color: var(--muted); font-size: 13px; }
.panel.full { grid-column: 1 / -1; }
.cards > *, .stat-grid > * { min-width: 0; }
.panel .doc { max-height: 420px; overflow: auto; }
.panel .doc .table { table-layout: fixed; }
.panel .doc .table th:nth-child(1) { width: 90px; } .panel .doc .table th:nth-child(2) { width: 170px; }
.panel .doc .table th:nth-child(3) { width: 80px; } .panel .doc .table th:nth-child(4) { width: 130px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; font-size: 13px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.list-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.list-row:first-of-type { border-top: 0; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-bottom: 18px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; }
.stat small { color: var(--muted); font-size: 12px; }
.stat b { display: block; font-size: 22px; letter-spacing: -.02em; margin-top: 2px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.chip { height: 30px; padding: 0 12px; border-radius: 99px; border: 1px solid var(--line2); background: var(--panel); color: var(--text2); cursor: pointer; font-size: 13px; }
.chip:hover { border-color: #5a2c33; color: #fff; }
.chip.on { background: var(--red); border-color: var(--red); color: #fff; }

/* ---------- login / share standalone pages ---------- */
.center-page { min-height: 100%; display: grid; place-items: center; padding: 24px; overflow: auto; background: radial-gradient(800px 500px at 50% -10%, rgba(229, 36, 59, .22), transparent 70%), radial-gradient(600px 400px at 100% 100%, rgba(120, 10, 25, .25), transparent 70%), var(--bg); }
body.page-scroll { overflow: auto; }
.auth-card { width: min(400px, 100%); background: rgba(21, 11, 14, .92); border: 1px solid var(--line2); border-radius: 22px; padding: 30px 28px 26px; box-shadow: 0 40px 100px -30px rgba(229, 36, 59, .35), var(--shadow); animation: pop .25s; }
.auth-card .brand { padding: 0 0 18px; justify-content: center; }
.auth-card h1 { font-size: 20px; text-align: center; margin: 0 0 4px; }
.auth-card .sub { text-align: center; color: var(--muted); margin: 0 0 22px; font-size: 13.5px; }
.auth-card .btn.primary { width: 100%; height: 42px; margin-top: 6px; }
.form-err { color: var(--red3); background: rgba(229, 36, 59, .1); border: 1px solid #5a222b; border-radius: 10px; padding: 9px 12px; margin-bottom: 14px; font-size: 13px; }
.foot-note { text-align: center; color: var(--muted); font-size: 12px; margin-top: 18px; display: flex; gap: 6px; justify-content: center; align-items: center; }
.share-wrap { width: min(1000px, 100%); margin: 0 auto; padding: 28px 20px 60px; }
.share-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; }
.share-head h1 { margin: 0; font-size: 24px; letter-spacing: -.02em; }
.share-file { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 18px; display: grid; place-items: center; gap: 14px; }
.share-file img, .share-file video { max-width: 100%; max-height: 70vh; border-radius: 10px; }
.share-file audio { width: 100%; }
.share-file iframe { width: 100%; height: 75vh; border: 0; border-radius: 10px; background: #fff; }
.share-file pre { width: 100%; max-height: 70vh; overflow: auto; background: var(--bg2); padding: 14px; border-radius: 10px; font: 13px/1.5 var(--mono); white-space: pre-wrap; margin: 0; }
.share-player { position: sticky; bottom: 12px; margin-top: 16px; background: rgba(23, 11, 14, .96); border: 1px solid #4a2a30; border-radius: 14px; padding: 10px 14px; display: flex; align-items: center; gap: 12px; box-shadow: var(--shadow); }
.share-player audio { flex: 1; min-width: 0; height: 40px; }
.share-wrap .table { table-layout: fixed; width: 100%; }
.share-wrap .table th.c-size { width: 72px; }
.share-wrap .table th:last-child { width: 120px; }
.share-wrap .nm { min-width: 0; }
.share-wrap .nm b, .share-wrap .nm small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .player { grid-template-columns: minmax(140px, 1fr) minmax(260px, 1.6fr) auto; }
  .pr .vol { width: 80px; }
  .table .c-date, .table .c-album { display: none; }
}
@media (max-width: 820px) {
  :root { --player: 132px; }
  body { font-size: 14.5px; }
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: min(290px, 85vw); z-index: 40; transform: translateX(-102%); transition: transform .22s; box-shadow: var(--shadow); }
  .sidebar.open { transform: none; }
  .menu-btn { display: inline-grid; }
  .topbar { padding: 10px 12px; gap: 6px; flex-wrap: wrap; }
  .search { order: 5; width: 100%; }
  .search kbd { display: none; }
  .view { padding: 14px 12px 40px; }
  .table .c-size, .table .c-date, .table .c-folder, .table .c-album, .table th.c-size, .table th.c-date { display: none; }
  .table th { top: -14px; }
  .player { grid-template-columns: 1fr auto; grid-template-rows: auto auto; gap: 6px 10px; padding: 8px 12px 10px; align-content: center; }
  .np { grid-column: 1; grid-row: 1; }
  .pr { grid-column: 2; grid-row: 1; }
  .pr .vol, .pr .vol-btn { display: none; }
  .pc { grid-column: 1 / -1; grid-row: 2; }
  .pc .seek { max-width: none; }
  .np .cover { width: 46px; height: 46px; }
  .hero { flex-direction: column; align-items: flex-start; padding: 18px; }
  .hero .art { width: 96px; height: 96px; }
  .hero h1 { font-size: 26px; }
  .cards { grid-template-columns: 1fr; }
  .uploads { left: 12px; }
  .selbar { bottom: 10px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
  .viewer-nav { display: none; }
  .table td.c-act .icon-btn { opacity: 1; }
}
@media (hover: none) {
  .qitem .icon-btn { opacity: 1; }
  .card .cb { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- brand motion (brand.js): intro once per session + slow-request loader ---------- */
html.s10-cover::after { content: ''; position: fixed; inset: 0; background: var(--bg); z-index: 10000; }
#s10intro { position: fixed; inset: 0; z-index: 10000; background: var(--bg); display: grid; place-items: center; cursor: pointer; overflow: hidden; }
#s10intro .b-glow { position: absolute; left: 50%; top: 50%; width: 70vmin; height: 70vmin; margin: -35vmin 0 0 -35vmin; border-radius: 50%;
  background: radial-gradient(circle, rgba(229, 36, 59, .32), rgba(229, 36, 59, 0) 62%); opacity: 0; transform: scale(.4);
  animation: b-glow 1.9s cubic-bezier(.22, 1, .36, 1) forwards; }
#s10intro .b-stage { position: relative; display: grid; justify-items: center; gap: 22px; }
#s10intro .b-logo { width: 116px; height: 116px; opacity: 0; transform: scale(.82); filter: blur(10px);
  animation: b-in .75s cubic-bezier(.22, 1, .36, 1) .05s forwards, b-pulse .9s ease-out 1.25s; }
#s10intro .b-logo svg { width: 100%; height: 100%; display: block; overflow: visible; }
#s10intro .b-track { display: none; }
#s10intro .b-cloud { stroke-dasharray: 1; stroke-dashoffset: 1; animation: b-draw .95s cubic-bezier(.65, 0, .35, 1) .25s forwards; }
#s10intro .b-arrow { opacity: 0; transform: translateY(16px); transform-box: fill-box; animation: b-arrow .55s cubic-bezier(.34, 1.56, .64, 1) .95s forwards; }
#s10intro .b-shine { animation: b-shine .8s cubic-bezier(.45, 0, .2, 1) 1.3s forwards; }
#s10intro .b-word { font-size: 30px; font-weight: 800; letter-spacing: .45em; color: #fff; opacity: 0; filter: blur(8px); margin-right: -.45em;
  animation: b-word .8s cubic-bezier(.22, 1, .36, 1) 1.05s forwards; }
#s10intro .b-word span { color: var(--red2); }
#s10intro.out { animation: b-out .55s cubic-bezier(.55, 0, .7, .2) forwards; }
#s10intro.out .b-stage { animation: b-zoom .55s cubic-bezier(.55, 0, .7, .2) forwards; }
@keyframes b-glow { 40% { opacity: 1; } to { opacity: .55; transform: scale(1.25); } }
@keyframes b-in { to { opacity: 1; transform: none; filter: none; } }
@keyframes b-draw { to { stroke-dashoffset: 0; } }
@keyframes b-arrow { to { opacity: 1; transform: none; } }
@keyframes b-shine { from { transform: skewX(-18deg) translateX(0); } to { transform: skewX(-18deg) translateX(130px); } }
@keyframes b-pulse { 0% { filter: drop-shadow(0 0 0 rgba(255, 77, 94, 0)); } 35% { filter: drop-shadow(0 0 26px rgba(255, 77, 94, .75)); } to { filter: drop-shadow(0 0 0 rgba(255, 77, 94, 0)); } }
@keyframes b-word { to { opacity: 1; filter: none; letter-spacing: .04em; margin-right: -.04em; } }
@keyframes b-out { to { opacity: 0; } }
@keyframes b-zoom { to { transform: scale(1.35); filter: blur(6px); } }

#s10load { position: fixed; inset: 0; z-index: 9000; display: grid; place-items: center; pointer-events: none; opacity: 0; transition: opacity .25s; }
#s10load.on { opacity: 1; }
#s10load .b-card { display: grid; justify-items: center; gap: 10px; padding: 20px 26px 14px; border-radius: 22px; background: rgba(18, 7, 9, .82);
  border: 1px solid #3a1a20; box-shadow: 0 20px 60px -10px rgba(0, 0, 0, .7), 0 0 40px -12px var(--red-glow);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); transform: scale(.92); transition: transform .3s cubic-bezier(.34, 1.56, .64, 1); }
#s10load.on .b-card { transform: none; }
#s10load .b-logo { width: 64px; height: 64px; }
#s10load .b-logo svg { width: 100%; height: 100%; display: block; }
#s10load .b-tile { fill: transparent; }
#s10load .b-cloud { stroke-dasharray: .28 .72; animation: b-trace 1.15s linear infinite; }
#s10load .b-arrow { transform-box: fill-box; animation: b-bob 1.15s cubic-bezier(.45, 0, .55, 1) infinite; }
#s10load small { color: var(--muted, #b9a3a7); font-size: 12px; letter-spacing: .06em; }
@keyframes b-trace { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes b-bob { 0%, 100% { transform: translateY(3px); opacity: .55; } 50% { transform: translateY(-4px); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { #s10load .b-cloud, #s10load .b-arrow { animation-duration: 3s; } }

/* ---------- fun motion: vault login, share padlock, server boot, logo orbit, drawers, wax seal ---------- */
/* vault login */
.vault-dial { position: relative; width: 58px; height: 58px; display: grid; place-items: center; }
.vault-dial img { width: 34px; height: 34px; position: relative; z-index: 1; }
.vault-ring { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.vault-ring circle { fill: none; stroke: #3a1a20; stroke-width: 1.5; }
.vault-ring line { stroke: #6b3a42; stroke-width: 1.3; stroke-linecap: round; }
.vault-ring line.major { stroke: var(--red2); stroke-width: 2; }
.vault-ring .notch { fill: var(--red2); }
.center-page { perspective: 1400px; }
.auth-card.vault-open { animation: v-door .95s cubic-bezier(.6, 0, .3, 1) .55s forwards; transform-origin: 0 50%; }
.auth-card.vault-open .vault-dial img { animation: v-glow .6s ease-out forwards; }
@keyframes v-door { 0% { transform: none; } 18% { transform: translateZ(14px); } to { transform: rotateY(-108deg); opacity: .2; } }
@keyframes v-glow { to { filter: drop-shadow(0 0 18px var(--red2)) brightness(1.3); } }
body.vault-light::before { content: ''; position: fixed; inset: 0; pointer-events: none; background: radial-gradient(circle at 50% 50%, rgba(255, 77, 94, .35), transparent 60%); animation: fade .8s .6s both; }
.auth-card.denied { animation: v-deny .55s cubic-bezier(.36, .07, .19, .97); border-color: var(--red); }
.auth-card.denied::after { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; animation: v-glitch .55s steps(1) forwards; }
.auth-card { position: relative; }
@keyframes v-deny {
  0%, 100% { transform: none; filter: none; }
  10% { transform: translateX(-12px) skewX(-4deg); filter: drop-shadow(4px 0 0 rgba(255, 0, 40, .8)) drop-shadow(-4px 0 0 rgba(0, 255, 255, .45)); }
  25% { transform: translateX(10px) skewX(3deg); filter: drop-shadow(-5px 0 0 rgba(255, 0, 40, .8)) drop-shadow(5px 0 0 rgba(0, 255, 255, .45)); }
  40% { transform: translateX(-8px); filter: hue-rotate(-10deg) saturate(2); }
  55% { transform: translateX(6px); filter: none; }
  70% { transform: translateX(-3px); } 85% { transform: translateX(2px); } }
@keyframes v-glitch {
  0% { background: linear-gradient(transparent 20%, rgba(255, 30, 60, .35) 20% 26%, transparent 26% 61%, rgba(255, 30, 60, .25) 61% 64%, transparent 64%); }
  20% { background: linear-gradient(transparent 44%, rgba(255, 30, 60, .4) 44% 52%, transparent 52% 80%, rgba(0, 255, 255, .15) 80% 83%, transparent 83%); }
  40% { background: linear-gradient(transparent 8%, rgba(0, 255, 255, .15) 8% 12%, transparent 12% 70%, rgba(255, 30, 60, .35) 70% 78%, transparent 78%); }
  60%, 100% { background: transparent; } }
/* share padlock */
.padlock { width: 64px; height: 76px; margin: 0 auto 12px; display: block; overflow: visible; }
.padlock .shackle { fill: none; stroke: #c9b8bb; stroke-width: 6; stroke-linecap: round; transform-box: view-box; }
.padlock .lbody { fill: url(#plg); }
.padlock .khole { fill: #1a0a0d; }
/* server boot (intro bonus after a day away) */
#s10intro .b-rack { display: flex; flex-direction: column; align-items: center; gap: 8px; opacity: 0; animation: b-in .3s 1.25s forwards; }
#s10intro .b-leds { display: flex; gap: 7px; }
#s10intro .b-leds i { width: 7px; height: 7px; border-radius: 50%; background: #2a1418; animation: b-led .5s steps(1) forwards; }
#s10intro .b-leds i:nth-child(1) { animation-delay: 1.30s; } #s10intro .b-leds i:nth-child(2) { animation-delay: 1.38s; }
#s10intro .b-leds i:nth-child(3) { animation-delay: 1.44s; } #s10intro .b-leds i:nth-child(4) { animation-delay: 1.53s; }
#s10intro .b-leds i:nth-child(5) { animation-delay: 1.58s; } #s10intro .b-leds i:nth-child(6) { animation-delay: 1.67s; }
#s10intro .b-leds i:nth-child(7) { animation-delay: 1.72s; }
#s10intro .b-leds i:nth-child(8) { animation: b-led .5s steps(1) 1.8s forwards, b-blink .4s steps(1) 2.3s infinite; }
#s10intro .b-rack small { font: 600 10.5px/1 var(--mono); letter-spacing: .3em; color: #6fdc9a; opacity: 0; animation: b-in .35s 1.95s forwards; }
@keyframes b-led { 0% { background: #3ddc84; box-shadow: 0 0 8px #3ddc84; } 20% { background: #2a1418; box-shadow: none; } 40%, 100% { background: #3ddc84; box-shadow: 0 0 8px #3ddc84; } }
@keyframes b-blink { 50% { background: #ffb020; box-shadow: 0 0 8px #ffb020; } }
/* logo orbit */
.orbit-logo { position: fixed; z-index: 9500; pointer-events: none; filter: drop-shadow(0 0 14px var(--red2)); }
.orbit-ghost { position: fixed; z-index: 9499; pointer-events: none; border-radius: 10px; opacity: .5; animation: o-ghost .45s forwards; }
@keyframes o-ghost { to { opacity: 0; } }
.brand img.annoyed { filter: drop-shadow(0 0 12px var(--red)) saturate(1.6) brightness(1.15); }
/* wax seal */
.wax { display: grid; place-items: center; height: 118px; margin: 4px 0 6px; }
.wax-seal { width: 96px; height: 96px; display: grid; place-items: center; border-radius: 47% 53% 50% 50% / 52% 46% 54% 48%;
  background: radial-gradient(circle at 35% 30%, #ff5a6a, #c4142a 45%, #7d0a17 100%);
  box-shadow: inset 0 0 0 7px rgba(0, 0, 0, .12), inset 0 0 0 9px rgba(255, 120, 130, .25), inset -6px -8px 14px rgba(0, 0, 0, .35), 0 8px 24px -6px rgba(0, 0, 0, .7);
  opacity: 0; animation: w-stamp .6s cubic-bezier(.5, 0, .75, 0) forwards, w-squish .45s cubic-bezier(.3, 1.6, .5, 1) .6s; }
.wax-seal svg { width: 48px; height: 48px; filter: drop-shadow(1px 1px 0 rgba(255, 140, 150, .45)) drop-shadow(-1px -1px 0 rgba(60, 0, 8, .6)); }
.wax-seal svg path { stroke: #8e0d1d !important; }
.wax-after { opacity: 0; transform: translateY(8px); animation: w-reveal .35s .85s forwards; }
@keyframes w-reveal { to { opacity: 1; transform: none; } }
@keyframes w-stamp { 0% { opacity: 0; transform: scale(2.8) rotate(-28deg); } 30% { opacity: 1; } 100% { opacity: 1; transform: scale(1) rotate(0); } }
@keyframes w-squish { 0% { transform: scale(1.12, .86); } 100% { transform: none; } }
@media (prefers-reduced-motion: reduce) { .auth-card.vault-open, .auth-card.denied, .wax-seal, .wax-after { animation-duration: .01s !important; animation-delay: 0s !important; } }

/* ---------- fun motion 2: magnet buttons, trash burp + chomp, hazard tape, "mini" terminal ---------- */
.mag { transition: transform .1s ease-out; }
.mag-back { transition: transform .5s cubic-bezier(.3, 1.8, .5, 1); }
/* sidebar trash: lid opens when you drag files over it */
.trash-ico .lid { transform-origin: 4px 6px; transition: transform .15s cubic-bezier(.3, 1.6, .5, 1); }
.nav a.chomp-ready { background: var(--red-dim); color: var(--text); box-shadow: inset 0 0 0 1px var(--red); }
.nav a.chomp-ready .trash-ico .lid { transform: rotate(-32deg) translate(-1px, -1px); }
/* empty trash: big can that eats everything and burps */
.burp-can { position: fixed; z-index: 9200; width: 120px; height: 120px; pointer-events: none; filter: drop-shadow(0 12px 30px rgba(0, 0, 0, .6)); }
.burp-can svg { width: 100%; height: 100%; overflow: visible; fill: none; stroke: var(--red2); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.burp-can .body { fill: #1c0b0f; }
.burp-can .lid { transform-origin: 3px 6px; transform-box: view-box; }
.burp-bubble { position: absolute; left: 70%; top: -26px; padding: 6px 12px; border-radius: 14px 14px 14px 4px; background: #fff; color: #120709; font: 800 15px/1 var(--font, system-ui); white-space: nowrap; opacity: 0; transform: scale(.3); transform-origin: 0 100%; }
/* hazard tape (shift + click logo) */
.hazard { position: fixed; inset: 0; z-index: 9600; pointer-events: none; overflow: hidden; display: grid; place-items: center; }
.hazard .dim { position: absolute; inset: 0; background: rgba(0, 0, 0, .55); opacity: 0; }
.hazard .tape { position: absolute; width: 150vw; height: 58px; display: grid; place-items: center; background: #ffcc00; color: #111; font: 900 22px/1 var(--font, system-ui); letter-spacing: .12em; white-space: nowrap; overflow: hidden; box-shadow: 0 10px 40px rgba(0, 0, 0, .6); }
.hazard .tape::before, .hazard .tape::after { content: ''; position: absolute; left: 0; right: 0; height: 11px; background: repeating-linear-gradient(-45deg, #111 0 14px, #ffcc00 14px 28px); }
.hazard .tape::before { top: 0; } .hazard .tape::after { bottom: 0; }
.hazard .t1 { transform: rotate(-7deg); } .hazard .t2 { transform: rotate(5deg); margin-top: 150px; }
/* "mini" terminal */
.mini-term { position: fixed; z-index: 9400; top: 12px; left: 50%; width: min(640px, 94vw); margin-left: max(-320px, -47vw); border-radius: 14px; overflow: hidden;
  background: rgba(8, 4, 5, .94); border: 1px solid #3a1a20; box-shadow: 0 30px 80px -10px rgba(0, 0, 0, .8), 0 0 50px -15px var(--red-glow);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); font: 13px/1.6 var(--mono); color: #d9cbcd; }
.mini-term .bar { display: flex; align-items: center; gap: 7px; padding: 9px 12px; background: rgba(255, 255, 255, .04); border-bottom: 1px solid #2a1418; }
.mini-term .bar i { width: 11px; height: 11px; border-radius: 50%; background: #ff5f57; } .mini-term .bar i:nth-child(2) { background: #febc2e; } .mini-term .bar i:nth-child(3) { background: #28c840; }
.mini-term .bar span { flex: 1; text-align: center; color: var(--muted); font-size: 12px; }
.mini-term .bar button { background: none; border: 0; color: var(--muted); cursor: pointer; font: inherit; padding: 0 4px; }
.mini-term pre { margin: 0; padding: 14px 16px 16px; white-space: pre-wrap; font: inherit; min-height: 230px; }
.mini-term .p { color: var(--red2); } .mini-term .ok { color: #6fdc9a; } .mini-term .dim { color: #7d6a6e; } .mini-term .bar-fill { color: var(--red2); }
.mini-term .cur { display: inline-block; width: 8px; height: 15px; background: #d9cbcd; vertical-align: -2px; animation: t-blink 1s steps(1) infinite; }
@keyframes t-blink { 50% { opacity: 0; } }
