/* Return and reward (js/neo-return.js, 2026-11-14): the welcome-back card beside the guide button, the gold world for a
   complete NEO PASS, the sweep and notice when it completes, and the GOLD ROOM. */

/* ---- Welcome back ---- */
/* 2026-11-15: centred like a greeting card. NEO's face sits on the top edge as a medallion, WELCOME BACK runs between two
   gold rules, おかえりなさい stands large, and the two lines under it break at phrase boundaries and balance their length,
   so no line ends on a lone word. The two buttons share the width equally. */
.neo-welcome {
  position: fixed;
  left: 16px;
  bottom: calc(80px + env(safe-area-inset-bottom, 0px));
  z-index: 61;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(360px, calc(100vw - 32px));
  margin-top: 26px;
  padding: 34px 20px 18px;
  border: 1px solid rgba(120, 247, 232, .42);
  background:
    radial-gradient(ellipse 70% 55% at 50% 0, rgba(120, 247, 232, .16), transparent 72%),
    radial-gradient(ellipse 60% 40% at 50% 100%, rgba(255, 226, 122, .07), transparent 70%),
    #03080b;
  box-shadow: 0 18px 40px rgba(0, 0, 0, .6), 0 0 24px rgba(120, 247, 232, .12);
  color: #f4fbfa;
  font-family: 'Noto Sans JP', sans-serif;
  text-align: center;
  --guide-tiffany: #78f7e8;
  --guide-gold: #ffe27a;
}
/* A gold line across the top edge, brightest at the centre where the face sits. */
.neo-welcome::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 12%;
  right: 12%;
  height: 2px;
  background: linear-gradient(90deg, transparent, #ffe27a 50%, transparent);
}
html[data-motion="on"] .neo-welcome { animation: neo-welcome-in .4s cubic-bezier(.2, .7, .2, 1) both; }
html[data-motion="on"] .neo-welcome.is-leaving { animation: neo-welcome-out .22s ease both; }
@keyframes neo-welcome-in { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes neo-welcome-out { to { opacity: 0; transform: translateY(8px); } }
.neo-welcome .neo-guide-face {
  position: absolute;
  top: -24px;
  left: 50%;
  width: 48px;
  height: 48px;
  translate: -50% 0;
  box-shadow: 0 0 0 5px #03080b, 0 0 22px rgba(120, 247, 232, .35);
}
.neo-welcome-body { width: 100%; min-width: 0; }
.neo-welcome-body p { margin: 0; }
.neo-welcome-kicker {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #ffe27a;
  font: 600 .6875rem/1.2 'Chakra Petch', sans-serif;
  letter-spacing: .26em;
  text-indent: .26em;
}
.neo-welcome-kicker::before,
.neo-welcome-kicker::after {
  content: "";
  width: 28px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 226, 122, .7));
}
.neo-welcome-kicker::after { transform: scaleX(-1); }
.neo-welcome-title {
  margin-top: 10px !important;
  font-size: 1.375rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: .12em;
  text-indent: .12em;
}
.neo-welcome-text,
.neo-welcome-next {
  font-size: .9375rem;
  line-height: 1.75;
  word-break: auto-phrase;
  text-wrap: balance;
}
.neo-welcome-text { margin-top: 8px !important; color: rgba(244, 251, 250, .78); }
.neo-welcome-next { margin-top: 2px !important; }
.neo-welcome-body b { color: #78f7e8; font-weight: 700; }
.neo-welcome-body b.is-whole { white-space: nowrap; }
.neo-welcome-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 16px;
}
.neo-welcome-go, .neo-welcome-later {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 12px;
  border: 1px solid #78f7e8;
  font: 700 .9375rem/1 'Noto Sans JP', sans-serif;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 160ms ease, transform 120ms ease;
}
.neo-welcome-go:active, .neo-welcome-later:active { transform: scale(.97); }
.neo-welcome-go { background: #78f7e8; color: #03211e; box-shadow: 0 0 18px rgba(120, 247, 232, .25); }
.neo-welcome-go:hover { background: #a6fff4; }
.neo-welcome-later { border-color: rgba(120, 247, 232, .35); background: transparent; color: #f4fbfa; }
.neo-welcome-later:hover { background: rgba(120, 247, 232, .1); }
.neo-welcome-close {
  position: absolute;
  top: 4px;
  right: 4px;
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 0;
  background: transparent;
  color: rgba(244, 251, 250, .6);
  cursor: pointer;
}
.neo-welcome-close::after { content: ""; position: absolute; inset: -4px; }
.neo-welcome-close:hover { color: #fff; }
.neo-welcome :focus-visible { outline: 2px solid #ffe27a; outline-offset: 2px; }
html.neo-tour-on .neo-welcome, html.neo-scan-open .neo-welcome, body.nav-open ~ .neo-welcome { display: none; }
@media (max-width: 760px) {
  .neo-welcome { left: 14px; bottom: calc(78px + env(safe-area-inset-bottom, 0px)); width: calc(100vw - 28px); }
}

/* ---- The gold world (a complete NEO PASS, while the visitor keeps it on) ---- */
html[data-neo-gold="on"] .btn-primary,
html[data-neo-gold="on"] .site-header .header-cta {
  background: linear-gradient(115deg, #fff1b8, #ffd36a 45%, #e0a93a) !important;
  color: #2a1a00 !important;
  box-shadow: 0 0 22px rgba(255, 211, 106, .45) !important;
}
html[data-neo-gold="on"] .eyebrow { color: #ffd36a !important; }
html[data-neo-gold="on"] .eyebrow::before, html[data-neo-gold="on"] .eyebrow::after { background: #ffd36a !important; }
html[data-neo-gold="on"] .site-header { border-bottom-color: rgba(255, 211, 106, .45) !important; box-shadow: 0 1px 18px rgba(255, 211, 106, .14); }
html[data-neo-gold="on"] .logo-mark { filter: drop-shadow(0 0 10px rgba(255, 211, 106, .75)) sepia(.35) saturate(1.4); }
html[data-neo-gold="on"] .h2-en { color: #ffd36a; -webkit-text-fill-color: #ffd36a; text-shadow: 0 0 18px rgba(255, 211, 106, .35); }
html[data-neo-gold="on"] .neo-guide-toggle { border-color: rgba(255, 211, 106, .7); box-shadow: 0 8px 24px rgba(0, 0, 0, .45), 0 0 18px rgba(255, 211, 106, .3); }
html[data-neo-gold="on"] .neo-guide { --guide-tiffany: #ffd36a; }
/* A soft gold light at the edges of the screen. */
html[data-neo-gold="on"] body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 59;
  pointer-events: none;
  background: radial-gradient(ellipse 120% 90% at 50% 50%, transparent 62%, rgba(255, 196, 80, .09) 100%);
}

/* ---- The moment it completes ---- */
.neo-gold-sweep {
  position: fixed;
  inset: 0;
  z-index: 130;
  pointer-events: none;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 226, 140, .0) 40%, rgba(255, 226, 140, .55) 50%, rgba(255, 226, 140, 0) 60%, transparent 65%);
  background-size: 250% 100%;
  animation: neo-gold-sweep 1.6s cubic-bezier(.4, 0, .2, 1) both;
}
@keyframes neo-gold-sweep { from { background-position: 100% 0; } to { background-position: -50% 0; } }
.neo-gold-notice {
  position: fixed;
  left: 50%;
  top: calc(84px + env(safe-area-inset-top, 0px));
  z-index: 131;
  width: min(440px, calc(100vw - 32px));
  padding: 18px 18px 16px;
  transform: translateX(-50%);
  border: 1px solid rgba(255, 211, 106, .7);
  background: radial-gradient(ellipse 90% 80% at 50% 0, rgba(255, 211, 106, .2), transparent 70%), #0a0703;
  box-shadow: 0 18px 48px rgba(0, 0, 0, .6), 0 0 36px rgba(255, 211, 106, .3);
  color: #fff7e0;
  font-family: 'Noto Sans JP', sans-serif;
  text-align: center;
}
html[data-motion="on"] .neo-gold-notice { animation: neo-gold-notice .5s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes neo-gold-notice { from { opacity: 0; transform: translate(-50%, -12px) scale(.96); } to { opacity: 1; transform: translateX(-50%); } }
.neo-gold-notice p { margin: 0; }
.neo-gold-notice-kicker { color: #ffd36a; font: 700 .8125rem/1.2 'Chakra Petch', sans-serif; letter-spacing: .26em; }
.neo-gold-notice-text { margin-top: 8px !important; font-size: .9375rem; line-height: 1.7; }
.neo-gold-notice-actions { display: flex; justify-content: center; gap: 8px; margin-top: 14px; }

/* Shared gold buttons. */
.neo-gold-notice button, .neo-gold-entry-open, .neo-gold-room-ask, .neo-gold-room-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid #ffd36a;
  background: transparent;
  color: #fff7e0;
  font: 700 .875rem/1 'Noto Sans JP', sans-serif;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease;
}
.neo-gold-notice-open, .neo-gold-entry-open, .neo-gold-room-ask { background: linear-gradient(115deg, #fff1b8, #ffd36a 45%, #e0a93a); color: #2a1a00 !important; }
.neo-gold-notice-close:hover, .neo-gold-room-close:hover { background: rgba(255, 211, 106, .14); }
.neo-gold-notice :focus-visible, .neo-gold-entry :focus-visible, .neo-gold-room :focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* The switch that turns the gold world off and on again. */
.neo-gold-switch {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: #fff7e0;
  font: 600 .875rem/1.3 'Noto Sans JP', sans-serif;
  cursor: pointer;
}
.neo-gold-switch-track { position: relative; flex: none; width: 40px; height: 22px; border: 1px solid rgba(255, 211, 106, .6); border-radius: 999px; background: rgba(255, 211, 106, .08); transition: background-color .2s ease; }
.neo-gold-switch-track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: rgba(255, 247, 224, .6); transition: transform .2s ease, background-color .2s ease; }
.neo-gold-switch[aria-pressed="true"] .neo-gold-switch-track { background: rgba(255, 211, 106, .35); }
.neo-gold-switch[aria-pressed="true"] .neo-gold-switch-track::after { transform: translateX(18px); background: #ffd36a; }

/* The entry in the NEO PASS section. */
.neo-gold-entry {
  display: grid;
  gap: 10px;
  margin-top: 20px;
  padding: 16px;
  border: 1px solid rgba(255, 211, 106, .55);
  background: radial-gradient(ellipse 90% 80% at 0 0, rgba(255, 211, 106, .14), transparent 70%), rgba(10, 7, 3, .6);
}
.neo-gold-entry[hidden] { display: none; }
.neo-gold-entry-kicker { margin: 0; color: #ffd36a; font: 700 .75rem/1.2 'Chakra Petch', sans-serif; letter-spacing: .24em; }

/* ---- The GOLD ROOM ---- */
.neo-gold-room {
  width: 100vw;
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background:
    radial-gradient(ellipse 70% 50% at 50% 0, rgba(255, 211, 106, .18), transparent 70%),
    radial-gradient(ellipse 60% 40% at 50% 100%, rgba(255, 170, 60, .1), transparent 70%),
    #070503;
  color: #fff7e0;
  font-family: 'Noto Sans JP', sans-serif;
}
.neo-gold-room::backdrop { background: #000; }
.neo-gold-room[open] { display: block; overflow-y: auto; }
.neo-gold-room-inner { position: relative; width: min(100% - 32px, 1120px); margin: 0 auto; padding: 72px 0 48px; text-align: center; }
.neo-gold-room-close { position: absolute; top: max(16px, env(safe-area-inset-top)); right: 0; }
.neo-gold-room-kicker { margin: 0; color: #ffd36a; font: 600 .75rem/1.4 'Chakra Petch', sans-serif; letter-spacing: .26em; }
.neo-gold-room h2 { display: flex; flex-direction: column; gap: 6px; margin: 12px 0 0; font-size: 1.125rem; line-height: 1.4; }
.neo-gold-room h2 span {
  color: #ffd36a;
  font: 700 clamp(2.25rem, 7vw, 4rem)/1 'Chakra Petch', sans-serif;
  letter-spacing: .08em;
  text-shadow: 0 0 28px rgba(255, 211, 106, .45);
}
.neo-gold-room-lead { max-width: 560px; margin: 16px auto 0; color: rgba(255, 247, 224, .82); font-size: 1rem; line-height: 1.8; }
.neo-gold-wall { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 24px; margin: 40px 0 0; padding: 0; list-style: none; }
.neo-gold-frame {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  color: #fff7e0;
  cursor: pointer;
}
.neo-gold-frame-art {
  display: block;
  padding: 10px;
  background: linear-gradient(135deg, #fff1b8, #c8892a 30%, #ffd36a 55%, #8a5a14 80%, #ffe9a6);
  box-shadow: 0 14px 30px rgba(0, 0, 0, .55), 0 0 26px rgba(255, 211, 106, .22);
  transition: transform .3s ease, box-shadow .3s ease;
}
.neo-gold-frame-art img { display: block; width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border: 2px solid #1a1206; background: #1a1206; }
.neo-gold-frame:hover .neo-gold-frame-art { transform: translateY(-4px); box-shadow: 0 20px 40px rgba(0, 0, 0, .6), 0 0 36px rgba(255, 211, 106, .4); }
.neo-gold-frame-title { font: 600 .875rem/1.4 'Chakra Petch', 'Noto Sans JP', sans-serif; letter-spacing: .04em; }
.neo-gold-room-foot { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 16px 24px; margin-top: 40px; }
/* On entering for the first time in a visit, the frames light in one after another. */
html[data-motion="on"] .neo-gold-room.is-celebrate[open] .neo-gold-wall li { animation: neo-gold-frame .6s cubic-bezier(.2, .7, .2, 1) both; }
html[data-motion="on"] .neo-gold-room.is-celebrate[open] .neo-gold-wall li:nth-child(2) { animation-delay: .1s; }
html[data-motion="on"] .neo-gold-room.is-celebrate[open] .neo-gold-wall li:nth-child(3) { animation-delay: .2s; }
html[data-motion="on"] .neo-gold-room.is-celebrate[open] .neo-gold-wall li:nth-child(4) { animation-delay: .3s; }
html[data-motion="on"] .neo-gold-room.is-celebrate[open] .neo-gold-wall li:nth-child(5) { animation-delay: .4s; }
@keyframes neo-gold-frame { from { opacity: 0; transform: translateY(16px); filter: brightness(2); } to { opacity: 1; transform: none; filter: none; } }
@media (max-width: 760px) {
  .neo-gold-wall { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .neo-gold-frame-art { padding: 7px; }
  .neo-gold-room-inner { padding-top: 76px; }
}
@media (prefers-reduced-motion: reduce) {
  .neo-welcome, .neo-gold-sweep, .neo-gold-notice, .neo-gold-wall li { animation: none !important; }
}
