/* 鳥居のむこう（仮） 先へ進めたくなる工夫（js/extras.js）— 気づきのゆらぎ・見つけたときの光とひとこと
   気づきは「気づかなくても不思議でない」くらいの、ごくかすかなゆらぎ。こわさ控えめでも同じ（光らせない・揺らさない）。 */

/* 気づきの層：#layer-explore の中だが、押せない（タップは engine → TORII.extras.tapAt で判定） */
#layer-explore > .ex-nlayer,
.ex-nlayer {
  position: absolute;
  inset: 0;
  pointer-events: none !important;
  overflow: hidden;
  z-index: 0;
}

.ex-n {
  position: absolute;
  margin: 0;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  pointer-events: none;
  /* 絵の空気がほんの少しだけ揺れて見える */
  background: radial-gradient(closest-side, rgba(200, 220, 255, .16), rgba(200, 220, 255, .05) 55%, rgba(200, 220, 255, 0) 100%);
  mix-blend-mode: screen;
  opacity: .0;
  animation: ex-n-sway 7s ease-in-out infinite;
  filter: blur(1.5px);
}
.ex-n-core {
  position: absolute;
  left: 50%; top: 50%;
  width: 22%; height: 22%;
  min-width: 3px; min-height: 3px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: rgba(235, 242, 255, .35);
  filter: blur(1px);
}
.ex-n.tone-warm { background: radial-gradient(closest-side, rgba(255, 214, 170, .16), rgba(255, 214, 170, .05) 55%, rgba(255, 214, 170, 0)); }
.ex-n.tone-warm .ex-n-core { background: rgba(255, 236, 210, .35); }
.ex-n.tone-dark { mix-blend-mode: multiply; background: radial-gradient(closest-side, rgba(10, 14, 24, .22), rgba(10, 14, 24, 0)); }
.ex-n.tone-dark .ex-n-core { background: rgba(10, 14, 24, .3); }

@keyframes ex-n-sway {
  0%, 100% { opacity: .35; transform: translate(-50%, -50%) scale(.94); }
  38% { opacity: .75; transform: translate(-49.4%, -50.6%) scale(1.04); }
  55% { opacity: .5; transform: translate(-50.5%, -49.6%) scale(1); }
  80% { opacity: .62; transform: translate(-50%, -50%) scale(.98); }
}
/* こわさ控えめ・動きを減らす：揺れは止めるが、同じくらいかすかに見える */
#stage.calm .ex-n, html.calm .ex-n { animation: none; opacity: .5; }
@media (prefers-reduced-motion: reduce) { .ex-n { animation: none; opacity: .5; } }

.ex-n.is-found { animation: ex-n-gone .8s ease-out forwards; }
@keyframes ex-n-gone { to { opacity: 0; transform: translate(-50%, -50%) scale(1.6); } }

/* 見つけた瞬間の小さな光 */
.ex-n-burst {
  position: absolute;
  width: 18px; height: 18px;
  margin: -9px 0 0 -9px;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(closest-side, rgba(255, 255, 250, .95), rgba(220, 232, 255, .55) 45%, rgba(220, 232, 255, 0));
  box-shadow: 0 0 18px 6px rgba(210, 225, 255, .45);
  animation: ex-burst 1.1s cubic-bezier(.2, .7, .2, 1) forwards;
}
.ex-n-burst::after {
  content: "";
  position: absolute; inset: -6px;
  border-radius: 50%;
  border: 1.5px solid rgba(235, 242, 255, .8);
  animation: ex-ring 1.1s ease-out forwards;
}
@keyframes ex-burst {
  0% { opacity: 0; transform: scale(.3); }
  25% { opacity: 1; transform: scale(1.2); }
  100% { opacity: 0; transform: scale(2.2); }
}
@keyframes ex-ring { from { transform: scale(.6); opacity: .9; } to { transform: scale(3.6); opacity: 0; } }
#stage.calm .ex-n-burst, html.calm .ex-n-burst { animation-duration: .6s; box-shadow: none; }
#stage.calm .ex-n-burst::after, html.calm .ex-n-burst::after { display: none; }

/* sys ふうの一言（中央より少し上・押せない） */
.ex-pop {
  position: absolute;
  left: 50%; top: 22%;
  z-index: 30;
  transform: translate(-50%, 6px);
  width: max-content;
  max-width: min(86%, 30em);
  padding: .7em 1.4em .75em;
  background: rgba(10, 12, 18, .78);
  border: 1px solid rgba(220, 210, 190, .5);
  box-shadow: 0 0 0 4px rgba(10, 12, 18, .3), 0 6px 22px rgba(0, 0, 0, .5);
  color: #f1e9d8;
  font-family: var(--font-mincho, "Yu Mincho", "Hiragino Mincho ProN", serif);
  font-size: calc(var(--fs, 18px) * .95);
  line-height: 1.65;
  text-align: center;
  letter-spacing: .05em;
  pointer-events: none;
  opacity: 0;
  transition: opacity .4s ease, transform .4s ease;
  text-wrap: balance;
  line-break: strict;
}
.ex-pop.is-in { opacity: 1; transform: translate(-50%, 0); }
.ex-pop.is-out { opacity: 0; transform: translate(-50%, -4px); transition-duration: .45s; }
.ex-pop-mark {
  display: inline-block;
  margin-bottom: .35em;
  padding: .05em .7em;
  border: 1.5px solid rgba(214, 96, 84, .9);
  border-radius: 2px;
  color: #f0b3a8;
  font-size: .78em;
  letter-spacing: .3em;
  padding-left: 1em;
}
.ex-pop-text { margin: 0 0 .3em; }
.ex-pop-count { font-size: .85em; color: #d9c9a6; letter-spacing: .12em; font-variant-numeric: tabular-nums; }
.ex-pop-ch { font-size: .75em; color: #b3a78f; letter-spacing: .1em; }
.ex-pop .ph { display: inline-block; white-space: nowrap; }
.ex-pop.is-calm { transition-duration: .2s; }
/* 最初に気づきを拾ったときだけ出す遊び方のひとこと（1123d） */
.ex-pop-tip { margin-top: .5em; padding-top: .45em; border-top: 1px solid rgba(217,201,166,.25); font-size: .78em; line-height: 1.6; color: #cfc3a8; text-wrap: pretty; }
