*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body.senpai-lp-horizontal {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

:root {
  --lp-floating-cta-height: 4rem;
  --lp-nav-bottom-offset: 0.85rem;
  --lp-swipe-bottom-offset: 4rem;
  --lp-nav-icon-width: min(6.5rem, 26vw);
  --lp-nav-icon-shift: 0.95rem;
}

.lp-horizontal {
  width: 100%;
  font-size: 18px;
  line-height: 1.7;
}

.lp-horizontal__brand {
  position: fixed;
  top: max(0.65rem, env(safe-area-inset-top));
  left: max(0.65rem, env(safe-area-inset-left));
  z-index: 55;
}

body.admin-bar .lp-horizontal__brand {
  top: calc(32px + max(0.65rem, env(safe-area-inset-top)));
}

/* TOP header-over-light と同系（#2d2d2d / text-lg / tracking-widest） */
.lp-horizontal__brand-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  max-width: min(26rem, calc(100vw - 1.25rem));
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text-color);
  font-family: var(--font-serif, serif);
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  line-height: 1.2;
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.2s ease, opacity 0.2s ease;
}

.lp-horizontal__brand-btn:hover {
  color: var(--brand-color);
}

.lp-horizontal__brand-logo {
  display: block;
  flex: 0 0 auto;
  width: auto;
  height: 4rem;
}

.lp-horizontal__brand-text {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
}

.lp-horizontal__brand-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lp-horizontal__brand-hint {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 1.125rem;
  height: 1.125rem;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  font-family: var(--font-sans, system-ui, sans-serif);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1;
  opacity: 0.88;
}

.lp-about-modal .first-timer-modal-title {
  margin-bottom: 0.75rem;
  font-size: clamp(1.25rem, 3.5vw, 1.65rem);
}

.lp-about-modal .first-timer-modal-text {
  font-size: 0.85rem;
  line-height: 1.7;
  text-align: left;
}

.lp-about-modal .first-timer-modal-text + .first-timer-modal-text {
  margin-top: 0.75rem;
}

.lp-horizontal__cards {
  display: flex;
  height: 100vh;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.lp-horizontal__cards::-webkit-scrollbar {
  display: none;
}

.lp-card {
  flex: 0 0 100%;
  min-height: 100%;
  scroll-snap-align: start;
  background: #fff;
  position: relative;
  overflow: hidden;
}

.lp-slide__inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 100%;
  margin: 0 auto;
  padding: 2rem 0 5.75rem;
  max-width: 28rem;
  text-align: center;
}

.lp-slide__headline {
  margin: 0 0 1.15rem;
  font-family: var(--font-serif, serif);
  font-size: clamp(1.3rem, 4.8vw, 1.9rem);
  font-weight: 500;
  line-height: 1.65;
  letter-spacing: 0.08em;
  color: var(--brand-color);
}

.lp-slide__sub {
  margin: 0 0 0.85rem;
  font-size: clamp(0.92rem, 3.4vw, 1.05rem);
  line-height: 1.85;
  letter-spacing: 0.06em;
  color: rgba(var(--brand-rgb), 0.82);
}

.lp-slide__body {
  margin: 0 0 0.25rem;
  width: min(100%, 20rem);
  text-align: left;
}

.lp-slide__body p {
  margin: 0 0 0.85rem;
  font-size: clamp(0.9rem, 3.2vw, 1rem);
  line-height: 1.85;
  letter-spacing: 0.05em;
  color: rgba(var(--brand-rgb), 0.88);
}

.lp-slide__body p:last-child {
  margin-bottom: 0;
}

.lp-slide__list {
  margin: 0 0 1.15rem;
  padding: 0 0 0 0.65rem;
  list-style: none;
  text-align: left;
  width: min(100%, 20rem);
}

.lp-slide__list li {
  position: relative;
  margin: 0 0 0.85rem;
  padding-left: 1.55em;
  font-size: clamp(0.88rem, 3.1vw, 0.98rem);
  line-height: 1.75;
  letter-spacing: 0.04em;
  color: rgba(var(--brand-rgb), 0.9);
}

.lp-slide__list li::before {
  content: "";
  position: absolute;
  left: 0.15em;
  top: 0.62em;
  width: 0.35em;
  height: 0.65em;
  border-right: 2px solid rgba(var(--brand-rgb), 0.78);
  border-bottom: 2px solid rgba(var(--brand-rgb), 0.78);
  box-sizing: border-box;
  transform: rotate(45deg) translateY(-50%);
  transform-origin: center;
}

