:root {
  --bg: #f6f8fb;
  --paper: #ffffff;
  --ink: #17223b;
  --muted: #62708a;
  --line: #dce3ee;
  --blue: #1c75bc;
  --blue-deep: #0f4775;
  --accent: #f0b84d;
  --danger: #b21725;
  --shadow: 0 16px 40px rgba(30, 52, 86, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Yu Gothic", "Hiragino Kaku Gothic ProN", Meiryo, Arial, sans-serif;
  letter-spacing: 0;
  transition: background 0.6s ease, color 0.6s ease, filter 0.6s ease;
}

a {
  color: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
  padding: 10px clamp(18px, 4vw, 56px);
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.brand img {
  width: 192px;
  height: auto;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2vw, 26px);
  color: var(--muted);
  font-size: 0.95rem;
}

.nav-links a {
  text-decoration: none;
}

.debug-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.debug-controls button {
  min-height: 34px;
  border: 1px solid rgba(28, 117, 188, 0.3);
  border-radius: 6px;
  padding: 0 10px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--blue-deep);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
}

.debug-controls button:hover {
  background: #e9f2fb;
}

.hero {
  position: relative;
  min-height: calc(100vh - 72px);
  display: grid;
  align-items: center;
  padding: clamp(70px, 11vh, 120px) clamp(22px, 6vw, 72px) clamp(96px, 12vh, 128px);
  overflow: hidden;
  isolation: isolate;
}

.hero-media,
.hero-media::after {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.hero-media::after {
  content: "";
  z-index: 1;
  background: linear-gradient(90deg, rgba(8, 26, 47, 0.74), rgba(8, 26, 47, 0.24) 55%, rgba(8, 26, 47, 0.05));
}

.hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1s ease, filter 0.7s ease;
}

.hero-image.is-active {
  opacity: 1;
}

.hero-content {
  width: min(690px, 100%);
  color: #fff;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.24);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--blue);
  font-weight: 700;
  font-size: 0.82rem;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: #f8d37a;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 18px;
  font-size: clamp(2.4rem, 6vw, 5.4rem);
  line-height: 1.03;
  font-weight: 800;
}

h2 {
  margin-bottom: 14px;
  font-size: clamp(1.65rem, 3vw, 2.7rem);
  line-height: 1.18;
}

h3 {
  margin-bottom: 10px;
  font-size: 1.1rem;
}

.hero p:not(.eyebrow) {
  max-width: 620px;
  font-size: clamp(1.02rem, 1.8vw, 1.25rem);
  line-height: 1.9;
}

.primary-link,
.secondary-link,
.submit-button,
.return-button,
.plain-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 0;
  border-radius: 6px;
  padding: 0 18px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.primary-link,
.submit-button {
  background: var(--accent);
  color: #1d2430;
}

.secondary-link,
.return-button,
.plain-button {
  background: #e9f2fb;
  color: var(--blue-deep);
}

.notice-band {
  background: #123d66;
  color: #fff;
  padding: 14px clamp(18px, 4vw, 56px);
  text-align: center;
}

.notice-band p {
  margin: 0;
  line-height: 1.6;
}

.section {
  padding: clamp(52px, 8vw, 92px) clamp(18px, 5vw, 72px);
}

.section-head {
  max-width: 900px;
  margin-bottom: 28px;
}

.tour-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.tour-card {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.tour-card a {
  text-decoration: none;
}

.tour-image-wrap {
  position: relative;
  aspect-ratio: 3 / 2;
  overflow: hidden;
}

.tour-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.02);
  transition: transform 0.35s ease, filter 0.35s ease;
}

.tour-card:hover img {
  transform: scale(1.035);
}

.staff-tag {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 5px 8px;
  border-radius: 4px;
  background: rgba(13, 20, 30, 0.82);
  color: #fff;
  font-size: 0.78rem;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.tour-card:hover .staff-tag,
.tour-card:focus-within .staff-tag,
.tour-detail-slider:hover .staff-tag,
.tour-detail-slider:focus-within .staff-tag {
  opacity: 1;
  transform: translateY(0);
}

.tour-body {
  padding: 18px;
}

.tour-body p {
  color: var(--muted);
  line-height: 1.65;
}

.tour-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
  color: var(--blue-deep);
  font-weight: 700;
}

.tour-detail {
  display: grid;
  gap: clamp(28px, 5vw, 56px);
}

.tour-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.85fr);
  gap: clamp(24px, 5vw, 64px);
  align-items: center;
}

