@font-face { font-family: 'Arad'; src: url('/fonts/Arad/Arad-Light.woff2') format('woff2'); font-weight: 300; font-display: swap; }
@font-face { font-family: 'Arad'; src: url('/fonts/Arad/Arad-Regular.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Arad'; src: url('/fonts/Arad/Arad-Medium.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Arad'; src: url('/fonts/Arad/Arad-Bold.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Arad'; src: url('/fonts/Arad/Arad-Black.woff2') format('woff2'); font-weight: 900; font-display: swap; }

:root {
  --bg: #0b0e1a;
  --bg-soft: #0f1424;
  --panel: #131829;
  --panel-2: #1a2036;
  --border: #262d45;
  --border-soft: #1e2439;
  --accent: #7c5cfc;
  --accent-2: #34d9c7;
  --accent-glow: rgba(124, 92, 252, 0.35);
  --warn: #ffd166;
  --danger: #ff6b6b;
  --ok: #34d399;
  --text: #f1f3fa;
  --muted: #8891a8;
  --muted-2: #5e6785;
  --radius: 16px;
  --radius-sm: 11px;
  --font: 'Arad', 'Tahoma', system-ui, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --ctl: 40px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
html { background: var(--bg); }
body {
  font-family: var(--font);
  color: var(--text);
  min-height: 100vh;
  min-height: 100dvh;
  line-height: 1.7;
  font-size: 15px;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(60% 40% at 85% -5%, rgba(124, 92, 252, 0.16), transparent 70%),
    radial-gradient(50% 35% at 5% 105%, rgba(52, 217, 199, 0.08), transparent 70%),
    var(--bg);
}
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }
.ltr { direction: ltr; unicode-bidi: plaintext; }
.container { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 max(20px, env(safe-area-inset-left)) 0 max(20px, env(safe-area-inset-right)); }
svg { display: block; flex: none; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: var(--ctl);
  padding: 0 18px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: var(--panel-2);
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  transition: transform 0.15s, border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.btn svg { width: 18px; height: 18px; }
.btn:hover { border-color: var(--accent); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible, .ib:focus-visible, .chip:focus-visible, .seg button:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }
.btn-primary { background: linear-gradient(135deg, var(--accent), #9a6bff); border-color: transparent; box-shadow: 0 8px 24px var(--accent-glow); }
.btn-primary:hover { border-color: transparent; filter: brightness(1.08); }
.btn-ghost { background: transparent; }
.btn-danger { background: var(--danger); border-color: transparent; color: #2a0a0a; }
.btn-lg { height: 50px; padding: 0 28px; font-size: 15.5px; border-radius: 13px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }

.ib {
  width: var(--ctl);
  height: var(--ctl);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: var(--panel-2);
  color: var(--muted);
  transition: color 0.15s, border-color 0.15s, background 0.15s, transform 0.15s;
}
.ib svg { width: 19px; height: 19px; }
.ib:hover { color: var(--text); border-color: var(--accent); background: rgba(124, 92, 252, 0.12); }
.ib:active { transform: translateY(1px); }
.ib.danger:hover { color: var(--danger); border-color: var(--danger); background: rgba(255, 107, 107, 0.1); }
.ib.ok { color: var(--ok); border-color: var(--ok); }

.top {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(14px);
  background: rgba(11, 14, 26, 0.78);
  border-bottom: 1px solid var(--border-soft);
}
.top .container { height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 900; font-size: 18px; }
.brand img { width: 32px; height: 32px; border-radius: 9px; }
.brand small { display: block; font-size: 10px; font-weight: 500; color: var(--muted-2); margin-top: -4px; }
.top-actions { display: flex; align-items: center; gap: 8px; }
.user-chip { display: flex; align-items: center; gap: 9px; height: var(--ctl); padding: 0 12px 0 6px; border: 1.5px solid var(--border); border-radius: 999px; background: var(--panel); font-size: 13.5px; font-weight: 700; }
.user-chip .av { width: 28px; height: 28px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), var(--accent-2)); display: flex; align-items: center; justify-content: center; font-size: 13px; color: #0b0e1a; font-weight: 900; }
.user-chip span.nm { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.drop {
  position: relative;
  border: 2px dashed var(--border);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(124, 92, 252, 0.07), rgba(124, 92, 252, 0.02));
  padding: 34px 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
}
.drop:hover, .drop.over { border-color: var(--accent); background: rgba(124, 92, 252, 0.12); }
.drop.over { transform: scale(1.01); }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.drop .dz-ic { width: 54px; height: 54px; margin: 0 auto 12px; border-radius: 16px; background: rgba(124, 92, 252, 0.16); display: flex; align-items: center; justify-content: center; color: var(--accent); }
.drop .dz-ic svg { width: 28px; height: 28px; }
.drop h3 { font-size: 18px; font-weight: 800; }
.drop p { color: var(--muted); font-size: 13.5px; margin-top: 4px; }
.drop .pill { display: inline-flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; justify-content: center; }
.pill span { font-size: 12px; color: var(--muted); background: var(--panel); border: 1px solid var(--border-soft); padding: 3px 12px; border-radius: 999px; }

.queue { display: grid; gap: 10px; margin-top: 16px; }
.q-item { display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--border-soft); background: var(--panel); border-radius: 14px; }
.q-ic { width: 44px; height: 44px; border-radius: 12px; background: var(--panel-2); display: flex; align-items: center; justify-content: center; color: var(--accent-2); overflow: hidden; }
.q-ic svg { width: 22px; height: 22px; }
.q-ic img { width: 100%; height: 100%; object-fit: cover; }
.q-name { font-size: 14px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; direction: ltr; text-align: right; unicode-bidi: plaintext; }
.q-sub { font-size: 12px; color: var(--muted); display: flex; gap: 10px; }
.q-sub.err { color: var(--danger); }
.bar { height: 5px; border-radius: 5px; background: var(--border-soft); overflow: hidden; margin: 6px 0 2px; }
.bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width 0.15s linear; }
.q-item.done .bar i { background: var(--ok); width: 100% !important; }
.q-item.fail .bar i { background: var(--danger); }
.q-actions { display: flex; gap: 6px; }

.result { border: 1px solid rgba(52, 211, 153, 0.35); background: rgba(52, 211, 153, 0.06); border-radius: 16px; padding: 14px; margin-top: 12px; display: grid; gap: 12px; }
.link-row { display: flex; gap: 8px; align-items: stretch; }
.link-row input { flex: 1; min-width: 0; height: var(--ctl); border-radius: var(--radius-sm); border: 1.5px solid var(--border); background: var(--bg-soft); padding: 0 12px; direction: ltr; text-align: left; font-family: var(--mono); font-size: 13px; }
.link-row input:focus { outline: none; border-color: var(--accent); }
.acts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 96px), 1fr)); gap: 8px; }
.acts .btn { width: 100%; }

