:root {
  --fondo: #ffffff;
  --inchiostro: #121214;
  --grigio: #76767c;
  --linea: #e7e7eb;
  --accento: #4f5bf0;
  --accento-chiaro: #eef0ff;
}

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

html, body {
  margin: 0;
  height: 100%;
  background: var(--fondo);
  color: var(--inchiostro);
  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: 20px 16px;
  overflow: hidden;
}

/* the frame is as big as the open menu, so the preview frames the open state too */
.frame {
  width: min(300px, 92vw);
  display: grid;
  gap: 16px;
}

.event { margin: 0; display: grid; gap: 3px; }
.event b { font-size: 15px; font-weight: 640; letter-spacing: -0.01em; }
.event span { font-size: 13px; color: var(--grigio); font-weight: 450; }

.wrap {
  position: relative;
  min-height: 236px;
}

.add {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  height: 46px;
  padding: 0 14px 0 15px;
  border: 0;
  background: none;
  color: #fff;
  font: inherit;
  font-size: 15px;
  font-weight: 580;
  cursor: pointer;
  border-radius: 999px;
  -webkit-tap-highlight-color: transparent;
  isolation: isolate;
  z-index: 2;
}
.add:focus-visible { outline: 2px solid var(--accento); outline-offset: 3px; }

.add__bg, .add__fill {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  z-index: -1;
}
.add__bg { background: var(--inchiostro); box-shadow: 0 1px 2px rgba(18, 18, 20, 0.18), 0 6px 16px -8px rgba(18, 18, 20, 0.45); }
.add__fill { background: var(--accento); clip-path: circle(0% at 24px 50%); }

.ico { position: relative; width: 22px; height: 22px; flex: none; }
.ico svg { position: absolute; inset: 0; width: 22px; height: 22px; overflow: visible; }

.cal { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.cal__body { fill: rgba(255, 255, 255, 0.06); }
.cal__sheet rect { fill: #2a2a2e; stroke: none; }
.cal__sheet path { stroke: rgba(255, 255, 255, 0.85); stroke-width: 1.5; }

.tick { fill: none; stroke: #fff; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; opacity: 0; }

.labels { position: relative; display: block; height: 20px; overflow: hidden; }
.label {
  position: absolute;
  left: 0;
  top: 0;
  line-height: 20px;
  white-space: nowrap;
  font-stretch: 100%;
  opacity: 0;
}
.label[data-l="add"] { opacity: 1; }

.chev { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; opacity: 0.75; }

.note {
  position: relative;
  margin: 10px 0 0 4px;
  height: 18px;
  font-size: 13px;
  color: var(--grigio);
}
.note__t { position: absolute; left: 0; top: 0; white-space: nowrap; opacity: 0; }
.note__t[data-note-t="add"] { opacity: 1; }

.menu {
  position: absolute;
  left: 0;
  top: 54px;
  width: 100%;
  padding: 6px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 0 0 1px var(--linea), 0 14px 32px -12px rgba(18, 18, 20, 0.28), 0 3px 8px -4px rgba(18, 18, 20, 0.12);
  display: grid;
  gap: 2px;
  transform-origin: 26px 0;
  visibility: hidden;
  z-index: 3;
}

.opt {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: var(--inchiostro);
  font: inherit;
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.opt.is-hot { background: #f4f4f6; }
.opt:focus-visible { outline: 2px solid var(--accento); outline-offset: -2px; }

.opt__ico {
  width: 34px;
  height: 34px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #f4f4f6;
  box-shadow: inset 0 0 0 1px var(--linea);
  transition: background-color 0.18s, box-shadow 0.18s;
}
.opt.is-hot .opt__ico { background: var(--accento-chiaro); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accento) 22%, transparent); }
.opt__ico svg { width: 20px; height: 20px; fill: none; stroke: var(--inchiostro); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.opt.is-hot .opt__ico svg { stroke: var(--accento); }

.opt__t { display: grid; gap: 1px; min-width: 0; }
.opt__t b { font-size: 14px; font-weight: 590; }
.opt__t small { font-size: 12px; color: var(--grigio); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* the little page that flies: a white sheet with a coloured top and the day */
.flyer {
  position: fixed;
  left: 0;
  top: 0;
  width: 26px;
  height: 28px;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 0 0 1px var(--linea), 0 8px 18px -6px rgba(18, 18, 20, 0.35);
  overflow: hidden;
  display: grid;
  place-items: center;
  pointer-events: none;
  opacity: 0;
  z-index: 9;
}
.flyer i { position: absolute; left: 0; right: 0; top: 0; height: 8px; background: var(--accento); }
.flyer b { margin-top: 7px; font-size: 12px; font-weight: 680; line-height: 1; }

.ghost {
  position: fixed;
  left: 0;
  top: 0;
  width: 24px;
  height: 24px;
  fill: #111113;
  stroke: #fff;
  stroke-width: 1.4;
  stroke-linejoin: round;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.22));
  pointer-events: none;
  opacity: 0;
  z-index: 10;
}

@media (hover: hover) {
  .opt:hover { background: #f4f4f6; }
}

@media (max-width: 400px) {
  .add { height: 44px; font-size: 14px; }
  .note { font-size: 12px; }
}
