/* ============================================================================
   glass.css - страница загрузки контента для модели (upload.apolloproduction.studio).
   Дом Apollo: фон #0C0D11, серебро и белый, акцент #4FC4E9 меньше 10% площади, стекло.
   Токены и числа взяты из ~/apollo-sign/app/glass.css (стекло обменника, снятое числами):
     панели  - blur(13px) saturate(134%), градиент 103deg белый .085 > .050 > .028, рамка .145, радиусы 18/14/10;
     кнопки  - без backdrop-filter, градиент 135deg белый .16 > .06 > акцент .10, кромка отдельным элементом .btn__rim;
     кривая  - cubic-bezier(.22,1,.36,1), нажатие scale(.97), наведение только hover+fine.
   Где акцент: тонкая линия прогресса, кольцо фокуса, активный язык, кромка кнопок. Больше нигде. Фиолетового нет.
   Телефон первым (375x812), потом компьютер. Без чужих шрифтов и CDN. Без эмодзи, без длинного тире.
   СОДЕРЖАНИЕ: 0 токены · 1 основа и небо · 2 шапка · 3 панели · 4 кнопки · 5 зона выбора · 6 списки и прогресс ·
               7 экраны (загрузка, закрыто, PIN) · 8 баннер · 9 компьютер · 10 экономия движения
   ========================================================================== */

/* ── 0. ТОКЕНЫ ─────────────────────────────────────────────────────────── */
:root {
  --bg: #0C0D11;
  --ink: #F5F7FA;
  --silver: #C8CFD9;
  --muted: #9CA5B3;
  --accent: #4FC4E9;
  --ok: #7DDBA0;
  --warn: #F2B66B;
  --bad: #FF8E8E;
  --line: rgba(255, 255, 255, .145);

  --gl-ease: cubic-bezier(.22, 1, .36, 1);
  --gl-panel: linear-gradient(103deg, rgba(255,255,255,.085) 0%, rgba(255,255,255,.050) 42%, rgba(255,255,255,.028) 100%);
  --gl-panel-rim: inset 0 1px 0 rgba(255,255,255,.085), inset 0 -1px 0 rgba(0,0,0,.30);
  --gl-panel-shadow: 0 18px 40px -32px rgba(0,0,0,.92);
  --gl-blur: blur(13px) saturate(134%);
  --gl-r-lg: 18px;
  --gl-r-md: 14px;
  --gl-r-sm: 10px;
  --gl-bar: rgba(12, 13, 17, .97);
  --gl-scrim: rgba(12, 13, 17, .94);

  --gl-btn-fill: linear-gradient(135deg, rgba(255,255,255,.16) 0%, rgba(255,255,255,.06) 55%, rgba(79,196,233,.10) 100%);
  --gl-btn-fill-hot: linear-gradient(135deg, rgba(255,255,255,.26) 0%, rgba(255,255,255,.12) 55%, rgba(79,196,233,.20) 100%);
  --gl-btn-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 8px 24px -14px rgba(0,0,0,.85);
  --gl-btn-rim: linear-gradient(118deg, rgba(255,255,255,.62) 0%, rgba(214,220,228,.34) 42%, rgba(79,196,233,.30) 78%, rgba(79,196,233,.62) 100%);
  --gl-field: linear-gradient(180deg, rgba(255,255,255,.028), rgba(255,255,255,.052));

  color-scheme: dark;
}

