/* ガイドアニメーション用のスタイル */
#guide-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  opacity: 1;
  transition: opacity 0.5s ease;
}

#guide-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

#guide-animation-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: absolute;
  top: 172px;
  left: 0;
  right: 0;
}

#guide-animation-canvas {
  max-width: 80vw;
  height: auto;
  margin-top: 96px;
}

#guide-animation-container #guide-animation-image {
  width: 280px;
  height: 280px;
  object-fit: contain;
  margin-top: 96px !important;
}

#guide-message {
  color: white;
  font-size: 16px;
  text-align: center;
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;
  line-height: 1.6;
  padding: 0 20px;
  max-width: 320px;
}

/* キャプチャーモード切り替えボタン用のスタイル */
#capture-mode-toggle {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  display: flex;
  gap: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
}

#capture-mode-toggle.visible {
  opacity: 1;
  pointer-events: auto;
}

.mode-button {
  min-width: 88px;
  padding: 12px 20px;
  border: none;
  border-radius: 24px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;
  background: #d8d8db;
  color: #757578;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  position: relative;
}

.mode-button.active {
  color: #fff;
  border: 1px solid #4b4b4b;
  background: #000;
}

.prompt-box-8w .prompt-button-container-8w .button-primary-8w {
  background-color: #000 !important;
  color: #fff !important;
}

.recorder-container {
  bottom: 20vmin !important;
}

#actionButton {
  background-color: #000 !important;
}

/* コントロールボタン (Help & Reset) */
#control-buttons {
  position: fixed;
  top: 28px;
  left: 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 28;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

#control-buttons.visible {
  opacity: 1;
  pointer-events: auto;
}

.control-button {
  width: 40px;
  height: 40px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  transition:
    transform 0.2s ease,
    opacity 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.control-button:hover {
  transform: scale(1.1);
  opacity: 0.8;
}

.control-button:active {
  transform: scale(0.95);
}

.control-button svg {
  width: 40px;
  height: 40px;
  display: block;
}

/* ヘルプモーダル */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0);
  z-index: 10001;
  justify-content: center;
  align-items: center;
  opacity: 0;
}

.modal.visible {
  display: flex;
  animation: fadeIn 0.3s ease forwards;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    background-color: rgba(0, 0, 0, 0);
  }
  to {
    opacity: 1;
    background-color: rgba(0, 0, 0, 0.8);
  }
}

.modal-content {
  position: relative;
  max-width: 90%;
  max-height: 90%;
  display: flex;
  flex-direction: column;
  align-items: center;
  opacity: 0;
  transform: scale(0.9);
}

.modal.visible .modal-content {
  animation: fadeInScale 0.3s ease 0.1s forwards;
}

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.modal-background {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
}

.modal-close-button {
  position: absolute;
  bottom: 38px;
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  padding: 15px 41px 13.822px 25px;
  align-items: center;
  gap: 19.822px;
  background: #474e5d;
  border: none;
  border-radius: 60px;
  cursor: pointer;
  transition: all 0.2s ease;

  color: #fff;
  text-align: center;
  font-family:
    "Prada Typeface",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  font-size: 16px;
  font-style: normal;
  font-weight: 400;
  line-height: 21.432px;
}

.modal-close-button:hover {
  background-color: #5a5f6d;
  transform: translateX(-50%) scale(1.05);
}

.modal-close-button:active {
  transform: translateX(-50%) scale(0.95);
}

.modal-close-button svg {
  width: 18px;
  height: 18px;
}

.modal-close-button .close-text {
  width: auto;
  height: auto;
  display: block;
}

/* Landing page */
.landing-body {
  margin: 0;
  min-height: 100vh;
  background: url("../img/bg.jpg") no-repeat top center / cover;
  background-color: #080808;
  color: #f7f7f7;
  font-family:
    "Helvetica Neue", Arial, "Hiragino Sans", "Noto Sans JP", sans-serif;
  display: flex;
  justify-content: center;
}

.landing-shell {
  --landing-pad: 22px;
  width: 100%;
  max-width: 460px;
  padding: 48px var(--landing-pad) 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.landing-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      180deg,
      rgba(0, 0, 0, 0.15) 0%,
      rgba(0, 0, 0, 0.65) 35%,
      #0d0d0f 100%
    ),
    radial-gradient(
      circle at 50% 0%,
      rgba(255, 255, 255, 0.08),
      transparent 45%
    );
  z-index: 0;
}

