:root {
  --stage-bg: #4f5960;
  --text: #ffffff;
  --bubble: rgba(0, 176, 240, 0.6);
  --bubble-glow: rgba(59, 196, 255, 0.5);
  --marker-bg: rgba(0, 0, 0, 0.18);
  --marker-text: #ffffff;
  --marker-hover-bg: #ffcc00;
  --marker-hover-text: #1a1a1a;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  overflow: hidden;
}

body {
  margin: 0;
  width: 100%;
  font-family: "Yu Gothic", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 10% 10%, #2b3742, #1d252d 38%, #151a1f 100%);
}

.page {
  min-height: 100svh;
  height: 100svh;
  width: 100%;
  display: grid;
  place-items: center;
  padding: 0px;
  overflow: hidden;
}

.stage {
  position: relative;
  aspect-ratio: 16 / 9;
  width: 100%;
  height: auto;
  background: transparent;
  overflow: hidden;
  
  /* 追加: 子要素で cqw / cqh を使えるようにする */
  container-type: size;
}

@media (min-aspect-ratio: 16 / 9) {
  .stage {
    width: auto;
    height: 100%;
  }
}

.layer {
  position: absolute;
  display: block;
  object-fit: cover;
  user-select: none;
  pointer-events: none;
}

.bg 
{
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
}

.overlay {
  right: 0;
  top: 1%;
  width: 34%;
  height: 100%;
  object-fit: contain;
}

.overlay-frame {
  position: absolute;
  right: 0;
  top: 5%;
  width: 25%;
  height: 91%;
  border: 0;
  display: block;
  background: transparent;
}

.left-overlay-frame {
  position: absolute;
  left: 1%;
  bottom: 1%;
  width: 31%;
  height: 32%;
  border: 0;
  display: block;
  background: transparent;
  z-index: 6;
}

.title {
  position: absolute;
  left: 0%;
  top: 0%;
  width: 100%;
  height: 5%;
  display: grid;
  place-items: center;
  background: rgba(22, 33, 41, 0.9);
  font-weight: 700;
  font-size: 1.55vw;
  letter-spacing: 0.01em;
  padding-inline: 1.2vw;
}

.title-text {
  pointer-events: none;
}

.title-action {
  position: absolute;
  top: 50%;
  right: 1vw;
  transform: translateY(-50%);
  min-width: 6.6vw;
  padding: 0.45em 0.9em;
  border: 0.2vh solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: var(--text);
  font: inherit;
  font-size: 0.85vw;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(6px);
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.title-action:hover,
.title-action:focus-visible {
  background: rgba(255, 255, 255, 0.24);
  border-color: rgba(255, 255, 255, 0.55);
  outline: none;
}

.title-action:active {
  transform: translateY(-50%) scale(0.98);
}

body:fullscreen {
  background: #000;
}

body:fullscreen .page {
  width: 100vw;
  height: 100vh;
}

body:fullscreen .stage {
  width: 100vw;
  height: 100vh;
  aspect-ratio: auto;
  background: #000;
}

.date {
  position: absolute;
  margin: 0;
  font-weight: 700;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
  z-index: 5;
}

.date {
  right: 0;
  bottom: 0;
  width: 7.487%;
  height: 3%;
  font-size: 0.72vw;
}

.scene-notes {
  position: absolute;
  right: 0;
  bottom: 0%;
  width: 25%;
  color: var(--text);
  font-size: 0.5cqw;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
  z-index: 5;
  background-color: rgb(137 137 137 / 62%);
  padding: 0.3cqw;
  border-radius: 0.5cqw;
}

.marker {
  position: absolute;
  transform: translate(-50%, -50%);
  font-size: 1.4vw;
  font-weight: 700;
  color: var(--marker-text);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.65);
  line-height: 1;
  padding: 0.12em 0.26em;
  border-radius: 1.2vh;
  background: var(--marker-bg);
  z-index: 7;
  transition: background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.marker.is-linked-hover {
  background: var(--marker-hover-bg);
  color: var(--marker-hover-text);
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.18);
}

.m1 { left: 72.0%; top: 26.0%; }
.m2 { left: 64.5%; top: 57.0%; }
.m3 { left: 48.0%; top: 54.0%; }
.m4 { left: 56.0%; top: 14.0%; }
.m5 { left: 46.8%; top: 14.3%; }
.m6 { left: 12.5%; top: 13.9%; }
.m7 { left: 71.2%; top: 38.3%; }
.m8 { left: 25.1%; top: 32.0%; }
.m9 { left: 71.5%; top: 63.1%; }

.view {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 3.2vw;
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  text-decoration: none;
  color: #00131e;
  font-size: 0.68vw;
  font-weight: 700;
  border-radius: 50%;
  background: var(--bubble);
  box-shadow:
    0 0 0 0.1vw rgba(255, 255, 255, 0.3) inset,
    0 0 24px var(--bubble-glow),
    0 6px 18px rgba(0, 0, 0, 0.35);
  z-index: 8;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.view span {
  transform: translateY(2%);
  line-height: 1.05;
  text-align: center;
}

.view:hover,
.view:focus-visible {
  transform: translate(-50%, -50%) scale(1.08);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.45) inset,
    0 0 30px rgba(59, 196, 255, 0.75),
    0 8px 24px rgba(0, 0, 0, 0.5);
  outline: none;
}

.view.is-linked-hover {
  transform: translate(-50%, -50%) scale(1.08);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.45) inset,
    0 0 30px rgba(59, 196, 255, 0.75),
    0 8px 24px rgba(0, 0, 0, 0.5);
}

.v1 { left: 63.9%; top: 38.5%; }
.v2 { left: 59.4%; top: 46.1%; }
.v3 { left: 59.4%; top: 61.4%; }