/* === Reset & Base === */
*, *::before, *::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

:root {
  --bg-obsidian: #06080e;
  --bg-obsidian-elevated: #0d111c;
  --bg-obsidian-card: #121726;
  --bg-stone: #f3f0e8;
  --bg-stone-card: #ffffff;
  --text-light: #f5f7fb;
  --text-muted-light: #b3bed0;
  --text-dark: #121620;
  --text-muted-dark: #464f60;
  --accent-primary: #2cf0ff;
  --accent-secondary: #ff4fd8;
  --accent-tertiary: #ffbe42;
  --accent-emerald: #26f0a5;
  --accent-indigo: #1b3fff;
  --border-dark: rgba(255, 255, 255, 0.15);
  --border-light: #d2cbc0;
  --focus-ring: #ffcf40;
  --spectral-grad: linear-gradient(95deg, var(--accent-primary) 0%, var(--accent-secondary) 52%, var(--accent-tertiary) 100%);
  --font-sans: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", system-ui, -apple-system, sans-serif;
  --font-serif: "Hiragino Mincho ProN", "Yu Mincho", "MS PMincho", serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  --max-w: 1240px;
  --header-offset: 6.2rem;
}

/* Spectral Presets */
body[data-preset="neon"] {
  --accent-primary: #26f0a5;
  --accent-secondary: #2cf0ff;
  --accent-tertiary: #a6ff4d;
}

body[data-preset="amber"] {
  --accent-primary: #ffbe42;
  --accent-secondary: #ff5e3a;
  --accent-tertiary: #2cf0ff;
}

html {
  scroll-behavior: smooth;
  background-color: var(--bg-obsidian);
  color: var(--text-light);
  font-family: var(--font-sans);
  line-height: 1.65;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  overflow-x: hidden;
  background-color: var(--bg-obsidian);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

button {
  font-family: inherit;
}

:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 3px;
}

section[id],
div[id] {
  scroll-margin-top: var(--header-offset);
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  z-index: 1000;
  background: var(--focus-ring);
  color: #000;
  padding: 0.75rem 1.25rem;
  font-weight: 700;
  border-radius: 4px;
}

.skip-link:focus {
  top: 1rem;
}

.container {
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: clamp(0.95rem, 3.8vw, 2.5rem);
}

/* === Header === */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(6, 8, 14, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(44, 240, 255, 0.22);
}

.header-inner {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.3rem;
  padding-block: 0.4rem;
}

.header-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  min-height: 44px;
  padding-block: 2px;
}

.brand-logo {
  height: 38px;
  width: auto;
  object-fit: contain;
  border-radius: 4px;
}

.header-quick-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.site-nav {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  gap: 0.35rem;
  padding-top: 0.25rem;
  padding-bottom: 0.1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.site-nav::-webkit-scrollbar {
  display: none;
}

.nav-link,
.nav-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.3rem 0.7rem;
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
  border-radius: 999px;
  white-space: nowrap;
  flex: 0 0 auto;
}

.nav-link {
  color: var(--text-light);
  background: rgba(255, 255, 255, 0.05);
}

.nav-link:hover {
  background: rgba(44, 240, 255, 0.15);
  color: var(--accent-primary);
}

.header-direct-cta,
.nav-cta-desktop {
  background: var(--spectral-grad);
  color: #05070e;
  font-weight: 800;
  padding-inline: 0.95rem;
}

.nav-cta-desktop {
  display: none;
}

@media (min-width: 640px) {
  .brand-logo {
    height: 42px;
  }
}

@media (min-width: 860px) {
  :root {
    --header-offset: 4.8rem;
  }
  .header-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding-block: 0.6rem;
  }
  .header-direct-cta {
    display: none;
  }
  .site-nav {
    border-top: 0;
    padding-top: 0;
    overflow-x: visible;
    gap: 0.45rem;
  }
  .nav-link {
    background: transparent;
    font-size: 0.86rem;
  }
  .nav-cta-desktop {
    display: inline-flex;
    padding-inline: 1.15rem;
    font-size: 0.86rem;
  }
}

/* === Typography & Buttons === */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-primary);
  margin: 0 0 0.4rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.section-light .eyebrow,
.section-pricing .eyebrow {
  color: var(--accent-indigo);
}

.section-title {
  font-family: var(--font-serif);
  font-size: clamp(1.55rem, 3.2vw, 2.35rem);
  line-height: 1.3;
  margin: 0 0 0.9rem;
  letter-spacing: 0.01em;
  text-wrap: balance;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0.6rem 1.15rem;
  font-size: 0.92rem;
  font-weight: 800;
  text-decoration: none;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  line-height: 1.3;
  text-align: center;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background-color 0.18s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--spectral-grad);
  color: #050811;
  box-shadow: 0 6px 24px rgba(44, 240, 255, 0.24);
}

.btn-secondary {
  background: var(--bg-obsidian-card);
  color: var(--text-light);
  border-color: var(--accent-primary);
}

.btn-secondary:hover {
  background: rgba(44, 240, 255, 0.14);
}

.btn-outline {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-light);
  border-color: rgba(255, 255, 255, 0.28);
}

.btn-outline:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

/* === Hero Stage === */
.hero {
  position: relative;
  padding-block: 0.85rem 2.4rem;
  background:
    radial-gradient(ellipse 70% 45% at 80% 18%, rgba(44, 240, 255, 0.16), transparent 70%),
    radial-gradient(ellipse 55% 40% at 15% 65%, rgba(255, 79, 216, 0.12), transparent 70%),
    var(--bg-obsidian);
  border-bottom: 2px solid transparent;
  border-image: var(--spectral-grad) 1;
}

.hero-stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.85rem;
  align-items: start;
}

.hero-headline-block,
.hero-Monitor-column,
.hero-cta-block,
.hero-sub-figures {
  min-width: 0;
  max-width: 100%;
}

.signal-indicator {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-primary);
  box-shadow: 0 0 10px var(--accent-primary);
  flex-shrink: 0;
}

.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(1.32rem, 2.4vw, 2.08rem);
  line-height: 1.28;
  letter-spacing: -0.015em;
  margin: 0;
  word-break: normal;
  overflow-wrap: anywhere;
}

.title-chunk {
  display: inline-block;
}

.title-line {
  display: block;
}

.title-main {
  color: var(--text-light);
}

.title-accent {
  background: var(--spectral-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Interactive Stage Monitor (Primary Figure) */
.primary-figure {
  margin: 0;
  position: relative;
  background: #04060b;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(44, 240, 255, 0.35);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.65), 0 0 28px rgba(44, 240, 255, 0.12);
}

.primary-img-frame {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  touch-action: manipulation;
}

.primary-figure img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #04060b;
}

.primary-figure img[data-step-fit="contain"],
body:not([data-active-step="1"]) .primary-figure img {
  object-fit: contain;
}

.stage-reactive-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  background: none;
  opacity: 0.92;
  transition: opacity 0.2s ease;
}

.primary-figure[data-pointer-active="true"] .stage-reactive-layer,
.primary-figure[data-pulsing="true"] .stage-reactive-layer {
  opacity: 1;
}

.stage-grid-overlay {
  display: none;
  background: none;
}

.stage-reticle {
  position: absolute;
  left: var(--rx, 50%);
  top: var(--ry, 50%);
  width: 132px;
  height: 132px;
  transform: translate(-50%, -50%);
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  pointer-events: none;
  opacity: 0.92;
  transition: opacity 0.2s ease;
}

