:root {
  --fondo: #ffffff;
  --pino: #10372f;
  --salvia: #1f5c4e;
  --menta: #a6ecd0;
  --crema: #f3f6f2;
  --acciaio: #d9dcd6;
  --grigio: #84908a;
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--fondo);
  color: var(--pino);
  font-family: "Mona Sans Variable", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

.frame {
  position: relative;
  display: grid;
  justify-items: center;
  align-content: center;
  width: min(360px, 94vw);
  height: min(150px, 40vh);
}

/* the pill: the button for GSAP (scale), the layers inside for CSS */
.c {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  height: 60px;
  padding: 0 26px 0 16px;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--crema);
  font: inherit;
  font-size: 16px;
  font-weight: 580;
  letter-spacing: -0.005em;
  cursor: pointer;
  isolation: isolate;
  max-width: 94vw;
  -webkit-tap-highlight-color: transparent;
}
.c:focus-visible { outline: 2px solid var(--salvia); outline-offset: 4px; }

.c__skin, .c__fill, .c__glow, .c__sheen, .c__grain {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
}
.c__skin {
  z-index: -5;
  background: linear-gradient(180deg, #19473e 0%, var(--pino) 56%, #0b2924 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    inset 0 -1px 0 rgba(0, 0, 0, 0.42),
    0 1px 1px rgba(16, 55, 47, 0.16),
    0 6px 14px -6px rgba(16, 55, 47, 0.32),
    0 22px 40px -22px rgba(16, 55, 47, 0.6);
}
/* the check-in fill: grows from the tag towards the end of the pill */
.c__fill {
  z-index: -4;
  overflow: hidden;
  background: linear-gradient(180deg, #2a6d5d 0%, var(--salvia) 55%, #174a3f 100%);
  box-shadow: inset 0 1px 0 rgba(200, 255, 230, 0.2);
  clip-path: inset(0% 100% 0% 0% round 999px);
}
.c__edge {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 26px;
  margin-left: -26px;
  background: linear-gradient(90deg, transparent, rgba(166, 236, 208, 0.32));
  opacity: 0;
}
.c__glow {
  z-index: -3;
  overflow: hidden;
  opacity: 0;
  background: radial-gradient(120px 80px at var(--gx, 50%) var(--gy, 50%), rgba(214, 255, 236, 0.15), transparent 70%);
}
.c__sheen {
  z-index: -2;
  opacity: 0;
  background: linear-gradient(100deg, transparent 32%, rgba(230, 255, 244, 0.26) 48%, transparent 63%);
  background-size: 260% 100%;
  background-position: 120% 0;
}
.c__grain {
  z-index: -1;
  opacity: 0.09;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='120' height='120' filter='url(%23n)'/></svg>");
}

/* the icon: a split ring at the top, the round tag hanging from it */
.c__icon {
  position: relative;
  flex: none;
  width: 34px;
  height: 40px;
  margin-top: 2px;
}
.c__ring {
  position: absolute;
  inset: 0;
  width: 34px;
  height: 40px;
  overflow: visible;
  fill: none;
  stroke: #c9cec7;
  stroke-width: 1.5;
  stroke-linecap: round;
}
.c__ring .c__ring-hi { stroke: #ffffff; stroke-width: 0.8; opacity: 0.7; }
.c__swing {
  position: absolute;
  left: 50%;
  top: 7px;
  width: 24px;
  height: 30px;
  margin-left: -12px;
  perspective: 140px;
}
.c__link {
  position: absolute;
  left: 50%;
  top: 0;
  width: 1.4px;
  height: 5px;
  margin-left: -0.7px;
  border-radius: 1px;
  background: linear-gradient(180deg, #e8ebe6, #9aa39c);
}
.c__flip {
  position: absolute;
  left: 0;
  top: 5px;
  width: 24px;
  height: 24px;
  transform-style: preserve-3d;
}
.tag {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  overflow: hidden;
  -webkit-backface-visibility: hidden;
          backface-visibility: hidden;
  background:
    radial-gradient(circle at 50% 50%, transparent 10.2px, rgba(0, 0, 0, 0.14) 10.6px, transparent 11.2px),
    radial-gradient(120% 90% at 30% 18%, #ffffff 0%, rgba(255, 255, 255, 0) 52%),
    conic-gradient(from 210deg, #bfc4bd, #f4f6f2, #a9afa8, #e6e9e3, #b6bcb4, #f1f3ef, #bfc4bd);
  box-shadow:
    inset 0 0 0 0.75px rgba(255, 255, 255, 0.7),
    inset 0 -1px 1px rgba(0, 0, 0, 0.25),
    0 1px 1px rgba(0, 0, 0, 0.35),
    0 4px 8px -3px rgba(0, 0, 0, 0.55);
}
/* the eyelet at the top of the tag */
.tag::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 1.6px;
  width: 3px;
  height: 3px;
  margin-left: -1.5px;
  border-radius: 50%;
  background: #0f2e28;
  box-shadow: 0 0.6px 0 rgba(255, 255, 255, 0.8);
}
.tag--back { transform: rotateY(180deg); }
.tag__shine {
  position: absolute;
  inset: -20%;
  background: linear-gradient(115deg, transparent 38%, rgba(255, 255, 255, 0.85) 50%, transparent 62%);
  transform: translateX(-70%);
  opacity: 0.9;
}
.tag__mark, .tag__check {
  position: absolute;
  left: 4px;
  top: 4.6px;
  width: 16px;
  height: 16px;
}
/* engraved: a dark cut with a hair of light under it */
.tag__mark {
  fill: #3e4b45;
  filter: drop-shadow(0 0.5px 0 rgba(255, 255, 255, 0.85));
}
.tag__check {
  fill: none;
  stroke: #1f5c4e;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  filter: drop-shadow(0 0.5px 0 rgba(255, 255, 255, 0.85));
}

.c__labels {
  position: relative;
  display: block;
  height: 22px;
  overflow: hidden;
}
.c__label {
  position: absolute;
  left: 0;
  top: 0;
  display: inline-flex;
  align-items: center;
  width: max-content;
  height: 22px;
  line-height: 22px;
  white-space: nowrap;
  opacity: 0;
  font-variation-settings: "wdth" 100;
}
.c__label[data-l="idle"] { opacity: 1; }
.c__sep { margin: 0 0.42em; opacity: 0.5; }
.c__room { color: var(--menta); font-weight: 650; }

.note {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(50% + 44px);
  height: 18px;
  margin: 0;
  font-size: 13px;
  font-weight: 460;
  color: var(--grigio);
}
.note__line {
  position: absolute;
  left: 0;
  right: 0;
  text-align: center;
  white-space: nowrap;
  opacity: 0;
}
.note__line[data-n="idle"] { opacity: 1; }
.note__line [data-mins] { color: var(--pino); font-weight: 600; font-variant-numeric: tabular-nums; }

@media (max-width: 400px) {
  .c { height: 56px; font-size: 15px; padding: 0 22px 0 14px; gap: 8px; }
  .note { top: calc(50% + 42px); font-size: 12px; }
}
