:root {
  --fondo: #08090b;
  --accento: #8fd0ff;
  --testo: #f4f6f8;
  --testo-2: rgba(244, 246, 248, 0.6);
  --testo-3: rgba(244, 246, 248, 0.34);
  --vetro: rgba(255, 255, 255, 0.055);
  --bordo: rgba(255, 255, 255, 0.11);
  --luce: rgba(143, 208, 255, 0.5);
}

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

html, body { height: 100%; }

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

.stage {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 16px;
  overflow: hidden;
  background:
    radial-gradient(60% 45% at 50% 58%, rgba(143, 208, 255, 0.07), transparent 70%),
    var(--fondo);
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}

.dock {
  position: relative;
  width: min(360px, 90vw);
  height: min(210px, 52vh);
  display: grid;
  align-content: center;
}

.floor {
  position: absolute;
  left: 8%; right: 8%;
  top: calc(50% + 42px);
  height: 46px;
  border-radius: 50%;
  background: radial-gradient(50% 50% at 50% 50%, var(--luce), transparent 70%);
  filter: blur(14px);
  opacity: 0;
  pointer-events: none;
}

.stack {
  position: relative;
  height: 78px;
}

.hint {
  position: absolute;
  left: 0; right: 0;
  bottom: 0;
  text-align: center;
  font-size: 11.5px;
  font-variation-settings: "wdth" 104;
  letter-spacing: 0.02em;
  color: var(--testo-3);
}

.note {
  position: absolute;
  inset: 0;
  transform-origin: 50% 0%;
  will-change: transform;
  cursor: grab;
  touch-action: pan-y;
}
.note.is-held { cursor: grabbing; }

.note__halo {
  position: absolute;
  inset: 6px 10px -6px;
  border-radius: 22px;
  background: var(--luce);
  filter: blur(22px);
  opacity: 0;
  pointer-events: none;
}

.note__glass {
  position: relative;
  height: 100%;
  display: grid;
  grid-template-columns: 42px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 0 14px 0 14px;
  border-radius: 20px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.025)),
    rgba(20, 22, 26, 0.72);
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
  backdrop-filter: blur(18px) saturate(1.3);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 18px 40px -18px rgba(0, 0, 0, 0.9),
    0 2px 6px rgba(0, 0, 0, 0.4);
}

.note__fill {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(143, 208, 255, 0.04), rgba(143, 208, 255, 0.2) 70%, rgba(200, 232, 255, 0.36));
  transform-origin: 0 50%;
  pointer-events: none;
}
.note__front {
  position: absolute;
  top: 0; bottom: 0; right: -1px;
  width: 2px;
  background: linear-gradient(180deg, transparent, #ffffff 30%, #ffffff 70%, transparent);
  box-shadow: 0 0 14px 3px var(--luce), 0 0 3px #ffffff;
  opacity: 0.9;
}

.note__glint {
  position: absolute;
  top: -40%; bottom: -40%;
  left: 0;
  width: 70px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.28), transparent);
  transform: translateX(-120px) skewX(-18deg);
  pointer-events: none;
}

.note__icon {
  position: relative;
  width: 42px; height: 42px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.03));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.16);
}
.ico { position: absolute; width: 22px; height: 22px; fill: none; stroke: var(--testo); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.ico__reel { stroke: var(--testo-2); stroke-width: 1.3; }
.ico--done { stroke: var(--accento); stroke-width: 2; }

.note__text { min-width: 0; position: relative; }
.note__top { display: flex; gap: 8px; align-items: baseline; font-size: 10.5px; letter-spacing: 0.03em; color: var(--testo-3); margin-bottom: 2px; }
.note__app { font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; }
.note__title { font-size: 14px; font-weight: 600; font-variation-settings: "wdth" 102; line-height: 18px; }
.note__sub { font-size: 12px; color: var(--testo-2); line-height: 16px; }

.roll { position: relative; display: block; overflow: hidden; height: 1lh; }
.roll__line { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.roll__line + .roll__line { position: absolute; left: 0; right: 0; top: 0; }

.note__side { position: relative; width: 52px; height: 30px; display: grid; place-items: center end; }
.note__pct {
  font-size: 13px;
  font-weight: 600;
  font-variation-settings: "wdth" 96;
  color: var(--testo);
  position: absolute; right: 0;
}
.note__act {
  position: absolute; right: 0;
  height: 28px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  color: #071018;
  background: linear-gradient(180deg, #ffffff, #d7ecfb);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.4), 0 6px 16px -6px var(--luce);
  cursor: pointer;
}

.note__edge {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  overflow: visible;
  pointer-events: none;
}
.note__edge rect {
  fill: none;
  stroke: var(--bordo);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.ghost {
  position: absolute; left: 0; top: 0;
  width: 22px; height: 22px;
  pointer-events: none;
  z-index: 50;
}
.ghost path { fill: #ffffff; stroke: #08090b; stroke-width: 1.4; stroke-linejoin: round; }
