@import url("https://fonts.googleapis.com/css2?family=DM+Mono&family=Noto+Sans+JP:wght@400;500;600;700&display=swap");
:root {
  --ink: #16365c;
  --blue: #1967b3;
  --sky: #d9ecff;
  --paper: #f5f8fc;
  --line: #c8d4df;
  --muted: #667a8e;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Noto Sans JP", sans-serif;
}
button {
  font: inherit;
  cursor: pointer;
}
.app-shell {
  min-height: calc(100dvh - 45px);
  max-width: 680px;
  margin: 0 auto;
  padding: clamp(24px, 6vw, 56px) 24px 28px;
}
.view {
  min-height: 100%;
  display: flex;
  flex-direction: column;
}
.view[hidden],
.selection-overlay[hidden],
.notice-overlay[hidden] {
  display: none;
}
.hero {
  padding-top: clamp(28px, 4vh, 86px);
}
.eyebrow {
  margin: 0 0 13px;
  color: var(--blue);
  font:
    12px "DM Mono",
    monospace;
  letter-spacing: 0.12em;
}
h1 {
  display: flex;
  flex-direction: column;
  margin: 0;
  font-size: clamp(40px, 16vw, 60px);
  line-height: 0.78;
  letter-spacing: -0.05em;
}
h1 strong {
  margin-top: 15px;
  color: var(--blue);
}
.lead {
  margin: 20px 0 0;
  font-size: 15px;
  font-weight: 500;
}
.route-form {
  margin-top: clamp(46px, 6vh, 84px);
}
.location-field label {
  display: block;
  margin-bottom: 10px;
  font-size: 14px;
  font-weight: 700;
}
.select-trigger {
  width: 100%;
  min-height: 62px;
  margin: 4px 0 clamp(12px, 2vh, 24px);
  padding: 12px 45px 12px 17px;
  position: relative;
  color: var(--ink);
  text-align: left;
  background: #fff;
  border: 1px solid var(--ink);
  border-radius: 3px;
}
.select-trigger::after {
  content: "＋";
  position: absolute;
  top: 17px;
  right: 16px;
  font-size: 22px;
}
.select-trigger.is-selected {
  font-weight: 700;
}
.form-message {
  min-height: 20px;
  margin: 17px 0 -4px;
  color: #a13f36;
  font-size: 13px;
}
.go-button {
  width: 100%;
  min-height: 61px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
  padding: 0 20px;
  color: #fff;
  background: var(--blue);
  border: 1px solid var(--ink);
  border-radius: 3px;
  font-size: 18px;
  font-weight: 700;
}
.go-button span {
  font-size: 25px;
}
.loading-view {
  position: fixed;
  inset: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
}
.spinner {
  width: 70px;
  height: 70px;
  border: 5px solid #cbddec;
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin 0.85s linear infinite;
}
.loading-view p {
  margin-top: 25px;
  font-weight: 600;
}
.guide-view {
  padding-bottom: 20px;
}
.guide-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}
.route-change-button {
  min-height: 44px;
  padding: 0 14px;
  flex: none;
  color: #fff;
  background: var(--blue);
  border: 1px solid var(--ink);
  border-radius: 3px;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}
.guide-context {
  min-width: 0;
  text-align: right;
}
.guide-context p {
  margin: 0;
}
.guide-context #progress-label {
  color: var(--muted);
  font:
    15px "DM Mono",
    monospace;
  letter-spacing: 0.04em;
}
.destination-label {
  margin-top: 4px !important;
  overflow-wrap: anywhere;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.4;
}
.guide-progress {
  margin: 18px 0 14px;
}
.guide-progress div {
  height: 4px;
  background: #d9e1e9;
}
.guide-progress i {
  display: block;
  height: 100%;
  background: var(--blue);
  transition: width 0.3s;
}
.instruction-card {
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--ink);
}
.route-image {
  display: grid;
  aspect-ratio: 4 / 3;
  background: #e8eef4;
}
.route-image > * {
  grid-area: 1 / 1;
}
.route-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.image-unavailable {
  display: grid;
  place-items: center;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}
