@import url("https://fonts.googleapis.com/css2?family=Inter:wght@500;600;700;800;900&family=Noto+Sans+JP:wght@500;700;900&display=swap");

:root {
  --ink: #181512;
  --muted: #746f68;
  --paper: #f7f3ea;
  --panel: #fffdfa;
  --line: #dfd8cc;
  --charcoal: #151512;
  --green: #254943;
  --green-2: #416a62;
  --red: #bc002d;
  --red-soft: #fff2ef;
  --gold: #b99756;
  --blue: #263a50;
  --shadow: 0 22px 54px rgba(31, 28, 22, 0.12);
  --soft-shadow: 0 10px 24px rgba(31, 28, 22, 0.08);
}

* {
  box-sizing: border-box;
  min-width: 0;
}

html {
  width: 100%;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

body {
  width: 100%;
  margin: 0;
  overflow-x: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family: "Inter", "Noto Sans JP", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
  text-rendering: geometricPrecision;
}

body::before {
  content: "日本";
  position: fixed;
  right: max(12px, calc((100vw - 1180px) / 2));
  bottom: -34px;
  z-index: -1;
  color: rgba(188, 0, 45, 0.04);
  font-family: "Noto Sans JP", sans-serif;
  font-size: clamp(8rem, 22vw, 18rem);
  font-weight: 900;
  line-height: 1;
  pointer-events: none;
}

a {
  color: inherit;
}

button {
  font: inherit;
  -webkit-tap-highlight-color: transparent;
}

img {
  display: block;
  max-width: 100%;
}

.hero {
  position: relative;
  min-height: min(680px, 86vh);
  overflow: hidden;
  background: var(--charcoal);
  color: #fff;
  isolation: isolate;
}

.hero__media {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(13, 14, 12, 0.97) 0%, rgba(13, 14, 12, 0.78) 48%, rgba(13, 14, 12, 0.18) 100%),
    linear-gradient(180deg, rgba(13, 14, 12, 0.18) 0%, rgba(13, 14, 12, 0.74) 100%),
    url("./assets/hero-japan-night.webp") center / cover;
  filter: saturate(0.82) contrast(1.02);
  transform: scale(1.02);
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 96px;
  background: linear-gradient(180deg, rgba(244, 240, 231, 0), var(--paper));
}

.topbar {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  padding: 24px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 0.95rem;
  font-weight: 900;
  letter-spacing: 0;
}

.jp-flag {
  position: relative;
  display: grid;
  width: 46px;
  height: 32px;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.2);
}

.jp-flag::after {
  content: "";
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--red);
}

.hero__content {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  padding: clamp(72px, 11vh, 110px) 0 clamp(110px, 16vh, 150px);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--gold);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  max-width: 860px;
  font-size: clamp(3rem, 6.6vw, 6rem);
  font-weight: 900;
  line-height: 0.94;
}

h2 {
  font-size: clamp(1.65rem, 3vw, 2.75rem);
  font-weight: 900;
  line-height: 1.04;
}

h3 {
  font-size: clamp(1.45rem, 2.1vw, 2rem);
  font-weight: 900;
  line-height: 1.08;
}

.jp-subtitle {
  margin: 6px 0 0;
  color: var(--green);
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.35;
}

.lead {
  max-width: 710px;
  margin: 28px 0 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: clamp(1.02rem, 1.45vw, 1.24rem);
  line-height: 1.62;
}

.hero__stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 136px));
  gap: 12px;
  margin-top: 38px;
}

.hero__stats div {
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 0;
  padding: 12px 0 0;
  background: transparent;
  backdrop-filter: none;
}

.hero__stats strong,
.hero__stats span {
  display: block;
}

.hero__stats strong {
  font-size: 2.1rem;
  line-height: 1;
}

.hero__stats span {
  margin-top: 6px;
  color: rgba(255, 255, 255, 0.74);
  font-size: 0.9rem;
}