.stage-reticle::before,
.stage-reticle::after {
  display: none;
}

.primary-figure[data-pointer-active="true"] .stage-reticle {
  opacity: 1;
}

.stage-pulse-ring {
  position: absolute;
  left: var(--rx, 50%);
  top: var(--ry, 50%);
  width: 36px;
  height: 36px;
  transform: translate(-50%, -50%) scale(0.4);
  border: 1.5px solid var(--accent-primary);
  border-radius: 50%;
  background: transparent;
  box-shadow: none;
  pointer-events: none;
  opacity: 0;
}

.stage-hud-top {
  position: absolute;
  top: 0.55rem;
  left: 0.55rem;
  right: 0.55rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  pointer-events: none;
}

.hud-pill,
.hud-readout {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  line-height: 1.3;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  background: rgba(6, 8, 14, 0.84);
  border: 1px solid rgba(44, 240, 255, 0.38);
  color: var(--text-light);
  backdrop-filter: blur(6px);
}

.hud-readout {
  color: var(--accent-primary);
  font-weight: 700;
}

.figure-caption {
  padding: 0.55rem 0.8rem;
  font-size: 0.76rem;
  color: var(--text-muted-light);
  background: rgba(10, 13, 22, 0.96);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.caption-text {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}

.caption-tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  padding: 0.12rem 0.45rem;
  border-radius: 4px;
  background: rgba(44, 240, 255, 0.15);
  color: var(--accent-primary);
  font-weight: 700;
}

.stage-mini-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  cursor: default;
}

.preset-switcher {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: rgba(255, 255, 255, 0.05);
  padding: 0.15rem;
  border-radius: 999px;
}

.preset-chip {
  min-height: 32px;
  padding: 0.18rem 0.55rem;
  font-size: 0.72rem;
  font-weight: 700;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted-light);
  cursor: pointer;
}

.preset-chip[aria-pressed="true"] {
  background: var(--accent-primary);
  color: #050811;
}

/* Hero CTA & Facts */
.hero-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0.5rem;
  margin-bottom: 0.95rem;
}

.hero-actions .btn-primary {
  grid-column: span 2;
}

.hero-actions .btn {
  padding: 0.55rem 0.75rem;
  font-size: 0.86rem;
}

.hero-lead {
  font-size: 0.94rem;
  line-height: 1.65;
  color: var(--text-light);
  margin: 0 0 1rem;
}

.hero-facts {
  display: grid;
  gap: 0.55rem;
  margin: 0;
}

.fact-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.15rem;
  padding: 0.5rem 0.75rem;
  border-left: 3px solid var(--accent-primary);
  background: linear-gradient(90deg, rgba(44, 240, 255, 0.09), rgba(255, 255, 255, 0.02));
  border-radius: 0 6px 6px 0;
  font-size: 0.86rem;
}

.fact-item:nth-child(2) {
  border-left-color: var(--accent-secondary);
  background: linear-gradient(90deg, rgba(255, 79, 216, 0.09), rgba(255, 255, 255, 0.02));
}

.fact-item:nth-child(3) {
  border-left-color: var(--accent-tertiary);
  background: linear-gradient(90deg, rgba(255, 190, 66, 0.09), rgba(255, 255, 255, 0.02));
}

.fact-item dt {
  font-family: var(--font-mono);
  font-size: 0.73rem;
  font-weight: 800;
  color: var(--accent-primary);
  letter-spacing: 0.06em;
}

.fact-item:nth-child(2) dt {
  color: var(--accent-secondary);
}

.fact-item:nth-child(3) dt {
  color: var(--accent-tertiary);
}

.fact-item dd {
  margin: 0;
  color: var(--text-light);
}

/* Hero Sub Figures & Interactive Reaction Loop */
.hero-sub-figures {
  margin-top: 0.35rem;
  padding-top: 1rem;
  border-top: 1px dashed rgba(255, 255, 255, 0.16);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
}

.cycle-card {
  background: rgba(18, 23, 38, 0.7);
  border: 1px solid var(--border-dark);
  border-radius: 10px;
  padding: 0.9rem;
}

.cycle-card-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  margin-bottom: 0.65rem;
}

.cycle-label {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 800;
  color: var(--accent-tertiary);
  margin: 0;
  letter-spacing: 0.08em;
}

.cycle-hint {
  font-size: 0.72rem;
  color: var(--text-muted-light);
}

.cycle-steps {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}

.cycle-step-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  min-height: 58px;
  padding: 0.5rem 0.65rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-left: 3px solid rgba(255, 255, 255, 0.25);
  border-radius: 6px;
  color: var(--text-light);
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.cycle-step-btn:hover {
  background: rgba(44, 240, 255, 0.08);
  border-color: rgba(44, 240, 255, 0.4);
}

.cycle-step-btn[aria-pressed="true"] {
  background: rgba(44, 240, 255, 0.14);
  border-color: var(--accent-primary);
  border-left-width: 4px;
}

.step-num {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--accent-primary);
  margin-bottom: 0.15rem;
}

.step-desc {
  font-size: 0.76rem;
  color: var(--text-muted-light);
  line-height: 1.35;
}

.sub-figure {
  margin: 0;
  background: var(--bg-obsidian-card);
  border: 1px solid var(--border-dark);
  border-radius: 10px;
  overflow: hidden;
  display: grid;
  grid-template-columns: 115px minmax(0, 1fr);
  align-items: center;
}

.sub-figure img {
  width: 100%;
  height: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.sub-figure .figure-caption {
  border-top: 0;
  border-left: 1px solid var(--border-dark);
  height: 100%;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
}

@media (min-width: 640px) {
  .hero-sub-figures {
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.9fr);
    align-items: stretch;
  }
}

@media (min-width: 960px) {
  .hero {
    padding-block: 2.6rem 4.2rem;
  }
  .hero-stage {
    grid-template-columns: minmax(0, 1.02fr) minmax(0, 1.18fr);
    grid-template-areas:
      "headline monitor"
      "cta monitor"
      "cta sub";
    gap: 1.35rem 2.75rem;
    align-items: start;
  }
  .hero-headline-block {
    grid-area: headline;
  }
  .hero-Monitor-column {
    grid-area: monitor;
  }
  .hero-cta-block {
    grid-area: cta;
  }
  .hero-sub-figures {
    grid-area: sub;
    margin-top: 0;
  }
  .hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
  }
  .hero-actions .btn {
    padding-inline: 1.25rem;
    font-size: 0.92rem;
  }
}

/* === Sections Common === */
.section {
  padding-block: clamp(2.6rem, 5.5vw, 5rem);
  border-bottom: 1px solid var(--border-dark);
}

.section-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
  margin-bottom: 2.2rem;
}

@media (min-width: 860px) {
  .section-header {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: end;
    gap: 2rem;
  }
}

.section-desc {
  margin: 0;
  color: var(--text-muted-light);
  font-size: 0.96rem;
}

.credit-note {
  display: inline-block;
  margin-top: 0.4rem;
  color: var(--accent-tertiary);
}

/* === Web PLAY Section === */
.section-play {
  background:
    radial-gradient(circle at 75% 50%, rgba(44, 240, 255, 0.12), transparent 58%),
    #080b14;
  border-bottom: 1px solid rgba(44, 240, 255, 0.22);
}

.play-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2rem;
  align-items: start;
}