.tour-detail-media .tour-image-wrap {
  position: relative;
  aspect-ratio: 3 / 2;
  border-radius: 8px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.tour-detail-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tour-detail-slide {
  opacity: 0;
  transition: opacity 0.9s ease, filter 0.35s ease;
}

.tour-detail-slide.is-active {
  opacity: 1;
}

.tour-detail-dots {
  position: absolute;
  left: 50%;
  bottom: 14px;
  z-index: 4;
  display: flex;
  gap: 8px;
  transform: translateX(-50%);
}

.tour-detail-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.18);
}

.tour-detail-dots span.is-active {
  background: #fff;
}

.staff-hotspot {
  position: absolute;
  right: 4%;
  bottom: 12%;
  z-index: 6;
  width: clamp(74px, 12vw, 150px);
  height: clamp(150px, 24vw, 280px);
  border: 0;
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
}

.staff-hotspot::after {
  content: "staff=13";
  position: absolute;
  right: 0;
  bottom: 0;
  padding: 5px 8px;
  border-radius: 4px;
  background: rgba(13, 20, 30, 0.82);
  color: #fff;
  font-size: 0.78rem;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.staff-hotspot:hover::after,
.staff-hotspot:focus-visible::after {
  opacity: 1;
  transform: translateY(0);
}

.tour-detail-copy {
  display: grid;
  gap: 16px;
}

.tour-detail-copy h1 {
  margin-bottom: 0;
  font-size: clamp(2rem, 4.5vw, 4.1rem);
}

.tour-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tour-detail-meta span {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 12px;
  background: var(--paper);
  color: var(--blue-deep);
  font-weight: 800;
}

.tour-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tour-detail-sections {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.tour-detail-sections section {
  min-height: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.tour-detail-sections h2 {
  margin-bottom: 12px;
  font-size: 1.1rem;
}

.tour-detail-sections ul,
.tour-detail-sections ol {
  margin: 0;
  padding-left: 1.2em;
  color: var(--muted);
  line-height: 1.75;
}

.tour-detail-sections p {
  color: var(--muted);
  line-height: 1.75;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1fr);
  gap: clamp(24px, 5vw, 72px);
  align-items: start;
  background: #eef5fb;
}

.lead {
  color: var(--muted);
  line-height: 1.9;
}

.booking-form,
.gift-form,
.confirm-panel {
  display: grid;
  gap: 16px;
  padding: clamp(18px, 3vw, 28px);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid #c9d5e4;
  border-radius: 6px;
  padding: 10px 12px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

textarea {
  min-height: 110px;
  resize: vertical;
}

.return-error {
  min-height: 24px;
  margin: 0;
  color: var(--danger);
  font-weight: 800;
}

.return-error.is-pulse {
  animation: pulseText 0.35s ease;
}

.comment-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.comment-card {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 12px;
  align-items: start;
  padding: 18px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.comment-card img {
  width: 52px;
  height: 52px;
  border-radius: 50%;
}

.comment-card p {
  margin-bottom: 8px;
  color: var(--muted);
  line-height: 1.7;
}

.comment-card strong {
  display: block;
  color: var(--ink);
}

.contact {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.85fr);
  gap: clamp(24px, 5vw, 64px);
  align-items: center;
}

.contact img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 8px;
}

.site-footer {
  display: grid;
  gap: 4px;
  padding: 22px clamp(18px, 4vw, 56px);
  background: #0f2238;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.78rem;
}

.site-footer p {
  margin: 0;
}

.subpage {
  min-height: calc(100vh - 72px);
  padding: clamp(36px, 7vw, 84px) clamp(18px, 5vw, 72px);
}

.subpage-hero {
  display: grid;
  grid-template-columns: minmax(280px, 0.75fr) minmax(0, 1fr);
  gap: clamp(24px, 5vw, 70px);
  align-items: center;
}

.staff-photo,
.gift-visual,
.final-visual {
  width: 100%;
  border-radius: 8px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.record-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 24px 0;
}

.record-item {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.record-item span {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
}

.record-item strong {
  display: block;
  margin-top: 8px;
  font-size: 1.4rem;
}

.confirm-row {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.confirm-row span:first-child {
  color: var(--muted);
  font-weight: 700;
}

.truth-note {
  display: grid;
  gap: 10px;
  margin-top: 20px;
  padding: 18px;
  border: 1px solid rgba(178, 23, 37, 0.35);
  border-radius: 8px;
  background: rgba(178, 23, 37, 0.08);
  color: var(--danger);
  font-weight: 800;
}

.final-message {
  min-height: 150px;
  margin-top: 24px;
  color: #fff;
  font-size: clamp(1.3rem, 3vw, 2.4rem);
  font-weight: 800;
}

.final-message p {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.final-message p.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.noise-flash {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 100;
  opacity: 0;
  background-image: var(--noise-01-url, url("images/noise_01_1920x1080.png"));
  background-size: cover;
  mix-blend-mode: multiply;
}

.noise-flash.is-visible {
  animation: noiseFlash 0.22s steps(2, end);
}

.fade-veil {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 90;
  background: #020407;
  opacity: 0;
}

.fade-veil.is-visible {
  animation: veil 0.72s ease;
}

.site-alter-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  overflow: hidden;
  isolation: isolate;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  background:
    repeating-linear-gradient(
      0deg,
      rgba(210, 210, 210, 0.16) 0,
      rgba(110, 110, 110, 0.22) 1px,
      rgba(185, 185, 185, 0.16) 2px,
      rgba(90, 90, 90, 0.18) 3px
    ),
    linear-gradient(180deg, rgba(120, 120, 120, 0.18), rgba(165, 165, 165, 0.18));
}

.site-alter-overlay.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.site-alter-layer,
.site-alter-flash,
.site-alter-message {
  position: absolute;
}

.site-alter-layer {
  inset: -8%;
  pointer-events: none;
  z-index: 1;
}

.site-alter-layer-1 {
  background:
    repeating-linear-gradient(
      0deg,
      rgba(240, 240, 240, 0.18) 0,
      rgba(70, 70, 70, 0.24) 1px,
      rgba(200, 200, 200, 0.18) 2px,
      rgba(90, 90, 90, 0.22) 3px,
      rgba(170, 170, 170, 0.14) 4px
    );
  mix-blend-mode: screen;
}

.site-alter-layer-2 {
  background:
    repeating-linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.03) 0,
      rgba(0, 0, 0, 0.08) 2px,
      rgba(255, 255, 255, 0.03) 4px
    ),
    repeating-linear-gradient(
      0deg,
      rgba(255, 255, 255, 0.08) 0,
      rgba(0, 0, 0, 0.12) 2px,
      rgba(255, 255, 255, 0.06) 4px,
      rgba(0, 0, 0, 0.08) 6px
    );
  mix-blend-mode: overlay;
}

.site-alter-layer-3 {
  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0) 0%,
      rgba(255, 255, 255, 0.16) 14%,
      rgba(0, 0, 0, 0.12) 28%,
      rgba(255, 255, 255, 0.1) 44%,
      rgba(0, 0, 0, 0.1) 62%,
      rgba(255, 255, 255, 0.12) 78%,
      rgba(255, 255, 255, 0) 100%
    );
  opacity: 0.55;
  filter: blur(0.4px);
}