main {
  width: min(1120px, calc(100% - 48px));
  margin: 0 auto;
  padding: 42px 0 80px;
}

.onboarding {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(240px, 360px) 1fr;
  gap: 34px;
  align-items: center;
  margin-top: 0;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  padding: 28px 0 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.onboarding__intro p,
.section-heading p,
.city-context__text p,
.logistics p {
  margin: 12px 0 0;
  color: var(--muted);
}

.step {
  display: inline-flex;
  width: max-content;
  border-radius: 4px;
  padding: 5px 8px;
  background: rgba(188, 0, 45, 0.08);
  color: var(--red);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.people-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.person {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 10px;
  background: rgba(255, 253, 248, 0.76);
  color: var(--ink);
  cursor: pointer;
  text-align: center;
  font-weight: 900;
  box-shadow: none;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, color 160ms ease;
}

.person:hover {
  transform: translateY(-2px);
  border-color: var(--red);
}

.person.is-active {
  border-color: var(--red);
  background: var(--red);
  color: #fff;
  box-shadow: 0 14px 26px rgba(188, 0, 45, 0.14);
}

.city-picker,
.city-context,
.logistics {
  margin-top: 48px;
}

.section-heading {
  max-width: 790px;
}

.city-carousel {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 22px;
}

.city-card {
  position: relative;
  overflow: hidden;
  min-height: 154px;
  border: 1px solid rgba(31, 28, 22, 0.1);
  border-radius: 6px;
  padding: 16px;
  background: rgba(255, 253, 248, 0.62);
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  box-shadow: none;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, color 160ms ease;
}

.city-card::after {
  content: "";
  position: absolute;
  right: 14px;
  top: 14px;
  width: 26px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: rgba(188, 0, 45, 0.12);
}

.city-card span,
.city-card small,
.city-card strong,
.city-card em {
  position: relative;
  z-index: 1;
  display: block;
}

.city-card span,
.city-card small {
  color: var(--muted);
  font-size: 0.88rem;
}

.city-card strong {
  margin: 18px 0 4px;
  font-size: clamp(1.18rem, 1.8vw, 1.55rem);
  line-height: 1;
}

.city-card em {
  margin-bottom: 12px;
  color: var(--red);
  font-family: "Noto Sans JP", sans-serif;
  font-size: 1.05rem;
  font-style: normal;
  font-weight: 900;
}

.city-card:hover {
  transform: translateY(-3px);
  border-color: var(--green-2);
}

.city-card.is-active {
  border-color: var(--charcoal);
  background: var(--charcoal);
  color: #fff;
}

.city-card.is-active::after {
  background: var(--red);
}

.city-card.is-active span,
.city-card.is-active small,
.city-card.is-active em {
  color: rgba(255, 255, 255, 0.75);
}

.city-context {
  border-top: 1px solid var(--line);
  padding-top: 28px;
}

.city-context > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 340px);
  gap: 24px;
  align-items: stretch;
}

.port-time-list {
  display: grid;
}

.port-time-list article {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: var(--charcoal);
  color: #fff;
  box-shadow: var(--soft-shadow);
}

.port-time-list span,
.port-time-list strong,
.port-time-list b,
.port-time-list small {
  display: block;
}

.port-time-list span,
.port-time-list small {
  color: rgba(255, 255, 255, 0.68);
}

.port-time-list strong {
  margin-top: 5px;
  font-size: 2rem;
  line-height: 1;
}

.port-time-list b {
  margin-top: 16px;
  color: #fff;
  font-size: 1.05rem;
}

.port-map-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  max-width: 100%;
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 12px;
  background: #fff;
  color: var(--green);
  font-size: 0.92rem;
  font-weight: 900;
  text-decoration: none;
}

.port-map-link b {
  border-radius: 999px;
  padding: 4px 8px;
  background: rgba(48, 120, 105, 0.11);
  color: var(--green);
  font-size: 0.76rem;
  line-height: 1;
  white-space: nowrap;
}