@media (min-width: 960px) {
  .play-layout {
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.25fr);
    gap: 2.75rem;
  }
}

.play-intro,
.play-widget-wrap {
  min-width: 0;
  max-width: 100%;
}

.play-lead {
  font-size: 1.06rem;
  color: var(--text-light);
  margin: 0 0 1.15rem;
}

.notice-box {
  background: rgba(44, 240, 255, 0.06);
  border: 1px solid rgba(44, 240, 255, 0.3);
  border-left: 4px solid var(--accent-primary);
  border-radius: 6px;
  padding: 0.95rem 1.15rem;
  margin-bottom: 1.15rem;
}

.notice-title {
  font-size: 0.95rem;
  margin: 0 0 0.45rem;
  color: var(--accent-primary);
}

.notice-box ul {
  margin: 0;
  padding-left: 1.15rem;
  font-size: 0.88rem;
  color: var(--text-light);
}

.notice-box li + li {
  margin-top: 0.35rem;
}

.play-subnote {
  font-size: 0.86rem;
  color: var(--text-muted-light);
  margin: 0 0 0.85rem;
}

.play-jump {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.text-link {
  color: var(--accent-primary);
  font-size: 0.9rem;
  font-weight: 700;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

/* finger-mandala Custom Element */
finger-mandala.fm {
  display: block;
  background: #04060b;
  border: 1px solid rgba(44, 240, 255, 0.38);
  border-radius: 14px;
  padding: clamp(0.9rem, 2.5vw, 1.3rem);
  box-shadow: 0 20px 55px rgba(0, 0, 0, 0.7), 0 0 35px rgba(44, 240, 255, 0.1);
}

.fm-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  min-height: 260px;
  background: #05070b;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  overflow: hidden;
}

.fm-stage canvas {
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
}

.fm-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(6, 9, 16, 0.72);
  pointer-events: none;
  transition: opacity 0.2s ease;
}

finger-mandala[data-state="running"] .fm-overlay {
  opacity: 0;
}

.play-prompt {
  text-align: center;
  padding: 0.9rem 1.85rem;
  border: 1px solid var(--accent-primary);
  background: rgba(11, 14, 20, 0.92);
  border-radius: 999px;
  box-shadow: 0 0 25px rgba(44, 240, 255, 0.28);
}

.play-word {
  display: block;
  font-family: var(--font-mono);
  font-size: 1.55rem;
  letter-spacing: 0.14em;
  color: var(--accent-primary);
}

.play-instruction {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted-light);
  margin-top: 0.2rem;
}

.fm-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 0.95rem;
}

.fm-controls button {
  min-height: 46px;
  padding: 0.55rem 1.25rem;
  font-size: 0.92rem;
  font-weight: 800;
  border-radius: 999px;
  cursor: pointer;
  border: 1px solid transparent;
}

.fm-controls button[data-action="start"],
.fm-controls button[data-action="resume"] {
  background: var(--spectral-grad);
  color: #050811;
  padding-inline: 1.7rem;
}

.fm-controls button[data-action="clear"] {
  background: var(--bg-obsidian-card);
  color: var(--text-light);
  border-color: var(--border-dark);
}

.fm-controls button[data-action="stop"] {
  background: transparent;
  color: var(--accent-tertiary);
  border-color: rgba(255, 190, 66, 0.5);
}

.fm-help {
  margin: 0.95rem 0 0.45rem;
  font-size: 0.88rem;
  color: var(--text-light);
}

.fm-status {
  margin: 0 0 0.45rem;
  font-size: 0.84rem;
  color: var(--accent-emerald);
  font-weight: 700;
}

.fm-note {
  margin: 0;
  font-size: 0.78rem;
  color: var(--text-muted-light);
}

/* === Archive & Video Section === */
.video-showcase {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.5rem;
  padding: 1.75rem 0;
  margin-bottom: 2.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
}

@media (min-width: 900px) {
  .video-showcase {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
    align-items: center;
    gap: 2.25rem;
  }
}

.video-info,
.video-stage {
  min-width: 0;
  max-width: 100%;
}

.badge {
  display: inline-block;
  background: rgba(255, 190, 66, 0.16);
  color: var(--accent-tertiary);
  border: 1px solid rgba(255, 190, 66, 0.45);
  font-size: 0.78rem;
  font-weight: 800;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  margin-bottom: 0.65rem;
}

.video-title {
  font-size: 1.38rem;
  margin: 0 0 0.65rem;
}

.video-text {
  color: var(--text-muted-light);
  margin: 0 0 0.75rem;
  font-size: 0.94rem;
}

.consent-note {
  font-size: 0.82rem;
  color: var(--text-muted-light);
  background: rgba(255, 255, 255, 0.04);
  padding: 0.5rem 0.75rem;
  border-left: 3px solid var(--accent-emerald);
  margin: 0 0 1.15rem;
}

.video-links {
  margin-bottom: 1.15rem;
}

.origin-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.2rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border-dark);
}

