:root {
  --bg: #fff8e7;
  --ink: #1a1a1a;
  --accent: #d83a26;
  --card: #fff;
  --yellow: #ffd84d;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.55;
  overflow-x: hidden;
}

a { color: inherit; }

.brand {
  position: fixed;
  z-index: 20;
  top: .9rem;
  left: .9rem;
  line-height: 0;
}

.brand img {
  width: 48px;
  height: 48px;
  background: var(--bg);
  border: 3px solid var(--ink);
  border-radius: 14px;
  box-shadow: 3px 3px 0 var(--ink);
}

.locale-menu {
  position: fixed;
  z-index: 30;
  top: .9rem;
  right: .9rem;
  width: max-content;
  background: transparent;
}

.locale-menu summary {
  display: flex;
  min-height: 44px;
  align-items: center;
  list-style: none;
  cursor: pointer;
  background: var(--card);
  border: 3px solid var(--ink);
  border-radius: 999px;
  box-shadow: 3px 3px 0 var(--ink);
  padding: .48rem .8rem;
  font-size: .83rem;
  font-weight: 900;
}

.locale-menu summary::-webkit-details-marker { display: none; }

.locale-menu nav {
  position: absolute;
  right: 0;
  width: max-content;
  max-width: min(88vw, 420px);
  margin-top: .55rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: .35rem;
  background: var(--card);
  border: 3px solid var(--ink);
  border-radius: 16px;
  box-shadow: 5px 5px 0 var(--ink);
  padding: .65rem;
}

.locale-menu a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: .35rem .65rem;
  font-size: .78rem;
  font-weight: 800;
  line-height: 1.2;
  text-decoration: none;
}

.locale-menu a[aria-current="page"] { color: #fff; background: var(--accent); }

.bg-emoji {
  position: fixed;
  z-index: -1;
  opacity: .045;
  font-size: clamp(7rem, 15vw, 13rem);
  pointer-events: none;
}

.bg-emoji.a { top: 10%; right: -2%; transform: rotate(12deg); }
.bg-emoji.b { bottom: 5%; left: -2%; transform: rotate(-12deg); }

main {
  width: min(1120px, calc(100% - 2.5rem));
  margin: 0 auto;
  padding: 5.8rem 0 4rem;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  font-size: .88rem;
  font-weight: 800;
  opacity: .68;
}

.breadcrumb a:hover { color: var(--accent); }

.hero { max-width: 900px; padding: 3rem 0 2.5rem; }

h1 {
  max-width: 14ch;
  font-size: clamp(2.7rem, 8vw, 5.9rem);
  font-weight: 950;
  line-height: .96;
  letter-spacing: -.045em;
  text-transform: uppercase;
}

h1 span { color: var(--accent); }
.subpage h1 { max-width: 19ch; }

.lede {
  max-width: 65ch;
  margin-top: 1.35rem;
  font-size: clamp(1.08rem, 2.1vw, 1.3rem);
  font-weight: 560;
}

h1.near-me {
  max-width: none;
  font-size: clamp(2.1rem, 4.1vw, 3.3rem);
  line-height: 1.02;
}

h1.near-me .loc { display: block; color: var(--accent); }

:lang(fr) h1.near-me { font-size: clamp(2rem, 3.9vw, 3.1rem); }

:lang(zh) h1.near-me,
:lang(ja) h1.near-me,
:lang(ko) h1.near-me { font-size: clamp(2.4rem, 5.2vw, 4.1rem); }

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .8rem;
  margin-top: 1.6rem;
}

.primary-link,
.secondary-link,
.candidate-load,
.candidate-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border: 3px solid var(--ink);
  border-radius: 999px;
  padding: .75rem 1.2rem;
  font: inherit;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
}

.primary-link,
.candidate-load {
  color: #fff;
  background: var(--accent);
  box-shadow: 4px 4px 0 var(--ink);
}

.secondary-link,
.candidate-more { background: #fff; }

.hero-actions .find-cta {
  min-height: 64px;
  padding: 1.1rem 2rem;
  font-size: clamp(1.15rem, 2.6vw, 1.5rem);
  font-weight: 950;
  box-shadow: 6px 6px 0 var(--ink);
  animation: find-cta-bounce 2.4s ease-in-out infinite;
}

.hero-actions .find-cta:hover {
  animation-play-state: paused;
  transform: translate(-2px, -2px);
  box-shadow: 8px 8px 0 var(--ink);
}

@keyframes find-cta-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-actions .find-cta { animation: none; }
}

@media (max-width: 760px) {
  .hero-actions .find-cta { width: 100%; }
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  padding: 1rem 0 3.5rem;
}

.stat {
  min-height: 128px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--yellow);
  border: 3px solid var(--ink);
  border-radius: 18px;
  box-shadow: 5px 5px 0 var(--ink);
  padding: 1rem;
}

.stat strong { font-size: clamp(1.8rem, 4vw, 2.8rem); line-height: 1; }
.stat span { margin-top: .45rem; font-weight: 800; }

.section { padding: 2.6rem 0; border-top: 3px solid var(--ink); }

.section h2 {
  max-width: 22ch;
  font-size: clamp(1.8rem, 5vw, 3.25rem);
  line-height: 1;
  letter-spacing: -.035em;
  text-transform: uppercase;
}

.section-intro {
  max-width: 70ch;
  margin-top: .9rem;
  font-size: 1.02rem;
  opacity: .76;
}