.port-map-link b.is-unknown {
  background: #b90021;
  color: #fff;
}

.port-map-link small {
  color: var(--muted);
  font-weight: 800;
}

.port-status-note {
  max-width: 680px;
  margin: 10px 0 0;
  border-left: 4px solid #b90021;
  padding-left: 12px;
  color: #6a6258;
  font-size: 0.94rem;
}

.cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 36px;
  margin-top: 34px;
}

.card {
  display: grid;
  grid-template-columns: 1fr;
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid rgba(21, 31, 27, 0.1);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.86);
  box-shadow: var(--soft-shadow);
}

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

.card__image {
  position: relative;
  display: block;
  width: 100%;
  height: auto;
  min-height: 0;
  aspect-ratio: 16 / 9;
  border: 0;
  background-color: #eee8dc;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  cursor: pointer;
  text-align: left;
}

.card__image::after {
  content: none;
}

.card__image span {
  display: none;
}

.card__body {
  display: grid;
  gap: 18px;
  align-content: start;
  overflow: hidden;
  padding: clamp(22px, 3vw, 34px);
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 7px 11px;
  background: #fff;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.tag--risk-low {
  border-color: #b8d6c6;
  color: #256244;
}

.tag--risk-medium {
  border-color: #ead291;
  color: #7a5805;
}

.tag--risk-high {
  border-color: #efb8ae;
  color: #922c20;
}

.tag--count {
  border-color: rgba(36, 76, 71, 0.2);
  background: #edf5f2;
  color: var(--green);
}

.tag--photo {
  border-color: rgba(185, 151, 86, 0.34);
  background: #fff8e8;
  color: #7f5d1e;
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  overflow-wrap: break-word;
  word-break: break-word;
}

.facts {
  display: grid;
  gap: 10px;
  margin: 0;
}

.facts div {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 12px;
  border-top: 1px solid rgba(222, 215, 202, 0.8);
  padding-top: 10px;
}

.facts dt {
  color: var(--green);
  font-weight: 900;
}

.facts dd {
  margin: 0;
  overflow-wrap: break-word;
  word-break: break-word;
}

.details-button {
  min-height: 50px;
  border: 1px solid var(--green);
  border-radius: 5px;
  padding: 0 16px;
  background: #11201d;
  color: #fff;
  cursor: pointer;
  font-weight: 900;
  transition: transform 160ms ease, background 160ms ease;
}

.details-button:hover {
  transform: translateY(-2px);
  background: var(--green);
}

.vote-panel {
  position: relative;
  display: grid;
  gap: 14px;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  padding: 20px 0 0;
  background: transparent;
}

.vote-panel strong {
  display: block;
  font-size: 1.02rem;
}