.meta-link {
  font-size: 0.86rem;
  color: var(--accent-primary);
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.video-poster-wrap {
  position: relative;
  background: #000;
  border: 1px solid rgba(44, 240, 255, 0.3);
  border-radius: 10px;
  overflow: hidden;
}

.video-poster {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.video-poster-actions {
  padding: 0.95rem;
  background: var(--bg-obsidian-card);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}

.video-fallback-link {
  font-size: 0.82rem;
  color: var(--text-muted-light);
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.video-iframe-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 10px;
  overflow: hidden;
}

.video-iframe-wrap iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

/* Photo Archive with Interactive Spotlight & Pin */
.photo-archive {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 0.95rem;
  align-items: start;
}

.archive-item {
  margin: 0;
  min-width: 0;
  background: var(--bg-obsidian-card);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.archive-item::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(220px circle at var(--cx, 50%) var(--cy, 50%), rgba(44, 240, 255, 0.2), transparent 70%);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.archive-item:hover::before {
  opacity: 1;
}

.archive-item[data-pinned="true"] {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 2px var(--accent-primary), 0 14px 34px rgba(0, 0, 0, 0.65);
}

.archive-img-wrap {
  overflow: hidden;
  background: #05070b;
}

.archive-item img {
  width: 100%;
  height: auto;
  display: block;
}

.archive-item figcaption {
  padding: 0.55rem 0.75rem;
  font-size: 0.78rem;
  color: var(--text-muted-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.archive-pin-btn {
  flex-shrink: 0;
  min-height: 34px;
  padding: 0.2rem 0.55rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-light);
  cursor: pointer;
}

.archive-pin-btn[aria-pressed="true"] {
  background: var(--accent-primary);
  color: #050811;
  border-color: var(--accent-primary);
}

.ratio-wide {
  grid-column: span 12;
}

.ratio-portrait,
.ratio-tall {
  grid-column: span 6;
}

@media (max-width: 639px) {
  .ratio-wide,
  .ratio-portrait,
  .ratio-tall {
    grid-column: span 12;
  }
}

@media (min-width: 900px) {
  .ratio-wide {
    grid-column: span 6;
  }
  .ratio-portrait {
    grid-column: span 3;
  }
  .ratio-tall {
    grid-column: span 6;
  }
  .ratio-tall img {
    max-height: 540px;
    object-fit: contain;
  }
}

/* === Ideas & Craft Section === */
.section-light {
  background: var(--bg-stone);
  color: var(--text-dark);
  border-bottom: 1px solid var(--border-light);
}

.disclaimer-banner {
  background: #fff8e6;
  border: 1px solid #e0be6b;
  border-left: 4px solid #b57c00;
  color: #2b2108;
  padding: 0.85rem 1rem;
  border-radius: 6px;
  font-size: 0.86rem;
}

.idea-lens-bar {
  background: #e7e2d6;
  border: 1px solid #c9c1b2;
  border-radius: 10px;
  padding: 0.85rem 1rem;
  margin-bottom: 1.5rem;
  display: grid;
  gap: 0.65rem;
}

.lens-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.idea-tab-btn {
  min-height: 40px;
  padding: 0.35rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 800;
  border-radius: 999px;
  border: 1px solid #9d9485;
  background: #fff;
  color: var(--text-dark);
  cursor: pointer;
}

.idea-tab-btn[aria-pressed="true"] {
  background: var(--accent-indigo);
  color: #fff;
  border-color: var(--accent-indigo);
}

.lens-monitor {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--accent-indigo);
}

.ideas-grid {
  counter-reset: idea-counter;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
  margin-bottom: 2.75rem;
}

@media (min-width: 860px) {
  .ideas-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.idea-card {
  counter-increment: idea-counter;
  background: var(--bg-stone-card);
  border: 2px solid var(--border-light);
  border-radius: 10px;
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.idea-card::before {
  content: "0" counter(idea-counter);
  font-family: var(--font-mono);
  font-size: 1.85rem;
  font-weight: 800;
  line-height: 1;
  color: var(--accent-indigo);
  margin-bottom: 0.45rem;
}

.section-light[data-active-idea="1"] .idea-card[data-idea-card="1"],
.section-light[data-active-idea="2"] .idea-card[data-idea-card="2"],
.section-light[data-active-idea="3"] .idea-card[data-idea-card="3"] {
  border-color: var(--accent-indigo);
  box-shadow: 6px 6px 0 var(--accent-indigo);
}

.idea-tag {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--accent-indigo);
  margin: 0 0 0.4rem;
}

.idea-title {
  font-family: var(--font-serif);
  font-size: 1.28rem;
  margin: 0 0 0.65rem;
}

.idea-body {
  font-size: 0.92rem;
  color: var(--text-muted-dark);
  margin: 0 0 1rem;
  flex-grow: 1;
}

.idea-caution {
  font-size: 0.8rem;
  color: #7a2e0e;
  background: #fdf2ed;
  padding: 0.45rem 0.65rem;
  border-radius: 4px;
  margin: 0 0 0.9rem;
  font-weight: 700;
}

.idea-link {
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--accent-indigo);
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.craft-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.5rem;
}

@media (min-width: 860px) {
  .craft-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
}

.craft-block {
  background: var(--bg-stone-card);
  border: 1px solid var(--border-light);
  border-top: 3px solid var(--text-dark);
  border-radius: 8px;
  padding: 1.5rem;
}

.craft-heading {
  font-size: 1.22rem;
  margin: 0 0 0.7rem;
}

.craft-text {
  font-size: 0.92rem;
  color: var(--text-muted-dark);
  margin: 0 0 1.2rem;
}

.process-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.process-list li {
  background: var(--bg-stone);
  border: 1px solid var(--border-light);
  padding: 0.38rem 0.7rem;
  border-radius: 6px;
  font-size: 0.84rem;
  font-weight: 700;
}

.process-list li span {
  font-family: var(--font-mono);
  color: var(--accent-indigo);
  margin-right: 0.35rem;
}

.sound-note {
  background: var(--bg-stone);
  border-left: 4px solid var(--accent-indigo);
  padding: 0.85rem 1rem;
  border-radius: 4px;
}

.sound-note h4 {
  margin: 0 0 0.3rem;
  font-size: 0.94rem;
}

.sound-note p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted-dark);
}

/* === Pricing Section === */
.section-pricing {
  background: #e9e4d8;
  color: var(--text-dark);
  border-bottom: 1px solid var(--border-light);
}

.section-pricing .section-desc {
  color: var(--text-muted-dark);
}

.pricing-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.5rem;
  background: #ffffff;
  border: 2px solid var(--text-dark);
  box-shadow: 8px 8px 0 var(--text-dark);
  padding: clamp(1.25rem, 3vw, 2.2rem);
  margin-bottom: 1.5rem;
}

@media (min-width: 860px) {
  .pricing-panel {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    align-items: center;
  }
}

.price-region {
  font-weight: 800;
  color: var(--accent-indigo);
  margin: 0 0 0.25rem;
}

.price-amount {
  margin: 0 0 0.7rem;
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
}

.price-amount strong {
  font-family: var(--font-serif);
  font-size: clamp(2.8rem, 5vw, 4rem);
  line-height: 1;
}

.price-amount span {
  font-size: 1.12rem;
  font-weight: 800;
}

.price-summary {
  margin: 0;
  font-size: 0.92rem;
  color: var(--text-muted-dark);
}

.price-specs {
  margin: 0;
  display: grid;
  gap: 0.65rem;
}

.spec-box {
  border-bottom: 1px solid var(--border-light);
  padding: 0.55rem 0;
}

.spec-box:last-child {
  border-bottom: 0;
}

.spec-box dt {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--text-muted-dark);
}

.spec-box dd {
  margin: 0.2rem 0 0;
  font-size: 0.94rem;
  font-weight: 700;
  color: var(--text-dark);
}

.check-panel {
  background: rgba(255, 255, 255, 0.65);
  border-left: 4px solid var(--accent-indigo);
  padding: 1rem 1.25rem;
  border-radius: 0 8px 8px 0;
}

.check-title {
  font-size: 1.02rem;
  margin: 0 0 0.65rem;
}

.check-list {
  margin: 0;
  padding-left: 1.2rem;
  font-size: 0.9rem;
  color: var(--text-muted-dark);
}

.check-list li + li {
  margin-top: 0.38rem;
}

/* === Contact Section === */
.section-contact {
  background: var(--bg-obsidian);
}

.contact-box {
  background: linear-gradient(145deg, #101522 0%, #090c14 100%);
  border: 1px solid rgba(44, 240, 255, 0.35);
  border-radius: 14px;
  padding: clamp(1.4rem, 4vw, 2.8rem);
  max-width: 840px;
  margin-inline: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.65);
}

.contact-lead {
  color: var(--text-muted-light);
  margin: 0 0 1.6rem;
}

.contact-actions {
  margin-bottom: 1.4rem;
}

.btn-large {
  font-size: 1rem;
  padding: 0.85rem 1.4rem;
}

.mailto-help {
  font-size: 0.84rem;
  color: var(--text-muted-light);
  margin: 0.5rem 0 0;
}

.email-copy-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--border-dark);
}

.email-address {
  font-family: var(--font-mono);
  font-size: 0.96rem;
  background: rgba(255, 255, 255, 0.08);
  padding: 0.35rem 0.65rem;
  border-radius: 4px;
}

.copy-feedback {
  font-size: 0.85rem;
  color: var(--accent-emerald);
  font-weight: 700;
}

/* === Footer === */
.site-footer {
  padding-block: 2.4rem;
  background: #04060a;
  font-size: 0.86rem;
  color: var(--text-muted-light);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1.8rem;
}

.footer-philosophy {
  margin: 0.7rem 0 0.25rem;
  color: var(--text-light);
  font-weight: 700;
}

