:root {
  --orange: #f39a3b;
  --orange-d: #e36f2c;
  --ink: #3a3330;
  --ink-sub: #74695f;
  --paper: #fff;
  --bg: #faac38;
  --round:
    "Kumbh Sans", "Noto Sans JP", sans-serif; /* 現行サイトと同じ: 英字は Kumbh Sans、和文は Noto Sans JP */
  --sans: "Noto Sans JP", sans-serif;
  --shadow: 0 10px 30px rgba(150, 80, 20, 0.16);
}

* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  height: 100%;
  overflow: hidden;
}
body.town-page {
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
.town-page .site-header {
  padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) 0
    env(safe-area-inset-left, 0px);
}
.town-app {
  font-family: var(--sans);
  font-size: 14px;
  line-height: normal;
  color: var(--ink);
}
p {
  font-size: inherit;
  letter-spacing: normal;
}
button {
  font: inherit;
  cursor: pointer;
}
body::before {
  content: "";
  position: fixed;
  inset: -12%;
  z-index: -1;
  pointer-events: none;
  background-image:
    radial-gradient(
      circle at 12% 30%,
      rgba(242, 161, 131, 0.69) 3%,
      transparent 40%
    ),
    radial-gradient(
      circle at 37% 28%,
      rgba(207, 2, 26, 0.2) 3%,
      transparent 40%
    ),
    radial-gradient(circle at 71% 50%, #fb9830 3%, transparent 40%),
    radial-gradient(circle at 77% 50%, #f57b4a 3%, transparent 40%),
    radial-gradient(circle at 19% 58%, #f47b3c 3%, transparent 63%),
    radial-gradient(circle at 56% 61%, #f97c45 3%, transparent 63%);
  animation: drift 24s ease-in-out infinite alternate;
}
@keyframes drift {
  from {
    transform: translate(-2%, -1%) scale(1);
  }
  to {
    transform: translate(2%, 1.5%) scale(1.05);
  }
}

#town {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  cursor: grab;
  touch-action: pan-y;
}
#town.grabbing {
  cursor: grabbing;
}

/* TOP のコピー */
.hero {
  position: fixed;
  left: 56px;
  top: 50%;
  z-index: 10;
  width: min(440px, 38vw);
  transform: translateY(-46%);
  transition:
    opacity 0.45s,
    transform 0.45s;
}
.hero-en {
  margin: 0 0 10px;
  font-family: var(--round);
  font-weight: 700;
  color: #fff;
  opacity: 0.92;
  letter-spacing: 0.08em;
}
.hero {
  color: #fff;
  text-shadow: 0 1px 12px rgba(180, 70, 10, 0.25);
}
.hero h1 {
  margin: 0 0 22px;
  font-family: var(--round);
  font-weight: 700;
  font-size: clamp(26px, 2.6vw, 38px);
  line-height: 1.55;
  letter-spacing: 0.04em;
}
.hero-lead {
  margin: 0 0 22px;
  font-size: 14.5px;
  line-height: 2;
}
.hero-address {
  margin: 0 0 26px;
  font-size: 13px;
  line-height: 1.9;
  opacity: 0.9;
}
.hero .town-btn {
  background: #fff;
  color: var(--orange-d);
  box-shadow: 0 4px 0 rgba(160, 60, 10, 0.35);
  text-shadow: none;
}
body:not(.is-top) .hero {
  opacity: 0;
  transform: translateY(-42%);
  pointer-events: none;
}

/* 説明カード */
.town-card {
  position: fixed;
  z-index: 15;
  left: 40px;
  top: 50%;
  width: min(440px, 38vw);
  max-height: calc(100vh - 220px);
  overflow: auto;
  padding: 34px 34px 30px;
  border-radius: 24px;
  background: var(--paper);
  box-shadow:
    0 12px 0 #ebd3b6,
    var(--shadow);
  transform: translateY(-46%);
  transition:
    opacity 0.4s,
    transform 0.4s;
}
body.is-top .town-card {
  opacity: 0;
  transform: translate(-30px, -46%);
  pointer-events: none;
}
.town-card.swap > * {
  animation: rise 0.5s both;
}
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.card-en {
  margin: 0;
  font-family: var(--round);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--orange-d);
}
.card-ja {
  margin: 6px 0 16px;
  font-family: var(--round);
  font-weight: 700;
  font-size: 25px;
  line-height: 1.45;
}
.card-body {
  font-size: 14.5px;
  line-height: 1.95;
}
.card-body p {
  margin: 0 0 12px;
}
.quotes {
  list-style: none;
  margin: 8px 0 4px;
  padding: 0;
  display: grid;
  gap: 8px;
}
.quotes li {
  padding: 10px 14px;
  border-radius: 12px;
  background: #fff4e8;
}
.quotes b {
  display: block;
  font-size: 13.5px;
  line-height: 1.6;
}
.quotes span {
  display: block;
  font-size: 11.5px;
  color: var(--ink-sub);
}
.work-list {
  list-style: none;
  margin: 8px 0 4px;
  padding: 0;
  display: grid;
  gap: 6px;
}
.work-list a {
  display: block;
  padding: 8px 12px;
  border: 1px solid #f0e2d2;
  border-radius: 10px;
  color: var(--ink);
  text-decoration: none;
  line-height: 1.5;
  transition:
    border-color 0.2s,
    background 0.2s;
}
.work-list a:hover {
  border-color: var(--orange);
  background: #fff4e8;
}
.work-list b {
  display: block;
  font-size: 13px;
}
.work-list span {
  font-size: 11.5px;
  color: var(--ink-sub);
}
/* 写真＋見出しの一覧(制作事例・インタビュー) */
.media {
  list-style: none;
  margin: 4px 0 8px;
  padding: 0;
  display: grid;
  gap: 10px;
}
.media a {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  grid-template-rows: auto auto 1fr;
  column-gap: 12px;
  align-items: start;
  padding: 8px;
  border: 1px solid #f0e2d2;
  border-radius: 14px;
  color: var(--ink);
  text-decoration: none;
  transition:
    border-color 0.2s,
    background 0.2s,
    transform 0.2s;
}
.media a:hover {
  border-color: var(--orange);
  background: #fff6ec;
  transform: translateY(-1px);
}
.media img {
  grid-row: 1 / 4;
  width: 96px;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 10px;
  background: #f3e7da;
}
.media-tag {
  font-family: var(--round);
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--orange-d);
}
.media h3 {
  margin: 2px 0 4px;
  font-family: var(--round);
  font-weight: 700;
  font-size: 14px;
  line-height: 1.5;
  text-wrap: balance;
}
.media p {
  margin: 0;
  font-size: 11.5px;
  line-height: 1.55;
  color: var(--ink-sub);
}
.media-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.media-grid a {
  grid-template-columns: 1fr;
  grid-template-rows: auto;
  padding: 6px 6px 10px;
}
.media-grid img {
  grid-row: auto;
  width: 100%;
  aspect-ratio: 16 / 10;
  margin-bottom: 6px;
}
.media-grid .media-tag,
.media-grid h3,
.media-grid p {
  padding-inline: 4px;
}
.media-grid h3 {
  font-size: 12.5px;
}
.media-grid p {
  font-size: 10.5px;
}