.vote-help,
.vote-progress {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.vote-buttons {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
  padding-top: 30px;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.vote-buttons::before {
  content: "";
  position: absolute;
  top: 8px;
  right: 8px;
  left: 8px;
  height: 2px;
  background: linear-gradient(90deg, var(--red), #b07a25 28%, #8b8a7e 50%, var(--green-2) 72%, var(--blue));
}

.vote {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  min-height: 54px;
  border: 0;
  border-radius: 0;
  padding: 12px 5px 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  text-align: center;
  box-shadow: none;
  transition: color 150ms ease, transform 150ms ease;
}

.vote::before {
  content: "";
  position: absolute;
  top: -16px;
  left: 50%;
  width: 2px;
  height: 14px;
  background: currentColor;
  transform: translateX(-50%);
  opacity: 0.42;
}

.vote::after {
  content: "";
  position: absolute;
  top: -29px;
  left: 50%;
  width: 25px;
  height: 25px;
  border: 2px solid #fff;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, var(--red) 0 5px, transparent 5.5px),
    #fff;
  box-shadow: 0 0 0 1px rgba(31, 28, 22, 0.16), 0 8px 18px rgba(31, 28, 22, 0.18);
  opacity: 0;
  transform: translateX(-50%);
}

.vote-label {
  display: block;
  font-weight: 900;
  line-height: 1.1;
  overflow-wrap: break-word;
}

.vote small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.2;
  white-space: normal;
}

.vote--hot {
  color: var(--red);
}

.vote--warm {
  color: #a06a1f;
}

.vote--neutral {
  color: #59645f;
}

.vote--cool {
  color: var(--green-2);
}

.vote--cold {
  color: var(--blue);
}

.vote:hover {
  transform: translateY(-1px);
  background: transparent;
}

.vote.is-selected {
  background: transparent;
  color: currentColor;
  box-shadow: none;
}

.vote.is-selected small {
  color: var(--ink);
}

.vote.is-selected::before,
.vote.is-selected::after {
  opacity: 1;
}

.vote.is-selected::before {
  top: -10px;
  height: 8px;
  opacity: 0.58;
}

.card__links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.card__links a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 11px;
  background: rgba(255, 253, 248, 0.78);
  color: var(--green);
  font-weight: 900;
  text-decoration: none;
}

.icon-link span {
  position: relative;
  display: inline-block;
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
}

.icon-link--map span::before {
  content: "";
  position: absolute;
  inset: 2px 4px 3px;
  border: 2px solid currentColor;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
}

.icon-link--map span::after {
  content: "";
  position: absolute;
  top: 6px;
  left: 7px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
}

.icon-link--source span::before,
.icon-link--source span::after {
  content: "";
  position: absolute;
  width: 8px;
  height: 6px;
  border: 2px solid currentColor;
  border-radius: 5px;
}

.icon-link--source span::before {
  top: 4px;
  left: 2px;
  transform: rotate(-35deg);
}

.icon-link--source span::after {
  right: 2px;
  bottom: 4px;
  transform: rotate(-35deg);
}

.icon-link--video span::before {
  content: "";
  position: absolute;
  inset: 2px;
  border: 2px solid currentColor;
  border-radius: 50%;
}

.icon-link--video span::after {
  content: "";
  position: absolute;
  top: 5px;
  left: 7px;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  border-left: 6px solid currentColor;
}

.logistics {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 28px;
  align-items: start;
  border-top: 1px solid var(--line);
  padding-top: 32px;
}

.logistics ul {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px 20px 20px 40px;
  background: var(--panel);
  box-shadow: var(--soft-shadow);
}

.logistics li + li {
  margin-top: 10px;
}

.useful {
  margin-top: 56px;
  border-top: 1px solid var(--line);
  padding-top: 34px;
}

.useful-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 24px;
}

.useful-card {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 14px;
  border: 1px solid rgba(31, 28, 22, 0.1);
  border-radius: 8px;
  padding: 18px;
  background: rgba(255, 253, 248, 0.78);
  box-shadow: var(--soft-shadow);
}

.useful-card h3,
.useful-card p {
  margin: 0;
}

.useful-card p {
  margin-top: 8px;
  color: var(--muted);
}

.useful-icon {
  position: relative;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(188, 0, 45, 0.2);
  border-radius: 50%;
  background: #fff;
  color: var(--red);
}

.useful-icon::before,
.useful-icon::after {
  content: "";
  position: absolute;
}

.useful-icon--taxi::before,
.useful-icon--taxi-alt::before {
  width: 25px;
  height: 13px;
  border: 2px solid currentColor;
  border-radius: 8px 8px 4px 4px;
}

.useful-icon--taxi::after,
.useful-icon--taxi-alt::after {
  bottom: 10px;
  width: 26px;
  height: 3px;
  border-right: 5px solid currentColor;
  border-left: 5px solid currentColor;
}

.useful-icon--route::before {
  inset: 10px 13px 12px;
  border: 2px solid currentColor;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
}

.useful-icon--route::after {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
}