.instruction-copy {
  padding: 20px 18px;
}
.instruction-copy > p {
  margin: 0;
  font-size: 21px;
  line-height: 1.85;
}
.step-destination-name {
  margin-top: 10px !important;
  color: var(--blue);
  font-size: 22px !important;
  font-weight: 700;
}
.home-button {
  width: 100%;
  min-height: 52px;
  margin-top: 20px;
  color: #fff;
  background: var(--blue);
  border: 1px solid var(--ink);
  border-radius: 3px;
  font-weight: 700;
}
.step-actions {
  display: grid;
  grid-template-columns: 0.9fr 1.5fr;
  gap: 10px;
  margin-top: 14px;
}
.step-actions button {
  min-height: 54px;
  border-radius: 3px;
  font-weight: 700;
  touch-action: manipulation;
}
.previous-button {
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--ink);
}
.next-button {
  color: #fff;
  background: var(--ink);
  border: 1px solid var(--ink);
}
.previous-button:disabled {
  opacity: 0.35;
  cursor: default;
}
.next-button:disabled {
  color: #7a858e;
  background: #dce1e5;
  border-color: #aeb7bf;
  cursor: default;
}
.festival-link {
  min-height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--ink);
  background: #fff;
  border-top: 1px solid var(--line);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}
.festival-link span {
  color: var(--blue);
  font-size: 18px;
}
.selection-overlay,
.notice-overlay {
  position: fixed;
  z-index: 10;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgb(22 54 92 / 0.35);
}
.selection-modal {
  width: min(100%, 560px);
  max-height: min(90dvh, 760px);
  overflow: hidden;
  background: var(--paper);
  border: 1px solid var(--ink);
  border-radius: 5px;
}
.selection-modal header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 17px 18px;
  border-bottom: 1px solid var(--line);
}
.selection-modal header p {
  margin: 0;
  font-weight: 700;
}
.selection-modal header button {
  width: 34px;
  height: 34px;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--ink);
  border-radius: 50%;
  font-size: 23px;
}
.place-menu {
  max-height: calc(min(78dvh, 680px) - 70px);
  overflow: auto;
  padding: 8px;
}
.category-block + .category-block {
  border-top: 1px solid var(--line);
}
.category-title {
  width: 100%;
  display: flex;
  justify-content: space-between;
  padding: 15px 10px;
  color: var(--blue);
  text-align: left;
  background: transparent;
  border: 0;
  font-size: 14px;
  font-weight: 700;
}
.category-title::after {
  content: "⌄";
}
.category-title[aria-expanded="true"]::after {
  content: "⌃";
}
.place-list {
  padding: 0 4px 9px;
}
.place-option {
  width: 100%;
  padding: 13px 8px;
  color: var(--ink);
  text-align: left;
  background: none;
  border: 0;
  border-radius: 2px;
  font-size: 15px;
}
.place-option:hover,
.place-option:focus-visible {
  background: var(--sky);
  outline: 0;
}
.place-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.place-option-distance {
  flex: none;
  padding: 2px 8px;
  color: var(--blue);
  background: var(--sky);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}
.notice-overlay {
  z-index: 20;
}
.notice-modal {
  width: min(100%, 480px);
  padding: 26px 22px 22px;
  background: #fff;
  border: 1px solid var(--ink);
  border-radius: 5px;
}
.notice-modal h2 {
  margin: 0 0 16px;
  font-size: 20px;
}
.notice-modal p {
  margin: 0;
  font-size: 14px;
  line-height: 1.75;
}
.notice-checkbox {
  display: flex;
  gap: 9px;
  align-items: center;
  margin-top: 20px;
  font-size: 14px;
  font-weight: 700;
}
.notice-checkbox input {
  width: 18px;
  height: 18px;
  accent-color: var(--blue);
}
.notice-close-button {
  width: 100%;
  min-height: 50px;
  margin-top: 22px;
  color: #fff;
  background: var(--blue);
  border: 1px solid var(--ink);
  border-radius: 3px;
  font-weight: 700;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@media (min-width: 700px) and (orientation: landscape) {
  .app-shell {
    max-width: 1080px;
    padding: 30px 40px;
  }
  .instruction-card {
    display: grid;
    grid-template-columns: minmax(260px, 3fr) minmax(0, 4fr);
  }
  .route-image {
    border-right: 1px solid var(--ink);
  }
  .instruction-copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 28px;
  }
  .step-actions {
    max-width: 100%;
  }
  .selection-overlay {
    align-items: center;
  }
}