.area-grid,
.hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: .8rem;
  margin-top: 1.4rem;
}

.area-grid > *,
.hub-card {
  min-width: 0;
  display: flex;
  gap: .7rem;
  align-items: center;
  background: #fff;
  border: 2px solid var(--ink);
  border-radius: 14px;
  padding: .85rem;
  text-decoration: none;
}

.hub-card {
  min-height: 96px;
  align-items: flex-start;
  box-shadow: 3px 3px 0 var(--ink);
}

.hub-card:hover { background: var(--yellow); transform: translate(-1px, -1px); }

.hub-count {
  flex: 0 0 auto;
  min-width: 2.4rem;
  color: var(--accent);
  font-size: 1.35rem;
  font-weight: 950;
  line-height: 1.1;
}

.hub-card strong { display: block; font-size: 1rem; line-height: 1.2; overflow-wrap: anywhere; }
.hub-card small { display: block; margin-top: .35rem; opacity: .65; font-weight: 750; }

.location-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.location-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 3px solid var(--ink);
  border-radius: 18px;
  box-shadow: 5px 5px 0 var(--ink);
  padding: 1rem 1rem 1.1rem;
}

.location-head { display: flex; gap: .8rem; justify-content: space-between; align-items: flex-start; }
.location-card h3 { font-size: 1.05rem; line-height: 1.25; overflow-wrap: anywhere; }

.location-kind {
  flex: 0 0 auto;
  max-width: 12rem;
  padding: .28rem .55rem;
  color: #fff;
  background: var(--accent);
  border: 2px solid var(--ink);
  border-radius: 999px;
  font-size: .67rem;
  font-weight: 900;
  text-align: center;
}

.address { margin-top: .65rem; font-size: .9rem; opacity: .7; }
.details { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .7rem; }

.details span {
  min-width: 0;
  padding: .25rem .55rem;
  border: 2px solid var(--ink);
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.hours {
  margin-top: .75rem;
  padding: .7rem .8rem;
  background: var(--bg);
  border-left: 4px solid var(--accent);
  border-radius: 0 10px 10px 0;
}

.hours div { display: grid; grid-template-columns: 7.2rem 1fr; gap: .6rem; }
.hours div + div { margin-top: .25rem; }
.hours dt { font-weight: 900; }
.hours dd { margin: 0; }
.note { margin-top: .7rem; font-size: .85rem; }

.map-link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin-top: auto;
  padding: .7rem .75rem .6rem;
  color: #fff;
  background: var(--ink);
  border-radius: 10px;
  font-weight: 900;
  text-decoration: none;
}

.map-link:hover { background: var(--accent); }

.candidate-loader {
  margin-top: 1.4rem;
  padding: 1.1rem;
  background: rgba(255, 255, 255, .56);
  border: 3px dashed var(--ink);
  border-radius: 18px;
}

.candidate-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem; }
.candidate-status { min-height: 1.5em; margin-top: .9rem; font-weight: 800; opacity: .72; }
.candidate-more { margin-top: 1rem; }
[hidden] { display: none !important; }

.source-box {
  margin-top: 1.5rem;
  background: #fff;
  border: 3px solid var(--ink);
  border-radius: 18px;
  box-shadow: 5px 5px 0 var(--ink);
  padding: 1.1rem;
}

.source-box p + p { margin-top: .55rem; }
.source-box strong { font-weight: 900; }

.faq-list { margin-top: 1.4rem; display: grid; gap: .75rem; }

details:not(.locale-menu) {
  background: #fff;
  border: 3px solid var(--ink);
  border-radius: 14px;
  padding: .85rem 1rem;
}

summary { cursor: pointer; font-weight: 900; }
details p { margin-top: .65rem; }

.related-cities nav,
.subpage-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .7rem;
  margin-top: 1.1rem;
}

.related-cities nav a,
.subpage-nav a {
  display: flex;
  align-items: center;
  min-height: 54px;
  background: var(--card);
  border: 2px solid var(--ink);
  border-radius: 14px;
  padding: .7rem .85rem;
  font-weight: 850;
  line-height: 1.35;
  text-decoration: none;
}

.related-cities nav a:hover,
.subpage-nav a:hover { background: var(--yellow); }

footer {
  border-top: 3px solid var(--ink);
  padding: 1.6rem 1.25rem 2.5rem;
  text-align: center;
  font-size: .88rem;
}

html:lang(ko) body { word-break: keep-all; overflow-wrap: break-word; }

@media (max-width: 760px) {
  .brand { position: absolute; }
  main { width: min(100% - 1.5rem, 1120px); padding-top: 5rem; }
  .hero { padding-top: 2rem; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .location-grid { grid-template-columns: 1fr; }
  .location-head { display: block; }
  .location-kind { display: inline-block; margin-top: .55rem; }
}

@media (max-width: 620px) {
  .locale-menu { top: .72rem; right: .72rem; }
  .locale-menu summary { max-width: 43vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .related-cities nav,
  .subpage-nav { grid-template-columns: 1fr; }
}

@media (max-width: 420px) {
  .stats { grid-template-columns: 1fr 1fr; gap: .65rem; }
  .stat { min-height: 105px; box-shadow: 4px 4px 0 var(--ink); }
  .hours div { grid-template-columns: 1fr; gap: 0; }
  .hub-grid { grid-template-columns: 1fr; }
  .candidate-load,
  .candidate-more { width: 100%; }
}
