@font-face {
  font-family: "Academy Sans";
  src: local("Segoe UI"), local("Helvetica Neue"), local("Arial");
}
:root {
  color-scheme: dark;
  font-family: "Academy Sans", sans-serif;
  color: #f6ecd6;
  background: #0d1115;
  font-synthesis: none;
  --gold: #e5c681;
}
* { box-sizing: border-box; }
html, body { margin: 0; width: 100%; min-height: 100%; overflow: hidden; }
body { min-height: 100svh; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; cursor: pointer; }
button:focus-visible, a:focus-visible { outline: 2px solid #fff0c4; outline-offset: 5px; }
[hidden] { display: none !important; }
#stage { position: fixed; inset: 0; overflow: hidden; z-index: 1; }
#stage canvas { position: absolute; display: block; }
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 2;
  background: linear-gradient(#0d1115 0%, #0d111500 30%, #0d111500 53%, #0d1115ef 79%, #0d1115 100%);
  transition: opacity .4s;
}
body.is-ar::before { opacity: 0; }
.intro {
  position: fixed; inset: 0; z-index: 3; display: flex; flex-direction: column;
  justify-content: space-between; padding: max(36px, env(safe-area-inset-top)) 24px max(24px, env(safe-area-inset-bottom));
  text-align: center; pointer-events: none;
}
.masthead { margin-top: 8px; }
.eyebrow { color: var(--gold); font-size: .75rem; letter-spacing: .15em; text-transform: uppercase; margin: 0 0 16px; }
h1 { font-family: Georgia, "Times New Roman", serif; font-size: clamp(3.3rem, 11.5vw, 5.5rem); line-height: .94; font-weight: 400; margin: 0; letter-spacing: -.045em; }
h1 em { color: var(--gold); font-weight: 400; }
.intro__bottom { width: 100%; max-width: 360px; margin-inline: auto; pointer-events: auto; }
.intro__copy { font-size: 1.05rem; line-height: 1.55; margin: 0 0 22px; color: #e7dfcf; }
.gold-button {
  min-height: 54px; width: 100%; padding: 15px 24px; border-radius: 7px; border: 1px solid #f4d99b;
  background: linear-gradient(135deg, #f0d493, #c8a35e); color: #20190e; font-weight: 600;
  box-shadow: 0 4px 30px #c9a25d12; transition: filter .2s, transform .2s;
}
.gold-button:active { transform: scale(.985); filter: brightness(.95); }
.gold-button:disabled { cursor: progress; opacity: .6; }
.hint { color: #b3ad9f; font-size: .85rem; line-height: 1.5; margin: 14px 0 16px; }
.text-link, .text-button { color: #d0bc8f; font-size: .875rem; text-underline-offset: 4px; }
.text-button { border: 0; background: none; padding: 18px; text-decoration: underline; }
.ar-ui { position: fixed; inset: 0; z-index: 4; pointer-events: none; }
.ar-toolbar { display: flex; align-items: center; gap: 14px; justify-content: space-between; padding: max(16px, env(safe-area-inset-top)) 20px 24px; background: linear-gradient(#0009, #0000); }
.ar-toolbar p { margin: 0; max-width: 210px; font-size: .8rem; line-height: 1.5; letter-spacing: .04em; color: #fff1d4; text-shadow: 0 1px 5px #000; }
.quiet-button { pointer-events: auto; min-height: 44px; padding: 10px 16px; background: #101318b8; border: 1px solid #ffffff3b; border-radius: 22px; color: white; backdrop-filter: blur(8px); }
.scan-guide {
  position: absolute; left: 50%; top: 48%; transform: translate(-50%, -50%);
  display: flex; flex-direction: column; align-items: center; width: 240px;
  padding: 26px 20px; background: #0b1015cc; backdrop-filter: blur(10px); border: 1px solid #e7c68366; border-radius: 14px;
  text-align: center; transition: opacity .3s, transform .3s;
}
.scan-guide img { width: 88px; height: 88px; background: white; padding: 6px; }
.scan-guide p { margin: 18px 0 0; line-height: 1.5; font-size: 1rem; }
.scan-guide.is-found { opacity: 0; transform: translate(-50%, -46%); }
.ar-status {
  position: absolute; left: 50%; bottom: max(28px, env(safe-area-inset-bottom)); transform: translateX(-50%);
  width: max-content; max-width: calc(100% - 40px); margin: 0; padding: 12px 18px;
  background: #0b1015ba; border: 1px solid #ffffff25; border-radius: 24px; backdrop-filter: blur(10px);
  font-size: .875rem; line-height: 1.4; text-align: center; color: #f8eed8;
}
.error-panel {
  position: fixed; z-index: 8; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(360px, calc(100% - 40px));
  padding: 28px; border-radius: 14px; border: 1px solid #be9c59; background: #11161cf5; box-shadow: 0 10px 90px #0009; text-align: center;
}
.error-panel h2 { margin: 0 0 14px; font: 400 1.9rem Georgia, serif; color: #eace93; }
.error-panel p { margin: 0 0 24px; font-size: 1rem; line-height: 1.6; color: #e1ddd4; }
.load-status { position: fixed; z-index: 5; top: 47%; left: 20px; right: 20px; text-align: center; color: #d6bd86; pointer-events: none; font-size: .875rem; }
noscript { position: fixed; z-index: 20; inset: 35% 20px auto; text-align: center; background: #0d1115; padding: 30px; }
@media (min-width: 700px) {
  .intro { padding-block: 40px 28px; }
  h1 { font-size: 4.6rem; }
  .intro__copy { margin-bottom: 16px; }
}
@media (max-height: 680px) {
  .intro { padding-top: 22px; padding-bottom: 16px; }
  h1 { font-size: 2.9rem; }
  .eyebrow { font-size: .6875rem; margin-bottom: 12px; }
  .intro__copy { margin-bottom: 14px; font-size: .95rem; }
  .hint { margin-block: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before { transition-duration: .01ms !important; }
}