/* 一覧の件数と「スワイプで見る」の案内(SP だけ表示) */

/* お知らせの見出し一覧 */
.town-news-list {
  list-style: none;
  margin: 4px 0 8px;
  padding: 0;
  display: grid;
}
.town-news-list a {
  display: block;
  padding: 12px 4px;
  border-bottom: 1px solid #f0e2d2;
  color: var(--ink);
  text-decoration: none;
  transition: background 0.2s;
}
.town-news-list li:first-child a {
  border-top: 1px solid #f0e2d2;
}
.town-news-list a:hover {
  background: #fff6ec;
}
.town-news-meta {
  display: flex;
  gap: 10px;
  align-items: baseline;
}
.town-news-meta time {
  font-family: var(--round);
  font-weight: 700;
  font-size: 11.5px;
  color: var(--ink-sub);
  font-variant-numeric: tabular-nums;
}
.town-news-list h3 {
  margin: 4px 0 0;
  font-family: var(--round);
  font-weight: 700;
  font-size: 14px;
  line-height: 1.55;
}

.town-btn {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-top: 10px;
  padding: 13px 26px;
  border: 0;
  border-radius: 999px;
  background: var(--orange);
  color: #fff;
  font-family: var(--round);
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  box-shadow: 0 4px 0 var(--orange-d);
  transition:
    transform 0.15s,
    box-shadow 0.15s;
}
.town-btn:hover {
  transform: translateY(2px);
  box-shadow: 0 2px 0 var(--orange-d);
}
.town-btn i {
  font-style: normal;
}
.town-btn .ext {
  width: 14px;
  height: 14px;
}

