:root {
  --fondo: #ffffff;
  --carta: #ffffff;
  --testo: #1b1915;
  --testo-2: #6b655d;
  --testo-3: #b0a99f;
  --linea: #ece8e2;
  --traccia: #f5f2ee;
  --accento: #e0961c;        /* the single accent: honey amber, in the stars, the rule and the pill */
  --accento-scuro: #b9740b;
  --accento-velo: #fdf4e4;
  --ombra: 46, 32, 12;
  --respiro: 0;              /* 0 to 1: the shadow breathing when the window arrives */
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
html { font-size: clamp(12px, min(3.6vw, 3.3vh), 17px); }
body {
  background: var(--fondo);
  color: var(--testo);
  font-family: "Mona Sans Variable", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input { font: inherit; color: inherit; }

.stage { min-height: 100vh; display: grid; place-items: center; padding: 1em; }

/* ---- the window ---- */
.prompt {
  width: min(20.5em, 90vw);
  background: var(--carta);
  border: 1px solid var(--linea);
  border-radius: 1.4em;
  padding: 1.5em 1.4em 2em;
  text-align: center;
  box-shadow:
    0 1px 2px rgba(var(--ombra), .05),
    0 calc(18px + var(--respiro) * 14px) calc(40px + var(--respiro) * 24px) calc(-26px - var(--respiro) * 4px) rgba(var(--ombra), calc(.26 + var(--respiro) * .1));
}

.prompt__icon {
  width: 3em; height: 3em;
  margin: 0 auto .85em;
  border-radius: .85em;
  background: var(--traccia);
  border: 1px solid var(--linea);
  display: grid; place-items: center;
  box-shadow: inset 0 1px 0 #fff, 0 6px 14px -10px rgba(var(--ombra), .5);
}
.prompt__icon svg { width: 1.9em; height: 1.9em; fill: none; stroke: var(--testo); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.prompt__icon .icon__soft { stroke: var(--testo-3); }

.prompt__title { font-size: 1.32em; font-weight: 640; font-stretch: 104%; letter-spacing: -.01em; line-height: 1.15; }
.prompt__sub { margin-top: .4em; font-size: .88em; color: var(--testo-2); line-height: 1.4; }

/* ---- the stars ---- */
.stars { display: flex; justify-content: center; gap: .25em; margin-top: 1.05em; touch-action: none; }
.star {
  width: 2.55em; height: 2.55em;
  display: grid; place-items: center;
  border-radius: .7em;
  outline: none;
}
.star:focus-visible { box-shadow: 0 0 0 2px var(--accento-velo), 0 0 0 3.5px var(--accento); }
.star svg { width: 2.05em; height: 2.05em; overflow: visible; }
.star__line { fill: none; stroke: #d6cfc5; stroke-width: 1.35; stroke-linejoin: round; transition: stroke .25s; }
.star.is-on .star__line { stroke: var(--accento-scuro); }
.star__fill { fill: var(--accento); stroke: var(--accento); stroke-width: 1.35; stroke-linejoin: round; }

/* ---- the word under the stars ---- */
.word { position: relative; height: 1.6em; margin-top: .45em; display: grid; place-items: center; }
.word__rule {
  position: absolute; left: 50%; bottom: .05em;
  width: 2.2em; height: 1.5px; margin-left: -1.1em;
  background: var(--accento); border-radius: 2px;
  transform: scaleX(0);
}
.roll { position: relative; display: block; height: 1.3em; overflow: hidden; min-width: 6em; }
.roll__line {
  position: absolute; inset: 0;
  display: block; text-align: center;
  font-size: .82em; line-height: 1.6;
  font-weight: 560; letter-spacing: .06em; text-transform: uppercase;
  color: var(--accento-scuro);
}

/* ---- after the rating ---- */
.after { position: relative; height: 0; overflow: hidden; margin: 0 -.9em -.7em; }
.panel {
  position: absolute; left: .9em; right: .9em; top: 0;
  padding-top: 1em;
  visibility: hidden;
}

.panel--high { display: grid; gap: .35em; justify-items: center; }
.pill {
  width: 100%;
  border-radius: 999px;
  outline: none;
}
.pill__face {
  display: flex; align-items: center; justify-content: center; gap: .5em;
  height: 2.9em; border-radius: 999px;
  background: linear-gradient(180deg, #e9a42c, var(--accento) 60%, #d38a12);
  color: #fff;
  font-weight: 620; font-size: .98em;
  font-stretch: 100%;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 10px 20px -12px rgba(160, 96, 0, .8);
}
.pill:focus-visible .pill__face { box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px var(--accento-scuro); }
.pill__glyph { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ghost { padding: .55em 1em; font-size: .86em; color: var(--testo-2); border-radius: 999px; outline: none; }
.ghost:focus-visible { box-shadow: 0 0 0 1.5px var(--linea); }

.panel--low { text-align: left; }
.field__label { display: block; font-size: .84em; font-weight: 560; color: var(--testo); margin: 0 0 .5em .15em; }
.field {
  display: flex; align-items: center; gap: .3em;
  border: 1px solid var(--linea); border-radius: .9em;
  background: var(--traccia);
  padding: .3em .3em .3em .85em;
  transition: border-color .25s, background .25s;
}
.field:focus-within { border-color: #e7cfa5; background: #fff; }
.field__input {
  flex: 1; min-width: 0;
  border: 0; background: none; outline: none;
  font-size: .9em; padding: .45em 0;
}
.field__input::placeholder { color: var(--testo-3); }
.send {
  display: flex; align-items: center; gap: .3em;
  padding: .55em .8em; border-radius: .65em;
  background: var(--testo); color: #fff;
  font-size: .82em; font-weight: 600;
  outline: none;
}
.send:focus-visible { box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px var(--accento); }
.send svg { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.panel--thanks { display: flex; align-items: center; justify-content: center; gap: .55em; font-size: .92em; color: var(--testo-2); padding-top: 1.1em; }
.tick { width: 1.45em; height: 1.45em; flex: none; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.tick__ring { fill: var(--accento-velo); stroke: none; }
.tick path { stroke: var(--accento-scuro); stroke-width: 1.8; stroke-dasharray: 1; stroke-dashoffset: 1; }

@media (hover: hover) {
  .ghost:hover { color: var(--testo); background: var(--traccia); }
  .send:hover { background: #000; }
}
