:root {
  --h: 0;
  --s: 0%;
  --l: 35%;
}

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

html, body {
  height: 100%;
  background: #1b1b1f;
  color: #fff;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  overflow: hidden;
  -webkit-user-select: none;
  user-select: none;
}

#ind {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: hsl(var(--h) var(--s) var(--l));
  transition: background-color 1.2s ease, filter 3s ease, opacity 3s ease;
  padding: env(safe-area-inset-top) 16px env(safe-area-inset-bottom);
  text-align: center;
}

#ind.idle {
  filter: saturate(0.25);
  opacity: 0.45;
}

#word {
  font-size: clamp(3rem, 18vw, 8rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  text-shadow: 0 2px 12px rgb(0 0 0 / 0.25);
}

#band {
  font-size: clamp(1.25rem, 7vw, 2.5rem);
  font-weight: 600;
  opacity: 0.85;
}

#ind.neutral #word { font-size: clamp(2rem, 11vw, 4rem); font-weight: 600; opacity: 0.8; }

#intro {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  background: #1b1b1f;
  -webkit-user-select: text;
  user-select: text;
}

#intro[hidden] { display: none; }

.intro-body {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: calc(env(safe-area-inset-top) + 24px) 16px 24px;
  max-width: 34rem;
  width: 100%;
  margin: 0 auto;
  line-height: 1.45;
}

#intro h1 { font-size: 2.25rem; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 0.5rem; }
#intro h2 { font-size: 1.4rem; margin-bottom: 1rem; }
#intro h3 { font-size: 1rem; margin-bottom: 0.5rem; color: #cfcfd6; }
#intro .lead { font-size: 1.05rem; color: #e4e4ea; }
#intro.problem h1 { color: #fbbf24; font-size: 1.75rem; }
#intro.problem .lead { margin-bottom: 1.75rem; }

.help {
  background: #26262c;
  border-radius: 14px;
  padding: 1rem 1rem 1rem;
  margin-bottom: 0.75rem;
}
.help ol { padding-left: 1.25rem; display: grid; gap: 0.6rem; }
.help b { color: #fff; }
.help .tip { font-size: 0.9rem; color: #a8a8b3; margin-top: 0.75rem; }

#help-other { margin-top: 1rem; color: #a8a8b3; }
#help-other summary { cursor: pointer; padding: 0.5rem 0; }
#help-other[open] summary { margin-bottom: 0.5rem; }

.intro-foot {
  padding: 12px 16px calc(env(safe-area-inset-bottom) + 16px);
  border-top: 1px solid #2e2e35;
  display: flex;
  justify-content: center;
}

#start {
  font: inherit;
  font-size: 1.5rem;
  font-weight: 700;
  width: 100%;
  max-width: 34rem;
  padding: 1rem;
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: #1b1b1f;
  cursor: pointer;
}

#status {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: calc(env(safe-area-inset-bottom) + 16px);
  text-align: center;
  font-size: 0.9rem;
  opacity: 0.75;
  pointer-events: none;
}

#debug {
  position: fixed;
  top: calc(env(safe-area-inset-top) + 8px);
  left: 8px;
  font-size: 0.75rem;
  background: rgb(0 0 0 / 0.5);
  padding: 0.4rem 0.6rem;
  border-radius: 6px;
  pointer-events: none;
}