.lp-slide__list li:last-child {
  margin-bottom: 0;
}

.lp-slide__list--center {
  width: fit-content;
  max-width: min(100%, 20rem);
  margin-left: auto;
  margin-right: auto;
}

.lp-slide__headline + .lp-slide__sub,
.lp-slide__list + .lp-slide__sub {
  margin-top: 1rem;
}

.lp-slide__sub:last-child {
  margin-bottom: 0;
}

/* Swipe hint: message + arrow */
.lp-slide__swipe {
  position: absolute;
  left: 50%;
  bottom: var(--lp-swipe-bottom-offset);
  z-index: 2;
  width: min(20rem, 84vw);
  margin: 0;
  text-align: center;
  transform: translateX(-50%);
  pointer-events: none;
}

.lp-slide__swipe-message {
  margin: 0 0 4px;
  font-size: clamp(12px, 3.4vw, 14px);
  line-height: 1.5;
  letter-spacing: 0.04em;
  color: rgba(var(--brand-rgb), 0.82);
}

.lp-slide__swipe-arrow {
  display: block;
  font-size: 24px;
  font-weight: 700;
  line-height: 1;
  color: rgba(var(--brand-rgb), 0.72);
  animation: lpSwipeHintArrow 1.5s ease-in-out infinite;
}

.lp-slide__swipe--down .lp-slide__swipe-arrow {
  font-size: 22px;
  animation-name: lpSwipeHintArrowDown;
}

/* Slides 01–05: cream overlay (same as .first-timer-modal-panel) */
.lp-slide-01,
.lp-slide-02,
.lp-slide-03,
.lp-slide-04,
.lp-slide-05 {
  background:
    linear-gradient(rgba(250, 249, 246, 0.88), rgba(250, 249, 246, 0.88)),
    var(--lp-slide-bg-image) center center / cover no-repeat;
  color: var(--brand-color);
}

.lp-slide-01 {
  --lp-slide-bg-image: url("../img/lp-slide-01-bg.webp");
}

.lp-slide-02 {
  --lp-slide-bg-image: url("../img/lp-slide-02-bg.webp");
}

.lp-slide-03 {
  --lp-slide-bg-image: url("../img/lp-slide-03-bg.webp");
}

.lp-slide-04 {
  --lp-slide-bg-image: url("../img/lp-slide-04-bg.webp");
}

.lp-slide-05 {
  --lp-slide-bg-image: url("../img/lp-slide-05-bg.webp");
}

.lp-horizontal__nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: calc(var(--lp-nav-bottom-offset) + env(safe-area-inset-bottom));
  z-index: 50;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0 0.75rem;
  pointer-events: none;
}

.lp-horizontal__nav-btn,
.lp-horizontal__nav-fv,
.lp-horizontal__nav-cta {
  flex: 0 0 auto;
  width: var(--lp-nav-icon-width);
  padding: 0;
  border: 0;
  background: transparent;
  line-height: 0;
  transform: translateY(var(--lp-nav-icon-shift));
}