.site-alter-flash {
  inset: 0;
  z-index: 2;
  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0) 0%,
      rgba(255, 255, 255, 0.16) 25%,
      rgba(255, 255, 255, 0) 52%,
      rgba(255, 255, 255, 0.12) 76%,
      rgba(255, 255, 255, 0) 100%
    );
  opacity: 0;
}

.site-alter-message {
  z-index: 10;
  top: 50%;
  left: 50%;
  width: min(88vw, 760px);
  padding: 0 16px;
  color: #7c0606;
  font-size: clamp(1.8rem, 3.2vw, 3rem);
  font-weight: 900;
  letter-spacing: 0.14em;
  line-height: 1.65;
  text-align: center;
  white-space: nowrap;
  opacity: 1;
  pointer-events: none;
  transform: translate(-50%, -50%);
  text-shadow:
    0 0 1px rgba(255, 255, 255, 0.45),
    0 0 3px rgba(255, 255, 255, 0.25),
    0 0 4px rgba(0, 0, 0, 1),
    0 0 10px rgba(0, 0, 0, 0.98),
    0 0 18px rgba(0, 0, 0, 0.95),
    0 3px 6px rgba(60, 0, 0, 0.95),
    0 0 16px rgba(120, 0, 0, 0.7);
}

.site-alter-message::before,
.site-alter-message::after {
  content: "サイトが改変されました。";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.site-alter-message::before {
  color: rgba(255, 220, 220, 0.22);
  transform: translate(2px, 0);
  mix-blend-mode: screen;
}

.site-alter-message::after {
  color: rgba(50, 0, 0, 0.42);
  transform: translate(-2px, 1px);
}

.site-alter-overlay.is-active .site-alter-layer-1 {
  animation: staticBandA 0.08s steps(2, end) infinite;
}

.site-alter-overlay.is-active .site-alter-layer-2 {
  animation: staticBandB 0.11s steps(3, end) infinite;
}

.site-alter-overlay.is-active .site-alter-layer-3 {
  animation: rollingBand 0.28s linear infinite;
}

.site-alter-overlay.is-active .site-alter-flash {
  animation: flashSweep 0.32s linear infinite;
}

body.is-shaking {
  animation: shake 0.2s ease;
}

body.phase-2 {
  --bg: #e8edf2;
  --paper: #f8f9fb;
  --ink: #1b2532;
  --muted: #5c6873;
  --line: #cbd3dc;
  filter: saturate(0.82);
}

body.phase-2 .site-header {
  background: rgba(237, 241, 245, 0.94);
}

body.phase-2 .hero-media::after {
  background: linear-gradient(90deg, rgba(14, 20, 28, 0.78), rgba(14, 20, 28, 0.35), rgba(14, 20, 28, 0.08));
}

body.phase-3 {
  --bg: #11161b;
  --paper: #171c22;
  --ink: #e5e8ec;
  --muted: #a2abb6;
  --line: #303944;
  --blue: #9ba8b7;
  --blue-deep: #d8dde4;
  --accent: #b92935;
  --danger: #ff5967;
  background: #11161b;
  filter: saturate(0.65);
}

body.phase-3::before {
  content: "";
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: -1;
  background: var(--dark-overlay-url, url("images/bg_dark_overlay_1920x1080.png")) center / cover, rgba(7, 8, 10, 0.8);
  opacity: 0.38;
}

body.phase-3 .site-header,
body.phase-3 .split,
body.phase-3 .notice-band {
  background: rgba(16, 20, 25, 0.94);
}

body.phase-3 .tour-image-wrap img,
body.phase-3 .contact img {
  filter: grayscale(0.25) contrast(1.08) brightness(0.72);
}

body.phase-3 .noise-flash {
  background-image: var(--noise-03-url, url("images/noise_03_1920x1080.png"));
  mix-blend-mode: screen;
}

body.final-page {
  background: #020305 var(--final-bg-url, url("images/final_bg_1600x900.png")) center / cover fixed;
  color: #fff;
}

body.final-page .site-header {
  background: rgba(5, 8, 12, 0.82);
  border-bottom-color: rgba(255, 255, 255, 0.14);
}

@keyframes noiseFlash {
  0%, 100% { opacity: 0; }
  20%, 70% { opacity: 0.75; }
}

@keyframes veil {
  0%, 100% { opacity: 0; }
  40%, 70% { opacity: 0.95; }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  30% { transform: translateX(-4px); }
  65% { transform: translateX(3px); }
}

@keyframes pulseText {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.25; }
}