.section { padding: 34px 0; }
.hero { padding: 44px 0 20px; }
.hero h1 { font-size: clamp(26px, 5.2vw, 44px); font-weight: 900; line-height: 1.35; text-align: center; }
.hero h1 b { background: linear-gradient(90deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.lead { text-align: center; color: var(--muted); max-width: 560px; margin: 12px auto 26px; font-size: 15.5px; }
.upload-card { max-width: 680px; margin: 0 auto; }
.note { text-align: center; color: var(--muted-2); font-size: 12.5px; margin-top: 12px; }
.note a { color: #b7a6ff; font-weight: 700; }
.h2 { font-size: 20px; font-weight: 800; margin-bottom: 14px; display: flex; align-items: center; gap: 10px; }
.h2 small { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.recent { max-width: 680px; margin: 26px auto 0; }
.rec-list { display: grid; gap: 8px; }
.rec { display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--border-soft); background: var(--panel); border-radius: 14px; }
.rec .meta { font-size: 12px; color: var(--muted); }
.rec .acts2 { display: flex; gap: 6px; }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 14px; }
.feat { padding: 20px; border: 1px solid var(--border-soft); border-radius: var(--radius); background: var(--panel); }
.feat .fi { width: 42px; height: 42px; border-radius: 12px; background: rgba(124, 92, 252, 0.15); color: var(--accent); display: flex; align-items: center; justify-content: center; margin-bottom: 12px; }
.feat:nth-child(2) .fi { background: rgba(52, 217, 199, 0.14); color: var(--accent-2); }
.feat:nth-child(3) .fi { background: rgba(255, 209, 102, 0.14); color: var(--warn); }
.feat h3 { font-size: 16px; font-weight: 800; margin-bottom: 4px; }
.feat p { color: var(--muted); font-size: 13.5px; }
body.sticky { display: flex; flex-direction: column; }
body.sticky > main { flex: 1 0 auto; width: 100%; }
body.sticky > footer.ft { margin-top: auto; width: 100%; }
footer.ft { border-top: 1px solid var(--border-soft); padding: 22px 0 30px; color: var(--muted-2); font-size: 13px; text-align: center; margin-top: 30px; }
footer.ft b { color: var(--text); }

.dash { padding-top: 26px; padding-bottom: 60px; }
.dash-grid { display: grid; gap: 18px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 12px; }
.stat { padding: 14px 16px; border: 1px solid var(--border-soft); background: var(--panel); border-radius: var(--radius); }
.stat .l { font-size: 12.5px; color: var(--muted); }
.stat .v { font-size: 20px; font-weight: 800; }
.stat .bar { height: 6px; margin-top: 8px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.search { position: relative; flex: 1 1 220px; min-width: 0; }
.search input { width: 100%; height: var(--ctl); border-radius: var(--radius-sm); border: 1.5px solid var(--border); background: var(--panel); padding: 0 40px 0 12px; }
.search input:focus { outline: none; border-color: var(--accent); }
.search svg { position: absolute; right: 12px; top: 11px; width: 18px; height: 18px; color: var(--muted); pointer-events: none; }
.sel { height: var(--ctl); border-radius: var(--radius-sm); border: 1.5px solid var(--border); background: var(--panel); padding: 0 12px; }
.sel:focus { outline: none; border-color: var(--accent); }
.seg { display: inline-flex; border: 1.5px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; background: var(--panel); }
.seg button { width: var(--ctl); height: calc(var(--ctl) - 3px); border: 0; background: transparent; color: var(--muted); display: flex; align-items: center; justify-content: center; }
.seg button svg { width: 18px; height: 18px; }
.seg button.on { background: rgba(124, 92, 252, 0.2); color: var(--text); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { height: 34px; padding: 0 14px; border-radius: 999px; border: 1.5px solid var(--border); background: transparent; color: var(--muted); font-size: 13px; font-weight: 700; }
.chip.on { background: rgba(124, 92, 252, 0.2); border-color: var(--accent); color: var(--text); }

.files { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: 14px; }
.files.list { grid-template-columns: 1fr; }
.fc { display: flex; flex-direction: column; border: 1px solid var(--border-soft); border-radius: var(--radius); background: var(--panel); overflow: hidden; transition: border-color 0.2s, transform 0.2s; }
.fc:hover { border-color: var(--border); transform: translateY(-2px); }
.fc .th { position: relative; height: 150px; background: var(--bg-soft); display: flex; align-items: center; justify-content: center; cursor: pointer; overflow: hidden; }
.fc .th img, .fc .th video { width: 100%; height: 100%; object-fit: contain; }
.fc .th { background-image: linear-gradient(45deg, #0d1222 25%, transparent 25%, transparent 75%, #0d1222 75%), linear-gradient(45deg, #0d1222 25%, transparent 25%, transparent 75%, #0d1222 75%); background-size: 20px 20px; background-position: 0 0, 10px 10px; }
.fc .th .big { width: 54px; height: 54px; color: var(--accent); opacity: 0.9; }
.fc .th .tag { position: absolute; top: 10px; left: 10px; font-size: 11px; font-weight: 700; padding: 2px 10px; border-radius: 999px; background: rgba(11, 14, 26, 0.75); border: 1px solid var(--border); }
.fc .th .play { position: absolute; width: 46px; height: 46px; border-radius: 50%; background: rgba(11, 14, 26, 0.7); display: flex; align-items: center; justify-content: center; border: 1px solid var(--border); }
.fc .th .play svg { width: 20px; height: 20px; }
.fc .bd { padding: 12px 14px 8px; min-width: 0; }
.fc .nm { font-size: 14.5px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; direction: ltr; text-align: right; unicode-bidi: plaintext; }
.fc .mt { font-size: 12px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 2px; }
.fc .ac { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; padding: 8px 14px 14px; }
.fc .ac .ib { width: 100%; }
.files.list .fc { flex-direction: row; align-items: center; }
.files.list .fc .th { width: 88px; height: 72px; flex: none; }
.files.list .fc .th .big { width: 30px; height: 30px; }
.files.list .fc .th .tag, .files.list .fc .th .play { display: none; }
.files.list .fc .bd { flex: 1; padding: 8px 14px; }
.files.list .fc .ac { width: 330px; flex: none; padding: 8px 14px 8px 8px; }
.empty { text-align: center; padding: 56px 16px; border: 1px dashed var(--border); border-radius: var(--radius); color: var(--muted); }
.empty h3 { color: var(--text); font-size: 17px; margin-bottom: 4px; }

.modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(5, 7, 14, 0.78); backdrop-filter: blur(6px); animation: fade 0.2s ease; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.modal-card { width: 100%; max-width: 420px; background: var(--panel); border: 1px solid var(--border); border-radius: 20px; padding: 24px; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55); }
.modal-card h3 { font-size: 18px; font-weight: 800; margin-bottom: 6px; }
.modal-card p { color: var(--muted); font-size: 14px; }
.modal-card input.txt { width: 100%; height: 46px; margin-top: 14px; border-radius: var(--radius-sm); border: 1.5px solid var(--border); background: var(--bg-soft); padding: 0 12px; }
.modal-card input.txt:focus { outline: none; border-color: var(--accent); }
.modal-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 20px; }
.modal-ic { width: 44px; height: 44px; border-radius: 13px; background: rgba(124, 92, 252, 0.15); color: var(--accent); display: flex; align-items: center; justify-content: center; margin-bottom: 12px; }
.modal-ic.danger { background: rgba(255, 107, 107, 0.14); color: var(--danger); }
.modal-ic svg { width: 22px; height: 22px; }

.viewer { align-items: stretch; padding: 0; }
.viewer-in { width: 100%; max-width: 1100px; margin: auto; display: flex; flex-direction: column; max-height: 100vh; padding: 14px; gap: 12px; }
.viewer-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.viewer-bar .t { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; direction: ltr; unicode-bidi: plaintext; }
.viewer-bar .row { display: flex; gap: 8px; flex: none; }
.stage { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; border-radius: var(--radius); background: #05070e; border: 1px solid var(--border-soft); overflow: hidden; }
.stage img, .stage video { max-width: 100%; max-height: calc(100vh - 110px); object-fit: contain; }
.stage iframe { width: 100%; height: calc(100vh - 110px); border: 0; background: #fff; }
.stage audio { width: min(520px, 92%); }
.stage pre { width: 100%; max-height: calc(100vh - 110px); overflow: auto; padding: 18px; font-family: var(--mono); font-size: 13px; line-height: 1.7; direction: ltr; text-align: left; white-space: pre-wrap; word-break: break-word; }

.share { min-height: 100vh; display: flex; flex-direction: column; }
.share main { flex: 1; display: flex; align-items: center; justify-content: center; padding: 28px 16px; min-width: 0; }
.share-card { width: 100%; max-width: 760px; background: var(--panel); border: 1px solid var(--border); border-radius: 24px; overflow: hidden; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4); }
.share-stage { background: #05070e; min-height: 220px; max-height: 62vh; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.share-stage img, .share-stage video { max-width: 100%; max-height: 62vh; object-fit: contain; display: block; }
.share-stage iframe { width: 100%; height: 62vh; border: 0; background: #fff; }
.share-stage audio { width: min(480px, 90%); margin: 60px 0; }
.share-stage pre { width: 100%; max-height: 62vh; overflow: auto; padding: 18px; font-family: var(--mono); font-size: 13px; direction: ltr; text-align: left; white-space: pre-wrap; word-break: break-word; }
.share-stage .noprev { padding: 44px 20px; text-align: center; color: var(--muted); }
.share-stage .noprev .big { width: 72px; height: 72px; margin: 0 auto 10px; color: var(--accent); }
.share-info { padding: 20px 22px 22px; display: grid; gap: 14px; }
.share-info h1 { font-size: 18px; font-weight: 800; overflow-wrap: anywhere; direction: ltr; text-align: right; unicode-bidi: plaintext; }
.metas { display: flex; flex-wrap: wrap; gap: 8px; }
.metas span { font-size: 12.5px; color: var(--muted); background: var(--bg-soft); border: 1px solid var(--border-soft); padding: 3px 12px; border-radius: 999px; }
.share-acts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.share-acts .btn { height: 50px; font-size: 15px; }
.cta { text-align: center; color: var(--muted); font-size: 13px; }
.cta a { color: #b7a6ff; font-weight: 700; }
.state { text-align: center; padding: 50px 20px; }
.state h2 { font-size: 20px; margin-bottom: 6px; }
.state p { color: var(--muted); margin-bottom: 18px; }

.toast { position: fixed; bottom: 24px; left: 50%; transform: translate(-50%, 20px); background: var(--panel-2); border: 1px solid var(--border); padding: 11px 20px; border-radius: 999px; font-size: 14px; font-weight: 700; opacity: 0; pointer-events: none; transition: 0.25s; z-index: 200; max-width: 92vw; text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.auth-page { display: flex; align-items: center; justify-content: center; padding: 24px 16px; min-height: 100vh; min-height: 100dvh; }
.au-card { width: 100%; max-width: 430px; background: var(--panel); border: 1px solid var(--border); border-radius: 22px; padding: 28px 24px 24px; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45); animation: auIn 0.35s cubic-bezier(0.2, 0.7, 0.3, 1) both; }
@keyframes auIn { from { opacity: 0; transform: translateY(10px) scale(0.98); } to { opacity: 1; transform: none; } }
.au-brand { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 18px; font-weight: 900; font-size: 19px; }
.au-brand img { width: 34px; height: 34px; border-radius: 9px; }
.au-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; background: var(--bg-soft); border: 1px solid var(--border-soft); border-radius: 12px; margin-bottom: 22px; }
.au-tab { height: 40px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font-size: 14px; font-weight: 700; transition: background 0.2s, color 0.2s; }
.au-tab[aria-selected='true'] { background: linear-gradient(135deg, var(--accent), #9a6bff); color: #fff; }
.au-title { font-size: 20px; font-weight: 800; text-align: center; margin-bottom: 4px; }
.au-sub { font-size: 13px; color: var(--muted); text-align: center; margin-bottom: 22px; }
.au-alert { display: none; margin-bottom: 16px; padding: 11px 14px; border-radius: 11px; border: 1px solid rgba(255, 107, 107, 0.4); background: rgba(255, 107, 107, 0.1); color: #ffb4b4; font-size: 13px; line-height: 1.8; }
.au-alert.show { display: block; animation: shake 0.35s ease; }
@keyframes shake { 20% { transform: translateX(6px); } 40% { transform: translateX(-6px); } 60% { transform: translateX(4px); } 80% { transform: translateX(-3px); } }
.fld { margin-bottom: 16px; }
.fld label { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 7px; }
.iw { position: relative; }
.inp { width: 100%; height: 48px; padding: 0 14px; border-radius: 12px; border: 1.5px solid var(--border); background: var(--bg-soft); font-size: 15px; transition: border-color 0.2s, box-shadow 0.2s; }
.inp[dir='ltr'] { text-align: left; }
.inp.eye { padding-right: 48px; }
.inp:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.fld.invalid .inp { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.15); }
.fld.valid .inp { border-color: rgba(52, 211, 153, 0.7); }
.eye-btn { position: absolute; top: 0; bottom: 0; right: 4px; width: 42px; border: 0; background: transparent; color: var(--muted); display: flex; align-items: center; justify-content: center; border-radius: 10px; }
.eye-btn:hover { color: var(--text); }
.eye-btn svg { width: 20px; height: 20px; }
.msg { font-size: 12px; line-height: 1.7; margin-top: 6px; color: var(--muted-2); }
.msg:empty { display: none; }
.fld.invalid .msg { color: #ff9a9a; }
.caps { display: none; font-size: 12px; margin-top: 6px; color: var(--warn); }
.caps.show { display: block; }
.meter { display: none; gap: 4px; margin-top: 8px; }
.meter.show { display: flex; }
.meter i { flex: 1; height: 4px; border-radius: 4px; background: var(--border); transition: background 0.25s; }
.meter[data-level='1'] i:nth-child(1) { background: var(--danger); }
.meter[data-level='2'] i:nth-child(-n+2) { background: #f59e0b; }
.meter[data-level='3'] i:nth-child(-n+3) { background: #84cc16; }
.meter[data-level='4'] i { background: var(--ok); }
.meter-label { display: none; font-size: 11.5px; color: var(--muted-2); margin-top: 5px; }
.meter-label.show { display: block; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; pointer-events: none; overflow: hidden; }
.au-submit { width: 100%; height: 50px; border: 0; border-radius: 13px; background: linear-gradient(135deg, var(--accent), #9a6bff); color: #fff; font-size: 15.5px; font-weight: 800; display: flex; align-items: center; justify-content: center; gap: 10px; box-shadow: 0 10px 28px var(--accent-glow); transition: transform 0.15s, opacity 0.2s; }
.au-submit:hover:not(:disabled) { transform: translateY(-1px); }
.au-submit:disabled { opacity: 0.65; cursor: wait; }
.au-spin { display: none; width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid rgba(255, 255, 255, 0.35); border-top-color: #fff; animation: spin 0.7s linear infinite; }
.au-submit.loading .au-spin { display: block; }
@keyframes spin { to { transform: rotate(360deg); } }
.au-foot { text-align: center; font-size: 13px; color: var(--muted); margin-top: 18px; }
.au-link { color: #b7a6ff; font-weight: 700; background: none; border: 0; }
.au-link:hover { text-decoration: underline; }

.ab-box { position: relative; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 8px 10px; padding: 10px 12px; margin: 4px 0 18px; border: 1.5px solid var(--border); border-radius: 12px; background: var(--bg-soft); overflow: hidden; transition: border-color 0.2s; }
.ab-box[data-state='done'] { border-color: rgba(52, 211, 153, 0.6); }
.ab-box[data-state='error'], .ab-box[data-state='network'], .ab-box.flag { border-color: var(--danger); }
.ab-main { display: flex; align-items: center; gap: 12px; border: 0; background: transparent; font-size: 14px; font-weight: 600; padding: 2px 0; text-align: start; }
.ab-check { position: relative; width: 26px; height: 26px; flex: none; border-radius: 8px; border: 2px solid var(--border); display: flex; align-items: center; justify-content: center; transition: background 0.2s, border-color 0.2s; }
.ab-spin { display: none; width: 14px; height: 14px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.2); border-top-color: var(--accent); animation: spin 0.7s linear infinite; }
.ab-tick { display: none; width: 16px; height: 16px; color: #06281c; }
.ab-tick svg { width: 100%; height: 100%; }
.ab-box[data-state='solving'] .ab-spin { display: block; }
.ab-box[data-state='done'] .ab-check { background: var(--ok); border-color: var(--ok); }
.ab-box[data-state='done'] .ab-tick { display: block; }
.ab-box[data-state='error'] .ab-check, .ab-box[data-state='network'] .ab-check { border-color: var(--danger); }
.ab-brand { display: flex; align-items: center; gap: 5px; font-size: 10.5px; color: var(--muted-2); white-space: nowrap; }
.ab-brand svg { width: 14px; height: 14px; }
.ab-bar { position: absolute; inset-inline: 0; bottom: 0; height: 3px; }
.ab-fill { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width 0.15s linear; }

.set-page { max-width: 640px; margin: 0 auto; padding: 26px 16px 70px; display: grid; gap: 16px; }
.back { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13.5px; }
.back svg { width: 16px; height: 16px; }
.p-head { display: flex; align-items: center; gap: 14px; }
.av-lg { width: 64px; height: 64px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), var(--accent-2)); display: flex; align-items: center; justify-content: center; font-size: 26px; font-weight: 900; color: #0b0e1a; }
.p-head h2 { font-size: 20px; }
.p-head p { color: var(--muted); font-size: 13.5px; direction: ltr; text-align: right; }
.card { background: var(--panel); border: 1px solid var(--border-soft); border-radius: var(--radius); padding: 20px; }
.card h3 { font-size: 16px; font-weight: 800; }
.card .desc { color: var(--muted); font-size: 13.5px; margin: 2px 0 16px; }
.card.danger { border-color: rgba(255, 107, 107, 0.35); }
.row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.row .res { font-size: 13px; }
.res.ok { color: var(--ok); }
.res.err { color: var(--danger); }
.disabled-inp { opacity: 0.6; }

@media (max-width: 760px) {
  .files.list .fc { flex-direction: column; align-items: stretch; }
  .files.list .fc .th { width: 100%; height: 130px; }
  .files.list .fc .ac { width: 100%; padding: 8px 14px 14px; }
  .viewer-in { padding: 10px; }
  .user-chip span.nm { display: none; }
  .user-chip { padding: 0 6px; }
}
@media (max-width: 440px) {
  .au-card { padding: 22px 16px 20px; }
  .ab-brand span { display: none; }
  .share-acts { grid-template-columns: 1fr; }
  .brand small { display: none; }
}
@media (pointer: coarse) {
  :root { --ctl: 44px; }
  .chip { height: 38px; }
}
@media (max-width: 900px) {
  .container { padding-left: 16px; padding-right: 16px; }
  .hero { padding: 30px 0 14px; }
  .dash { padding-top: 18px; padding-bottom: 50px; }
}
@media (max-width: 640px) {
  input, select, textarea { font-size: 16px !important; }
  .top .container { height: 58px; }
  .brand { font-size: 16px; }
  .brand img { width: 28px; height: 28px; }
  .drop { padding: 24px 14px; border-radius: 18px; }
  .drop h3 { font-size: 16px; }
  .drop p { font-size: 13px; }
  .stats { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat { padding: 12px; }
  .stat .v { font-size: 16px; }
  .toolbar { gap: 8px; }
  .search { flex: 1 1 100%; }
  .toolbar .sel { flex: 1; min-width: 0; }
  .files { gap: 12px; }
  .fc .th { height: 170px; }
  .link-row { flex-direction: column; }
  .link-row .btn { width: 100%; }
  .q-item, .rec { grid-template-columns: 40px 1fr auto; gap: 10px; padding: 9px 10px; }
  .q-ic { width: 40px; height: 40px; }
  .rec .acts2 { gap: 4px; }
  .h2 { flex-wrap: wrap; font-size: 18px; }
  .section { padding: 22px 0; }
  .share main { padding: 14px 10px 24px; align-items: flex-start; }
  .share-card { border-radius: 18px; }
  .share-info { padding: 16px; }
  .share-stage iframe { height: 55vh; }
  .modal { padding: 10px; }
  .modal-card { padding: 20px 16px; border-radius: 18px; }
  .set-page { padding: 18px 12px 50px; }
  .card { padding: 16px; }
  .btn-lg { height: 48px; }
  .top-actions .btn { padding: 0 12px; }
}
@media (max-width: 360px) {
  .container { padding-left: 12px; padding-right: 12px; }
  .stats { grid-template-columns: 1fr; }
  .fc .ac { gap: 4px; padding: 8px 10px 12px; }
  .fc .bd { padding: 10px 10px 6px; }
  .au-card { padding: 18px 12px 16px; }
  .rec .acts2 .ib:nth-child(2) { display: none; }
}
@media (min-width: 1500px) {
  .container { max-width: 1400px; }
  .files { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