.landing-shell > * {
  position: relative;
  z-index: 1;
}

.landing-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 38px;
  margin-bottom: 26px;
}

.landing-logo {
  width: 100px;
  height: auto;
}

.landing-title {
  width: 156px;
  height: auto;
}

.landing-lede {
  margin: 0 auto 30px;
  line-height: 1.8;
  font-size: 14px;
  color: #e4e5ea;
  white-space: nowrap;
  padding: 0 10px;
}

.card-grid {
  display: flex;
  gap: 18px;
  justify-content: center;
  margin: 0 auto 22px;
  flex-wrap: nowrap;
}

.ar-card {
  flex: 0 0 auto;
  min-width: 160px;
  max-width: 200px;
  text-decoration: none;
  color: #f7f7f7;
  box-shadow: 0 18px 30px rgba(0, 0, 0, 0.35);
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  background: transparent;
  border: none;
}

.ar-card:hover,
.ar-card:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 24px 36px rgba(0, 0, 0, 0.4);
  outline: none;
}

.card-visual {
  width: 100%;
  max-width: 170px;
  object-fit: contain;
}

.landing-note {
  margin: 6px auto 30px;
  color: #d1d2d6;
  font-size: 12px;
}

.env-section {
  padding: 18px var(--landing-pad);
  margin: 8px 0 0;
}

.env-heading {
  position: relative;
  margin: 0 0 24px;
  padding: 10px var(--landing-pad);
  font-size: 12px;
  letter-spacing: 0.12em;
  color: #e7e8ec;
  overflow: visible;
}

.env-heading::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: calc(-1 * (50vw - 50%));
  right: calc(-1 * (50vw - 50%));
  border-top: 1px solid #666666;
  border-bottom: 1px solid #666666;
  pointer-events: none;
}

.env-block {
  margin-bottom: 14px;
}

.env-term {
  font-size: 12px;
  color: #c4c6cc;
  margin-bottom: 4px;
}

.env-detail {
  font-size: 12px;
  line-height: 1.6;
  color: #f3f3f5;
}

.env-footnote {
  margin: 16px 0 0;
  font-size: 11px;
  color: #c4c6cc;
  line-height: 1.6;
}

@media (max-width: 420px) {
  .landing-shell {
    --landing-pad: 18px;
    padding: 36px var(--landing-pad) 64px;
  }

  .card-grid {
    gap: 10px;
  }

  .ar-card {
    min-width: 0;
    width: calc((100vw - 36px - 10px) / 2);
    max-width: 170px;
  }

  .card-visual {
    max-width: 100%;
  }

  .env-section {
    margin-left: 0;
    margin-right: 0;
  }
}

@media (max-width: 375px) {
  .landing-lede {
    font-size: 3.5vw;
  }
}

/* LINE App Open Banner */
.line-banner {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  z-index: 10000;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.line-banner.visible {
  display: flex;
}

.line-banner-content {
  background: linear-gradient(145deg, #1a1a1a, #0d0d0d);
  border-radius: 20px;
  padding: 32px 24px;
  max-width: 320px;
  width: 100%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.line-banner-icon {
  width: 64px;
  height: 64px;
  margin-bottom: 20px;
}

.line-banner-title {
  font-size: 18px;
  font-weight: 600;
  color: #fff;
  margin: 0 0 12px;
  line-height: 1.4;
}

.line-banner-text {
  font-size: 14px;
  color: #a0a0a0;
  margin: 0 0 24px;
  line-height: 1.6;
}

.line-banner-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #06C755;
  color: #fff;
  text-decoration: none;
  padding: 14px 32px;
  border-radius: 30px;
  font-size: 16px;
  font-weight: 600;
  transition: all 0.2s ease;
  box-shadow: 0 4px 16px rgba(6, 199, 85, 0.3);
}

.line-banner-button:hover,
.line-banner-button:active {
  background: #05b34c;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(6, 199, 85, 0.4);
}

.line-banner-button svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.line-banner-skip {
  display: block;
  margin-top: 16px;
  color: #666;
  font-size: 13px;
  text-decoration: underline;
  cursor: pointer;
  background: none;
  border: none;
  padding: 8px;
}

.line-banner-skip:hover {
  color: #888;
}
