:root { --bg: #060608; --text: #f5f3ef; --muted: #9a98a6; --violet: #b14bff; }
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: var(--bg); color: var(--text); }
body { font-family: "Satoshi", system-ui, -apple-system, sans-serif; -webkit-font-smoothing: antialiased; }
main {
  height: 100vh; height: 100dvh; min-height: 560px; max-width: 560px; margin: 0 auto;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: calc(env(safe-area-inset-top) + 24px) 24px calc(env(safe-area-inset-bottom) + 18px);
  background: radial-gradient(ellipse 85% 44% at 50% 52%, rgba(123, 47, 255, .34), transparent 70%);
}
.logo { width: 158px; height: auto; }
.logo text { font-family: "Clash Display", "Avenir Next", system-ui, sans-serif; font-weight: 600; font-size: 24px; letter-spacing: 1.5px; fill: var(--text); }
h1 { margin-top: 26px; font-family: "Clash Display", "Satoshi", system-ui, sans-serif; font-weight: 600; font-size: clamp(23px, 6.4vw, 31px); line-height: 1.16; text-wrap: balance; }
header p { margin: 10px auto 0; max-width: 32ch; color: var(--muted); font-size: 15px; line-height: 1.45; text-wrap: balance; }
model-viewer { flex: 1; width: 100%; min-height: 220px; margin: 6px 0; --poster-color: transparent; --progress-bar-color: var(--violet); --progress-bar-height: 2px; }
footer { width: 100%; }
button {
  width: 100%; max-width: 360px; height: 56px; border: 0; border-radius: 28px;
  background: var(--violet); color: #fff; font: 700 17px "Satoshi", system-ui, sans-serif; cursor: pointer;
  box-shadow: 0 10px 34px rgba(177, 75, 255, .32);
}
button:active { transform: scale(.985); }
button:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; }
button:disabled { background: #1c1a24; color: var(--muted); box-shadow: none; cursor: default; }
#help { margin: 12px auto 0; max-width: 36ch; color: var(--muted); font-size: 13px; line-height: 1.45; text-wrap: balance; }
.dims { margin-top: 16px; color: #8a8796; font-size: 12px; letter-spacing: .12em; }
.ar-hint {
  display: none; position: absolute; left: 16px; right: 16px; bottom: calc(env(safe-area-inset-bottom) + 24px);
  padding: 14px 18px; border-radius: 18px; background: rgba(6, 6, 8, .78); font-size: 15px; line-height: 1.4; pointer-events: none;
}
.ar-hint small { display: block; margin-top: 4px; color: #c9a6ff; font-size: 12px; }
.ar-hint .placed { display: none; }
model-viewer[ar-status="session-started"] .ar-hint,
model-viewer[ar-status="object-placed"] .ar-hint { display: block; }
model-viewer[ar-status="object-placed"] .searching { display: none; }
model-viewer[ar-status="object-placed"] .placed { display: block; }

[hidden] { display: none !important; }
dialog {
  width: 100%; max-width: 560px; margin: auto auto 0; border: 0; border-radius: 28px 28px 0 0; color: var(--text); text-align: center;
  padding: 30px 24px calc(env(safe-area-inset-bottom) + 14px); background: #121019; box-shadow: 0 -20px 60px rgba(0, 0, 0, .6);
}
dialog::backdrop { background: rgba(0, 0, 0, .68); }
dialog h2 { font-family: "Clash Display", "Satoshi", system-ui, sans-serif; font-weight: 600; font-size: 22px; }
dialog p { margin: 10px auto 0; max-width: 32ch; color: var(--muted); font-size: 15px; line-height: 1.45; text-wrap: balance; }
dialog .lead { margin-top: 16px; color: var(--text); font-size: 17px; font-weight: 700; }
.place { display: block; width: 100%; max-width: 360px; margin: 24px auto 0; }
a.place img { display: block; width: 100%; height: auto; }
button.cancel { display: block; margin: 6px auto 0; height: 44px; background: none; box-shadow: none; color: var(--muted); font-weight: 500; font-size: 15px; }