@keyframes staticBandA {
  0% {
    opacity: 0.95;
    transform: translateY(-8px) scaleY(1.04);
  }
  50% {
    opacity: 0.7;
    transform: translateY(5px) scaleY(1.01);
  }
  100% {
    opacity: 0.92;
    transform: translateY(-3px) scaleY(1.05);
  }
}

@keyframes staticBandB {
  0% {
    opacity: 0.65;
    transform: translateX(-10px);
  }
  50% {
    opacity: 0.45;
    transform: translateX(12px);
  }
  100% {
    opacity: 0.7;
    transform: translateX(-6px);
  }
}

@keyframes rollingBand {
  0% {
    transform: translateY(-24%);
  }
  100% {
    transform: translateY(24%);
  }
}

@keyframes flashSweep {
  0% {
    opacity: 0;
    transform: translateY(-18%);
  }
  35% {
    opacity: 0.42;
  }
  100% {
    opacity: 0;
    transform: translateY(18%);
  }
}

@media (max-width: 980px) {
  .tour-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .split,
  .contact,
  .tour-detail-layout,
  .subpage-hero {
    grid-template-columns: 1fr;
  }

  .comment-list {
    grid-template-columns: 1fr;
  }

  .record-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tour-detail-sections {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .nav-links {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 4px;
    white-space: nowrap;
  }

  .debug-controls {
    width: 100%;
    margin-left: 0;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .debug-controls button {
    flex: 0 0 auto;
  }

  .site-alter-message {
    white-space: normal;
    letter-spacing: 0.08em;
    line-height: 1.5;
  }

  .hero {
    min-height: 82vh;
  }

  .tour-grid,
  .tour-detail-sections,
  .record-grid {
    grid-template-columns: 1fr;
  }

  .confirm-row {
    grid-template-columns: 1fr;
  }
}
