html, body {
  margin: 0;
  height: 100%;
  background: #05060a;
  overflow: hidden;
}

body {
  /* ごく弱い周辺減光。中心だけほんの少し明るい夜 */
  background:
    radial-gradient(ellipse at 50% 45%, #0b0d16 0%, #06070c 55%, #030306 100%);
}

canvas {
  display: block;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
}

/* ---- 名前（ISGS Lab.） ------------------------------------------------- */
.mark {
  position: fixed;
  left: 0; right: 0;
  bottom: clamp(28px, 7vh, 72px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.9em;
  pointer-events: none;
  user-select: none;
  font-family: "Cinzel Decorative", "Cinzel", "Trajan Pro", "Cormorant Garamond", Georgia, serif;
}

.mark h1 {
  margin: 0;
  font-weight: 400;
  font-size: clamp(18px, 2.4vw, 30px);
  letter-spacing: 0.32em;
  padding-left: 0.32em;            /* 字間ぶんのずれを打ち消して中央に */
  white-space: nowrap;
  /* 色空間と同じく、色がゆっくり移ろう */
  background: linear-gradient(90deg,
    #f3d9a4, #f6b8d8, #c7b6ff, #9fd8ff, #b8f0d4, #f3d9a4);
  background-size: 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 6px rgba(200, 190, 255, 0.35))
          drop-shadow(0 0 18px rgba(140, 150, 255, 0.18));
  animation: drift 40s linear infinite;
}

.mark h1 span {
  display: inline-block;
  background: inherit;
  background-size: 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  animation: drift 40s linear infinite, conjure 2.6s cubic-bezier(.2,.7,.2,1) both;
  animation-delay: 0s, calc(1.2s + var(--i) * 0.16s);
}
.mark h1 .sp { width: 0.5em; }

/* 呪文が浮かび上がるように、ぼやけた光から 1 文字ずつ現れる */
@keyframes conjure {
  0%   { opacity: 0; filter: blur(10px); transform: translateY(0.35em) scale(1.15); }
  60%  { opacity: 1; filter: blur(0.6px); }
  100% { opacity: 1; filter: blur(0); transform: none; }
}
@keyframes drift {
  from { background-position: 0% 50%; }
  to   { background-position: 300% 50%; }
}

/* 上の飾り：細い線と小さな星 */
.orn {
  display: flex;
  align-items: center;
  gap: 0.8em;
  color: rgba(215, 210, 255, 0.55);
  font-size: clamp(9px, 0.9vw, 12px);
  opacity: 0;
  animation: fadein 3s ease 0.6s both;
}
.orn i {
  display: block;
  width: clamp(40px, 7vw, 90px);
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(215, 210, 255, 0.45), transparent);
}
.orn b {
  font-weight: 400;
  animation: twinkle 5s ease-in-out infinite;
}
@keyframes twinkle {
  0%, 100% { opacity: 0.35; text-shadow: none; }
  50%      { opacity: 1;    text-shadow: 0 0 8px rgba(220, 215, 255, 0.9); }
}
@keyframes fadein { to { opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  .mark h1, .mark h1 span, .orn, .orn b { animation: none; opacity: 1; }
}
