:root {
  --ui-text: #fff2d9;
  --ui-border: #d8c7ee;
  --ui-background: rgb(25 30 49 / 40%);
  --ui-shadow: 0 0 12px #d8c7ee26, 0 3px 12px #152a3226;
  --ui-hover-shadow: 0 0 16px #d8c7ee40, 0 5px 14px #152a3233;
  --ui-text-shadow: 0 1px 4px #18273799;
  --ui-font-size: 1.0625rem;
  --ui-button-font-size: .9375rem;
  font-family: "Avenir Next", Avenir, "Segoe UI", sans-serif;
  font-weight: 600;
  color: var(--ui-text);
  background: #1d1b3e;
  font-synthesis: none;
  -webkit-tap-highlight-color: transparent;
}
* { box-sizing: border-box; }
body { margin: 0; overflow: hidden; }
button, a { font: inherit; touch-action: manipulation; }
button:focus-visible, a:focus-visible { outline: 2px solid var(--ui-text); outline-offset: 6px; }
[hidden] { display: none !important; }
.scene-svg { display: block; width: 100%; height: 100%; overflow: hidden; }
.immersive { position: fixed; inset: 0; isolation: isolate; background: #203d40; color: var(--ui-text); }
.immersive-art { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.immersive-art .scene-svg { position: absolute; inset: 0; }
.immersive-bottom, .instagram-invitation, .noscript-message {
  position: absolute; z-index: 1; left: 50%; top: 50%; transform: translate(-50%, -50%);
}
.immersive-bottom {
  display: flex; flex-direction: column; align-items: center; gap: 0;
}
.start-button, .instagram-link, .immersive-bottom.is-reading, .noscript-message {
  border: 1px solid var(--ui-border); background: var(--ui-background); color: var(--ui-text);
  box-shadow: var(--ui-shadow); text-shadow: var(--ui-text-shadow);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.start-button, .instagram-link {
  border-radius: 999px; cursor: pointer; font-size: var(--ui-button-font-size);
  transition: transform .2s, border-color .2s, box-shadow .2s;
}
.start-button:hover, .instagram-link:hover {
  transform: translateY(-3px); border-color: var(--ui-text); box-shadow: var(--ui-hover-shadow);
}
.start-button:active, .instagram-link:active { transform: translateY(0); }
.start-button {
  min-width: 160px; min-height: 56px; display: grid; place-items: center;
  text-align: center; padding: 14px 28px;
  line-height: 1.3;
}
.immersive-bottom.is-reading {
  width: min(440px, calc(100vw - 32px));
  max-height: calc(100vh - 32px); max-height: calc(100svh - 32px);
  padding: clamp(20px, 3vw, 28px); gap: 20px; overflow-y: auto;
  overscroll-behavior: contain; scrollbar-width: thin;
  border-radius: 24px;
}
.message-card {
  width: 100%; flex-shrink: 0; text-align: center;
}
.is-reading .start-button { flex-shrink: 0; width: 56px; min-width: 56px; padding: 0; }
.advance-icon { width: 24px; height: 24px; }
.message-card h1 { margin: 0 0 14px; font-size: 1.8rem; font-weight: inherit; line-height: 1.3; }
.message-copy { margin: 0; font-size: var(--ui-font-size); line-height: 1.7; }
.instagram-invitation {
  max-width: calc(100vw - 32px);
}
.instagram-link {
  position: relative; display: flex; justify-content: center; align-items: center; gap: 10px;
  width: 224px; max-width: calc(100vw - 32px); min-height: 56px; padding: 14px 24px;
  line-height: 1.3;
  text-decoration: none; white-space: nowrap;
}
.instagram-icon { width: 24px; height: 24px; flex-shrink: 0; }
.noscript-message {
  width: min(440px, calc(100vw - 32px)); margin: 0; padding: 24px;
  max-height: calc(100svh - 32px); overflow-y: auto; text-align: center;
  border-radius: 24px; font-size: var(--ui-font-size); line-height: 1.7;
}
.noscript-message a { color: inherit; text-underline-offset: 3px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}
.ambient-spark { animation: spark-float var(--speed, 4s) ease-in-out var(--delay, 0s) infinite alternate; }
@keyframes spark-float {
  from { opacity: .18; transform: translate(-3px, 4px); }
  to { opacity: .85; transform: translate(5px, -8px); }
}
@media (max-height: 500px) and (orientation: landscape) {
  .immersive-bottom.is-reading { padding-block: 16px; gap: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