/* ── 1. ОСНОВА И НЕБО ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: var(--bg); }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, "SF Pro Display", "SF Pro Text", system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
.sky {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(120% 55% at 12% -8%, rgba(214, 220, 228, .11), transparent 62%),
    radial-gradient(80% 45% at 100% 2%, rgba(255, 255, 255, .05), transparent 58%),
    radial-gradient(90% 50% at 50% 118%, rgba(255, 255, 255, .04), transparent 60%),
    var(--bg);
}
.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}
h1, h2, p { margin: 0; }
button { font: inherit; color: inherit; }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 12px; }

/* ── 2. ШАПКА (заслонка: плотная, без блюра) ───────────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: calc(6px + env(safe-area-inset-top)) calc(16px + env(safe-area-inset-right)) 6px calc(16px + env(safe-area-inset-left));
  min-height: 56px;
  background: linear-gradient(180deg, rgba(255,255,255,.05) 0%, rgba(255,255,255,.016) 100%), var(--gl-bar);
  border-bottom: 1px solid rgba(255, 255, 255, .10);
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .30), 0 14px 30px -26px rgba(0, 0, 0, .9);
}
.brand { display: inline-flex; align-items: center; gap: 10px; min-width: 0; }
.brand__mark { width: 26px; height: 26px; flex: none; display: block; }
.brand__name {
  font-weight: 600; font-size: 13px; letter-spacing: .2em; color: #fff; white-space: nowrap;
}
.lang { display: inline-flex; border: 1px solid var(--line); border-radius: 13px; background: rgba(255, 255, 255, .04); overflow: hidden; }
.lang__b {
  min-width: 46px; min-height: 44px; padding: 0 8px; border: 0; background: transparent; cursor: pointer;
  color: var(--silver); font-weight: 600; font-size: 14px; letter-spacing: .06em;
  box-shadow: inset 0 -2px 0 transparent;
  transition: color 200ms var(--gl-ease), box-shadow 200ms var(--gl-ease);
}
.lang__b[aria-pressed="true"] { color: var(--accent); box-shadow: inset 0 -2px 0 var(--accent); }

/* ── 3. ПАНЕЛИ (блюр только у панелей: их мало) ────────────────────────── */
.wrap {
  position: relative; z-index: 1;
  width: 100%; max-width: 560px; margin: 0 auto;
  padding: 20px calc(16px + env(safe-area-inset-right)) calc(40px + env(safe-area-inset-bottom)) calc(16px + env(safe-area-inset-left));
}
.screen { display: flex; flex-direction: column; gap: 16px; }
.panel {
  position: relative;
  background: var(--gl-panel);
  border: 1px solid var(--line);
  border-radius: var(--gl-r-lg);
  box-shadow: var(--gl-panel-rim), var(--gl-panel-shadow);
  -webkit-backdrop-filter: var(--gl-blur);
  backdrop-filter: var(--gl-blur);
}
.hello { font-size: 28px; line-height: 1.15; font-weight: 650; letter-spacing: -.01em; color: #fff; overflow-wrap: anywhere; }
.lead { color: var(--silver); font-size: 17px; margin-top: 4px; }
.muted { color: var(--muted); font-size: 14px; }
.note {
  padding: 12px 14px; border-radius: var(--gl-r-md); font-size: 14px; color: var(--silver);
  background: var(--gl-panel); border: 1px solid var(--line); border-left: 3px solid var(--warn);
}

/* ── 4. КНОПКИ ─────────────────────────────────────────────────────────── */
.btn {
  position: relative; isolation: isolate; overflow: hidden; overflow: clip;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 56px; padding: 0 28px;
  border: 1px solid transparent; border-radius: 18px;
  background-color: transparent; background-image: var(--gl-btn-fill); background-clip: padding-box;
  color: #fff; font-weight: 600; font-size: 17px; line-height: 1; cursor: pointer;
  box-shadow: var(--gl-btn-shadow);
  -webkit-backdrop-filter: none; backdrop-filter: none;
  transition: transform 220ms var(--gl-ease), box-shadow 350ms var(--gl-ease), background-image 350ms var(--gl-ease);
}
.btn--md { min-height: 48px; border-radius: 16px; font-size: 16px; }
.btn--wide { width: 100%; }
.btn__rim {
  position: absolute; inset: 0; z-index: -1; border-radius: inherit; padding: 1px; pointer-events: none;
  background: var(--gl-btn-rim);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
.btn:active { transform: scale(.97); transition-duration: 120ms; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
@media (hover: hover) and (pointer: fine) {
  .btn:not(:disabled):hover { background-image: var(--gl-btn-fill-hot); }
}
.mini {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 0 16px; border-radius: 14px; cursor: pointer;
  border: 1px solid rgba(255, 255, 255, .22);
  background-image: var(--gl-btn-fill); color: #fff; font-weight: 600; font-size: 15px; line-height: 1;
  box-shadow: var(--gl-btn-shadow);
  transition: transform 220ms var(--gl-ease), background-image 350ms var(--gl-ease);
}
.mini--quiet { background-image: none; background-color: rgba(255, 255, 255, .04); color: var(--silver); box-shadow: none; border-color: var(--line); }
.mini[data-armed="1"] { color: #fff; border-color: rgba(255, 255, 255, .5); }
.mini:active { transform: scale(.97); transition-duration: 120ms; }
.mini:disabled { opacity: .5; cursor: not-allowed; }
@media (hover: hover) and (pointer: fine) {
  .mini:not(:disabled):hover { background-image: var(--gl-btn-fill-hot); }
  .mini--quiet:not(:disabled):hover { background-image: none; background-color: rgba(255, 255, 255, .09); color: #fff; }
}

/* ── 5. ЗОНА ВЫБОРА ────────────────────────────────────────────────────── */
.drop {
  display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center;
  padding: 26px 18px 22px;
  transition: background-color 250ms var(--gl-ease);
}
.drop::after {
  content: ""; position: absolute; inset: 8px; border-radius: 12px; pointer-events: none;
  border: 1px dashed rgba(255, 255, 255, .16);
  transition: border-color 250ms var(--gl-ease);
}
.drop[data-over="1"] { background-color: rgba(255, 255, 255, .05); }
.drop[data-over="1"]::after { border-color: var(--accent); }
.drop__icon { width: 40px; height: 40px; color: var(--silver); }
.drop__or { color: var(--muted); font-size: 15px; }
.drop__types { color: var(--silver); font-size: 15px; }
.drop .btn { width: 100%; max-width: 320px; margin-top: 4px; }
@media (pointer: coarse) { .drop__or { display: none; } }

.quota { display: flex; flex-direction: column; gap: 8px; }
.quota__row { display: flex; justify-content: space-between; gap: 12px; color: var(--silver); font-size: 15px; font-variant-numeric: tabular-nums; }
.thin { height: 3px; border-radius: 2px; background: rgba(255, 255, 255, .12); overflow: hidden; }
.thin__fill { display: block; height: 100%; width: 100%; transform-origin: left center; transform: scaleX(var(--p, 0)); background: var(--accent); transition: transform 300ms var(--gl-ease); }

/* ── 6. СПИСКИ И ПРОГРЕСС ──────────────────────────────────────────────── */
.section { display: flex; flex-direction: column; gap: 12px; }
.section__title { font-size: 18px; font-weight: 650; color: #fff; }
.files { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.file {
  display: grid; gap: 10px; padding: 14px 14px 12px;
  background: var(--gl-panel); border: 1px solid var(--line); border-radius: var(--gl-r-md);
  box-shadow: var(--gl-panel-rim);
}
.file__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.file__name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; color: #fff; }
.file__size { flex: none; color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.bar { height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .10); overflow: hidden; }
.bar__fill {
  display: block; height: 100%; width: 100%; transform-origin: left center; transform: scaleX(var(--p, 0));
  background: linear-gradient(90deg, #4FC4E9, #A5E2F5); transition: transform 250ms linear;
}
.file__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; font-size: 14px; color: var(--silver); font-variant-numeric: tabular-nums; }
.file__meta--end { justify-content: space-between; }
.file__pct { color: #fff; font-weight: 600; min-width: 3ch; }
.file__err { color: var(--warn); font-size: 14px; }
.file__hint { color: var(--muted); font-size: 14px; }
.file__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.file__actions:empty { display: none; }
.badge { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--silver); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); flex: none; }
.file[data-status="rejected"] .dot { background: var(--bad); }
.file[data-status="uploading"] .dot { background: var(--warn); }
.file[data-status="withdrawn"] .dot { background: #6B7482; }
.file[data-status="withdrawn"] { opacity: .72; }
.file[data-state="failed"] { border-color: rgba(242, 182, 107, .35); }

/* ── 7. ЭКРАНЫ: загрузка, закрыто, PIN ─────────────────────────────────── */
.skel { border-radius: 14px; background: linear-gradient(90deg, rgba(255,255,255,.04), rgba(255,255,255,.09), rgba(255,255,255,.04)); background-size: 200% 100%; animation: shimmer 1.6s linear infinite; }
.skel--title { height: 34px; width: 62%; }
.skel--panel { height: 190px; }
.skel--line { height: 16px; width: 80%; }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.center { padding: 30px 20px; display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.center h1 { font-size: 24px; line-height: 1.2; font-weight: 650; color: #fff; }
.center p { color: var(--silver); }
.field {
  width: 100%; max-width: 280px; min-height: 56px; padding: 0 14px; text-align: center;
  font: 600 28px/1 -apple-system, "SF Pro Display", system-ui, sans-serif; letter-spacing: .4em; text-indent: .4em; color: #fff;
  background: var(--gl-field); border: 1px solid var(--line); border-radius: 14px;
}
.field:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.field__msg { min-height: 1.4em; color: var(--warn); font-size: 14px; }

/* ── 8. БАННЕР СВЯЗИ ───────────────────────────────────────────────────── */
.banner {
  position: fixed; z-index: 30; left: 12px; right: 12px; top: calc(62px + env(safe-area-inset-top));
  max-width: 536px; margin: 0 auto; padding: 12px 16px; border-radius: var(--gl-r-md);
  background: var(--gl-scrim); border: 1px solid var(--line); color: #fff; font-size: 15px; text-align: center;
  box-shadow: 0 18px 40px -24px rgba(0, 0, 0, .9);
}
.banner[data-kind="lost"] { border-color: rgba(242, 182, 107, .5); }

/* ── 9. КОМПЬЮТЕР ──────────────────────────────────────────────────────── */
@media (min-width: 720px) {
  .wrap { max-width: 680px; padding-top: 40px; }
  .drop { padding: 44px 28px 36px; gap: 12px; }
  .hello { font-size: 34px; }
  .file__actions { justify-content: flex-end; }
}
@media (max-width: 359px) {
  .brand__name { letter-spacing: .1em; font-size: 12px; }
  .hello { font-size: 24px; }
}

/* ── 10. ЭКОНОМИЯ ДВИЖЕНИЯ ─────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
