@font-face {
  font-family: Wavelength;
  src: local("Trebuchet MS");
  font-display: swap;
}
* {
  box-sizing: border-box;
}
html {
  background: #103f43;
  color: #f5efdf;
  font-family: Wavelength, "Trebuchet MS", sans-serif;
}
body {
  margin: 0;
  min-width: 280px;
  min-height: 100dvh;
}
button,
input,
select {
  font: inherit;
}
button,
a,
input,
select {
  touch-action: manipulation;
}
button {
  cursor: pointer;
  border: 0;
  min-height: 44px;
  border-radius: 6px;
  padding: 12px 22px;
  font-weight: 700;
}
button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
button:not(:disabled):active {
  transform: translateY(1px);
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
svg:focus-visible {
  outline: 3px solid #f5c85a;
  outline-offset: 5px;
}
button {
  transition:
    background 0.15s,
    transform 0.15s;
}
a {
  color: inherit;
}
header {
  max-width: 1600px;
  margin: auto;
  padding: 26px 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  display: flex;
  align-items: center;
  width: 195px;
}
.brand img {
  width: 100%;
  height: auto;
}
nav {
  display: flex;
  align-items: center;
  gap: 10px;
}
.quiet,
.icon-button,
.text-button {
  color: inherit;
  background: transparent;
}
.quiet:hover,
.icon-button:hover,
.text-button:hover {
  background: #ffffff12;
}
.icon-button {
  font-size: 25px;
  padding: 7px 13px;
}
.flag {
  padding: 8px;
  background: transparent;
  width: 49px;
  display: grid;
  place-items: center;
  min-height: 44px;
  border-radius: 4px;
}
.flag svg {
  width: 29px;
  height: 20px;
}
.flag[aria-pressed="true"] {
  box-shadow: inset 0 -3px #f5c85a;
}
.primary {
  color: #fff9ee;
  background: #b92b3e;
  font-size: 1.1rem;
  padding: 15px 30px;
}
.primary:hover {
  background: #a32032;
}
.secondary {
  color: #f5efdf;
  background: transparent;
  border: 2px solid #c6d5ca;
}
.secondary:hover {
  background: #ffffff12;
}
.text-button {
  font-weight: 400;
  font-size: 0.9rem;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.skip-link {
  position: absolute;
  top: -100px;
  left: 20px;
  background: #f4eede;
  color: #103f43;
  padding: 15px;
  z-index: 100;
}
.skip-link:focus {
  top: 10px;
}
main {
  width: min(1340px, 100%);
  margin: auto;
  padding: 22px 32px 30px;
}
.entry {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(270px, 1fr);
  align-items: center;
  gap: 72px;
  min-height: calc(100dvh - 190px);
}
h1 {
  font-size: clamp(2.2rem, 4vw, 4.25rem);
  line-height: 1.04;
  font-weight: 500;
  letter-spacing: -0.05em;
  margin: 12px 0 18px;
}
h2 {
  font-size: clamp(1.8rem, 3vw, 2.65rem);
  line-height: 1.12;
  font-weight: 500;
  letter-spacing: -0.035em;
  margin: 10px 0 16px;
}
p {
  line-height: 1.5;
}
.eyeline {
  font-size: 1rem;
  margin: 0 0 14px;
  color: #c6d5ca;
}
.entry-game {
  text-align: center;
}
.entry-game h1 {
  margin-bottom: 28px;
}
.entry-demo {
  max-width: 680px;
  margin: auto;
}
.demo-clue {
  font-size: clamp(1.6rem, 3vw, 2.5rem);
  margin-bottom: -15px;
  position: relative;
  z-index: 1;
  font-weight: 700;
}
.spectrum {
  display: flex;
  justify-content: space-between;
  gap: 80px;
  padding: 0 5.5%;
  margin-top: -20px;
  font-size: clamp(1.1rem, 2vw, 1.6rem);
  line-height: 1.15;
  font-weight: 700;
}
.spectrum > * {
  max-width: 38%;
  overflow-wrap: anywhere;
}
.spectrum > :last-child {
  text-align: right;
}
.entry-form {
  display: flex;
  flex-direction: column;
  max-width: 360px;
  width: 100%;
  justify-self: center;
  gap: 16px;
}
.entry-form label {
  font-size: 1rem;
}
input,
select {
  border: 2px solid #b5c7bd;
  background: #f4efdf;
  color: #162f32;
  border-radius: 5px;
  padding: 15px 16px;
  min-height: 52px;
  width: 100%;
  font-size: 1.1rem;
}
input::placeholder {
  color: #57615c;
}
.avatar-button {
  background: none;
  color: inherit;
  display: grid;
  justify-content: center;
  gap: 8px;
  justify-items: center;
  padding: 0;
  margin-bottom: 10px;
}
.avatar-button span:last-child {
  font-weight: 400;
  font-size: 0.85rem;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.avatar {
  position: relative;
  display: block;
  width: 84px;
  height: 84px;
  isolation: isolate;
}
.avatar.large {
  width: 138px;
  height: 138px;
}
.avatar img {
  position: absolute;
  object-fit: contain;
  pointer-events: none;
}
.avatar-head {
  width: 100%;
  height: 100%;
  inset: 0;
}
.avatar-eyes {
  width: 37%;
  height: 27%;
  left: 40%;
  top: 36%;
}
.avatar-mouth {
  width: 27%;
  height: 15%;
  left: 43%;
  top: 62%;
}
.avatar-hat {
  width: 70%;
  height: 40%;
  left: 24%;
  top: -2%;
}
.entry-note {
  text-align: center;
  color: #cfdbce;
  font-size: 0.95rem;
  margin: 6px 0;
}
.entry-form .primary,
.entry-form .secondary {
  width: 100%;
}
#join-code {
  display: grid;
  gap: 12px;
}
#join-code[hidden] {
  display: none;
}
.form-error {
  color: #ffd2bf;
  margin: 0;
  min-height: 22px;
}
.invite-note {
  text-align: center;
}
.dial {
  width: 100%;
  max-width: 800px;
  margin: auto;
  user-select: none;
}
.dial svg {
  width: 100%;
  height: auto;
  display: block;
  overflow: visible;
}
.dial.interactive svg {
  cursor: grab;
  touch-action: none;
}
.dial.dragging svg {
  cursor: grabbing;
}
.dial-base {
  fill: #267c78;
}
.dial.revealed .dial-base {
  fill: #eee8d7;
}
.dial-rim {
  fill: none;
  stroke: #b9c9ba;
  stroke-width: 1.5;
}
.needle {
  transform-origin: 400px 390px;
  transition: transform 0.14s ease-out;
}
.dragging .needle {
  transition: none;
}
.needle-line,
.dial-hub {
  fill: #c63145;
}
.hub-ring {
  fill: none;
  stroke: #d84b55;
  stroke-width: 1.5;
}
.dial-ticks path {
  stroke: #123f45;
  stroke-width: 2;
  opacity: 0.25;
  pointer-events: none;
}
.band-0,
.band-4 {
  fill: #f6c95b;
}
.band-1,
.band-3 {
  fill: #e98d4d;
}
.band-2 {
  fill: #52b4d3;
}
.band-number {
  fill: #163b3d;
  font-size: 20px;
  font-weight: 700;
}
.target-bands {
  animation: reveal 0.7s cubic-bezier(0.18, 0.7, 0.3, 1);
}
@keyframes reveal {
  from {
    opacity: 0;
    clip-path: inset(0 100% 0 0);
  }
  to {
    opacity: 1;
    clip-path: inset(0 0 0 0);
  }
}
footer {
  padding: 14px;
  text-align: center;
  color: #c6d5ca;
}
footer button {
  font-size: 0.75rem !important;
}
.tutorial-dialog {
  width: min(760px, calc(100% - 28px));
  max-height: calc(100dvh - 28px);
  border: 0;
  background: #f3eddd;
  color: #163f42;
  border-radius: 12px;
  padding: 28px 38px;
  overflow: auto;
}
.tutorial-dialog::backdrop {
  background: #071e27db;
}
.tutorial-top,
.tutorial-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.tutorial-top {
  border-bottom: 1px solid #adbaaf;
  padding-bottom: 15px;
}
.tutorial-top > span {
  font-weight: 700;
}
.tutorial-top button {
  font-size: 0.85rem;
  padding: 10px;
}
.tutorial-copy {
  text-align: center;
  padding: 20px 0 0;
  min-height: 190px;
}
.tutorial-copy p {
  max-width: 560px;
  margin: 0 auto;
  font-size: 1.1rem;
}
.tutorial-copy > span {
  color: #58675e;
  font-size: 0.8rem;
}
.tutorial-clue {
  text-align: center;
  font-size: 1.6rem;
  font-weight: 700;
  min-height: 35px;
  margin-top: 10px;
}
.tutorial-dial {
  width: min(550px, 100%);
  margin: -5px auto -10px;
}
.tutorial-dialog .spectrum {
  max-width: 550px;
  margin: 0 auto 24px;
}
.tutorial-bottom {
  padding-top: 20px;
}
.tutorial-bottom .quiet {
  border: 1px solid #758c7b;
}
.lobby {
  max-width: 950px;
  margin: 30px auto;
  text-align: center;
}
.room-invite {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin: 35px auto;
}
.room-invite > strong {
  font-size: 2rem;
  letter-spacing: 0.12em;
}
.player-roster {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 30px;
  margin: 45px 0;
}
.player {
  display: grid;
  justify-items: center;
  gap: 8px;
  min-width: 100px;
}
.player > span:last-child {
  font-size: 0.8rem;
  color: #c6d5ca;
}
.lobby-bottom {
  margin: 40px 0;
}
.lobby-bottom .primary {
  min-width: 260px;
}
#toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translate(-50%, 25px);
  background: #f3eddd;
  color: #153c3d;
  padding: 14px 22px;
  border-radius: 7px;
  max-width: calc(100% - 36px);
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.2s,
    transform 0.2s;
  z-index: 200;
  text-align: center;
  box-shadow: 0 6px 30px #0003;
}
#toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}
#connection {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  text-align: center;
  background: #f6ca5e;
  color: #173b3a;
  font-size: 0.9rem;
  padding: 10px;
  z-index: 90;
}
.calm * {
  animation: none !important;
  transition: none !important;
}
@media (min-width: 1600px) {
  main {
    max-width: 1450px;
  }
  .entry {
    gap: 100px;
  }
}
@media (max-width: 1050px) {
  .entry {
    gap: 30px;
    grid-template-columns: minmax(0, 1.3fr) minmax(250px, 1fr);
  }
  header {
    padding: 22px;
  }
  main {
    padding: 15px 25px;
  }
  .entry-form {
    max-width: 310px;
  }
  h1 {
    font-size: 2.9rem;
  }
}
@media (max-width: 700px) {
  header {
    padding: 16px 16px;
    gap: 6px;
  }
  .brand {
    width: 138px;
  }
  nav {
    gap: 2px;
  }
  #help {
    padding: 8px 10px;
    font-size: 0.8rem;
  }
  .flag {
    width: 40px;
    padding: 7px;
  }
  .flag svg {
    width: 25px;
  }
  .icon-button {
    font-size: 22px;
    padding: 8px;
  }
  .entry {
    display: flex;
    flex-direction: column;
    gap: 26px;
    min-height: 0;
  }
  .entry-game {
    width: 100%;
  }
  .entry-game h1 {
    font-size: clamp(2.1rem, 7vw, 3.2rem);
    margin: 8px 0 20px;
  }
  .eyeline {
    font-size: 0.9rem;
  }
  .entry-demo {
    max-width: 500px;
  }
  .entry-game .text-button {
    margin-top: 17px;
  }
  .entry-form {
    max-width: 420px;
    gap: 12px;
    padding: 4px 10px;
  }
  .entry .avatar-button {
    margin: 0;
    display: flex;
    flex-direction: row;
    gap: 15px;
  }
  .entry .avatar.large {
    width: 72px;
    height: 72px;
  }
  .entry-form label {
    text-align: left;
  }
  .entry-note br {
    display: none;
  }
  .entry-note {
    font-size: 0.85rem;
    margin-top: 5px;
  }
  .spectrum {
    margin-top: -10px;
    gap: 90px;
  }
  .demo-clue {
    font-size: 1.6rem;
  }
  main {
    padding: 12px 16px 20px;
  }
  .tutorial-dialog {
    padding: 16px 18px;
  }
  .tutorial-copy {
    min-height: 185px;
    padding-top: 15px;
  }
  .tutorial-copy h2 {
    font-size: 1.8rem;
  }
  .tutorial-copy p {
    font-size: 1rem;
  }
  .tutorial-top > span {
    font-size: 0.9rem;
  }
  .tutorial-top button {
    font-size: 0.75rem;
  }
  .tutorial-bottom {
    padding-top: 6px;
  }
  .room-invite {
    flex-wrap: wrap;
    gap: 12px;
  }
  .room-invite > strong {
    font-size: 1.6rem;
  }
  .player-roster {
    gap: 20px;
  }
  .player {
    min-width: 80px;
  }
  .avatar {
    width: 70px;
    height: 70px;
  }
  .lobby {
    margin: 10px auto;
  }
  .lobby h1 {
    font-size: 2.5rem;
  }
  .lobby-bottom {
    margin: 20px auto;
  }
}
@media (max-width: 380px) {
  .brand {
    width: 115px;
  }
  #help {
    font-size: 0.75rem;
    padding: 8px;
  }
  .flag {
    width: 34px;
    padding: 5px;
  }
  header {
    padding: 12px 10px;
  }
  .entry-game h1 {
    font-size: 2rem;
  }
  .tutorial-copy {
    min-height: 210px;
  }
  .tutorial-top {
    gap: 4px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
