:root {
  --bg: #ffffff;
  --ink: #17171a;
  --soft: rgba(23, 23, 26, 0.58);
  --line: rgba(23, 23, 26, 0.1);
  --accent: #2f6fe0;
  --good: #128a5e;
}

*, *::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: 10px 12px;
}
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; outline: none; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.live { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.sc { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; width: min(348px, 100%); padding: 18px 16px 16px; border-radius: 26px; background: #ffffff; box-shadow: inset 0 0 0 1.500px var(--line), 0 30px 44px -30px rgba(23, 23, 26, 0.4); }
.sc__head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 0 2px; }
.sc__head strong { font-size: 16px; line-height: 20px; font-weight: 740; letter-spacing: -0.01em; }
.sc__used { font-size: 12.500px; line-height: 16px; font-weight: 640; color: var(--soft); white-space: nowrap; font-variant-numeric: tabular-nums; }
.sc__used b { font-weight: 740; color: var(--ink); }

.sc__bar { position: relative; height: 8px; border-radius: 4px; background: rgba(23, 23, 26, 0.08); overflow: hidden; }
.sc__fill { position: absolute; left: 0; top: 0; bottom: 0; width: 73%; border-radius: 4px; background: var(--ink); overflow: hidden; }
/* the part that will be freed: the right end of what is used */
.sc__go { position: absolute; right: 0; top: 0; bottom: 0; width: 0; background: var(--accent); box-shadow: -2px 0 0 #ffffff; }

.sc__list { display: grid; grid-template-columns: minmax(0, 1fr); list-style: none; }
.sc__row { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 10px; align-items: center; width: 100%; height: 44px; padding: 0 2px; text-align: left; box-shadow: inset 0 -1px 0 var(--line); transition: opacity 0.35s; }
li:last-child .sc__row { box-shadow: none; }
.sc__box { position: relative; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 7px; box-shadow: inset 0 0 0 1.500px rgba(23, 23, 26, 0.26); transition: background-color 0.2s, box-shadow 0.2s; }
.sc__box svg { display: block; width: 14px; height: 14px; fill: none; stroke: #ffffff; stroke-width: 2.300; stroke-linecap: round; stroke-linejoin: round; transition: stroke 0.2s; }
.sc__box path, .sc__face path { stroke-dasharray: 1; stroke-dashoffset: 1; }
.sc__row[aria-checked="true"] .sc__box { background: var(--accent); box-shadow: inset 0 0 0 1.500px var(--accent); }
.sc__name { display: grid; gap: 1px; min-width: 0; }
.sc__name b { font-size: 13.500px; line-height: 17px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sc__name i { font-style: normal; font-size: 11px; line-height: 14px; font-weight: 600; color: var(--soft); white-space: nowrap; }
.sc__size { display: block; height: 17px; overflow: hidden; font-size: 13px; line-height: 17px; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; transition: color 0.3s; }
.sc__size span { display: block; }
.sc__row.is-clean { cursor: default; }
.sc__row.is-clean .sc__name, .sc__row.is-clean .sc__box { opacity: 0.45; }
.sc__row.is-clean .sc__box { background: transparent; box-shadow: none; }
.sc__row.is-clean .sc__box svg { stroke: var(--good); }
.sc__row.is-clean .sc__size { color: var(--good); }
.sc__row:focus-visible { box-shadow: inset 0 0 0 2px var(--ink); border-radius: 8px; }

.sc__btn { position: relative; display: block; width: 100%; height: 44px; border-radius: 22px; background: rgba(23, 23, 26, 0.07); color: var(--soft); overflow: hidden; transition: background-color 0.3s, color 0.3s, box-shadow 0.3s; }
.sc__btn[aria-disabled="true"] { cursor: default; }
.sc__btn.is-ready { background: var(--ink); color: #ffffff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 12px 16px -10px rgba(23, 23, 26, 0.7); }
.sc__btn.is-done { background: rgba(18, 138, 94, 0.12); color: var(--good); box-shadow: none; }
.sc__btn:focus-visible { box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px var(--ink); }
.sc__face { position: absolute; inset: 0; display: flex; justify-content: center; align-items: center; gap: 0.3em; font-size: 14px; font-weight: 720; white-space: nowrap; font-variant-numeric: tabular-nums; opacity: 0; }
.sc__face[data-face="idle"] { opacity: 1; }
.sc__face svg { display: block; width: 15px; height: 15px; margin-right: 2px; fill: none; stroke: currentColor; stroke-width: 2.200; stroke-linecap: round; stroke-linejoin: round; }

.ghost { position: absolute; left: 0; top: 0; width: 24px; height: 24px; margin: -3px 0 0 -5px; transform-origin: 20% 15%; pointer-events: none; opacity: 0; fill: #17171a; stroke: #ffffff; stroke-width: 1.300; stroke-linejoin: round; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3)); z-index: 6; }

@media (max-width: 350px) { .sc { padding: 16px 13px 14px; } .sc__name b { font-size: 13px; } }
@media (prefers-reduced-motion: reduce) { .sc__row, .sc__box, .sc__box svg, .sc__size, .sc__btn { transition: none; } }
