:root {
  --red: #d90d12;
  --red-dark: #b6080d;
  --ink: #111111;
  --muted: #66615b;
  --paper: #fffdf9;
  --line: #e8ded0;
  --gold: #c99a34;
  --shadow: 0 10px 28px rgba(17, 17, 17, 0.12);
  --app-height: 100svh;
  --slide-bottom-buffer: max(26px, env(safe-area-inset-bottom));
  --slide-header-clearance: max(76px, calc(env(safe-area-inset-top) + 76px));
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 50% -10%, rgba(217, 13, 18, 0.18), transparent 32rem),
    #141414;
  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "Hiragino Sans",
    "Hiragino Kaku Gothic ProN",
    "Yu Gothic",
    Meiryo,
    sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.app-shell {
  position: relative;
  width: min(100vw, 430px);
  height: var(--app-height);
  margin: 0 auto;
  overflow: hidden;
  background: #ffffff;
  isolation: isolate;
}

.site-header {
  position: absolute;
  top: max(10px, env(safe-area-inset-top));
  right: 12px;
  left: 12px;
  z-index: 20;
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 6px 6px 10px;
  border: 1px solid rgba(17, 17, 17, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 8px 24px rgba(17, 17, 17, 0.11);
  backdrop-filter: blur(14px);
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.app-shell[data-active="slide-1"] .site-header {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
}

.brand-mini {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  align-items: center;
  gap: 8px;
}

.brand-logo {
  display: block;
  width: min(244px, 100%);
  height: 34px;
  object-fit: contain;
  object-position: left center;
}

.menu-toggle {
  display: flex;
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  flex-direction: column;
  gap: 5px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #ffffff;
  background: linear-gradient(180deg, #ef171d, var(--red-dark));
  box-shadow: 0 5px 14px rgba(217, 13, 18, 0.24);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 17px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transition:
    transform 180ms ease,
    opacity 180ms ease;
}

.app-shell[data-menu="open"] .menu-toggle span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.app-shell[data-menu="open"] .menu-toggle span:nth-child(2) {
  opacity: 0;
}

.app-shell[data-menu="open"] .menu-toggle span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.menu-toggle:focus-visible {
  outline: 3px solid rgba(217, 13, 18, 0.35);
  outline-offset: 2px;
}

.menu-panel {
  position: absolute;
  top: calc(max(10px, env(safe-area-inset-top)) + 58px);
  right: 12px;
  left: 12px;
  z-index: 19;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(17, 17, 17, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 16px 42px rgba(17, 17, 17, 0.18);
  backdrop-filter: blur(16px);
}

.menu-panel[hidden] {
  display: none;
}

.menu-panel a {
  display: flex;
  min-width: 0;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 10px 8px;
  border: 1px solid rgba(217, 13, 18, 0.16);
  border-radius: 8px;
  color: #201c19;
  background: #ffffff;
  font-size: 13px;
  font-weight: 850;
  line-height: 1.1;
  text-align: center;
  text-decoration: none;
}

.menu-panel a:focus-visible {
  outline: 3px solid rgba(217, 13, 18, 0.35);
  outline-offset: 2px;
}

.snap-track {
  height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
}

.snap-track::-webkit-scrollbar {
  display: none;
}

.slide {
  position: relative;
  display: grid;
  width: 100%;
  height: 100%;
  min-height: 100%;
  overflow: hidden;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  background: #ffffff;
}

.image-slide {
  --slide-top-buffer: 0px;
  place-items: center;
}

.image-slide:not(#slide-1) {
  --slide-top-buffer: var(--slide-header-clearance);
}

.image-slide img {
  position: absolute;
  top: var(--slide-top-buffer);
  right: 0;
  bottom: var(--slide-bottom-buffer);
  left: 0;
  display: block;
  width: 100%;
  height: calc(100% - var(--slide-top-buffer) - var(--slide-bottom-buffer));
  object-fit: contain;
  object-position: center;
  background: #ffffff;
  user-select: none;
  -webkit-user-drag: none;
}

.tap-zone {
  position: absolute;
  right: 5%;
  bottom: calc(var(--slide-bottom-buffer) + 4px);
  left: 5%;
  height: 12%;
  border-radius: 999px;
  z-index: 2;
}

.tap-zone:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: -8px;
}

.progress-rail {
  position: absolute;
  top: 50%;
  right: max(8px, env(safe-area-inset-right));
  z-index: 8;
  display: grid;
  gap: 8px;
  padding: 7px 5px;
  border: 1px solid rgba(17, 17, 17, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 8px 24px rgba(17, 17, 17, 0.12);
  backdrop-filter: blur(12px);
  transform: translateY(-50%);
}

.progress-rail button {
  width: 9px;
  height: 9px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(17, 17, 17, 0.24);
  cursor: pointer;
  transition:
    height 180ms ease,
    background 180ms ease,
    transform 180ms ease;
}

.progress-rail button.is-active {
  height: 22px;
  border-radius: 999px;
  background: var(--red);
  transform: scale(1.02);
}

.progress-rail button:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 3px;
}

.app-shell[data-active="access"] .progress-rail {
  opacity: 0.18;
  pointer-events: none;
}

.access-slide {
  display: block;
  padding:
    max(74px, calc(env(safe-area-inset-top) + 74px))
    14px
    max(14px, env(safe-area-inset-bottom));
  background:
    linear-gradient(180deg, rgba(217, 13, 18, 0.06), transparent 22%),
    var(--paper);
}

.access-content {
  display: grid;
  height: 100%;
  grid-template-rows: auto auto auto minmax(105px, 1fr) auto auto;
  gap: 8px;
}

.access-head {
  padding-right: 24px;
}

.access-head h2 {
  margin: 0;
  font-family:
    "Hiragino Mincho ProN",
    "Yu Mincho",
    YuMincho,
    serif;
  font-size: clamp(34px, 10vw, 48px);
  line-height: 1.04;
  letter-spacing: 0;
}

.lead {
  display: grid;
  gap: 2px;
  margin: 7px 0 0;
  font-size: 14px;
  line-height: 1.45;
}

.lead strong {
  font-size: 15px;
}

.lead span {
  color: var(--red-dark);
  font-weight: 800;
}

.info-list {
  display: grid;
  gap: 7px;
}

.info-card {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 9px;
  align-items: start;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 4px 14px rgba(17, 17, 17, 0.05);
}

.info-card h3 {
  margin: 0 0 2px;
  color: var(--red-dark);
  font-size: 13px;
  line-height: 1.25;
}

.info-card p {
  margin: 0;
  color: #201c19;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.45;
}

.icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(217, 13, 18, 0.26);
  border-radius: 50%;
  color: var(--red);
  background: #ffffff;
}

.icon svg,
.action-button svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.action-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.action-button {
  display: inline-flex;
  min-width: 0;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 8px;
  border: 1px solid rgba(217, 13, 18, 0.2);
  border-radius: 999px;
  color: var(--red-dark);
  background: #ffffff;
  box-shadow: 0 5px 14px rgba(17, 17, 17, 0.08);
  font-size: 13px;
  font-weight: 850;
  line-height: 1;
  text-align: center;
  text-decoration: none;
}

.action-button.primary {
  color: #ffffff;
  border-color: var(--red);
  background: linear-gradient(180deg, #ef171d, var(--red-dark));
}

.action-button.wide {
  grid-column: 1 / -1;
}

.action-button:focus-visible {
  outline: 3px solid rgba(217, 13, 18, 0.35);
  outline-offset: 2px;
}

.map-wrap {
  min-height: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f4efe8;
  box-shadow: var(--shadow);
}

.map-wrap iframe {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 120px;
  border: 0;
}

.line-cta {
  display: inline-flex;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  border: 2px solid #ffffff;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(180deg, #ef171d, var(--red-dark));
  box-shadow:
    0 10px 24px rgba(217, 13, 18, 0.24),
    0 2px 0 rgba(255, 255, 255, 0.8) inset;
  font-size: 15px;
  font-weight: 900;
  line-height: 1;
  text-align: center;
  text-decoration: none;
}

.line-cta svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.line-cta:focus-visible {
  outline: 3px solid rgba(217, 13, 18, 0.35);
  outline-offset: 2px;
}

.site-footer {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  line-height: 1;
  text-align: center;
}

.site-footer small {
  font-size: inherit;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (min-width: 520px) {
  body {
    display: grid;
    min-height: 100%;
    place-items: center;
    padding: 20px;
  }

  .app-shell {
    height: min(max(calc(var(--app-height) - 40px), 560px), 920px);
    border-radius: 28px;
    box-shadow:
      0 24px 70px rgba(0, 0, 0, 0.42),
      0 0 0 1px rgba(255, 255, 255, 0.08);
  }
}

@media (min-width: 900px) {
  @keyframes logo-float-left {
    0% {
      transform: translate3d(0, 0, 0);
    }

    50% {
      transform: translate3d(0, 18px, 0);
    }

    100% {
      transform: translate3d(0, 0, 0);
    }
  }

  @keyframes logo-float-right {
    0% {
      transform: translate3d(0, 0, 0);
    }

    50% {
      transform: translate3d(0, -16px, 0);
    }

    100% {
      transform: translate3d(0, 0, 0);
    }
  }

  body {
    position: relative;
    display: block;
    min-height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 0 0 72px;
    background: #ffffff;
  }

  body::before,
  body::after {
    position: fixed;
    z-index: 0;
    border: 0;
    border-radius: 0;
    background-image: url("assets/header-logo.png");
    background-repeat: no-repeat;
    background-size: contain;
    content: "";
    opacity: 0.05;
    pointer-events: none;
  }

  body::before {
    top: 18vh;
    left: max(32px, calc((100vw - 760px) / 2 - 300px));
    width: 240px;
    height: 33px;
    animation: logo-float-left 16s ease-in-out infinite;
  }

  body::after {
    right: max(32px, calc((100vw - 760px) / 2 - 300px));
    bottom: 16vh;
    width: 240px;
    height: 33px;
    animation: logo-float-right 18s ease-in-out infinite;
  }

  .app-shell {
    position: relative;
    z-index: 1;
    width: min(760px, calc(100vw - 48px));
    height: auto;
    min-height: auto;
    margin: 0 auto;
    padding: 0 0 56px;
    overflow: visible;
    border-radius: 0;
    background: #ffffff;
    box-shadow: none;
  }

  .site-header {
    position: fixed;
    top: 18px;
    right: auto;
    left: 50%;
    width: min(720px, calc(100vw - 48px));
    margin: 0;
    transform: translateX(-50%);
  }

  .app-shell[data-active="slide-1"] .site-header {
    opacity: 0;
    pointer-events: none;
    transform: translateX(-50%) translateY(-8px);
  }

  .menu-panel {
    position: fixed;
    top: 84px;
    right: auto;
    left: 50%;
    width: min(720px, calc(100vw - 48px));
    margin: 0;
    transform: translateX(-50%);
  }

  .snap-track {
    height: auto;
    overflow: visible;
    scroll-snap-type: none;
    overscroll-behavior-y: auto;
  }

  .slide {
    display: block;
    height: auto;
    min-height: 0;
    margin: 0 auto 34px;
    overflow: visible;
    scroll-margin-top: 96px;
    scroll-snap-align: none;
    scroll-snap-stop: normal;
  }

  .image-slide,
  .image-slide:not(#slide-1) {
    --slide-top-buffer: 0px;
  }

  .image-slide img {
    position: static;
    width: min(100%, 720px);
    height: auto;
    margin: 0 auto;
    border: 1px solid rgba(17, 17, 17, 0.06);
    border-radius: 0;
    box-shadow: 0 18px 44px rgba(17, 17, 17, 0.08);
  }

  .tap-zone {
    right: 6%;
    bottom: 24px;
    left: 6%;
    height: 8%;
  }

  .progress-rail {
    display: none;
  }

  .access-slide {
    padding: 44px 0 0;
    background: #ffffff;
  }

  .access-content {
    width: min(100%, 720px);
    height: auto;
    margin: 0 auto;
    grid-template-rows: none;
  }

  .map-wrap {
    min-height: 320px;
  }

  .map-wrap iframe {
    min-height: 320px;
  }

  .line-cta {
    width: 100%;
  }
}

@media (max-width: 899px) and (max-height: 700px) {
  .access-slide {
    padding-top: max(64px, calc(env(safe-area-inset-top) + 64px));
    padding-bottom: max(10px, env(safe-area-inset-bottom));
  }

  .access-content {
    gap: 7px;
    grid-template-rows: auto auto auto minmax(78px, 1fr) auto auto;
  }

  .access-head h2 {
    font-size: 32px;
  }

  .lead {
    margin-top: 5px;
    font-size: 12px;
  }

  .lead strong {
    font-size: 13px;
  }

  .info-card {
    grid-template-columns: 30px minmax(0, 1fr);
    gap: 7px;
    padding: 7px 8px;
  }

  .info-card p {
    font-size: 11px;
    line-height: 1.38;
  }

  .icon {
    width: 30px;
    height: 30px;
  }

  .action-button {
    min-height: 40px;
    font-size: 12px;
  }

  .map-wrap iframe {
    min-height: 78px;
  }

  .line-cta {
    min-height: 42px;
    padding: 9px 12px;
    font-size: 13px;
  }

  .line-cta svg {
    width: 19px;
    height: 19px;
  }
}
