:root {
  --bg: #e9e6f2;
  --card: #ffffff;
  --ink: #1b1930;
  --soft: #7d7a92;
  --accent: #5b4be0;
  --late: #c2571a;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  background:
    radial-gradient(60% 50% at 15% 0%, #fbfaff, transparent 70%),
    radial-gradient(50% 45% at 100% 100%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%),
    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 16px;
}

.ld {
  position: relative;
  width: min(292px, 100%);
  padding: 13px 13px 12px;
  border-radius: 26px;
  background: var(--card);
  box-shadow:
    0 0 0 1px rgba(27, 25, 48, 0.06),
    0 2px 4px rgba(27, 25, 48, 0.05),
    0 20px 40px -18px rgba(27, 25, 48, 0.28),
    0 50px 80px -44px color-mix(in srgb, var(--accent) 65%, transparent);
}
.ld__head { display: flex; align-items: center; gap: 10px; }
.bag { flex: none; width: 46px; height: 50px; display: grid; place-items: center; }
.bag svg { width: 42px; height: 49px; overflow: visible; }
.bag__body { fill: color-mix(in srgb, var(--accent) 9%, #ffffff); stroke: color-mix(in srgb, var(--accent) 55%, #ffffff); stroke-width: 1.6; }
.bag__fill { fill: color-mix(in srgb, var(--accent) 62%, #ffffff); }
.bag__fold { fill: none; stroke: rgba(255, 255, 255, 0.5); stroke-width: 1.4; stroke-linecap: round; }
.bag__neck { fill: color-mix(in srgb, var(--accent) 30%, #ffffff); stroke: color-mix(in srgb, var(--accent) 55%, #ffffff); stroke-width: 1.4; stroke-linejoin: round; }
.bag__tie { fill: none; stroke: var(--accent); stroke-width: 2.6; stroke-linecap: round; }
.ld__title { flex: 1; min-width: 0; }
.ld__title span { display: block; font-size: 10.5px; line-height: 14px; font-weight: 640; letter-spacing: 0.07em; text-transform: uppercase; color: var(--soft); }
.ld__title h1 { font-size: 18px; line-height: 22px; font-weight: 720; font-stretch: 108%; letter-spacing: -0.02em; }
.ld__count { flex: none; padding: 0 10px; border-radius: 99px; background: color-mix(in srgb, var(--accent) 11%, #ffffff); color: var(--accent); font-size: 11.5px; font-weight: 680; }
.roll { display: block; height: 22px; line-height: 22px; overflow: hidden; }
.roll > span, .roll > strong { display: block; white-space: nowrap; }

.rows { list-style: none; margin-top: min(9px, 2vh); display: grid; gap: min(5px, 1.2vh); }
.row { display: flex; align-items: center; gap: 8px; height: min(42px, 10vh); padding: 0 6px 0 11px; border-radius: 14px; background: #f5f4fa; }
.row__name { flex: 1; min-width: 0; font-size: 13.5px; font-weight: 640; }
.row__name small { display: block; font-size: 10.5px; font-weight: 540; color: var(--soft); }
.step { display: flex; align-items: center; height: 30px; border-radius: 99px; background: #ffffff; box-shadow: 0 0 0 1px rgba(27, 25, 48, 0.07), 0 2px 4px -2px rgba(27, 25, 48, 0.2); }
.step button { width: 30px; height: 30px; border: 0; border-radius: 50%; background: none; color: var(--ink); cursor: pointer; display: grid; place-items: center; -webkit-tap-highlight-color: transparent; }
.step button:disabled { opacity: 0.28; cursor: default; }
.step button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.step svg { width: 11px; height: 11px; }
.step path { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.step output { font: inherit; width: 18px; height: 20px; line-height: 20px; overflow: hidden; text-align: center; font-size: 13px; font-weight: 700; }
.step output span { display: block; }
.token { position: fixed; left: 0; top: 0; width: 13px; height: 10px; border-radius: 3px; background: var(--accent); pointer-events: none; z-index: 4; }

.ld__foot { display: flex; align-items: flex-end; justify-content: space-between; margin-top: min(9px, 2vh); padding: 0 4px; }
.ld__back span { display: block; font-size: 10.5px; line-height: 13px; font-weight: 560; color: var(--soft); }
.ld__back .roll { height: 19px; line-height: 19px; font-size: 13px; }
.ld__back strong { font-weight: 700; transition: color 0.4s ease; }
.ld.is-late .ld__back strong { color: var(--late); }
.ld__total { height: 28px; line-height: 28px; font-size: 23px; font-stretch: 110%; letter-spacing: -0.03em; }
.ld__total strong { font-weight: 740; }
.send { display: block; width: 100%; height: min(44px, 10.5vh); margin-top: min(9px, 2vh); border: 0; border-radius: 99px; background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 86%, #ffffff), var(--accent)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 10px 18px -10px var(--accent); color: #ffffff; font: inherit; font-size: 14px; font-weight: 660; cursor: pointer; transition: opacity 0.3s ease; -webkit-tap-highlight-color: transparent; }
.send[aria-disabled="true"] { opacity: 0.45; }
.send:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.send .roll { height: 20px; line-height: 20px; }

.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: #14151a;
  stroke: #ffffff;
  stroke-width: 1.4;
  stroke-linejoin: round;
  filter: drop-shadow(0 2px 4px rgba(20, 21, 26, 0.3));
  opacity: 0;
  visibility: hidden;
  z-index: 5;
}

/* big in the poster and on a desk, unchanged in the phone's box */
@media (min-width: 700px) and (min-height: 500px) {
  .ld { zoom: 1.25; }
}
@media (min-width: 1100px) and (min-height: 760px) {
  .ld { zoom: 1.7; }
}