.useful-icon--train::before {
  width: 22px;
  height: 24px;
  border: 2px solid currentColor;
  border-radius: 5px;
}

.useful-icon--train::after {
  bottom: 11px;
  width: 18px;
  height: 5px;
  border-top: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
}

.useful-icon--wallet::before {
  width: 25px;
  height: 18px;
  border: 2px solid currentColor;
  border-radius: 5px;
}

.useful-icon--wallet::after {
  right: 8px;
  width: 10px;
  height: 8px;
  border: 2px solid currentColor;
  border-radius: 4px;
  background: #fff;
}

.useful-icon--translate::before {
  width: 24px;
  height: 24px;
  border: 2px solid currentColor;
  border-radius: 50%;
}

.useful-icon--translate::after {
  width: 18px;
  height: 2px;
  background: currentColor;
  box-shadow: 0 -6px 0 currentColor, 0 6px 0 currentColor;
}

.store-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.store-links--badges {
  gap: 10px;
  align-items: center;
}

.store-links a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 12px;
  background: #fff;
  color: var(--green);
  font-size: 0.9rem;
  font-weight: 900;
  text-decoration: none;
}

.store-links .store-badge {
  min-height: 0;
  border: 0;
  border-radius: 8px;
  padding: 0;
  background: transparent;
}

.store-badge img {
  display: block;
  width: 136px;
  height: 40px;
  object-fit: contain;
}

.store-badge--play img {
  width: 135px;
  height: 40px;
  object-fit: cover;
  object-position: center;
}

.useful-notes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.useful-notes article {
  border-left: 3px solid var(--red);
  padding: 4px 0 4px 16px;
}

.useful-notes h3,
.useful-notes p {
  margin: 0;
}

.useful-notes p {
  margin-top: 8px;
  color: var(--muted);
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
  padding: 18px;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 15, 13, 0.76);
  backdrop-filter: blur(8px);
}

.modal__panel {
  position: relative;
  width: min(1080px, 100%);
  max-height: calc(100vh - 36px);
  overflow: auto;
  border-radius: 10px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.modal__close {
  position: sticky;
  top: 14px;
  left: calc(100% - 98px);
  z-index: 2;
  margin: 14px;
  border: 0;
  border-radius: 5px;
  padding: 10px 14px;
  background: #111916;
  color: #fff;
  cursor: pointer;
  font-weight: 900;
}

.modal__gallery {
  display: grid;
  grid-template-columns: 1.45fr 1fr;
  gap: 6px;
  margin-top: -58px;
  background: #111916;
}

.modal__gallery figure {
  position: relative;
  min-width: 0;
  margin: 0;
  background: #111916;
}

.modal__gallery img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  background: #111916;
}

.modal__gallery figure:first-child {
  grid-row: span 2;
}

.modal__gallery figure:first-child img {
  height: auto;
}

.modal__gallery figcaption {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  pointer-events: none;
}

.modal__gallery figcaption span,
.modal__gallery figcaption a {
  border-radius: 999px;
  padding: 5px 8px;
  background: rgba(17, 25, 22, 0.82);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1;
  text-decoration: none;
}

.modal__gallery figcaption a {
  pointer-events: auto;
  background: rgba(255, 255, 255, 0.9);
  color: var(--green);
}

.modal__content {
  display: grid;
  gap: 18px;
  padding: clamp(20px, 3vw, 32px);
}

.detail-blocks {
  display: grid;
  gap: 12px;
}

.detail-blocks article {
  border-left: 3px solid var(--red);
  padding: 2px 0 2px 14px;
}

.detail-blocks h3,
.detail-blocks p {
  margin: 0;
}

.detail-blocks h3 {
  color: var(--green);
  font-size: 0.95rem;
  line-height: 1.2;
}

.detail-blocks p {
  margin-top: 6px;
  color: var(--ink);
  line-height: 1.55;
}

.modal__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.modal__grid div {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 13px;
  background: #fff;
}