/* 建物のピン */
.labels {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 6;
}
.pin {
  position: absolute;
  left: 0;
  top: 0;
  pointer-events: auto;
  padding: 0;
  border: 0;
  background: none;
  translate: -50% -50%;
  transition: opacity 0.3s;
}
.pin-dot {
  display: block;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 4px 12px rgba(120, 60, 20, 0.25);
  position: relative;
  transition: transform 0.2s;
}
.pin-dot::after {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  background: var(--orange);
}
.pin-label {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  translate: -50% 0;
  white-space: nowrap;
  padding: 7px 14px;
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow);
  font-family: var(--round);
  font-weight: 700;
  font-size: 13px;
  color: var(--ink);
  opacity: 0;
  transform: translateY(4px);
  transition:
    opacity 0.25s,
    transform 0.25s;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.35;
}
.pin-label b {
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--orange-d);
}
.pin:hover .pin-label,
.pin.hover .pin-label,
.pin.active .pin-label {
  opacity: 1;
  transform: none;
}
/* 画面の上端に近いピンは、項目名を点の下側に出す(メニューバーと重ならないように) */
.pin.below .pin-label {
  bottom: auto;
  top: calc(100% + 10px);
  transform: translateY(-4px);
}
.pin.below:hover .pin-label,
.pin.below.hover .pin-label,
.pin.below.active .pin-label {
  transform: none;
}
.pin.active .pin-dot,
.pin:hover .pin-dot {
  transform: scale(1.15);
}
.pin.active .pin-dot::after {
  background: var(--orange-d);
  animation: pulse 1.6s infinite;
}
@keyframes pulse {
  50% {
    transform: scale(1.35);
  }
}
.pin.far {
  opacity: 0.35;
}