.lp-horizontal__nav-btn {
  cursor: pointer;
  pointer-events: auto;
  opacity: 1;
  transition: opacity 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.lp-horizontal__nav-fv,
.lp-horizontal__nav-cta {
  pointer-events: none;
  display: block;
}

.lp-horizontal__nav-fv[hidden],
.lp-horizontal__nav-cta[hidden] {
  display: none;
}

.lp-horizontal__nav-btn img,
.lp-horizontal__nav-fv img,
.lp-horizontal__nav-cta img {
  display: block;
  width: 100%;
  height: auto;
  transform: translateY(0);
  filter:
    drop-shadow(0 3px 6px rgba(0, 35, 70, 0.16))
    drop-shadow(0 10px 22px rgba(0, 28, 56, 0.22));
  transition: filter 0.2s ease, transform 0.15s ease;
}

/* 最終スライドの CTA キャラだけ軽くブルブル（進むボタンの代わりに表示時） */
.lp-horizontal__nav-cta:not([hidden]) img {
  transform-origin: 50% 90%;
  animation: lpCtaIconWiggle 1.4s ease-in-out infinite;
  transition: filter 0.2s ease;
}

@keyframes lpCtaIconWiggle {
  0%,
  100% {
    transform: rotate(0deg);
  }
  25% {
    transform: rotate(-1.5deg);
  }
  50% {
    transform: rotate(1.5deg);
  }
  75% {
    transform: rotate(-1deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .lp-horizontal__nav-cta:not([hidden]) img {
    animation: none;
  }
}

@media (hover: hover) {
  .lp-horizontal__nav-btn:hover:not(:disabled) img {
    transform: translateY(-2px);
    filter:
      drop-shadow(0 5px 10px rgba(0, 35, 70, 0.18))
      drop-shadow(0 14px 28px rgba(0, 28, 56, 0.28));
  }
}

.lp-horizontal__nav-btn:active:not(:disabled) img {
  transform: translateY(2px) scale(0.98);
  filter:
    drop-shadow(0 1px 2px rgba(0, 28, 56, 0.1))
    drop-shadow(0 4px 10px rgba(0, 28, 56, 0.14));
}

.lp-horizontal__nav-btn:disabled {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

body.senpai-lp-horizontal .lp-floating-cta-sp {
  background: #fff;
  border-top: 1px solid #d8e3ef;
}

body.senpai-lp-horizontal .lp-floating-cta-sp a {
  min-height: 4rem;
  gap: 0.35rem;
  padding-top: 0.6rem;
  padding-bottom: 0.65rem;
  border-top: 0 !important;
}

body.senpai-lp-horizontal .lp-floating-cta-sp a + a {
  border-left: 1px solid #c9decd;
}

body.senpai-lp-horizontal .lp-floating-cta-sp a span {
  font-size: 12px;
  line-height: 1.25;
  letter-spacing: 0.01em;
}

body.senpai-lp-horizontal .lp-floating-cta-sp a svg {
  width: 1.25rem;
  height: 1.25rem;
}

body.senpai-lp-horizontal .lp-floating-cta-sp a:first-child {
  background: #dcecff;
  color: #123d69;
}

body.senpai-lp-horizontal .lp-floating-cta-sp a:first-child span,
body.senpai-lp-horizontal .lp-floating-cta-sp a:first-child svg {
  color: #123d69;
}

body.senpai-lp-horizontal .lp-floating-cta-sp a:last-child {
  background: #dcf7e8;
  color: #185c35;
}

body.senpai-lp-horizontal .lp-floating-cta-sp a:last-child span,
body.senpai-lp-horizontal .lp-floating-cta-sp a:last-child svg {
  color: #185c35 !important;
  fill: currentColor;
}

@keyframes lpSwipeHintArrow {
  0% {
    transform: translateX(-6px);
    opacity: 0.25;
  }
  50% {
    transform: translateX(2px);
    opacity: 1;
  }
  100% {
    transform: translateX(8px);
    opacity: 0.1;
  }
}

@keyframes lpSwipeHintArrowDown {
  0% {
    transform: translateY(-6px);
    opacity: 0.25;
  }
  50% {
    transform: translateY(2px);
    opacity: 1;
  }
  100% {
    transform: translateY(8px);
    opacity: 0.1;
  }
}

@media (max-width: 782px) {
  body.admin-bar .lp-horizontal__brand {
    top: calc(46px + max(0.65rem, env(safe-area-inset-top)));
  }
}

@media (max-width: 767.98px) {
  .lp-horizontal {
    font-size: 17px;
  }

  .lp-slide__inner {
    padding-bottom: 3.5rem;
    max-width: 22rem;
  }

  :root {
    --lp-swipe-bottom-offset: 4.75rem;
    --lp-nav-bottom-offset: 1.05rem;
  }

  .lp-slide__swipe {
    width: min(18rem, 80vw);
  }

  .lp-horizontal__cards {
    height: calc(100vh - var(--lp-floating-cta-height) - env(safe-area-inset-bottom));
    height: calc(100dvh - var(--lp-floating-cta-height) - env(safe-area-inset-bottom));
  }

  .lp-horizontal__nav {
    bottom: calc(
      var(--lp-floating-cta-height) + var(--lp-nav-bottom-offset) + env(safe-area-inset-bottom)
    );
  }
}

@media (min-width: 768px) {
  .lp-horizontal__brand-logo {
    height: 4.75rem;
  }

  .lp-slide__inner {
    padding: 2.5rem 0 5.5rem;
    max-width: 32rem;
  }

  .lp-slide__headline {
    margin-bottom: 1.35rem;
    font-size: clamp(1.55rem, 2.6vw, 2.1rem);
  }

  :root {
    --lp-swipe-bottom-offset: 4.15rem;
    --lp-nav-bottom-offset: 1.15rem;
    --lp-nav-icon-shift: 1.05rem;
  }

  .lp-horizontal__nav {
    --lp-nav-icon-width: min(7.75rem, 15vw);
    padding: 0 1.5rem;
  }
}
