/* Guloxy Cloud — облачный диск от команды Guloxy */

/* ---------------------------------------------------------------- tokens */

:root {
  --accent-1: #7c5cff;
  --accent-2: #a78bfa;
  --accent-glow: rgba(124, 92, 255, .38);

  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;
  --r-pill: 999px;

  --ease: cubic-bezier(.4, 0, .2, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --t-fast: .16s;
  --t-mid: .28s;
  --t-slow: .45s;

  --sidebar-w: 268px;
  --topbar-h: 68px;

  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;
}

[data-accent="ocean"]  { --accent-1:#2b8dff; --accent-2:#5ee7f5; --accent-glow:rgba(43,141,255,.38); }
[data-accent="sunset"] { --accent-1:#ff5f6d; --accent-2:#ffa25f; --accent-glow:rgba(255,95,109,.38); }
[data-accent="forest"] { --accent-1:#18b57a; --accent-2:#8fe36a; --accent-glow:rgba(24,181,122,.38); }
[data-accent="rose"]   { --accent-1:#ff4d94; --accent-2:#ff9ecb; --accent-glow:rgba(255,77,148,.38); }
[data-accent="amber"]  { --accent-1:#f5a623; --accent-2:#ffd76e; --accent-glow:rgba(245,166,35,.38); }

[data-theme="dark"] {
  --bg: #08080f;
  --bg-2: #0d0d17;
  --panel: rgba(22, 22, 34, .72);
  --panel-solid: #16161f;
  --panel-2: rgba(255, 255, 255, .04);
  --hover: rgba(255, 255, 255, .06);
  --active: rgba(255, 255, 255, .09);
  --border: rgba(255, 255, 255, .09);
  --border-strong: rgba(255, 255, 255, .16);
  --text: #eef0f6;
  --text-2: #a4a8bd;
  --text-3: #6b6f85;
  --shadow: 0 18px 50px rgba(0, 0, 0, .55);
  --shadow-sm: 0 4px 16px rgba(0, 0, 0, .35);
  --scrim: rgba(4, 4, 10, .72);
  color-scheme: dark;
}

[data-theme="light"] {
  --bg: #f6f7fb;
  --bg-2: #eef0f7;
  --panel: rgba(255, 255, 255, .82);
  --panel-solid: #ffffff;
  --panel-2: rgba(15, 18, 40, .04);
  --hover: rgba(15, 18, 40, .05);
  --active: rgba(15, 18, 40, .09);
  --border: rgba(15, 18, 40, .10);
  --border-strong: rgba(15, 18, 40, .18);
  --text: #14162a;
  --text-2: #545a75;
  --text-3: #878da8;
  --shadow: 0 18px 50px rgba(20, 22, 45, .14);
  --shadow-sm: 0 4px 16px rgba(20, 22, 45, .09);
  --scrim: rgba(20, 22, 45, .45);
  color-scheme: light;
}

/* ---------------------------------------------------------------- reset */

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; }
a { color: inherit; text-decoration: none; }
img, svg, video { max-width: 100%; display: block; }
h1, h2, h3, h4, p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
svg.filled { fill: currentColor; stroke: none; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 99px; border: 3px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: var(--text-3); background-clip: content-box; }

:focus-visible { outline: 2px solid var(--accent-1); outline-offset: 2px; border-radius: 6px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

/* ---------------------------------------------------------------- boot */

.boot {
  position: fixed; inset: 0; z-index: 999;
  display: grid; place-content: center; gap: 22px; justify-items: center;
  background: var(--bg);
  transition: opacity var(--t-slow) var(--ease), visibility var(--t-slow);
}
.boot.hide { opacity: 0; visibility: hidden; }
.boot-mark {
  width: 62px; height: 62px; border-radius: var(--r-lg);
  display: grid; place-content: center;
  background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
  box-shadow: 0 12px 40px var(--accent-glow);
  animation: bootPulse 1.6s var(--ease) infinite;
}
.boot-mark svg { width: 34px; height: 34px; color: #fff; stroke-width: 1.9; }
.boot-bar { width: 150px; height: 3px; border-radius: 99px; background: var(--border); overflow: hidden; }
.boot-bar span { display: block; height: 100%; width: 40%; border-radius: 99px; background: linear-gradient(90deg, var(--accent-1), var(--accent-2)); animation: bootSlide 1.15s var(--ease) infinite; }

@keyframes bootPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.07); } }
@keyframes bootSlide { 0% { transform: translateX(-115%); } 100% { transform: translateX(290%); } }

/* ---------------------------------------------------------------- shared bits */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  height: 44px; padding: 0 20px; border-radius: var(--r-md);
  font-size: 14.5px; font-weight: 600; letter-spacing: -.01em;
  background: var(--panel-2); color: var(--text);
  border: 1px solid var(--border);
  transition: transform var(--t-fast) var(--ease), background var(--t-fast), border-color var(--t-fast), box-shadow var(--t-fast), opacity var(--t-fast);
  white-space: nowrap;
}
.btn svg { width: 19px; height: 19px; }
.btn:hover { background: var(--hover); border-color: var(--border-strong); }
.btn:active { transform: scale(.97); }
.btn[disabled] { opacity: .5; pointer-events: none; }

.btn-primary {
  background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
  color: #fff; border-color: transparent;
  box-shadow: 0 8px 24px var(--accent-glow);
}
.btn-primary:hover { box-shadow: 0 12px 32px var(--accent-glow); filter: brightness(1.06); }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: var(--hover); }
.btn-danger { color: #ff6b6b; }
.btn-danger:hover { background: rgba(255, 107, 107, .12); border-color: rgba(255, 107, 107, .3); }
.btn-block { width: 100%; }
.btn-sm { height: 36px; padding: 0 14px; font-size: 13.5px; border-radius: var(--r-sm); }

.icon-btn {
  width: 42px; height: 42px; flex: 0 0 auto;
  display: grid; place-content: center; border-radius: var(--r-sm);
  color: var(--text-2);
  transition: background var(--t-fast), color var(--t-fast), transform var(--t-fast) var(--ease);
}
.icon-btn:hover { background: var(--hover); color: var(--text); }
.icon-btn:active { transform: scale(.9); }
.icon-btn.on { color: var(--accent-1); background: var(--active); }

.field { display: grid; gap: 7px; }
.field label { font-size: 13px; font-weight: 600; color: var(--text-2); }
.input {
  height: 48px; padding: 0 15px; width: 100%;
  border-radius: var(--r-md);
  background: var(--panel-2);
  border: 1px solid var(--border);
  color: var(--text);
  transition: border-color var(--t-fast), background var(--t-fast), box-shadow var(--t-fast);
}
.input::placeholder { color: var(--text-3); }
.input:focus { outline: none; border-color: var(--accent-1); background: transparent; box-shadow: 0 0 0 4px var(--accent-glow); }
textarea.input { height: auto; padding: 13px 15px; resize: vertical; min-height: 90px; }
select.input { appearance: none; cursor: pointer; }

.checkbox { display: flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; font-size: 14px; color: var(--text-2); }
.checkbox input { position: absolute; opacity: 0; pointer-events: none; }
.checkbox .box {
  width: 21px; height: 21px; flex: 0 0 auto; border-radius: 7px;
  border: 1.6px solid var(--border-strong); display: grid; place-content: center;
  transition: background var(--t-fast) var(--ease), border-color var(--t-fast), transform var(--t-fast) var(--spring);
}
.checkbox .box svg { width: 14px; height: 14px; color: #fff; stroke-width: 2.6; opacity: 0; transform: scale(.5); transition: opacity var(--t-fast), transform var(--t-fast) var(--spring); }
.checkbox input:checked + .box { background: linear-gradient(135deg, var(--accent-1), var(--accent-2)); border-color: transparent; }
.checkbox input:checked + .box svg { opacity: 1; transform: scale(1); }
.checkbox:active .box { transform: scale(.9); }

.err {
  padding: 12px 15px; border-radius: var(--r-md); font-size: 13.5px; font-weight: 500;
  background: rgba(255, 87, 87, .12); color: #ff7a7a; border: 1px solid rgba(255, 87, 87, .25);
  animation: shake .35s var(--ease);
}
@keyframes shake { 0%,100%{transform:translateX(0)} 25%{transform:translateX(-5px)} 75%{transform:translateX(5px)} }

.spinner {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .32); border-top-color: #fff;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 28px; padding: 0 11px; border-radius: var(--r-pill);
  font-size: 12.5px; font-weight: 600;
  background: var(--panel-2); border: 1px solid var(--border); color: var(--text-2);
}
.chip svg { width: 14px; height: 14px; }

/* ---------------------------------------------------------------- landing */

.aurora { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.aurora i {
  position: absolute; display: block; border-radius: 50%;
  filter: blur(90px); opacity: .5;
  animation: drift 22s var(--ease) infinite alternate;
}
.aurora i:nth-child(1) { width: 46vw; height: 46vw; left: -10vw; top: -12vw; background: var(--accent-1); }
.aurora i:nth-child(2) { width: 38vw; height: 38vw; right: -8vw; top: 8vh; background: var(--accent-2); animation-delay: -7s; }
.aurora i:nth-child(3) { width: 42vw; height: 42vw; left: 28vw; bottom: -18vw; background: var(--accent-1); opacity: .3; animation-delay: -13s; }
@keyframes drift {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  100% { transform: translate3d(6vw, 5vh, 0) scale(1.18); }
}

.land { position: relative; z-index: 1; }

.land-nav {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 16px;
  height: 74px; padding: 0 clamp(18px, 5vw, 60px);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  border-bottom: 1px solid var(--border);
}
.land-nav .spacer { flex: 1; }

.brand { display: inline-flex; align-items: center; gap: 11px; font-weight: 800; font-size: 19px; letter-spacing: -.03em; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 12px; flex: 0 0 auto;
  display: grid; place-content: center;
  background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
  box-shadow: 0 6px 20px var(--accent-glow);
}
.brand-mark svg { width: 22px; height: 22px; color: #fff; stroke-width: 1.9; }
.brand small { display: block; font-size: 10.5px; font-weight: 600; color: var(--text-3); letter-spacing: .06em; text-transform: uppercase; margin-top: -2px; }

.hero {
  display: grid; place-items: center; text-align: center;
  padding: clamp(60px, 11vh, 120px) clamp(18px, 5vw, 60px) clamp(50px, 8vh, 90px);
  gap: 26px;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 16px; border-radius: var(--r-pill);
  font-size: 13px; font-weight: 600; color: var(--text-2);
  background: var(--panel); border: 1px solid var(--border);
  backdrop-filter: blur(12px);
  animation: rise .6s var(--ease) both;
}
.hero-badge svg { width: 15px; height: 15px; color: var(--accent-1); }
.hero h1 {
  font-size: clamp(38px, 7.5vw, 76px); line-height: 1.03; font-weight: 800; letter-spacing: -.045em;
  max-width: 15ch;
  animation: rise .6s .06s var(--ease) both;
}
.hero h1 .grad {
  background: linear-gradient(115deg, var(--accent-1), var(--accent-2) 60%, var(--accent-1));
  background-size: 200% auto;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  animation: shimmer 6s linear infinite;
}
@keyframes shimmer { to { background-position: 200% center; } }
.hero p.sub {
  font-size: clamp(15.5px, 2.1vw, 19px); color: var(--text-2); max-width: 56ch; line-height: 1.6;
  animation: rise .6s .12s var(--ease) both;
}
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; animation: rise .6s .18s var(--ease) both; }
.hero-cta .btn { height: 52px; padding: 0 26px; font-size: 15.5px; border-radius: var(--r-md); }
.hero-note { font-size: 13px; color: var(--text-3); animation: rise .6s .24s var(--ease) both; }

@keyframes rise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }

.hero-shot {
  width: min(1040px, 92vw); margin: 0 auto;
  border-radius: var(--r-xl); overflow: hidden;
  border: 1px solid var(--border); background: var(--panel-solid);
  box-shadow: var(--shadow);
  animation: rise .8s .3s var(--ease) both;
}
.shot-bar { display: flex; align-items: center; gap: 7px; padding: 12px 16px; border-bottom: 1px solid var(--border); background: var(--panel-2); }
.shot-bar i { width: 11px; height: 11px; border-radius: 50%; background: var(--border-strong); display: block; flex: 0 0 auto; }
.shot-bar i:nth-child(1) { background: #ff5f57; }
.shot-bar i:nth-child(2) { background: #febc2e; }
.shot-bar i:nth-child(3) { background: #28c840; }
.shot-url {
  margin-left: 12px; flex: 1; max-width: 260px; height: 24px; border-radius: 99px;
  background: var(--bg); border: 1px solid var(--border);
  font-size: 11px; color: var(--text-3); display: grid; place-content: center;
}

.shot-body { display: grid; grid-template-columns: 196px 1fr; min-height: 330px; text-align: left; }
.shot-side { border-right: 1px solid var(--border); padding: 15px 12px; display: grid; gap: 5px; align-content: start; }

.shot-up, .shot-nav {
  display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 11px;
  border-radius: 10px; font-size: 12.5px; font-weight: 600; color: var(--text-3);
}
.shot-up svg, .shot-nav svg { width: 16px; height: 16px; flex: 0 0 auto; }
.shot-up { background: linear-gradient(135deg, var(--accent-1), var(--accent-2)); color: #fff; margin-bottom: 8px; box-shadow: 0 6px 16px var(--accent-glow); }
.shot-nav.on { background: var(--active); color: var(--text); }

.shot-meter { margin-top: 12px; padding: 11px; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--border); display: grid; gap: 7px; }
.shot-meter b { font-size: 11px; font-weight: 650; color: var(--text-3); }
.shot-meter i { height: 5px; border-radius: 99px; background: var(--border); display: block; overflow: hidden; }
.shot-meter u { display: block; width: 24%; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--accent-1), var(--accent-2)); }

.shot-main { padding: 15px 18px 20px; min-width: 0; }
.shot-crumbs { font-size: 14px; font-weight: 700; letter-spacing: -.02em; margin-bottom: 13px; }
.shot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 12px; align-content: start; }

.shot-card {
  display: grid; gap: 3px; padding: 9px; border-radius: 12px;
  background: var(--panel-2); border: 1px solid var(--border);
  animation: fadeUp .5s var(--ease) both; min-width: 0;
}
.shot-thumb {
  aspect-ratio: 1 / .72; border-radius: 8px; margin-bottom: 5px;
  display: grid; place-content: center; background: var(--bg);
}
.shot-thumb svg { width: 24px; height: 24px; color: var(--text-3); stroke-width: 1.4; }
.shot-thumb.tint { background: linear-gradient(140deg, var(--accent-1), var(--accent-2)); }
.shot-thumb.tint svg { color: rgba(255, 255, 255, .92); }
.shot-thumb.folder svg { color: var(--accent-1); fill: color-mix(in srgb, var(--accent-1) 18%, transparent); }
.shot-card b { font-size: 11.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.shot-card em { font-size: 10px; font-style: normal; color: var(--text-3); }

@media (max-width: 720px) {
  .shot-body { grid-template-columns: 1fr; }
  .shot-side { display: none; }
  .shot-grid { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); }
}

.features {
  padding: clamp(50px, 9vh, 100px) clamp(18px, 5vw, 60px);
  display: grid; gap: 40px; max-width: 1200px; margin: 0 auto;
}
.sec-head { text-align: center; display: grid; gap: 12px; justify-items: center; }
.sec-head h2 { font-size: clamp(27px, 4.2vw, 40px); font-weight: 800; letter-spacing: -.035em; }
.sec-head p { color: var(--text-2); max-width: 52ch; line-height: 1.6; }

.f-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(255px, 1fr)); gap: 18px; }
.f-card {
  padding: 26px; border-radius: var(--r-lg);
  background: var(--panel); border: 1px solid var(--border);
  backdrop-filter: blur(14px);
  display: grid; gap: 12px; align-content: start;
  transition: transform var(--t-mid) var(--ease), border-color var(--t-mid), box-shadow var(--t-mid);
}
.f-card:hover { transform: translateY(-5px); border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.f-icon {
  width: 46px; height: 46px; border-radius: var(--r-md); display: grid; place-content: center;
  background: linear-gradient(135deg, var(--accent-1), var(--accent-2)); color: #fff;
  box-shadow: 0 8px 22px var(--accent-glow);
}
.f-card h3 { font-size: 17px; font-weight: 700; letter-spacing: -.02em; }
.f-card p { font-size: 14.2px; color: var(--text-2); line-height: 1.62; }

.cta-band {
  margin: 0 clamp(18px, 5vw, 60px) clamp(40px, 7vh, 80px);
  padding: clamp(36px, 6vw, 64px); border-radius: var(--r-xl); text-align: center;
  background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
  color: #fff; display: grid; gap: 18px; justify-items: center;
  box-shadow: 0 24px 60px var(--accent-glow);
  position: relative; overflow: hidden;
}
.cta-band h2 { font-size: clamp(25px, 4vw, 38px); font-weight: 800; letter-spacing: -.035em; }
.cta-band p { opacity: .92; max-width: 50ch; line-height: 1.6; }
.cta-band .btn { background: #fff; color: #1a1a2e; border-color: transparent; height: 50px; padding: 0 28px; box-shadow: 0 10px 30px rgba(0,0,0,.18); }
.cta-band .btn:hover { filter: none; transform: translateY(-2px); }

.land-foot {
  padding: 34px clamp(18px, 5vw, 60px) 44px; border-top: 1px solid var(--border);
  display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between;
  color: var(--text-3); font-size: 13.5px;
}
.land-foot .by { color: var(--text-2); }
.land-foot .by b { color: var(--text); font-weight: 700; }

/* ---------------------------------------------------------------- auth */

.auth-wrap { position: relative; z-index: 1; min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: 1fr; place-items: center; padding: 26px 18px; }
.auth-card {
  width: min(430px, 100%); padding: clamp(26px, 5vw, 38px); border-radius: var(--r-xl);
  background: var(--panel); border: 1px solid var(--border);
  backdrop-filter: blur(24px) saturate(160%); -webkit-backdrop-filter: blur(24px) saturate(160%);
  box-shadow: var(--shadow);
  display: grid; gap: 20px;
  animation: popIn .5s var(--spring) both;
}
@keyframes popIn { from { opacity: 0; transform: translateY(18px) scale(.97); } to { opacity: 1; transform: none; } }
.auth-card .head { display: grid; gap: 8px; justify-items: center; text-align: center; }
.auth-card h1 { font-size: 25px; font-weight: 800; letter-spacing: -.035em; }
.auth-card .head p { font-size: 14px; color: var(--text-2); }
.auth-form { display: grid; gap: 15px; }
.auth-alt { text-align: center; font-size: 14px; color: var(--text-2); }
.auth-alt a { color: var(--accent-1); font-weight: 600; }
.auth-alt a:hover { text-decoration: underline; }
.auth-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.auth-back { position: fixed; top: 22px; left: 22px; z-index: 5; }

/* ---------------------------------------------------------------- app shell */

.app { display: grid; grid-template-columns: var(--sidebar-w) 1fr; min-height: 100vh; min-height: 100dvh; }

.side {
  position: sticky; top: 0; height: 100vh; height: 100dvh;
  display: grid; grid-template-rows: auto auto 1fr auto;
  gap: 16px; padding: 20px 15px;
  background: var(--bg-2); border-right: 1px solid var(--border);
  z-index: 30;
}
.side-brand { padding: 0 7px; }

.nav { display: grid; gap: 3px; align-content: start; overflow-y: auto; }
.nav-item {
  display: flex; align-items: center; gap: 13px;
  height: 46px; padding: 0 14px; border-radius: var(--r-md);
  font-size: 14.5px; font-weight: 600; color: var(--text-2);
  transition: background var(--t-fast), color var(--t-fast), transform var(--t-fast) var(--ease);
  position: relative; width: 100%; text-align: left;
}
.nav-item svg { width: 20px; height: 20px; flex: 0 0 auto; }
.nav-item:hover { background: var(--hover); color: var(--text); }
.nav-item:active { transform: scale(.98); }
.nav-item.on { color: var(--text); background: var(--active); }
.nav-item.on::before {
  content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 3px; height: 22px; border-radius: 0 3px 3px 0;
  background: linear-gradient(180deg, var(--accent-1), var(--accent-2));
}
.nav-item .count { margin-left: auto; font-size: 12px; font-weight: 700; color: var(--text-3); }

.storage { display: grid; gap: 10px; padding: 15px; border-radius: var(--r-md); background: var(--panel-2); border: 1px solid var(--border); }
.storage-top { display: flex; align-items: baseline; justify-content: space-between; font-size: 12.5px; }
.storage-top b { font-size: 13.5px; font-weight: 700; }
.storage-top span { color: var(--text-3); }
.meter { height: 7px; border-radius: 99px; background: var(--border); overflow: hidden; }
.meter i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--accent-1), var(--accent-2)); transition: width var(--t-slow) var(--ease); }
.meter.warn i { background: linear-gradient(90deg, #ff9f43, #ff6b6b); }
.storage small { font-size: 11.5px; color: var(--text-3); }

.side-user {
  display: flex; align-items: center; gap: 11px; width: 100%;
  padding: 9px; border-radius: var(--r-md);
  transition: background var(--t-fast);
}
.side-user:hover { background: var(--hover); }
.side-user .meta { min-width: 0; text-align: left; flex: 1; }
.side-user .meta b { display: block; font-size: 13.8px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-user .meta span { display: block; font-size: 11.8px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.avatar {
  width: 38px; height: 38px; flex: 0 0 auto; border-radius: 50%;
  display: grid; place-content: center; font-size: 14.5px; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
  box-shadow: 0 4px 14px var(--accent-glow);
  text-transform: uppercase; user-select: none;
}
.avatar.lg { width: 62px; height: 62px; font-size: 23px; }
.avatar.sm { width: 30px; height: 30px; font-size: 12px; }

.main { display: grid; grid-template-rows: auto 1fr; min-width: 0; }

.topbar {
  position: sticky; top: 0; z-index: 25;
  display: flex; align-items: center; gap: 12px;
  height: var(--topbar-h); padding: 0 clamp(14px, 2.5vw, 26px);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(18px) saturate(160%); -webkit-backdrop-filter: blur(18px) saturate(160%);
  border-bottom: 1px solid var(--border);
}

.crumbs { display: flex; align-items: center; gap: 3px; min-width: 0; flex: 1; overflow: hidden; }
.crumb {
  padding: 7px 11px; border-radius: var(--r-sm); font-size: 15.5px; font-weight: 650; letter-spacing: -.02em;
  color: var(--text-2); white-space: nowrap; transition: background var(--t-fast), color var(--t-fast);
  max-width: 240px; overflow: hidden; text-overflow: ellipsis;
}
.crumb:hover { background: var(--hover); color: var(--text); }
.crumb.last { color: var(--text); pointer-events: none; }
.crumb-sep { color: var(--text-3); flex: 0 0 auto; font-size: 15px; }

.search {
  position: relative; flex: 0 1 340px; min-width: 0;
}
.search svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--text-3); pointer-events: none; }
.search input {
  height: 42px; width: 100%; padding: 0 14px 0 41px; border-radius: var(--r-pill);
  background: var(--panel-2); border: 1px solid var(--border); color: var(--text);
  transition: border-color var(--t-fast), box-shadow var(--t-fast), background var(--t-fast);
  font-size: 14px;
}
.search input::placeholder { color: var(--text-3); }
.search input:focus { outline: none; border-color: var(--accent-1); box-shadow: 0 0 0 4px var(--accent-glow); background: transparent; }

.content { padding: clamp(16px, 2.6vw, 28px); min-width: 0; position: relative; }

.toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; flex-wrap: wrap; }
.toolbar .spacer { flex: 1; }
.seg { display: flex; gap: 2px; padding: 3px; border-radius: var(--r-sm); background: var(--panel-2); border: 1px solid var(--border); }
.seg button { width: 34px; height: 32px; border-radius: 7px; display: grid; place-content: center; color: var(--text-3); transition: background var(--t-fast), color var(--t-fast); }
.seg button svg { width: 17px; height: 17px; }
.seg button.on { background: var(--panel-solid); color: var(--text); box-shadow: var(--shadow-sm); }

.view-title { display: flex; align-items: center; gap: 11px; }
.view-title h2 { font-size: 22px; font-weight: 750; letter-spacing: -.03em; }

/* -------- file grid */

.grid {
  display: grid; gap: 13px;
  grid-template-columns: repeat(auto-fill, minmax(178px, 1fr));
}
@media (max-width: 520px) { .grid { grid-template-columns: repeat(auto-fill, minmax(144px, 1fr)); gap: 11px; } }

.card {
  position: relative; border-radius: var(--r-md); overflow: hidden;
  background: var(--panel-2); border: 1px solid var(--border);
  cursor: pointer; user-select: none;
  transition: transform var(--t-fast) var(--ease), border-color var(--t-fast), box-shadow var(--t-fast), background var(--t-fast);
  animation: fadeUp .34s var(--ease) both;
}
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.card:hover { border-color: var(--border-strong); background: var(--hover); transform: translateY(-3px); box-shadow: var(--shadow-sm); }
.card:active { transform: translateY(-1px) scale(.99); }
.card.sel { border-color: var(--accent-1); box-shadow: 0 0 0 2px var(--accent-glow); background: var(--active); }
.card.drag-over { border-color: var(--accent-1); background: var(--active); transform: scale(1.03); }
.card.dragging { opacity: .4; }

.card-thumb {
  aspect-ratio: 1 / .74; display: grid; place-content: center; position: relative;
  background: linear-gradient(160deg, var(--panel-2), transparent);
  overflow: hidden;
}
.card-thumb img { width: 100%; height: 100%; object-fit: cover; }
.card-thumb > svg { width: 44px; height: 44px; color: var(--text-3); stroke-width: 1.4; transition: transform var(--t-mid) var(--spring), color var(--t-mid); }
.card:hover .card-thumb > svg { transform: scale(1.1); color: var(--accent-1); }
.card-thumb.folder > svg { color: var(--accent-1); fill: color-mix(in srgb, var(--accent-1) 16%, transparent); }
.play-badge {
  position: absolute; inset: 0; display: grid; place-content: center;
  background: rgba(0,0,0,.28);
}
.play-badge span { width: 42px; height: 42px; border-radius: 50%; background: rgba(255,255,255,.92); display: grid; place-content: center; box-shadow: 0 4px 16px rgba(0,0,0,.3); }
.play-badge svg { width: 18px; height: 18px; color: #111; fill: #111; stroke: none; margin-left: 2px; }

.card-body { padding: 10px 12px 12px; display: grid; gap: 3px; }
.card-name { font-size: 13.4px; font-weight: 600; line-height: 1.35; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; word-break: break-word; }
.card-meta { font-size: 11.5px; color: var(--text-3); display: flex; align-items: center; gap: 6px; }

.card-actions { position: absolute; top: 8px; right: 8px; display: flex; gap: 5px; opacity: 0; transform: translateY(-4px); transition: opacity var(--t-fast), transform var(--t-fast) var(--ease); }
.card:hover .card-actions, .card.sel .card-actions, .card-actions:focus-within { opacity: 1; transform: none; }
.card-actions button {
  width: 30px; height: 30px; border-radius: 8px; display: grid; place-content: center;
  background: color-mix(in srgb, var(--panel-solid) 88%, transparent); color: var(--text-2);
  backdrop-filter: blur(8px); border: 1px solid var(--border);
  transition: background var(--t-fast), color var(--t-fast), transform var(--t-fast);
}
.card-actions button svg { width: 15px; height: 15px; }
.card-actions button:hover { color: var(--text); background: var(--panel-solid); transform: scale(1.08); }

.star-on { color: #ffc542 !important; }
.star-on svg { fill: #ffc542; stroke: #ffc542; }

.card-pick {
  position: absolute; top: 8px; left: 8px; width: 24px; height: 24px; border-radius: 7px;
  border: 1.6px solid rgba(255,255,255,.6); background: rgba(0,0,0,.32); backdrop-filter: blur(6px);
  display: grid; place-content: center; opacity: 0; transform: scale(.8);
  transition: opacity var(--t-fast), transform var(--t-fast) var(--spring), background var(--t-fast);
}
.card:hover .card-pick, .card.sel .card-pick, .picking .card-pick { opacity: 1; transform: none; }
.card-pick svg { width: 14px; height: 14px; color: #fff; stroke-width: 3; opacity: 0; }
.card.sel .card-pick { background: linear-gradient(135deg, var(--accent-1), var(--accent-2)); border-color: transparent; }
.card.sel .card-pick svg { opacity: 1; }

/* -------- file list */

.list { display: grid; gap: 2px; }
.list-head {
  display: grid; grid-template-columns: 1fr 108px 168px 46px; gap: 14px;
  padding: 0 14px 10px; font-size: 12px; font-weight: 700; color: var(--text-3);
  text-transform: uppercase; letter-spacing: .05em; border-bottom: 1px solid var(--border);
}
.row {
  display: grid; grid-template-columns: 1fr 108px 168px 46px; gap: 14px; align-items: center;
  padding: 11px 14px; border-radius: var(--r-sm); cursor: pointer; user-select: none;
  transition: background var(--t-fast), transform var(--t-fast) var(--ease), box-shadow var(--t-fast);
  animation: fadeUp .26s var(--ease) both;
}
.row:hover { background: var(--hover); }
.row.sel { background: var(--active); box-shadow: inset 0 0 0 1px var(--accent-1); }
.row.drag-over { background: var(--active); box-shadow: inset 0 0 0 1.5px var(--accent-1); }
.row.dragging { opacity: .4; }
.row-main { display: flex; align-items: center; gap: 12px; min-width: 0; }
.row-ico { width: 38px; height: 38px; flex: 0 0 auto; border-radius: 9px; display: grid; place-content: center; background: var(--panel-2); overflow: hidden; }
.row-ico img { width: 100%; height: 100%; object-fit: cover; }
.row-ico svg { width: 20px; height: 20px; color: var(--text-3); }
.row-ico.folder svg { color: var(--accent-1); fill: color-mix(in srgb, var(--accent-1) 16%, transparent); }
.row-name { font-size: 14.2px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.row-sub { font-size: 11.8px; color: var(--text-3); }
.row-cell { font-size: 13px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-end { display: flex; justify-content: flex-end; }

@media (max-width: 860px) {
  .list-head, .row { grid-template-columns: 1fr 92px 46px; }
  .list-head span:nth-child(3), .row .row-cell:nth-child(3) { display: none; }
}
@media (max-width: 560px) {
  .list-head { display: none; }
  .row { grid-template-columns: 1fr 46px; }
  .row .row-cell { display: none; }
}

/* -------- empty & skeleton */

.empty {
  display: grid; place-items: center; gap: 15px; text-align: center;
  padding: clamp(48px, 12vh, 100px) 20px; color: var(--text-3);
  animation: fadeUp .4s var(--ease) both;
}
.empty-ico {
  width: 84px; height: 84px; border-radius: var(--r-xl); display: grid; place-content: center;
  background: var(--panel-2); border: 1px solid var(--border);
}
.empty-ico svg { width: 38px; height: 38px; color: var(--text-3); stroke-width: 1.4; }
.empty h3 { font-size: 18px; font-weight: 700; color: var(--text); letter-spacing: -.02em; }
.empty p { font-size: 14px; max-width: 40ch; line-height: 1.6; }

.skel-grid { display: grid; gap: 13px; grid-template-columns: repeat(auto-fill, minmax(178px, 1fr)); }
.skel {
  border-radius: var(--r-md); background: var(--panel-2); border: 1px solid var(--border);
  aspect-ratio: 1 / .98; position: relative; overflow: hidden;
}
.skel::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, var(--hover), transparent);
  animation: sweep 1.3s var(--ease) infinite;
}
@keyframes sweep { to { transform: translateX(100%); } }

/* ---------------------------------------------------------------- selection bar */

.selbar {
  position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%);
  z-index: 60; display: flex; align-items: center; gap: 8px;
  padding: 9px 11px; border-radius: var(--r-pill);
  background: var(--panel-solid); border: 1px solid var(--border-strong);
  box-shadow: var(--shadow);
  animation: barIn .3s var(--spring) both;
  max-width: calc(100vw - 28px); overflow-x: auto;
}
@keyframes barIn { from { opacity: 0; transform: translate(-50%, 22px); } to { opacity: 1; transform: translate(-50%, 0); } }
.selbar b { font-size: 13.5px; padding: 0 8px; white-space: nowrap; }
.selbar .sep { width: 1px; height: 22px; background: var(--border); flex: 0 0 auto; }

/* ---------------------------------------------------------------- upload tray */

.tray {
  position: fixed; right: 22px; bottom: 22px; z-index: 70;
  width: min(340px, calc(100vw - 32px));
  border-radius: var(--r-md); overflow: hidden;
  background: var(--panel-solid); border: 1px solid var(--border-strong);
  box-shadow: var(--shadow);
  animation: barIn .32s var(--spring) both;
}
.tray-head { display: flex; align-items: center; gap: 10px; padding: 13px 15px; border-bottom: 1px solid var(--border); font-size: 13.8px; font-weight: 700; }
.tray-head .spacer { flex: 1; }
.tray-head .icon-btn { width: 30px; height: 30px; }
.tray-head .icon-btn svg { width: 16px; height: 16px; }
.tray-list { max-height: 250px; overflow-y: auto; }
.tray-item { display: grid; grid-template-columns: 26px 1fr auto; gap: 10px; align-items: center; padding: 10px 15px; font-size: 13px; }
.tray-item + .tray-item { border-top: 1px solid var(--border); }
.tray-item .nm { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tray-item .st { font-size: 11.5px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.tray-item.done .st { color: #3ddc84; }
.tray-item.fail .st { color: #ff6b6b; }
.ring { width: 24px; height: 24px; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 3; }
.ring .bg { stroke: var(--border); }
.ring .fg { stroke: var(--accent-1); stroke-linecap: round; transition: stroke-dashoffset .2s var(--ease); }

/* ---------------------------------------------------------------- dropzone */

/* `display` here would otherwise beat the UA rule for [hidden], pinning the
   overlay on screen forever; pointer-events keeps it harmless either way. */
.dropzone { position: fixed; inset: 0; z-index: 500; display: grid; place-content: center; background: var(--scrim); backdrop-filter: blur(6px); animation: fadeIn .2s var(--ease) both; pointer-events: none; }
.dropzone[hidden] { display: none; }
.dropzone-inner {
  display: grid; gap: 16px; justify-items: center; padding: 54px 62px;
  border-radius: var(--r-xl); border: 2.5px dashed var(--accent-1);
  background: var(--panel-solid); box-shadow: var(--shadow);
  animation: popIn .3s var(--spring) both;
}
.dropzone-inner svg { width: 52px; height: 52px; color: var(--accent-1); animation: bob 1.4s var(--ease) infinite; }
.dropzone-inner p { font-size: 17px; font-weight: 700; }
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ---------------------------------------------------------------- toasts */

.toasts { position: fixed; top: 18px; right: 18px; z-index: 900; display: grid; gap: 9px; justify-items: end; pointer-events: none; }
.toast {
  display: flex; align-items: center; gap: 11px;
  padding: 13px 17px; border-radius: var(--r-md); max-width: min(390px, calc(100vw - 36px));
  background: var(--panel-solid); border: 1px solid var(--border-strong);
  box-shadow: var(--shadow); font-size: 13.8px; font-weight: 550;
  pointer-events: auto; animation: toastIn .35s var(--spring) both;
}
.toast.out { animation: toastOut .25s var(--ease) forwards; }
.toast svg { width: 19px; height: 19px; flex: 0 0 auto; }
.toast.ok svg { color: #3ddc84; }
.toast.err svg { color: #ff6b6b; }
.toast.info svg { color: var(--accent-1); }
@keyframes toastIn { from { opacity: 0; transform: translateX(60px) scale(.94); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateX(60px) scale(.94); } }

/* ---------------------------------------------------------------- menus */

.menu {
  position: fixed; z-index: 800; min-width: 216px; padding: 6px;
  border-radius: var(--r-md); background: var(--panel-solid);
  border: 1px solid var(--border-strong); box-shadow: var(--shadow);
  animation: menuIn .16s var(--ease) both;
}
@keyframes menuIn { from { opacity: 0; transform: scale(.95) translateY(-6px); } to { opacity: 1; transform: none; } }
.menu button {
  display: flex; align-items: center; gap: 11px; width: 100%;
  padding: 10px 12px; border-radius: 9px; font-size: 14px; font-weight: 550; text-align: left;
  color: var(--text-2); transition: background var(--t-fast), color var(--t-fast);
}
.menu button svg { width: 18px; height: 18px; flex: 0 0 auto; }
.menu button:hover { background: var(--hover); color: var(--text); }
.menu button.danger { color: #ff6b6b; }
.menu button.danger:hover { background: rgba(255,107,107,.12); }
.menu hr { border: none; border-top: 1px solid var(--border); margin: 5px 2px; }
.menu .label { padding: 8px 12px 5px; font-size: 11px; font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: .06em; }

/* ---------------------------------------------------------------- modals */

.modals { position: fixed; inset: 0; z-index: 700; pointer-events: none; }
.modal-back {
  position: absolute; inset: 0; display: grid; place-items: center; padding: 20px;
  background: var(--scrim); backdrop-filter: blur(9px); -webkit-backdrop-filter: blur(9px);
  pointer-events: auto; animation: fadeIn .22s var(--ease) both;
  overflow-y: auto;
}
.modal-back.out { animation: fadeOut .2s var(--ease) forwards; }
@keyframes fadeOut { to { opacity: 0; } }
.modal {
  width: min(490px, 100%); border-radius: var(--r-xl); padding: 26px;
  background: var(--panel-solid); border: 1px solid var(--border);
  box-shadow: var(--shadow); display: grid; gap: 18px;
  animation: popIn .34s var(--spring) both;
  margin: auto;
}
.modal-back.out .modal { animation: popOut .2s var(--ease) forwards; }
@keyframes popOut { to { opacity: 0; transform: translateY(12px) scale(.97); } }
.modal.wide { width: min(660px, 100%); }
.modal-head { display: flex; align-items: flex-start; gap: 14px; }
.modal-head .tx { flex: 1; display: grid; gap: 5px; }
.modal-head h3 { font-size: 19.5px; font-weight: 750; letter-spacing: -.03em; }
.modal-head p { font-size: 13.8px; color: var(--text-2); line-height: 1.55; }
.modal-body { display: grid; gap: 15px; }
.modal-foot { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.modal-foot .spacer { flex: 1; }

.copybox { display: flex; gap: 8px; }
.copybox .input { font-family: var(--mono); font-size: 12.8px; }

.tabs { display: flex; gap: 3px; padding: 4px; border-radius: var(--r-md); background: var(--panel-2); border: 1px solid var(--border); }
.tabs button { flex: 1; height: 36px; border-radius: 9px; font-size: 13.5px; font-weight: 650; color: var(--text-2); transition: background var(--t-fast), color var(--t-fast); }
.tabs button.on { background: var(--panel-solid); color: var(--text); box-shadow: var(--shadow-sm); }

.swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.swatch { width: 38px; height: 38px; border-radius: 50%; border: 2.5px solid transparent; transition: transform var(--t-fast) var(--spring), border-color var(--t-fast); position: relative; }
.swatch:hover { transform: scale(1.12); }
.swatch.on { border-color: var(--text); }
.swatch i { position: absolute; inset: 3px; border-radius: 50%; display: block; }

.stat-rows { display: grid; gap: 10px; }
.stat-row { display: flex; align-items: center; gap: 11px; font-size: 13.5px; }
.stat-row .dot { width: 11px; height: 11px; border-radius: 4px; flex: 0 0 auto; }
.stat-row .nm { flex: 1; color: var(--text-2); }
.stat-row .vl { font-weight: 650; font-variant-numeric: tabular-nums; }

.sess-item { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--border); font-size: 13.5px; }
.sess-item .tx { flex: 1; min-width: 0; }
.sess-item .tx b { display: block; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sess-item .tx span { font-size: 11.8px; color: var(--text-3); }

.tree { max-height: 320px; overflow-y: auto; display: grid; gap: 2px; }
.tree button {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  padding: 10px 12px; border-radius: 9px; font-size: 14px; color: var(--text-2);
  transition: background var(--t-fast), color var(--t-fast);
}
.tree button svg { width: 18px; height: 18px; color: var(--accent-1); flex: 0 0 auto; }
.tree button:hover { background: var(--hover); color: var(--text); }
.tree button.on { background: var(--active); color: var(--text); }

/* ---------------------------------------------------------------- preview */

.viewer { position: fixed; inset: 0; z-index: 850; display: grid; grid-template-rows: auto 1fr; background: color-mix(in srgb, var(--bg) 96%, #000); animation: fadeIn .2s var(--ease) both; }
.viewer.out { animation: fadeOut .18s var(--ease) forwards; }
.viewer-bar { display: flex; align-items: center; gap: 11px; padding: 12px clamp(12px, 2.4vw, 22px); border-bottom: 1px solid var(--border); background: var(--panel); backdrop-filter: blur(16px); }
.viewer-bar .tx { flex: 1; min-width: 0; }
.viewer-bar .tx b { display: block; font-size: 14.5px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.viewer-bar .tx span { font-size: 11.8px; color: var(--text-3); }
.viewer-body { display: grid; place-items: center; padding: clamp(12px, 2.5vw, 30px); overflow: auto; min-height: 0; }
.viewer-body img { max-width: 100%; max-height: calc(100dvh - var(--topbar-h) - 60px); object-fit: contain; border-radius: var(--r-md); box-shadow: var(--shadow); animation: popIn .35s var(--spring) both; }
.viewer-body video, .viewer-body audio { max-width: min(1100px, 100%); border-radius: var(--r-md); box-shadow: var(--shadow); }
.viewer-body audio { width: min(560px, 100%); }
.viewer-body iframe { width: min(1100px, 100%); height: calc(100dvh - var(--topbar-h) - 60px); border: none; border-radius: var(--r-md); background: #fff; box-shadow: var(--shadow); }
.viewer-body pre {
  width: min(1000px, 100%); max-height: calc(100dvh - var(--topbar-h) - 60px); overflow: auto; margin: 0;
  padding: 22px; border-radius: var(--r-md); background: var(--panel-solid); border: 1px solid var(--border);
  font-family: var(--mono); font-size: 13px; line-height: 1.65; white-space: pre-wrap; word-break: break-word;
}
.viewer-nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 46px; height: 46px; border-radius: 50%; display: grid; place-content: center;
  background: var(--panel-solid); border: 1px solid var(--border-strong); box-shadow: var(--shadow-sm);
  color: var(--text-2); transition: transform var(--t-fast) var(--ease), color var(--t-fast);
}
.viewer-nav:hover { color: var(--text); transform: translateY(-50%) scale(1.08); }
.viewer-nav.prev { left: 16px; }
.viewer-nav.next { right: 16px; }
.viewer-nav.next svg { transform: rotate(180deg); }
@media (max-width: 620px) { .viewer-nav { width: 40px; height: 40px; } .viewer-nav.prev { left: 8px; } .viewer-nav.next { right: 8px; } }

/* ---------------------------------------------------------------- share page */

.share-page { position: relative; z-index: 1; min-height: 100dvh; display: grid; grid-template-rows: auto 1fr auto; }
.share-main { display: grid; place-items: center; padding: clamp(20px, 5vw, 50px) 18px; width: 100%; }
.share-card {
  width: min(760px, 100%); border-radius: var(--r-xl); overflow: hidden;
  background: var(--panel); border: 1px solid var(--border); backdrop-filter: blur(20px);
  box-shadow: var(--shadow); animation: popIn .45s var(--spring) both;
}
.share-hero { padding: clamp(26px, 5vw, 40px); display: grid; gap: 18px; justify-items: center; text-align: center; border-bottom: 1px solid var(--border); }
.share-ico { width: 80px; height: 80px; border-radius: var(--r-lg); display: grid; place-content: center; background: linear-gradient(135deg, var(--accent-1), var(--accent-2)); color: #fff; box-shadow: 0 12px 34px var(--accent-glow); }
.share-ico svg { width: 38px; height: 38px; stroke-width: 1.5; }
.share-hero h1 { font-size: clamp(20px, 3.4vw, 27px); font-weight: 750; letter-spacing: -.03em; word-break: break-word; }
.share-hero .meta { font-size: 13.5px; color: var(--text-2); }
.share-prev { padding: clamp(16px, 3vw, 26px); display: grid; place-items: center; background: var(--panel-2); }
.share-prev img { max-height: 460px; border-radius: var(--r-md); box-shadow: var(--shadow-sm); }
.share-prev video { max-height: 460px; border-radius: var(--r-md); }
.share-list { padding: 12px; display: grid; gap: 2px; max-height: 420px; overflow-y: auto; }
.share-foot { padding: 22px; text-align: center; font-size: 13px; color: var(--text-3); }

/* ---------------------------------------------------------------- mobile */

.mobile-only { display: none !important; }
.mnav { display: none; }

@media (max-width: 900px) {
  :root { --topbar-h: 60px; }
  .app { grid-template-columns: 1fr; }

  .side {
    position: fixed; inset: 0 auto 0 0; width: min(84vw, 320px);
    transform: translateX(-102%);
    transition: transform var(--t-mid) var(--ease);
    box-shadow: var(--shadow);
    background: var(--panel-solid);
    padding-bottom: calc(20px + env(safe-area-inset-bottom));
  }
  .app.drawer-open .side { transform: none; }
  .scrim {
    position: fixed; inset: 0; z-index: 29; background: var(--scrim);
    backdrop-filter: blur(3px); animation: fadeIn .2s var(--ease) both;
  }

  .mobile-only { display: flex !important; }
  .desktop-only { display: none !important; }

  .content { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }

  .mnav {
    display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    padding: 7px 6px calc(7px + env(safe-area-inset-bottom));
    background: color-mix(in srgb, var(--bg) 88%, transparent);
    backdrop-filter: blur(20px) saturate(160%); -webkit-backdrop-filter: blur(20px) saturate(160%);
    border-top: 1px solid var(--border);
  }
  .mnav button {
    display: grid; justify-items: center; gap: 3px; padding: 7px 4px; border-radius: var(--r-sm);
    font-size: 10.5px; font-weight: 650; color: var(--text-3);
    transition: color var(--t-fast), background var(--t-fast), transform var(--t-fast);
  }
  .mnav button svg { width: 21px; height: 21px; }
  .mnav button.on { color: var(--accent-1); }
  .mnav button:active { transform: scale(.92); }

  .fab {
    position: fixed; right: 18px; bottom: calc(78px + env(safe-area-inset-bottom)); z-index: 45;
    width: 56px; height: 56px; border-radius: 20px; display: grid; place-content: center;
    background: linear-gradient(135deg, var(--accent-1), var(--accent-2)); color: #fff;
    box-shadow: 0 12px 30px var(--accent-glow);
    transition: transform var(--t-fast) var(--spring);
    animation: popIn .4s var(--spring) both;
  }
  .fab:active { transform: scale(.9); }
  .fab svg { width: 25px; height: 25px; stroke-width: 2; }

  .selbar { bottom: calc(84px + env(safe-area-inset-bottom)); }
  .tray { right: 12px; left: 12px; width: auto; bottom: calc(84px + env(safe-area-inset-bottom)); }
  .search { flex: 1; }
  .crumbs .crumb { max-width: 150px; font-size: 15px; }
  .toasts { top: auto; bottom: calc(84px + env(safe-area-inset-bottom)); left: 12px; right: 12px; justify-items: stretch; }
  .toast { max-width: none; }
  .modal { border-radius: var(--r-lg); }
  .land-nav { padding: 0 18px; height: 66px; }
}

@media (max-width: 480px) {
  .modal-back { padding: 12px; align-items: flex-end; }
  .modal { border-radius: var(--r-lg) var(--r-lg) 0 0; margin: 0; width: 100%; }
  .modal-foot .btn { flex: 1; }
  .hero-cta { width: 100%; flex-direction: column; }
  .hero-cta .btn { width: 100%; }
}

/* ---------------------------------------------------------------- misc */

.view-fade { animation: viewIn .3s var(--ease) both; }
@keyframes viewIn { from { opacity: 0; transform: translateY(9px); } to { opacity: 1; transform: none; } }

.sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.no-scroll { overflow: hidden; }