/* 前へ・次へ */
.stepper {
  position: fixed;
  right: 30px;
  bottom: 30px;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px;
  border-radius: 999px;
  background: #fff;
  box-shadow: var(--shadow);
}
.stepper button {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #fff1e2;
  color: var(--orange-d);
  transition:
    background 0.2s,
    color 0.2s,
    transform 0.15s;
}
.stepper button svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.stepper button:hover {
  background: var(--orange);
  color: #fff;
}
.stepper button:active {
  transform: scale(0.92);
}
.stepper button:focus-visible {
  outline: 2px solid var(--orange-d);
  outline-offset: 2px;
}
.stepper span {
  min-width: 72px;
  text-align: center;
  font-family: var(--round);
  font-weight: 700;
  font-size: 13px;
  color: var(--ink-sub);
}
.pill {
  position: fixed;
  right: 30px;
  bottom: 88px;
  z-index: 10;
  border: 0;
  padding: 9px 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
  color: var(--ink);
  font-family: var(--round);
  font-weight: 700;
  font-size: 12.5px;
  box-shadow: var(--shadow);
}
.pill:hover {
  background: var(--orange);
  color: #fff;
}
a.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
}
.ext {
  width: 12px;
  height: 12px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.hint {
  position: fixed;
  left: 50%;
  bottom: 24px;
  translate: -10% 0;
  margin: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--round);
  font-size: 12px;
  color: #fff;
  transition:
    opacity 0.5s,
    color 0.5s;
}
.mini-swipe {
  position: relative;
  width: 26px;
  height: 12px;
  border-bottom: 1.5px solid currentColor;
  border-radius: 0 0 50% 50%;
  opacity: 0.7;
}
.mini-swipe i {
  position: absolute;
  top: 2px;
  left: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;
  animation: mini-swipe 2.4s ease-in-out infinite;
}
@keyframes mini-swipe {
  0%,
  100% {
    left: 0;
  }
  50% {
    left: 18px;
  }
}
.mini-mouse {
  position: relative;
  width: 11px;
  height: 17px;
  margin-left: 8px;
  border: 1.5px solid currentColor;
  border-radius: 6px;
  opacity: 0.8;
}
.mini-mouse i {
  position: absolute;
  left: 50%;
  top: 3px;
  width: 2px;
  height: 4px;
  margin-left: -1px;
  border-radius: 1px;
  background: #fff;
  animation: wheel 1.6s ease-in-out infinite;
}
.only-sp {
  display: none;
}

/* 最初の数秒だけ、下の案内をオレンジで目立たせる */
.hint.intro {
  color: #fff;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.6);
  font-weight: 700;
}
.hint.intro .mini-swipe,
.hint.intro .mini-mouse {
  opacity: 1;
}
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.town-shortcuts {
  display: none;
}
@keyframes wheel {
  0% {
    transform: translateY(0);
    opacity: 1;
  }
  70% {
    transform: translateY(12px);
    opacity: 0;
  }
  100% {
    transform: translateY(0);
    opacity: 0;
  }
}

