:root {
  --bg-top: #1a2140;
  --bg-bottom: #09101d;
  --text: #f6efd6;
  --muted: rgba(246, 239, 214, 0.72);
  --shadow: rgba(5, 8, 18, 0.45);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: linear-gradient(180deg, var(--bg-top), var(--bg-bottom));
  color: var(--text);
  font-family: Georgia, "Times New Roman", serif;
  touch-action: none;
  overscroll-behavior: none;
  user-select: none;
  -webkit-user-select: none;
}

body {
  position: fixed;
  inset: 0;
}

.shell {
  position: relative;
  width: 100%;
  height: 100%;
}

canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.hud {
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: max(14px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) 14px max(14px, env(safe-area-inset-left));
  pointer-events: none;
}

.brand,
.status {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-shadow: 0 2px 10px var(--shadow);
}

.brand-title,
.status {
  letter-spacing: 0.05em;
}

.brand-title {
  font-size: clamp(0.9rem, 1.8vw, 1.15rem);
  text-transform: uppercase;
}

.brand-sub,
.status span {
  font-size: clamp(0.75rem, 1.45vw, 0.98rem);
  color: var(--muted);
}

.status {
  align-items: flex-end;
}

.overlay {
  position: absolute;
  left: 50%;
  bottom: max(18px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(13, 19, 35, 0.28);
  color: rgba(246, 239, 214, 0.88);
  font-size: clamp(0.82rem, 1.4vw, 1rem);
  letter-spacing: 0.04em;
  opacity: 0;
  transition: opacity 220ms ease;
  pointer-events: none;
  white-space: nowrap;
}

.overlay.visible {
  opacity: 1;
}

@media (max-width: 720px) {
  .hud {
    padding-top: max(14px, env(safe-area-inset-top));
    padding-left: max(12px, env(safe-area-inset-left));
    padding-right: max(12px, env(safe-area-inset-right));
  }

  .brand {
    max-width: 56vw;
  }
}
