@font-face {
  font-family: "Atkinson Hyperlegible Next";
  src: url("fonts/AtkinsonHyperlegibleNext.ttf") format("truetype");
  font-weight: 200 800;
  font-display: swap;
}
@font-face {
  font-family: "Figtree";
  src: url("fonts/Figtree.ttf") format("truetype");
  font-weight: 300 900;
  font-display: swap;
}

:root {
  --peach: #FBE3D0;
  --navy: #1C2B5A;
  --maroon: #5B2335;
  --orange: #E5573C;
  --red: #C8102F;
  --slate: #4A5578;
  --map: #F7EEE6;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html, body {
  position: fixed;
  inset: 0;
  overflow: hidden;
  background: var(--peach);
  overscroll-behavior: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

#stage {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 393px;
  height: 852px;
  transform: translate(-50%, -50%) scale(var(--scale, 1));
  font-family: "Atkinson Hyperlegible Next", system-ui, sans-serif;
  font-weight: 700;
  color: var(--navy);
}

.at { position: absolute; }

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
  transition: transform 120ms var(--ease), filter 120ms var(--ease);
}
button { touch-action: manipulation; }
button:active { transform: scale(0.94); filter: brightness(0.94); }
[data-mic]:active { transform: none; filter: none; }

.icon {
  display: inline-block;
  flex: none;
  background: currentColor;
  -webkit-mask: var(--src) center / contain no-repeat;
  mask: var(--src) center / contain no-repeat;
}

.hex { position: relative; display: grid; place-items: center; }
.hex > svg { position: absolute; inset: 0; overflow: visible; }
.hex > :not(svg) { position: relative; }

.label {
  font-size: 12px;
  letter-spacing: 1.5px;
  white-space: nowrap;
}

.logo { display: flex; font-family: "Figtree", sans-serif; font-weight: 900; color: #fff; }

.pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border-radius: 99px;
  background: #fff;
  letter-spacing: 1.3px;
  white-space: nowrap;
}

.layer { position: absolute; inset: 0; opacity: 0; transition: opacity 250ms ease-in-out; }
.layer:not(.shown) { pointer-events: none; }
.layer.shown { opacity: 1; }

.head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: 8.7px;
  width: 345px;
  font-size: 28.45px;
  letter-spacing: -0.2px;
}
.head .break { flex-basis: 100%; }
.word {
  height: 36px;
  padding: 0 5px;
  margin: 0 -5px;
  border-radius: 9px;
  line-height: 36px;
  white-space: nowrap;
}

.card {
  width: 345px;
  border-radius: 18px;
  background: #fff;
}

.said {
  position: absolute;
  right: 0;
  width: auto;
  max-width: 345px;
  padding: 20px 20px 22px;
  transform-origin: bottom right;
  transition: opacity 200ms ease-out, transform 200ms ease-out;
}
.said.empty { opacity: 0; transform: scale(0.9); }
.said .label { color: var(--slate); letter-spacing: 1.4px; margin-bottom: 10px; }
.said p {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: break-word;
  font-size: 17px;
  font-weight: 400;
  line-height: 1.3;
}

.row { display: flex; align-items: center; gap: 12px; font-size: 17.05px; }
.row small { display: block; font-size: 13px; font-weight: 400; color: var(--slate); margin-top: 2px; }

.chip {
  display: grid;
  place-items: center;
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--peach);
  color: var(--navy);
}
.chip.red { background: var(--red); color: #fff; }

.choice {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 165px;
  height: 55px;
  padding: 0 20px;
  border-radius: 99px;
  border: 2px solid var(--navy);
  background: #fff;
  color: var(--navy);
  font-size: 17.05px;
  white-space: nowrap;
}
.choice.primary { background: var(--navy); color: #fff; }
.choice.wide { width: 345px; }

.door, .flag { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.flag .art { transition: opacity 200ms var(--ease); }

.map {
  position: absolute;
  left: 20px;
  top: 20px;
  width: 305px;
  height: 96px;
  border-radius: 12px;
  overflow: hidden;
  background: var(--map);
}
.map img { position: absolute; width: 128px; height: 128px; }
.map .pin {
  position: absolute;
  left: 138.5px;
  top: 34px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--maroon);
  color: #fff;
  display: grid;
  place-items: center;
}
.map .credit {
  position: absolute;
  right: 6px;
  bottom: 3px;
  font-size: 8px;
  font-weight: 400;
  color: var(--slate);
}

.state .ring { opacity: 0; }
.state { display: block; }
.state.active .ring { animation: ring 1s linear infinite; }
.state.active .ring + .ring { animation-delay: -0.5s; }
.state.active .core { animation: breathe 0.67s ease-in-out infinite alternate; }
@keyframes ring {
  from { transform: scale(1); opacity: 0.35; }
  to { transform: scale(1.55); opacity: 0; }
}
@keyframes breathe {
  from { transform: scale(0.975); }
  to { transform: scale(1.025); }
}

.person {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 345px;
  height: 55px;
  border-radius: 99px;
  background: var(--red);
  color: #fff;
  font-size: 20.4px;
}

.start {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  background: var(--peach);
  z-index: 10;
  transition: opacity 250ms ease-in-out;
}
.start.gone { opacity: 0; }

@media (prefers-reduced-motion: reduce) {
  .state.active .ring, .state.active .core { animation: none; }
  button:active { transform: none; }
}