/* 読み込み中 */
.loader {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 14px;
  background: var(--bg);
  color: #fff;
  font-family: var(--round);
  font-weight: 700;
  transition:
    opacity 0.6s,
    visibility 0.6s;
}
.loader-flame {
  width: 46px;
  height: 62px;
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  background: radial-gradient(
    circle at 40% 70%,
    #3f7fd9 0 22%,
    #f39a3b 23% 60%,
    #ef4b2f 61%
  );
  animation: flicker 0.9s ease-in-out infinite alternate;
}
@keyframes flicker {
  from {
    transform: scale(1) rotate(-3deg);
  }
  to {
    transform: scale(1.08, 1.12) rotate(3deg);
  }
}
/* スマホ */
@media (max-width: 768px) {
  .hero,
  .town-card {
    left: calc(12px + env(safe-area-inset-left, 0px));
    right: calc(12px + env(safe-area-inset-right, 0px));
    top: auto;
    bottom: calc(70px + env(safe-area-inset-bottom, 0px));
    width: auto;
    transform: none;
  }
  /* SP: 白いカードに濃い文字で、ビジョンをはっきり読ませる */
  .hero {
    padding: 20px 20px 18px;
    border-radius: 20px;
    background: #fff;
    color: var(--ink);
    text-shadow: none;
    box-shadow: var(--shadow);
  }
  .hero-en {
    color: var(--orange-d);
    opacity: 1;
  }
  .hero .town-btn {
    background: var(--orange);
    color: #fff;
    box-shadow: 0 4px 0 var(--orange-d);
  }
  body:not(.is-top) .hero {
    transform: translateY(10px);
  }
  body.is-top .town-card {
    transform: translateY(16px);
  }
  .hero h1 {
    font-size: 22px;
    line-height: 1.5;
    margin-bottom: 12px;
  }
  .hero-lead,
  .hero-address {
    display: none;
  }
  .hero-en {
    font-size: 12px;
    margin-bottom: 4px;
  }
  /* SP: 説明カードはキービジュアルのカードと同じくらいの高さに抑えて、街を広く見せる。
     本文だけをカード内でスクロールさせ、ボタンは常に下に出しておく */
  .town-card {
    display: flex;
    flex-direction: column;
    max-height: min(27vh, 215px);
    overflow: hidden;
    padding: 16px 18px 14px;
    border-radius: 20px;
    box-shadow: var(--shadow);
  }
  .card-en {
    font-size: 11px;
  }
  .card-ja {
    font-size: 17px;
    margin: 2px 0 6px;
  }
  .card-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    overscroll-behavior: contain;
    padding-bottom: 12px;
    font-size: 13px;
    line-height: 1.75;
    -webkit-mask-image: linear-gradient(#000 calc(100% - 16px), transparent);
    mask-image: linear-gradient(#000 calc(100% - 16px), transparent);
  }
  .card-body p {
    margin: 0 0 8px;
  }
  .town-card > .town-btn {
    flex-shrink: 0;
    align-self: flex-start;
    margin-top: 4px;
  }
  .town-card .media img {
    width: 64px;
  }
  /* SP: 一覧のある場所は、前置きの文を省いて一覧を横スワイプのカードにする(次のカードを少しのぞかせる) */
  .town-card.has-list {
    max-height: none;
  }
  .town-card.has-list .card-body {
    position: relative;
    overflow: visible;
    padding-bottom: 0;
    -webkit-mask-image: none;
    mask-image: none;
  }
  .town-card.has-list .card-body > p {
    display: none;
  }
  .town-card.has-list .media,
  .town-card.has-list .town-news-list {
    display: flex;
    gap: 10px;
    margin: 0 -18px;
    padding: 0 18px 4px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 18px;
    scrollbar-width: none;
    overscroll-behavior-x: contain;
  }
  .town-card.has-list .media::-webkit-scrollbar,
  .town-card.has-list .town-news-list::-webkit-scrollbar {
    display: none;
  }
  .town-card.has-list .media li,
  .town-card.has-list .town-news-list li {
    flex: 0 0 80%;
    scroll-snap-align: start;
  }
  .town-card.has-list .media a {
    height: 100%;
    box-sizing: border-box;
    grid-template-columns: 64px minmax(0, 1fr);
    column-gap: 10px;
  }
  .town-card.has-list .media h3,
  .town-card.has-list .town-news-list h3 {
    font-size: 13px;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
  }
  .town-card.has-list .media p {
    font-size: 11px;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
    overflow: hidden;
  }
  .town-card.has-list .town-news-list a {
    height: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    border: 1px solid #f0e2d2;
    border-radius: 14px;
  }
  .town-card.has-list .town-news-list li:first-child a {
    border-top: 1px solid #f0e2d2;
  }
  .town-btn {
    padding: 10px 20px;
    font-size: 13px;
  }
  /* SP: 番号はなくし、左右の矢印だけを街の左右に重ねる */
  .stepper {
    left: calc(8px + env(safe-area-inset-left, 0px));
    right: calc(8px + env(safe-area-inset-right, 0px));
    top: max(calc(216px + env(safe-area-inset-top, 0px)), 33%);
    bottom: auto;
    translate: 0 -50%;
    padding: 0;
    background: none;
    box-shadow: none;
    justify-content: space-between;
    pointer-events: none;
  }
  .stepper span {
    display: none;
  }
  /* 押しやすい大きさの、すりガラス風の丸ボタン(タップ範囲は見た目より広く) */
  .stepper button {
    position: relative;
    pointer-events: auto;
    width: 48px;
    height: 48px;
    color: var(--orange-d);
    background: rgba(255, 255, 255, 0.78);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 6px 18px rgba(150, 70, 20, 0.22);
  }
  .stepper button::after {
    content: "";
    position: absolute;
    inset: -10px;
  }
  .stepper button svg {
    width: 24px;
    height: 24px;
    stroke-width: 2.4;
  }
  .stepper button:hover {
    background: rgba(255, 255, 255, 0.78);
    color: var(--orange-d);
  }
  .stepper button:active {
    background: var(--orange);
    color: #fff;
  }
  .pill {
    right: calc(14px + env(safe-area-inset-right, 0px));
    left: auto;
    top: calc(100px + env(safe-area-inset-top, 0px));
    bottom: auto;
    padding: 7px 12px;
    font-size: 11px;
  }
  .town-shortcuts {
    position: fixed;
    left: calc(10px + env(safe-area-inset-left, 0px));
    right: calc(10px + env(safe-area-inset-right, 0px));
    bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    z-index: 20;
    display: flex;
    align-items: center;
    padding: 4px;
    border: 1px solid #fff;
    border-radius: 100px;
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
  }
  .town-shortcuts button {
    flex: 1;
    min-width: 0;
    height: 44px;
    padding: 10px 2px;
    border: 0;
    border-radius: 100px;
    background: transparent;
    color: #333;
    font-family: var(--sans);
    font-size: clamp(8px, 2.6vw, 10px);
    font-weight: 400;
    line-height: 24px;
    letter-spacing: -0.02em;
    text-align: center;
    white-space: nowrap;
  }
  .town-shortcuts button.active {
    background: rgba(255, 255, 255, 0.55);
  }
  .town-shortcuts button:focus-visible {
    outline: 2px solid var(--orange-d);
    outline-offset: -2px;
  }
  .hint {
    display: none;
  }
  .only-pc {
    display: none;
  }
  .only-sp {
    display: inline;
  }
  .pin-dot {
    width: 20px;
    height: 20px;
  }
  .pin-dot::after {
    inset: 6px;
  }
}
/* 夜モード */
body {
  transition: background-color 0.9s;
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.9s;
  background:
    radial-gradient(
      circle at 82% 16%,
      rgba(255, 244, 214, 0.95) 0 2.2%,
      rgba(255, 236, 190, 0.25) 2.4%,
      transparent 9%
    ),
    radial-gradient(1.5px 1.5px at 12% 18%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 26% 8%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 38% 22%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 47% 6%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 58% 14%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 66% 28%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 72% 6%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 92% 30%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 8% 40%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 18% 62%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 30% 46%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 88% 52%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 96% 70%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 6% 84%, #fff 50%, transparent 51%),
    radial-gradient(120% 90% at 60% 40%, #2c3567 0%, #1a2045 55%, #10142d 100%);
}
body.night {
  background-color: #10142d;
}
body.night::before {
  opacity: 0;
  transition: opacity 0.9s;
}
body.night::after {
  opacity: 1;
}
body.night .site-header .logo img {
  filter: drop-shadow(0 0 2px #fff)
    drop-shadow(0 0 5px rgba(255, 255, 255, 0.7));
}
@media (min-width: 769px) {
  body.night .site-header .nav {
    background: rgba(255, 255, 255, 0.82);
  }
}
body.night .hero {
  text-shadow: 0 1px 14px rgba(0, 0, 20, 0.5);
}
.night-btn {
  position: fixed;
  left: 32px;
  bottom: 30px;
  z-index: 10;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid #fff;
  border-radius: 50%;
  color: #3a3330;
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 6px 18px rgba(150, 70, 20, 0.2);
  transition:
    background 0.3s,
    color 0.3s,
    transform 0.15s;
}
.night-btn:hover {
  background: #fff;
}
.night-btn:active {
  transform: scale(0.92);
}
.night-btn svg {
  grid-area: 1 / 1;
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition:
    opacity 0.4s,
    transform 0.4s;
}
.night-btn .i-moon {
  fill: currentColor;
  stroke: none;
}
.night-btn .i-sun {
  opacity: 0;
  transform: rotate(-60deg) scale(0.6);
}
body.night .night-btn {
  color: #ffd25e;
  background: rgba(30, 36, 80, 0.7);
  border-color: rgba(255, 255, 255, 0.5);
}
body.night .night-btn .i-moon {
  opacity: 0;
  transform: rotate(60deg) scale(0.6);
}
body.night .night-btn .i-sun {
  opacity: 1;
  transform: none;
}
@media (max-width: 768px) {
  .night-btn {
    left: auto;
    right: calc(14px + env(safe-area-inset-right, 0px));
    bottom: auto;
    top: calc(142px + env(safe-area-inset-top, 0px));
    width: 40px;
    height: 40px;
  }
  body.night .town-shortcuts {
    background: rgba(255, 255, 255, 0.82);
  }
  body.night .hero {
    text-shadow: none;
  }
}

@media (max-width: 768px) and (max-height: 500px) {
  .hero,
  .town-card {
    right: auto;
    width: min(
      400px,
      calc(
        100% - 180px - env(safe-area-inset-left, 0px) -
          env(safe-area-inset-right, 0px)
      )
    );
    max-height: max(
      0px,
      calc(
        100vh - 165px - env(safe-area-inset-top, 0px) -
          env(safe-area-inset-bottom, 0px)
      )
    );
  }
  .hero {
    overflow-y: auto;
    padding: 12px 14px;
  }
  .hero h1 {
    margin-bottom: 6px;
    font-size: 18px;
    line-height: 1.35;
  }
  .hero-en {
    margin-bottom: 2px;
    font-size: 11px;
  }
  .hero .town-btn {
    margin-top: 4px;
    padding: 8px 14px;
  }
  .town-card.has-list {
    max-height: max(
      0px,
      calc(
        100vh - 165px - env(safe-area-inset-top, 0px) -
          env(safe-area-inset-bottom, 0px)
      )
    );
  }
  .town-card.has-list {
    display: block;
    overflow-y: auto;
  }
  .stepper {
    left: auto;
    right: calc(14px + env(safe-area-inset-right, 0px));
    top: auto;
    bottom: calc(70px + env(safe-area-inset-bottom, 0px));
    translate: none;
    gap: 4px;
  }
  .stepper button {
    width: 42px;
    height: 42px;
  }
  .night-btn {
    top: auto;
    right: calc(106px + env(safe-area-inset-right, 0px));
    bottom: calc(70px + env(safe-area-inset-bottom, 0px));
  }
}

@media (prefers-reduced-motion: reduce) {
  body::after,
  body::before,
  .loader-flame,
  .pin.active .pin-dot::after,
  .mini-swipe i,
  .mini-mouse i {
    animation: none;
  }
  .hero,
  .town-card,
  .town-card.swap > *,
  .night-btn,
  body,
  body::after,
  body::before {
    animation: none;
    transition: none;
  }
}

.town-app [hidden] {
  display: none !important;
}
.town-fallback {
  position: fixed;
  top: calc(50% + 35px);
  left: 50%;
  width: min(560px, calc(100% - 32px));
  max-height: calc(100vh - 130px);
  overflow: auto;
  transform: translate(-50%, -50%);
  padding: 32px;
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--shadow);
}
.town-fallback-en {
  color: var(--orange-d);
  font-family: var(--round);
  font-weight: 700;
}
.town-fallback h1 {
  margin: 10px 0 20px;
  font-size: clamp(22px, 3vw, 32px);
  line-height: 1.5;
  font-weight: 700;
}
.town-fallback p {
  line-height: 1.8;
}
.town-btn:focus-visible,
.pin:focus-visible,
.pill:focus-visible,
.night-btn:focus-visible {
  outline: 3px solid var(--orange-d);
  outline-offset: 3px;
}
