:root {
  color-scheme: dark;
  --ink: #f7f2e8;
  --muted: rgba(247, 242, 232, 0.68);
  --panel: rgba(24, 27, 30, 0.46);
  --line: rgba(255, 255, 255, 0.16);
  --hot: #ffcf70;
  --cool: #8dd9d4;
  --leaf: #a7d87a;
}

* {
  box-sizing: border-box;
}

html,
body,
#app {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
}

body {
  background: #15181b;
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

button {
  appearance: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.09);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  min-height: 36px;
  padding: 0 13px;
  transition:
    background 160ms ease,
    border-color 160ms ease,
    transform 160ms ease;
}

button:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.32);
}

button:active {
  transform: translateY(1px);
}

button.is-active {
  background: rgba(141, 217, 212, 0.22);
  border-color: rgba(141, 217, 212, 0.56);
}

#scene {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
}

.hud {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  left: max(16px, env(safe-area-inset-left));
  pointer-events: none;
  position: fixed;
  right: max(16px, env(safe-area-inset-right));
  top: max(14px, env(safe-area-inset-top));
  z-index: 2;
}

.status,
.actions,
.hint {
  backdrop-filter: blur(18px);
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.2);
}

.status {
  align-items: center;
  border-radius: 999px;
  display: inline-flex;
  gap: 10px;
  min-height: 38px;
  max-width: min(440px, 58vw);
  padding: 0 15px;
}

.dot {
  background: var(--hot);
  border-radius: 999px;
  box-shadow: 0 0 22px rgba(255, 207, 112, 0.7);
  flex: 0 0 auto;
  height: 8px;
  width: 8px;
}

#statusText {
  display: block;
  font-size: 14px;
  line-height: 1.1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.actions {
  border-radius: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 6px;
  pointer-events: auto;
}

.hint {
  border-radius: 999px;
  bottom: max(16px, env(safe-area-inset-bottom));
  color: var(--muted);
  font-size: 13px;
  left: 50%;
  line-height: 1.25;
  margin: 0;
  max-width: min(680px, calc(100vw - 32px));
  padding: 10px 14px;
  position: fixed;
  text-align: center;
  transform: translateX(-50%);
  z-index: 2;
}

@media (max-width: 640px) {
  .hud {
    align-items: stretch;
    flex-direction: column;
    right: auto;
  }

  .status {
    max-width: calc(100vw - 32px);
  }

  .actions {
    width: fit-content;
  }

  .hint {
    border-radius: 10px;
    font-size: 12px;
  }
}
