:root {
  --bg: #000000;
  --panel: #111318;
  --ink: #f2f4f8;
  --soft: #8e94a3;
  --accent: #7c9cff;
  --ok: #5fe0a2;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Mona Sans Variable", "Mona Sans", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

.stage {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  place-items: center;
  padding: 16px;
}

.up {
  position: relative;
  width: min(320px, 100%);
  height: 148px;
  border-radius: 22px;
  background: linear-gradient(180deg, #171a21, var(--panel));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    inset 0 0 0 1px rgba(255, 255, 255, 0.07),
    0 0 70px -30px color-mix(in srgb, var(--accent) 70%, transparent);
  overflow: hidden;
  transition: box-shadow 0.4s ease;
}
.up.is-over {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    inset 0 0 0 1.5px var(--accent),
    0 0 80px -22px color-mix(in srgb, var(--accent) 90%, transparent);
}
.up:focus-within { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ---- empty: the place to drop ---- */
.up__drop { position: absolute; inset: 9px; display: grid; align-content: center; justify-items: center; gap: 4px; border-radius: 15px; border: 1.5px dashed rgba(255, 255, 255, 0.2); cursor: pointer; text-align: center; -webkit-tap-highlight-color: transparent; transition: border-color 0.3s ease, background-color 0.3s ease; }
.up.is-over .up__drop, .up__drop.is-hot { border-color: color-mix(in srgb, var(--accent) 80%, transparent); background: color-mix(in srgb, var(--accent) 8%, transparent); }
.up__ico { width: 40px; height: 40px; margin-bottom: 3px; border-radius: 13px; background: rgba(255, 255, 255, 0.07); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08); display: grid; place-items: center; }
.up__ico svg { width: 26px; height: 26px; overflow: visible; }
.up__ico rect, .up__ico path { fill: none; stroke: var(--ink); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.up__ico .up__arrow { stroke: var(--accent); stroke-width: 1.9; }
.up__main { font-size: 14.5px; line-height: 20px; font-weight: 620; }
.up__main b { font-weight: inherit; color: var(--accent); }
.up__hint { font-size: 11.5px; line-height: 15px; color: var(--soft); }

/* ---- chosen: the row with the preview ---- */
.up__file { position: absolute; left: 0; right: 0; top: 0; height: 96px; display: flex; align-items: center; gap: 13px; padding: 0 12px 0 12px; visibility: hidden; opacity: 0; }
.thumb { position: relative; flex: none; width: 72px; height: 72px; border-radius: 15px; overflow: hidden; background: #1c2029; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1), 0 10px 20px -8px rgba(0, 0, 0, 0.8); }
.thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
/* the part not uploaded yet: dark and out of focus, cut away from the top */
.thumb__veil { position: absolute; inset: 0; background: rgba(17, 19, 24, 0.72); backdrop-filter: blur(7px) saturate(0.4); -webkit-backdrop-filter: blur(7px) saturate(0.4); clip-path: inset(0 0 0 0); box-shadow: inset 0 2px 0 var(--accent); }
.thumb__sheen { position: absolute; top: -30%; bottom: -30%; left: 0; width: 60%; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.5) 50%, transparent); opacity: 0; }
.thumb__ok { position: absolute; right: 5px; bottom: 5px; width: 20px; height: 20px; overflow: visible; }
.thumb__ok rect { fill: var(--ok); }
.thumb__ok path { fill: none; stroke: #0b2a1b; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; }
.info { flex: 1; min-width: 0; display: grid; gap: 3px; }
.info__name { font-size: 14px; line-height: 19px; font-weight: 640; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.info__meta { display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--soft); white-space: nowrap; }
.roll { display: block; height: 16px; line-height: 16px; overflow: hidden; color: var(--accent); font-weight: 620; transition: color 0.4s ease; }
.roll span { display: block; }
.up.is-done .roll { color: var(--ok); }
.info__bar { position: relative; height: 4px; margin-top: 4px; border-radius: 99px; background: rgba(255, 255, 255, 0.1); overflow: hidden; }
.info__bar span { position: absolute; inset: 0; border-radius: inherit; background: var(--accent); transform-origin: 0 50%; transform: scaleX(0); transition: background-color 0.4s ease; }
.up.is-done .info__bar span { background: var(--ok); }
.up__x { flex: none; width: 34px; height: 34px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.07); color: var(--ink); cursor: pointer; display: grid; place-items: center; -webkit-tap-highlight-color: transparent; transition: background-color 0.25s ease; }
.up__x:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.up__x.is-hot { background: rgba(255, 255, 255, 0.16); }
.up__x svg { width: 16px; height: 16px; }
.up__x path { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.ghost {
  position: fixed;
  left: 0;
  top: 0;
  width: 22px;
  height: 22px;
  pointer-events: none;
  fill: #ffffff;
  stroke: #14151a;
  stroke-width: 1.4;
  stroke-linejoin: round;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.6));
  opacity: 0;
  visibility: hidden;
  z-index: 5;
}

@media (hover: hover) {
  .up__drop:hover { border-color: color-mix(in srgb, var(--accent) 80%, transparent); background: color-mix(in srgb, var(--accent) 8%, transparent); }
  .up__x:hover { background: rgba(255, 255, 255, 0.16); }
}