.footer-credit {
  margin: 0;
  font-size: 0.78rem;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.footer-links a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  color: var(--accent-primary);
}

/* === Spectral Presets (Tide & Comet) === */
body[data-preset="tide"] {
  --accent-primary: #b8a2ff;
  --accent-secondary: #62dcff;
  --accent-tertiary: #ff83c7;
}

body[data-preset="comet"] {
  --accent-primary: #ff84b8;
  --accent-secondary: #ffeaaa;
  --accent-tertiary: #b8a2ff;
}

/* Keep the requested hero copy on exactly two lines, including narrow phones. */
.hero-title > .title-line {
  white-space: nowrap;
}
@media (max-width: 480px) {
  .hero-title {
    font-size: clamp(1rem, 4.5vw, 1.32rem);
  }
}

/* === Stage HUD & Interactive Surface === */
.primary-img-frame[role="button"] {
  cursor: crosshair;
}
.primary-img-frame[role="button"]:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: -3px;
}

.stage-hud-top,
.stage-hud-bottom {
  z-index: 2;
}

.stage-hud-bottom {
  position: absolute;
  bottom: 0.5rem;
  left: 0.55rem;
  right: 0.55rem;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  pointer-events: none;
}

.hud-effect-badge {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.25;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  background: rgba(6, 8, 14, 0.86);
  border-left: 3px solid var(--accent-primary);
  border-top: 1px solid rgba(255, 255, 255, 0.22);
  border-right: 1px solid rgba(255, 255, 255, 0.22);
  border-bottom: 1px solid rgba(255, 255, 255, 0.22);
  color: var(--text-light);
  backdrop-filter: blur(6px);
}

@media (max-width: 639px) {
  .stage-hud-top .hud-pill {
    display: none;
  }
}

/* === Stage Reactive Layer & Shared Pointer-Centred Structure === */
.stage-axis-beam {
  display: none;
  background: none;
  opacity: 0;
}

.stage-pulse-echo {
  position: absolute;
  left: var(--rx, 50%);
  top: var(--ry, 50%);
  width: 24px;
  height: 24px;
  transform: translate(-50%, -50%) scale(0.4);
  border: 1.5px dashed var(--accent-secondary);
  border-radius: 50%;
  background: transparent;
  box-shadow: none;
  pointer-events: none;
  opacity: 0;
}

/* Strictly 3 ambient outline shapes per mode at the shared pointer centre */
.stage-star,
.stage-sq,
.stage-comet {
  display: none;
  position: absolute;
  inset: 0;
  margin: auto;
  pointer-events: none;
  transform-origin: 50% 50%;
  background: none;
  box-shadow: none;
  filter: none;
}

body[data-preset="amber"] .stage-star {
  display: block;
  fill: none !important;
  stroke-width: 1.5;
  stroke-linejoin: round;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}
body[data-preset="amber"] .stage-star polygon {
  fill: none !important;
}

body[data-preset="prism"] .stage-sq,
body[data-preset="neon"] .stage-sq,
body[data-preset="tide"] .stage-sq {
  display: block;
  background: transparent;
  box-shadow: none;
}

/* 1. PRISM (波紋): 3 concentric dashed/dotted rings rotating CW / CCW / CW while expanding outward with phase offsets */
body[data-preset="prism"] .stage-sq {
  border-radius: 50%;
  transform-origin: 50% 50%;
  transform: var(--ambient-origin, rotate(0deg));
}
body[data-preset="prism"] .stage-sq--lg {
  width: 108px;
  height: 108px;
  border: 1.5px dashed #2cf0ff;
  --ambient-origin: rotate(0deg);
  --turn-period: 24s;
  --turn-dir: normal;
  --ripple-period: 9.6s;
  --ripple-delay: 0s;
  --ripple-from: 0.24;
  --ripple-to: 1.22;
  --turn-span: 360deg;
}
body[data-preset="prism"] .stage-sq--md {
  width: 72px;
  height: 72px;
  border: 1.5px dotted #ff4fd8;
  --ambient-origin: rotate(35deg);
  --turn-period: 15s;
  --turn-dir: reverse;
  --ripple-period: 7.8s;
  --ripple-delay: -2.6s;
  --ripple-from: 0.32;
  --ripple-to: 1.68;
  --turn-span: -360deg;
}
body[data-preset="prism"] .stage-sq--sm {
  width: 40px;
  height: 40px;
  border: 1.5px dashed #ffbe42;
  --ambient-origin: rotate(70deg);
  --turn-period: 9.5s;
  --turn-dir: normal;
  --ripple-period: 6.4s;
  --ripple-delay: -4.3s;
  --ripple-from: 0.45;
  --ripple-to: 2.75;
  --turn-span: 360deg;
}

/* 2. NEON (レーザー): 3 concentric squares rotating CW / CCW / CW at distinct speeds */
body[data-preset="neon"] .stage-sq {
  border-radius: 2px;
  transform: var(--ambient-origin, rotate(0deg));
}
body[data-preset="neon"] .stage-sq--lg {
  width: 96px;
  height: 96px;
  border: 1.5px solid #26f0a5;
  --ambient-origin: rotate(0deg);
  --turn-period: 22s;
  --turn-dir: normal;
}
body[data-preset="neon"] .stage-sq--md {
  width: 64px;
  height: 64px;
  border: 1.5px dashed #2cf0ff;
  --ambient-origin: rotate(24deg);
  --turn-period: 14s;
  --turn-dir: reverse;
}
body[data-preset="neon"] .stage-sq--sm {
  width: 34px;
  height: 34px;
  border: 1.5px solid #a6ff4d;
  --ambient-origin: rotate(48deg);
  --turn-period: 8.5s;
  --turn-dir: normal;
}

/* 3. AMBER (星彩): 3 concentric 5-point star outlines (fill:none) rotating CW / CCW / CW */
body[data-preset="amber"] .stage-star--lg,
body[data-preset="amber"] .stage-star:nth-of-type(1) {
  width: 112px;
  height: 112px;
  stroke: #ffbe42;
  stroke-width: 1.5;
  --ambient-origin: rotate(0deg);
  --turn-period: 26s;
  --turn-dir: normal;
  transform: var(--ambient-origin);
}
body[data-preset="amber"] .stage-star--md,
body[data-preset="amber"] .stage-star:nth-of-type(2) {
  width: 74px;
  height: 74px;
  stroke: #ff5e3a;
  stroke-width: 1.5;
  stroke-dasharray: 5 2.5;
  --ambient-origin: rotate(18deg);
  --turn-period: 16s;
  --turn-dir: reverse;
  transform: var(--ambient-origin);
}
body[data-preset="amber"] .stage-star--sm,
body[data-preset="amber"] .stage-star:nth-of-type(3) {
  width: 40px;
  height: 40px;
  stroke: #2cf0ff;
  stroke-width: 1.5;
  --ambient-origin: rotate(36deg);
  --turn-period: 10s;
  --turn-dir: normal;
  transform: var(--ambient-origin);
}

