:root {
  --bg-1: #f7f2ea;
  --bg-2: #ece4d7;
  --bg-3: #fefaf4;
  --ink: #1e1a16;
  --hud: rgba(30, 26, 22, 0.6);
}

* {
  box-sizing: border-box;
}

html, body {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  background: radial-gradient(120% 120% at 10% 10%, var(--bg-3), var(--bg-1) 45%, var(--bg-2) 100%);
  font-family: "Futura", "Avenir Next", "Gill Sans", sans-serif;
  color: var(--ink);
  overflow: hidden;
}

#stage {
  display: block;
  width: 100vw;
  height: 100vh;
}

body.loading #stage {
  opacity: 0;
}

body.loading #brand {
  opacity: 0;
}

#brand {
  position: fixed;
  left: 50%;
  top: 20px;
  z-index: 2;
  pointer-events: auto;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 12px;
  font-weight: 600;
  transform: translateX(-50%);
  text-align: center;
  cursor: pointer;
}

#hud {
  position: fixed;
  left: 50%;
  bottom: 22px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 11px;
  transform: translateX(-50%);
  text-align: center;
}

#hud .status {
  color: var(--hud);
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
}

#hud .status .word {
  color: var(--hud);
}

#hud .status .bridge {
  position: relative;
  width: 46px;
  height: 1px;
  background: var(--hud);
  flex: 0 0 auto;
}

#hud .status .bridge::after {
  content: "";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translate(50%, -50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--hud);
}

#svg-cache {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
  visibility: hidden;
}

#intro {
  position: fixed;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
}

#intro .panel {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  text-align: center;
}

#intro .panel input {
  font-size: 16px;
  padding: 6px 2px;
  border-radius: 0;
  border: none;
  border-bottom: 1px solid rgba(30, 26, 22, 0.35);
  background: transparent;
  color: var(--ink);
  text-align: center;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  outline: none;
  box-shadow: none;
}

#intro .panel input:focus {
  outline: none;
  box-shadow: none;
  border-bottom-color: rgba(30, 26, 22, 0.7);
}

#intro .panel button {
  font-size: 11px;
  padding: 6px 2px;
  border-radius: 0;
  border: none;
  border-bottom: 1px solid rgba(30, 26, 22, 0.3);
  background: transparent;
  color: var(--ink);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  cursor: pointer;
  outline: none;
}

#intro .panel button:hover,
#intro .panel button:focus {
  border-bottom-color: rgba(30, 26, 22, 0.7);
}

#intro.hidden {
  display: none;
}

#info {
  position: fixed;
  inset: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(247, 242, 234, 0.7);
  backdrop-filter: blur(6px);
}

#info.hidden {
  display: none;
}

#info .panel {
  max-width: min(520px, 88vw);
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(30, 26, 22, 0.12);
  padding: 22px 24px;
  text-align: left;
}

#info .panel h2 {
  margin: 0 0 10px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

#info .panel p {
  margin: 0 0 12px;
  font-size: 14px;
  line-height: 1.6;
  color: rgba(30, 26, 22, 0.75);
}

#info .panel button {
  display: inline-block;
  margin-top: 6px;
  font-size: 11px;
  padding: 6px 0;
  border: none;
  background: transparent;
  color: var(--ink);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  cursor: pointer;
}