.modal__grid-wide {
  grid-column: 1 / -1;
}

.modal__grid strong,
.modal__grid span {
  display: block;
}

.modal__grid strong {
  color: var(--green);
  font-size: 0.82rem;
}

.modal__grid span {
  margin-top: 4px;
  color: var(--muted);
}

.inline-map-link {
  color: var(--green);
  font-weight: 900;
  text-decoration: none;
}

body.has-modal {
  overflow: hidden;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 20;
  max-width: min(360px, calc(100vw - 36px));
  border-radius: 6px;
  padding: 14px 16px;
  background: #111916;
  color: #fff;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(16px);
  transition: 180ms ease;
  pointer-events: none;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.sheet-link,
.button,
.controls,
.summary,
.timeline,
.tools {
  display: none;
}

@media (max-width: 960px) {
  .topbar,
  .hero__content,
  main {
    width: auto;
    margin-right: 16px;
    margin-left: 16px;
  }

  .hero {
    min-height: 700px;
  }

  h1 {
    max-width: 100%;
    font-size: clamp(2.55rem, 10.5vw, 4.8rem);
    line-height: 0.92;
  }

  .hero__stats {
    grid-template-columns: 1fr;
    max-width: 320px;
  }

  .onboarding,
  .city-context > div,
  .logistics,
  .card,
  .useful-grid,
  .useful-notes {
    grid-template-columns: 1fr;
  }

  .people-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .city-carousel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .modal__gallery,
  .modal__grid {
    grid-template-columns: 1fr;
  }

  .modal__gallery img,
  .modal__gallery img:first-child {
    height: 230px;
  }
}

@media (max-width: 560px) {
  .topbar,
  .hero__content,
  main {
    width: auto;
    margin-right: 14px;
    margin-left: 14px;
  }

  .hero {
    min-height: 690px;
  }

  .topbar {
    padding-top: 18px;
  }

  .brand {
    font-size: 0.86rem;
  }

  .jp-flag {
    width: 42px;
    height: 30px;
  }

  .hero__content {
    padding-top: 64px;
  }

  .lead {
    max-width: 330px;
    font-size: 1rem;
    line-height: 1.62;
  }

  .onboarding__intro p,
  .section-heading p,
  .city-context__text p {
    max-width: 330px;
  }

  .eyebrow {
    max-width: 100%;
    font-size: 0.68rem;
    overflow-wrap: anywhere;
  }

  h1 {
    font-size: clamp(2.55rem, 12vw, 3.4rem);
  }

  .onboarding {
    margin-top: 0;
    padding-top: 24px;
  }

  .people-grid,
  .city-carousel {
    grid-template-columns: 1fr;
  }

  .person {
    min-height: 50px;
  }

  .city-card {
    min-height: 132px;
  }

  .card {
    width: 100%;
    max-width: 100%;
    border-radius: 8px;
  }

  .card__image {
    height: 270px;
    min-height: 270px;
  }

  .card__image span {
    left: 12px;
    right: auto;
    bottom: 12px;
    max-width: calc(100% - 24px);
  }

  .card__body {
    width: 100%;
    max-width: 100%;
    display: block;
    padding: 18px;
  }

  .card__body > * + * {
    margin-top: 16px;
  }

  .card .eyebrow {
    font-size: 0.64rem;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .card__body > *,
  .card p,
  .facts,
  .facts div,
  .facts dd,
  .vote-panel,
  .vote-buttons {
    width: min(100%, 300px);
    max-width: 300px;
  }

  .facts div {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .vote-panel {
    padding-top: 18px;
  }

  .vote {
    min-height: 62px;
    padding-inline: 2px;
    font-size: 0.72rem;
  }

  .vote small {
    font-size: 0.62rem;
  }

  .modal {
    padding: 10px;
  }

  .modal__panel {
    border-radius: 18px;
    max-height: calc(100vh - 20px);
  }
}
