:root {
  --fondo: #0a0a0a;
  --superficie: #111112;
  --bordo: rgba(255, 255, 255, 0.07);
  --bordo-forte: rgba(255, 255, 255, 0.14);
  --testo: #f4f4f5;
  --testo-2: #8b8b92;
  --testo-3: #5c5c63;
  --binario: #1e1e21;
  --goccia: #f5f5f7;
  --accento: #8b7bff;
}

* { box-sizing: border-box; margin: 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;
}

.defs { position: absolute; width: 0; height: 0; }

.stage {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: clamp(14px, 4vmin, 40px);
}

.panel {
  width: min(500px, 100%);
  background: var(--superficie);
  border: 1px solid var(--bordo);
  border-radius: 22px;
  padding: clamp(14px, 3vh, 22px) clamp(16px, 4vw, 24px) clamp(6px, 1.4vh, 10px);
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.panel__head { padding-bottom: clamp(8px, 1.8vh, 14px); border-bottom: 1px solid var(--bordo); }

.panel__title { font-size: 19px; font-weight: 640; letter-spacing: -0.01em; }

.panel__sub { margin-top: 3px; font-size: 14px; color: var(--testo-2); }

.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: clamp(11px, 2.4vh, 16px) 0;
  border-bottom: 1px solid var(--bordo);
}

.row:last-child { border-bottom: 0; }

.row__text { min-width: 0; }

.row__name { font-size: 16px; font-weight: 560; }

.row__note {
  margin-top: 3px;
  font-size: 14px;
  color: var(--testo-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* the switch: a track drawn in CSS, the jelly drawn in an SVG with the gooey filter on top of it */
.goo {
  position: relative;
  flex: none;
  width: 76px;
  height: 42px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
  border-radius: 999px;
}

.goo:focus-visible { outline: 2px solid var(--accento); outline-offset: 4px; }

.goo__track {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: var(--binario);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.6), inset 0 0 0 1px var(--bordo);
  transition: box-shadow 0.25s ease;
}

.goo__glow {
  position: absolute;
  inset: -14px -18px;
  border-radius: 999px;
  background: radial-gradient(closest-side, var(--accento), transparent);
  filter: blur(10px);
  opacity: 0;
  pointer-events: none;
}

.goo__blobs {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.45));
}

.goo__drop { fill: var(--goccia); }

.goo__shine { fill: #ffffff; opacity: 0.5; filter: blur(1px); }

@media (hover: hover) {
  .goo:hover .goo__track { box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.6), inset 0 0 0 1px var(--bordo-forte); }
}

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

@media (max-width: 380px) {
  .row__name { font-size: 14px; }
  .row__note { font-size: 12px; }
}
