:root {
  color-scheme: dark;
  --bg: #5a5a5a;
  --ink: #f5f5f5;
  --card: #ffffff;
  --card-ink: #111111;
  --muted: #7a7a7a;
  --line: #d0d0d0;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
}

body {
  font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic Medium", "YuGothic", Meiryo, sans-serif;
  background: var(--bg);
  color: var(--ink);
  min-height: 100dvh;
}

main {
  min-height: 100dvh;
  max-width: 480px;
  margin: 0 auto;
  padding:
    max(22px, env(safe-area-inset-top))
    20px
    max(28px, env(safe-area-inset-bottom));
}

.back {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  margin: 0 0 8px;
  padding: 0 2px;
  color: var(--ink);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-decoration: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  animation: rise 0.45s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.back .chevron {
  width: 8px;
  height: 8px;
  border-top: 2px solid #ffffff;
  border-right: 2px solid #ffffff;
  transform: rotate(-135deg);
}

.back:active {
  opacity: 0.7;
}

.back:focus-visible {
  outline: 3px solid #ffffff;
  outline-offset: 3px;
}

h1 {
  margin: 22px 0 0;
  font-size: 32px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: 0.08em;
  animation: rise 0.55s cubic-bezier(0.16, 1, 0.3, 1) 0.06s both;
}

h1::after {
  content: "";
  display: block;
  width: 42px;
  height: 2px;
  margin-top: 14px;
  background: #ffffff;
  transform-origin: left center;
  animation: draw 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.18s both;
}

.card,
.map-frame {
  animation: rise 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
}

.card {
  margin-top: 28px;
  min-height: 72px;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
}

.mark {
  position: relative;
  width: 34px;
  height: 34px;
  border: 2px solid #111111;
  border-radius: 50%;
}

.mark::before,
.mark::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  background: #111111;
  border-radius: 1px;
  transform: translate(-50%, -50%);
}

.mark::before {
  width: 14px;
  height: 2px;
}

.mark::after {
  width: 2px;
  height: 14px;
}

.map-frame {
  position: relative;
  height: min(58vh, 480px);
  margin-top: 28px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background-color: #f4f4f4;
  background-image:
    linear-gradient(rgba(90, 90, 90, 0.16) 1px, transparent 1px),
    linear-gradient(90deg, rgba(90, 90, 90, 0.16) 1px, transparent 1px);
  background-size: 32px 32px;
}

.map-pin {
  width: 34px;
  height: 48px;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 56'%3E%3Cpath d='M20 53C20 53 4 34 4 20.5a16 16 0 0 1 32 0C36 34 20 53 20 53z' fill='%23111111' stroke='%23ffffff' stroke-width='3' stroke-linejoin='round'/%3E%3Ccircle cx='20' cy='20.5' r='6' fill='%23ffffff'/%3E%3C/svg%3E") center / contain no-repeat;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.55));
  transform: translate(-50%, calc(-100% + 2px));
  pointer-events: none;
}

.pin,
.pulse {
  position: absolute;
  left: 50%;
  top: 46%;
  border-radius: 50%;
}

.pin {
  width: 10px;
  height: 10px;
  margin: -5px 0 0 -5px;
  background: #111111;
}

.pulse {
  width: 18px;
  height: 18px;
  margin: -9px 0 0 -9px;
  border: 2px solid #111111;
  animation: pulse 1.8s ease-out infinite;
}

.schedule {
  margin-top: 28px;
  display: grid;
  grid-template-columns: 16px 1fr;
  column-gap: 14px;
  align-items: start;
  animation: rise 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.16s both;
}

.line {
  position: relative;
  width: 2px;
  height: 86px;
  margin: 18px auto 0;
  background: rgba(255, 255, 255, 0.78);
  transform-origin: top;
  animation: grow 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.22s both;
}

.line::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -7px;
  width: 12px;
  height: 12px;
  margin-left: -7px;
  border: 2px solid #ffffff;
  border-radius: 50%;
  background: var(--bg);
}

.schedule .card {
  margin-top: 0;
  animation: none;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes draw {
  from {
    opacity: 0;
    transform: scaleX(0);
  }
  to {
    opacity: 1;
    transform: scaleX(1);
  }
}

@keyframes grow {
  from { transform: scaleY(0); }
  to { transform: scaleY(1); }
}

@keyframes pulse {
  0% {
    transform: scale(0.7);
    opacity: 0.75;
  }
  100% {
    transform: scale(2.6);
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
  }
}
