/* NEO tour (js/neo-tour.js, 2026-11-14): a frame of light around the part of the page NEO is talking about, with the
   rest of the page dimmed, and a console bar at the bottom where NEO speaks. */
.neo-tour-frame {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 110;
  width: 0;
  height: 0;
  border: 1px solid rgba(120, 247, 232, .55);
  /* The dark around the frame, and corner brackets of light. */
  box-shadow: 0 0 0 200vmax rgba(0, 3, 6, .62), 0 0 24px rgba(120, 247, 232, .25), inset 0 0 24px rgba(120, 247, 232, .08);
  background:
    linear-gradient(#78f7e8, #78f7e8) top left / 22px 2px, linear-gradient(#78f7e8, #78f7e8) top left / 2px 22px,
    linear-gradient(#ffe27a, #ffe27a) top right / 22px 2px, linear-gradient(#ffe27a, #ffe27a) top right / 2px 22px,
    linear-gradient(#ffe27a, #ffe27a) bottom left / 22px 2px, linear-gradient(#ffe27a, #ffe27a) bottom left / 2px 22px,
    linear-gradient(#78f7e8, #78f7e8) bottom right / 22px 2px, linear-gradient(#78f7e8, #78f7e8) bottom right / 2px 22px;
  background-repeat: no-repeat;
  pointer-events: none;
  opacity: 0;
  transition: opacity .3s ease;
}
.neo-tour-frame.is-on { opacity: 1; }
html[data-motion="on"] .neo-tour-frame { transition: opacity .3s ease, top .45s cubic-bezier(.2, .7, .2, 1), left .45s cubic-bezier(.2, .7, .2, 1), width .45s cubic-bezier(.2, .7, .2, 1), height .45s cubic-bezier(.2, .7, .2, 1); }
/* A scan line that sweeps down the frame each time it lands somewhere new. */
.neo-tour-frame::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(120, 247, 232, .9), transparent);
  opacity: 0;
}
html[data-motion="on"] .neo-tour-frame.is-scan::after { animation: neo-tour-scan 1.1s cubic-bezier(.4, 0, .2, 1) both; }
@keyframes neo-tour-scan { 0% { top: 0; opacity: 1; } 90% { opacity: 1; } 100% { top: calc(100% - 2px); opacity: 0; } }

.neo-tour-bar {
  --tour-tiffany: #78f7e8;
  --tour-gold: #ffe27a;
  /* The face is the guide's (css/neo-guide.css), which reads these. */
  --guide-tiffany: #78f7e8;
  --guide-gold: #ffe27a;
  position: fixed;
  left: 50%;
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  z-index: 111;
  width: min(640px, calc(100vw - 32px));
  transform: translateX(-50%);
  border: 1px solid rgba(120, 247, 232, .45);
  background:
    linear-gradient(rgba(120, 247, 232, .035) 1px, transparent 1px) 0 0 / 100% 24px,
    radial-gradient(ellipse 80% 70% at 0 0, rgba(120, 247, 232, .12), transparent 70%),
    #03080b;
  box-shadow: 0 18px 48px rgba(0, 0, 0, .65), 0 0 32px rgba(120, 247, 232, .12);
  color: #f4fbfa;
  font-family: 'Noto Sans JP', sans-serif;
  clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 0 100%);
}
.neo-tour-bar[hidden] { display: none; }
html[data-motion="on"] .neo-tour-bar:not([hidden]) { animation: neo-tour-rise .35s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes neo-tour-rise { from { opacity: 0; transform: translate(-50%, 14px); } to { opacity: 1; transform: translateX(-50%); } }

.neo-tour-progress { height: 2px; background: rgba(120, 247, 232, .14); }
.neo-tour-progress i { display: block; width: 0; height: 100%; background: linear-gradient(90deg, var(--tour-tiffany), var(--tour-gold)); box-shadow: 0 0 10px rgba(120, 247, 232, .6); }

.neo-tour-body { display: flex; gap: 14px; padding: 14px 16px 10px; }
.neo-tour-body .neo-guide-face { width: 44px; height: 44px; font-size: 1.25rem; }
.neo-tour-bar.is-speaking .neo-guide-face { box-shadow: 0 0 0 4px rgba(120, 247, 232, .12), 0 0 18px rgba(120, 247, 232, .55); }
html[data-motion="on"] .neo-tour-bar.is-speaking .neo-guide-face { animation: neo-tour-talk .9s ease-in-out infinite; }
@keyframes neo-tour-talk { 50% { box-shadow: 0 0 0 8px rgba(120, 247, 232, .06), 0 0 26px rgba(120, 247, 232, .8); } }
.neo-tour-copy { flex: 1; min-width: 0; }
.neo-tour-meta { display: flex; align-items: center; gap: 10px; margin: 0 0 4px; font: 600 .6875rem/1.2 'Chakra Petch', sans-serif; letter-spacing: .22em; color: var(--tour-tiffany); }
.neo-tour-meta b { color: var(--tour-gold); font-weight: 600; }
.neo-tour-title { margin: 0 0 4px; color: #fff; font-size: 1.0625rem; font-weight: 700; line-height: 1.4; }
.neo-tour-text { margin: 0; color: rgba(244, 251, 250, .92); font-size: .9375rem; line-height: 1.7; }

.neo-tour-controls { display: flex; align-items: center; gap: 8px; padding: 0 16px 14px; }
.neo-tour-controls button, .neo-tour-controls a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 44px;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid rgba(120, 247, 232, .35);
  background: rgba(3, 8, 11, .8);
  color: #f4fbfa;
  font: 600 .875rem/1 'Noto Sans JP', sans-serif;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}
.neo-tour-controls button:hover, .neo-tour-controls a:hover { border-color: var(--tour-tiffany); background: rgba(120, 247, 232, .12); }
.neo-tour-controls button:focus-visible, .neo-tour-controls a:focus-visible { outline: 2px solid var(--tour-gold); outline-offset: 2px; }
.neo-tour-controls button:disabled { opacity: .35; cursor: default; }
.neo-tour-controls .neo-tour-next, .neo-tour-controls .neo-tour-cta { margin-left: auto; border-color: var(--tour-tiffany); background: var(--tour-tiffany); color: #03211e; }
.neo-tour-controls .neo-tour-next:hover, .neo-tour-controls .neo-tour-cta:hover { background: #a6fff4; color: #03211e; }
.neo-tour-voice[aria-pressed="true"] { border-color: var(--tour-gold); color: var(--tour-gold); }
.neo-tour-controls svg { flex: none; }
.neo-tour-bar [hidden] { display: none !important; }

/* While the tour runs, the corner guide and the floating sound button step aside for the bar. */
html.neo-tour-on .neo-guide, html.neo-tour-on .sound-toggle--float { display: none !important; }

@media (max-width: 760px) {
  .neo-tour-bar { bottom: 0; width: 100%; border-width: 1px 0 0; padding-bottom: env(safe-area-inset-bottom, 0px); clip-path: polygon(0 0, calc(100% - 22px) 0, 100% 22px, 100% 100%, 0 100%); }
  .neo-tour-body { padding: 12px 14px 8px; gap: 12px; }
  .neo-tour-body .neo-guide-face { width: 38px; height: 38px; font-size: 1.0625rem; }
  .neo-tour-controls { padding: 0 14px 12px; gap: 6px; }
  .neo-tour-controls .neo-tour-label { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .neo-tour-frame, .neo-tour-bar, .neo-tour-frame::after, .neo-tour-bar .neo-guide-face { animation: none !important; transition: none !important; }
}