/* 4. TIDE (潮): 3 concentric ellipses rotating CW / CCW / CW at distinct speeds */
body[data-preset="tide"] .stage-sq {
  border-radius: 50%;
  outline: 1px solid rgba(13, 20, 31, 0.65);
  transform: var(--ambient-origin, rotate(0deg));
}
body[data-preset="tide"] .stage-sq--lg {
  width: 114px;
  height: 48px;
  border: 2px solid #cdbfff;
  --ambient-origin: rotate(0deg);
  --turn-period: 25s;
  --turn-dir: normal;
}
body[data-preset="tide"] .stage-sq--md {
  width: 82px;
  height: 34px;
  border: 2px dashed #78e8ff;
  --ambient-origin: rotate(60deg);
  --turn-period: 16s;
  --turn-dir: reverse;
}
body[data-preset="tide"] .stage-sq--sm {
  width: 50px;
  height: 20px;
  border: 2px dotted #ffacd7;
  --ambient-origin: rotate(120deg);
  --turn-period: 10.5s;
  --turn-dir: normal;
}

/* 5. COMET: light travels around three centred, transparent capsule outlines. */
body[data-preset="comet"] .stage-comet {
  display: block;
  fill: none;
  transform: var(--ambient-origin, rotate(0deg));
}
.stage-comet rect {
  fill: none;
}
.stage-comet .comet-contrast { stroke: rgba(13, 20, 31, 0.72); stroke-width: 2.7px; }
.stage-comet .comet-outline { stroke: currentColor; stroke-width: 1.5px; opacity: 0.72; }
.stage-comet .comet-light { stroke: #fff; stroke-width: 2px; stroke-linecap: round; stroke-dasharray: 12 88; }
.stage-comet--lg { width: 118px; height: 22px; color: #ff84b8; --ambient-origin: rotate(15deg); --turn-period: 20s; --turn-dir: normal; --flow-period: 2.8s; --flow-dir: normal; }
.stage-comet--md { width: 86px; height: 16px; color: #ffeaaa; --ambient-origin: rotate(75deg); --turn-period: 13s; --turn-dir: reverse; --flow-period: 3.7s; --flow-dir: reverse; }
.stage-comet--sm { width: 54px; height: 11px; color: #cabbff; --ambient-origin: rotate(135deg); --turn-period: 8s; --turn-dir: normal; --flow-period: 4.8s; --flow-dir: normal; }

/* === Ambient Keyframes (in-place rotation & concentric ripple expansion around 50% 50% only) === */
@media (prefers-reduced-motion: no-preference) {
  body[data-preset="prism"] [data-stage-motion="running"] .stage-sq {
    animation: prismRippleExpand var(--ripple-period, 8s) linear var(--ripple-delay, 0s) infinite;
  }
  body[data-preset="neon"] [data-stage-motion="running"] .stage-sq,
  body[data-preset="amber"] [data-stage-motion="running"] .stage-star {
    animation: ambientTurn var(--turn-period, 16s) linear infinite;
    animation-direction: var(--turn-dir, normal);
  }

  body[data-preset="tide"] [data-stage-motion="running"] .stage-sq {
    animation: ambientTideTurn var(--turn-period) linear infinite;
    animation-direction: var(--turn-dir);
  }
  body[data-preset="comet"] [data-stage-motion="running"] .stage-comet {
    animation: ambientCometTurn var(--turn-period) linear infinite;
    animation-direction: var(--turn-dir);
  }
  body[data-preset="comet"] [data-stage-motion="running"] .comet-light {
    animation: ambientCometFlow var(--flow-period) linear infinite;
    animation-direction: var(--flow-dir);
  }

  [data-controls-motion="running"] [data-preset-btn="prism"][aria-pressed="true"] .preset-icon svg {
    animation: ambientBreathe 3.2s ease-in-out infinite;
  }
  [data-controls-motion="running"] [data-preset-btn="neon"][aria-pressed="true"] .preset-icon svg {
    animation: ambientTurn 12s linear infinite;
  }
  [data-controls-motion="running"] [data-preset-btn="amber"][aria-pressed="true"] .preset-icon svg {
    animation: ambientTurn 14s linear infinite reverse;
  }
  [data-controls-motion="running"] [data-preset-btn="tide"][aria-pressed="true"] .preset-icon svg {
    animation: ambientTurn 14s linear infinite;
  }
  [data-controls-motion="running"] [data-preset-btn="comet"][aria-pressed="true"] .preset-icon svg {
    animation: ambientTurn 12s linear infinite reverse;
  }
}

@keyframes ambientTurn {
  from {
    transform: var(--ambient-origin, rotate(0deg)) rotate(0deg);
  }
  to {
    transform: var(--ambient-origin, rotate(0deg)) rotate(360deg);
  }
}

/* Rotation and swelling share one transform, so neither overrides the other. */
@keyframes ambientTideTurn {
  0% { transform: var(--ambient-origin, rotate(0deg)) rotate(0deg) scale(1.0000, 0.8200); }
  6.25% { transform: var(--ambient-origin, rotate(0deg)) rotate(22.5deg) scale(1.0117, 0.8669); }
  12.5% { transform: var(--ambient-origin, rotate(0deg)) rotate(45deg) scale(1.0400, 0.9800); }
  18.75% { transform: var(--ambient-origin, rotate(0deg)) rotate(67.5deg) scale(1.0683, 1.0931); }
  25% { transform: var(--ambient-origin, rotate(0deg)) rotate(90deg) scale(1.0800, 1.1400); }
  31.25% { transform: var(--ambient-origin, rotate(0deg)) rotate(112.5deg) scale(1.0683, 1.0931); }
  37.5% { transform: var(--ambient-origin, rotate(0deg)) rotate(135deg) scale(1.0400, 0.9800); }
  43.75% { transform: var(--ambient-origin, rotate(0deg)) rotate(157.5deg) scale(1.0117, 0.8669); }
  50% { transform: var(--ambient-origin, rotate(0deg)) rotate(180deg) scale(1.0000, 0.8200); }
  56.25% { transform: var(--ambient-origin, rotate(0deg)) rotate(202.5deg) scale(1.0117, 0.8669); }
  62.5% { transform: var(--ambient-origin, rotate(0deg)) rotate(225deg) scale(1.0400, 0.9800); }
  68.75% { transform: var(--ambient-origin, rotate(0deg)) rotate(247.5deg) scale(1.0683, 1.0931); }
  75% { transform: var(--ambient-origin, rotate(0deg)) rotate(270deg) scale(1.0800, 1.1400); }
  81.25% { transform: var(--ambient-origin, rotate(0deg)) rotate(292.5deg) scale(1.0683, 1.0931); }
  87.5% { transform: var(--ambient-origin, rotate(0deg)) rotate(315deg) scale(1.0400, 0.9800); }
  93.75% { transform: var(--ambient-origin, rotate(0deg)) rotate(337.5deg) scale(1.0117, 0.8669); }
  100% { transform: var(--ambient-origin, rotate(0deg)) rotate(360deg) scale(1.0000, 0.8200); }
}
@keyframes ambientCometTurn {
  from { transform: var(--ambient-origin, rotate(0deg)) rotate(0deg); }
  to { transform: var(--ambient-origin, rotate(0deg)) rotate(360deg); }
}
@keyframes ambientCometFlow {
  from { stroke-dashoffset: 100; }
  to { stroke-dashoffset: 0; }
}

@keyframes prismRippleExpand {
  0% {
    transform: var(--ambient-origin, rotate(0deg)) rotate(0deg) scale(var(--ripple-from, 0.28));
    opacity: 0;
  }
  14% {
    opacity: 0.92;
  }
  78% {
    opacity: 0.84;
  }
  96% {
    transform: var(--ambient-origin, rotate(0deg)) rotate(var(--turn-span, 360deg)) scale(var(--ripple-to, 1.35));
    opacity: 0;
  }
  100% {
    transform: var(--ambient-origin, rotate(0deg)) rotate(var(--turn-span, 360deg)) scale(var(--ripple-to, 1.35));
    opacity: 0;
  }
}

@keyframes ambientBreathe {
  0%, 100% {
    transform: var(--ambient-origin, rotate(0deg)) scale(0.92);
    opacity: 0.72;
  }
  50% {
    transform: var(--ambient-origin, rotate(0deg)) scale(1.08);
    opacity: 1;
  }
}

/* === Bounded Click Afterglow (3 active + 1 retiring max 4 groups, <= 2 pseudos per group, strictly anchored at click centre) === */
.stage-wave {
  position: absolute;
  width: 0;
  height: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 1;
  transition: opacity 180ms linear;
  --wave-w: 42px;
  --wave-h: 42px;
  --wave-echo-w: 28px;
  --wave-echo-h: 28px;
  --wave-radius: 50%;
  --wave-from: 0deg;
  --wave-to: 90deg;
  --wave-scale: 2.8;
  color: #2cf0ff;
  --wave-echo: #ff4fd8;
}
.stage-wave[data-retiring="true"] {
  opacity: 0;
}
.stage-wave::before,
.stage-wave::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: var(--wave-w);
  height: var(--wave-h);
  margin: 0;
  border: 1.5px solid currentColor;
  border-radius: var(--wave-radius);
  background: transparent;
  box-shadow: none;
  transform-origin: 50% 50%;
  animation: stageWaveFade var(--wave-duration, 3.2s) cubic-bezier(0.18, 0.62, 0.32, 1) both;
}
.stage-wave::after {
  width: var(--wave-echo-w);
  height: var(--wave-echo-h);
  color: var(--wave-echo);
  border-style: dashed;
  --wave-from: 30deg;
  --wave-to: -60deg;
  animation-delay: 140ms;
}
.stage-wave[data-kind="prism"]::before {
  border-style: dashed;
}
.stage-wave[data-kind="prism"]::after {
  border-style: dotted;
  animation-delay: 160ms;
}
.stage-wave[data-kind="neon"] {
  color: #26f0a5;
  --wave-echo: #2cf0ff;
  --wave-w: 40px;
  --wave-h: 40px;
  --wave-echo-w: 26px;
  --wave-echo-h: 26px;
  --wave-radius: 2px;
  --wave-from: 0deg;
  --wave-to: 90deg;
  --wave-scale: 2.7;
}
.stage-wave[data-kind="neon"]::after {
  border-style: dashed;
  --wave-from: 45deg;
  --wave-to: -45deg;
}
.stage-wave[data-kind="amber"] {
  color: #ffbe42;
  --wave-echo: #ff5e3a;
  --wave-w: 46px;
  --wave-h: 46px;
  --wave-echo-w: 30px;
  --wave-echo-h: 30px;
  --wave-from: 0deg;
  --wave-to: 108deg;
  --wave-scale: 2.7;
}
.stage-wave[data-kind="amber"]::before,
.stage-wave[data-kind="amber"]::after,
body[data-preset="amber"] .stage-pulse-ring,
body[data-preset="amber"] .stage-pulse-echo {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: currentColor;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 60' fill='none'%3E%3Cpolygon points='30,4 35.88,21.91 54.73,21.97 39.51,33.09 45.28,51.03 30,40 14.72,51.03 20.49,33.09 5.27,21.97 24.12,21.91' fill='none' stroke='white' stroke-width='2' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 60' fill='none'%3E%3Cpolygon points='30,4 35.88,21.91 54.73,21.97 39.51,33.09 45.28,51.03 30,40 14.72,51.03 20.49,33.09 5.27,21.97 24.12,21.91' fill='none' stroke='white' stroke-width='2' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
body[data-preset="amber"] .stage-pulse-ring {
  color: var(--accent-primary);
}
body[data-preset="amber"] .stage-pulse-echo {
  color: var(--accent-secondary);
}
.stage-wave[data-kind="amber"]::after {
  --wave-from: 36deg;
  --wave-to: -72deg;
}
.stage-wave[data-kind="tide"] {
  color: #b8a2ff;
  --wave-echo: #62dcff;
  --wave-w: 52px;
  --wave-h: 22px;
  --wave-echo-w: 36px;
  --wave-echo-h: 15px;
  --wave-from: 0deg;
  --wave-to: 75deg;
  --wave-scale: 2.6;
}
.stage-wave[data-kind="tide"]::before,
.stage-wave[data-kind="tide"]::after,
.stage-wave[data-kind="comet"]::before,
.stage-wave[data-kind="comet"]::after {
  outline: 1px solid rgba(13, 20, 31, 0.65);
}
.stage-wave[data-kind="tide"]::after {
  border-style: dashed;
  --wave-from: 60deg;
  --wave-to: -45deg;
  animation-delay: 160ms;
}
.stage-wave[data-kind="comet"] {
  color: #ff84b8;
  --wave-echo: #ffeaaa;
  --wave-w: 64px;
  --wave-h: 12px;
  --wave-echo-w: 44px;
  --wave-echo-h: 8px;
  --wave-radius: 999px;
  --wave-from: 15deg;
  --wave-to: 135deg;
  --wave-scale: 2.2;
}
.stage-wave[data-kind="comet"]::before {
  border: 1.5px solid currentColor;
  background: transparent;
  box-shadow: none;
  margin: 0;
}
.stage-wave[data-kind="comet"]::after {
  border: 1.5px dashed currentColor;
  background: transparent;
  box-shadow: none;
  margin: 0;
  --wave-from: -45deg;
  --wave-to: -165deg;
  animation-delay: 130ms;
}

@keyframes stageWaveFade {
  0% {
    transform: translate(-50%, -50%) rotate(var(--wave-from)) scale(0.5);
    opacity: 0.92;
  }
  40% {
    opacity: 0.65;
  }
  100% {
    transform: translate(-50%, -50%) rotate(var(--wave-to)) scale(var(--wave-scale));
    opacity: 0;
  }
}

[data-stage-visible="false"] .stage-pulse-ring,
[data-stage-visible="false"] .stage-pulse-echo,
[data-motion-hidden="true"] .stage-pulse-ring,
[data-motion-hidden="true"] .stage-pulse-echo {
  animation-play-state: paused !important;
}

/* === Preset Switcher Controls === */
.figure-caption {
  padding: 0.45rem 0.65rem;
  gap: 0.35rem;
}

.caption-text {
  font-size: 0.72rem;
  line-height: 1.35;
}

.stage-mini-controls {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  justify-content: space-between;
  gap: 0.4rem;
}

.preset-switcher {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.38rem;
  background: transparent;
  padding: 0;
  border-radius: 0;
  flex: 1 1 280px;
}

.preset-chip {
  grid-column: span 2;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.38rem;
  min-height: 44px;
  padding: 0.3rem 0.48rem;
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-light);
  background: rgba(255, 255, 255, 0.05);
  border: 1.5px solid rgba(255, 255, 255, 0.26);
  cursor: pointer;
  text-align: left;
  transition: transform 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.preset-chip--tide,
.preset-chip--comet {
  grid-column: span 3;
}

.preset-chip:hover {
  background: rgba(255, 255, 255, 0.11);
  border-color: rgba(255, 255, 255, 0.5);
}

.preset-chip--prism {
  border-radius: 999px;
}
.preset-chip--neon {
  border-radius: 2px;
  border-left-width: 4px;
  border-right-width: 4px;
}
.preset-chip--amber {
  border-radius: 10px;
  border-style: double;
  border-width: 3px;
}
.preset-chip--tide {
  border-radius: 50% / 20%;
  border-bottom-width: 3px;
}
.preset-chip--comet {
  border-radius: 2px 18px 2px 18px;
  border-left-width: 4px;
}

.preset-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  background: rgba(0, 0, 0, 0.38);
  border: 1px solid rgba(255, 255, 255, 0.28);
}
.preset-chip--prism .preset-icon {
  border-radius: 50%;
  color: #2cf0ff;
}
.preset-chip--neon .preset-icon {
  border-radius: 2px;
  transform: rotate(45deg);
  color: #26f0a5;
}
.preset-chip--neon .preset-icon svg {
  --ambient-origin: rotate(-45deg);
  transform: rotate(-45deg);
}
.preset-chip--amber .preset-icon {
  border-radius: 6px;
  border-style: dashed;
  color: #ffbe42;
}
.preset-chip--tide .preset-icon {
  border-radius: 50%;
  color: #b8a2ff;
}
.preset-chip--comet .preset-icon {
  border: 0;
  color: #ff84b8;
}

.preset-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1 1 auto;
  gap: 0.06rem;
}
.preset-name {
  font-weight: 800;
  font-size: 0.78rem;
  line-height: 1.15;
  white-space: normal;
}
.preset-sub {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  line-height: 1.15;
  color: var(--text-muted-light);
  white-space: normal;
}

.preset-active-mark {
  display: none;
  position: absolute;
  top: -5px;
  right: -4px;
  width: 17px;
  height: 17px;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.64rem;
  font-weight: 900;
  line-height: 1;
  border-radius: 999px;
  border: 1.5px solid #ffffff;
  pointer-events: none;
}

.preset-chip[aria-pressed="true"] {
  background: var(--accent-primary);
  color: #050811;
  border-color: #ffffff;
  box-shadow: 0 0 0 2px #050811, 0 0 0 4px var(--accent-primary), 0 6px 16px rgba(0, 0, 0, 0.5);
  transform: translateY(-1px);
}
.preset-chip[aria-pressed="true"] .preset-icon {
  background: #050811;
  color: var(--accent-primary);
  border-color: #050811;
}
.preset-chip[aria-pressed="true"] .preset-sub {
  color: #050811;
  font-weight: 800;
  text-decoration: underline;
}
.preset-chip[aria-pressed="true"] .preset-active-mark {
  display: inline-flex;
  background: #050811;
  color: var(--accent-primary);
}

@media (max-width: 480px) {
  .preset-chip {
    padding: 0.25rem 0.36rem;
    gap: 0.28rem;
  }
  .preset-icon {
    width: 20px;
    height: 20px;
  }
  .preset-name {
    font-size: 0.72rem;
  }
  .preset-sub {
    font-size: 0.6rem;
  }
}

/* === Reduced Motion: 3 Static Mode-Specific Outline Shapes at Shared Centre === */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .stage-wave {
    display: none !important;
  }
  .stage-reactive-layer {
    background: none !important;
    opacity: 0.92 !important;
  }
  .stage-reticle {
    width: 132px !important;
    height: 132px !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: none !important;
    box-shadow: none !important;
    opacity: 0.92 !important;
    transform: translate(-50%, -50%) !important;
  }
  .stage-star,
  .stage-sq,
  .stage-comet,
  .stage-comet .comet-light {
    animation: none !important;
    fill: none !important;
    background: transparent !important;
    box-shadow: none !important;
    opacity: 0.9 !important;
  }
  .primary-figure[data-pulsing="true"] .stage-pulse-ring,
  .primary-figure[data-pulsing="true"] .stage-pulse-echo {
    animation: none !important;
    margin: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    opacity: 0.88 !important;
  }
  body[data-preset="prism"] .primary-figure[data-pulsing="true"] .stage-pulse-ring {
    border: 1.5px dashed var(--accent-primary) !important;
    border-radius: 50% !important;
    transform: translate(-50%, -50%) scale(2.2) !important;
  }
  body[data-preset="prism"] .primary-figure[data-pulsing="true"] .stage-pulse-echo {
    border: 1.5px dotted var(--accent-secondary) !important;
    border-radius: 50% !important;
    transform: translate(-50%, -50%) scale(1.5) !important;
  }
  body[data-preset="neon"] .primary-figure[data-pulsing="true"] .stage-pulse-ring {
    border-radius: 2px !important;
    border: 1.5px solid var(--accent-primary) !important;
    transform: translate(-50%, -50%) rotate(45deg) scale(2.1) !important;
  }
  body[data-preset="neon"] .primary-figure[data-pulsing="true"] .stage-pulse-echo {
    border-radius: 2px !important;
    border: 1.5px dashed var(--accent-secondary) !important;
    transform: translate(-50%, -50%) rotate(15deg) scale(1.45) !important;
  }
  body[data-preset="amber"] .primary-figure[data-pulsing="true"] .stage-pulse-ring {
    background: var(--accent-primary) !important;
    transform: translate(-50%, -50%) rotate(18deg) scale(2.2) !important;
  }
  body[data-preset="amber"] .primary-figure[data-pulsing="true"] .stage-pulse-echo {
    background: var(--accent-secondary) !important;
    transform: translate(-50%, -50%) rotate(-18deg) scale(1.55) !important;
  }
  body[data-preset="tide"] .primary-figure[data-pulsing="true"] .stage-pulse-ring,
  body[data-preset="tide"] .primary-figure[data-pulsing="true"] .stage-pulse-echo,
  body[data-preset="comet"] .primary-figure[data-pulsing="true"] .stage-pulse-ring,
  body[data-preset="comet"] .primary-figure[data-pulsing="true"] .stage-pulse-echo {
    outline: 1px solid rgba(13, 20, 31, 0.65);
  }
  body[data-preset="tide"] .primary-figure[data-pulsing="true"] .stage-pulse-ring {
    width: 68px !important;
    height: 28px !important;
    border-radius: 50% !important;
    border: 1.5px solid var(--accent-primary) !important;
    transform: translate(-50%, -50%) rotate(-15deg) scale(1.45) !important;
  }
  body[data-preset="tide"] .primary-figure[data-pulsing="true"] .stage-pulse-echo {
    width: 48px !important;
    height: 20px !important;
    border-radius: 50% !important;
    border: 1.5px dashed var(--accent-secondary) !important;
    transform: translate(-50%, -50%) rotate(25deg) scale(1.3) !important;
  }
  body[data-preset="comet"] .primary-figure[data-pulsing="true"] .stage-pulse-ring {
    width: 72px !important;
    height: 14px !important;
    border: 1.5px solid var(--accent-primary) !important;
    border-radius: 999px !important;
    transform: translate(-50%, -50%) rotate(25deg) scale(1.35) !important;
  }
  body[data-preset="comet"] .primary-figure[data-pulsing="true"] .stage-pulse-echo {
    width: 50px !important;
    height: 10px !important;
    border: 1.5px dashed var(--accent-secondary) !important;
    border-radius: 999px !important;
    transform: translate(-50%, -50%) rotate(-35deg) scale(1.25) !important;
  }
}
