:root {
  --fondo: #f6f6f4;
  --card: #ffffff;
  --inchiostro: #141416;
  --grigio: #6e6e75;
  --grigio-chiaro: #a8a8ae;
  --bordo: rgba(20, 20, 22, 0.08);
  --riga: rgba(20, 20, 22, 0.06);
  --accento: #2f7d4f;
  --accento-chiaro: #e7f2ea;
  --row: clamp(27px, 7vh, 36px);
  --head: clamp(24px, 6.2vh, 32px);
}

* { box-sizing: border-box; margin: 0; }

html, body { height: 100%; overflow: hidden; }

body {
  background: var(--fondo);
  color: var(--inchiostro);
  font-family: "Mona Sans Variable", "Mona Sans", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-align: left; }

.stage {
  position: relative;
  height: 100vh;
  display: grid;
  place-items: center;
  padding: 12px;
  overflow: hidden;
}

.list {
  width: min(400px, 100%);
  background: var(--card);
  border: 1px solid var(--bordo);
  border-radius: 18px;
  padding: clamp(12px, 3.4vh, 20px) clamp(14px, 4vw, 20px);
  box-shadow: 0 1px 2px rgba(20, 20, 22, 0.04), 0 18px 46px -20px rgba(20, 20, 22, 0.18);
  display: flex;
  flex-direction: column;
}

.list__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.list__brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.list__mark {
  width: clamp(26px, 6.6vh, 32px); height: clamp(26px, 6.6vh, 32px); flex: 0 0 auto;
  padding: 6px; border-radius: 9px; background: var(--accento-chiaro);
  fill: none; stroke: var(--accento); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
}
.list__title { font-size: clamp(13px, 3.6vh, 15.5px); font-weight: 640; font-variation-settings: "wdth" 104; letter-spacing: -0.01em; }
.list__sub { font-size: clamp(10.5px, 2.8vh, 12px); color: var(--grigio); margin-top: 1px; white-space: nowrap; }
.list__left { font-size: clamp(11px, 3vh, 12.5px); color: var(--grigio); white-space: nowrap; font-weight: 520; }
.list__left .roll { color: var(--inchiostro); font-weight: 650; }

.roll { display: inline-grid; overflow: hidden; vertical-align: bottom; height: 1.25em; line-height: 1.25em; }
.roll > span { grid-area: 1 / 1; }

.bar { height: 3px; border-radius: 3px; background: var(--riga); margin: clamp(8px, 2.4vh, 12px) 0 clamp(4px, 1.4vh, 8px); overflow: hidden; }
.bar__fill { display: block; height: 100%; background: var(--accento); border-radius: inherit; transform: scaleX(0); transform-origin: 0 50%; }

.done-all {
  display: flex; align-items: center; gap: 8px; height: 0; overflow: hidden; opacity: 0;
  font-size: clamp(11.5px, 3vh, 13px); font-weight: 560; color: var(--accento);
}
.done-all svg { width: 18px; height: 18px; flex: 0 0 auto; fill: none; stroke: var(--accento); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.aisles { display: flex; flex-direction: column; }

.aisle { border-top: 1px solid var(--riga); }
.aisle:first-child { border-top: 0; }

.aisle__head {
  width: 100%; height: var(--head);
  display: flex; align-items: center; gap: 6px;
  font-size: clamp(10px, 2.6vh, 11px); font-weight: 620; letter-spacing: 0.06em; text-transform: uppercase; color: var(--grigio);
}
.aisle__name { transition: color 0.3s; }
.aisle__check { width: 15px; height: 15px; fill: none; stroke: var(--accento); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.aisle__left { margin-left: auto; letter-spacing: 0.02em; text-transform: none; font-weight: 540; }
.aisle__chev { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; opacity: 0; transform: rotate(-90deg); }
.aisle.is-done .aisle__name { color: var(--grigio-chiaro); }
.aisle.is-done .aisle__chev { opacity: 0.7; }
@media (hover: hover) { .aisle.is-done .aisle__head:hover .aisle__name { color: var(--inchiostro); } }

.aisle__body { overflow: hidden; }

.item {
  width: 100%; height: var(--row);
  display: flex; align-items: center; gap: 10px;
  font-size: clamp(12px, 3.4vh, 14px); font-weight: 500;
  border-radius: 9px; padding: 0 6px; margin: 0 -6px; width: calc(100% + 12px);
  transition: background-color 0.2s;
}
@media (hover: hover) { .item:hover { background: #f5f5f3; } }
.item:focus-visible, .aisle__head:focus-visible { outline: 2px solid var(--accento); outline-offset: 2px; }

.box {
  width: 18px; height: 18px; flex: 0 0 auto; border-radius: 5px;
  border: 1.5px solid #c9c9ce; display: grid; place-items: center; background: #fff;
}
.box svg { width: 14px; height: 14px; fill: none; stroke: #fff; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

.item__name { position: relative; flex: 0 1 auto; min-width: 0; white-space: nowrap; }
.strike { position: absolute; left: -2px; right: -2px; top: 54%; height: 1.5px; background: currentColor; transform: scaleX(0); transform-origin: 0 50%; }
.item__qty { margin-left: auto; color: var(--grigio); font-size: 0.86em; white-space: nowrap; }

.pointer {
  position: absolute; left: 0; top: 0; width: 22px; height: 22px;
  fill: #141416; stroke: #fff; stroke-width: 1.4; stroke-linejoin: round;
  opacity: 0; pointer-events: none; z-index: 20;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.2));
}

@media (prefers-reduced-motion: reduce) {
  .pointer { display: none; }
}
