:root {
  --bg: #111;
  --fg: #f5f2ea;
  --muted: #b9b3a6;
  --accent: #e8c26a;
}
* { box-sizing: border-box; }
html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--fg);
  font-family: Georgia, "Times New Roman", serif;
  -webkit-tap-highlight-color: transparent;
}
#ar {
  position: fixed;
  inset: 0;
  overflow: hidden;
}
.screen {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: var(--bg);
  z-index: 20;
}
.card {
  max-width: 420px;
  text-align: center;
}
h1 {
  font-weight: normal;
  font-size: 2.2rem;
  letter-spacing: 0.02em;
  margin: 0 0 12px;
}
p { line-height: 1.5; color: var(--muted); }
.small { font-size: 0.85rem; }
button {
  font: inherit;
  font-size: 1.15rem;
  color: #111;
  background: var(--accent);
  border: 0;
  border-radius: 999px;
  padding: 14px 44px;
  margin: 12px 0;
  cursor: pointer;
}
button:disabled { opacity: 0.6; }
.hidden { display: none !important; }

#hud {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  pointer-events: none;
  z-index: 10;
}
#caption {
  position: absolute;
  left: 50%;
  bottom: calc(20px + env(safe-area-inset-bottom));
  max-width: calc(100% - 32px);
  background: rgba(10, 12, 24, 0.62);
  border: 1px solid rgba(232, 194, 106, 0.45);
  border-radius: 999px;
  padding: 9px 20px;
  font-size: 1.15rem;
  letter-spacing: 0.03em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0;
  transform: translate(-50%, 8px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
#caption.show {
  opacity: 1;
  transform: translate(-50%, 0);
}
#soundBtn {
  pointer-events: auto;
  margin: 0 0 0 auto;
  padding: 10px 14px;
  font-size: 1.3rem;
  background: rgba(0, 0, 0, 0.6);
  color: var(--fg);
}
