:root {
  --bg: #f4efe6;
  --surface: #fcf9f3;
  --surface-2: #efe8dd;
  --text: #111317;
  --muted: #515861;
  --line: rgba(17, 19, 23, 0.16);
  --accent: #2f4d63;
  --glass: rgba(252, 249, 243, 0.62);
  --radius: 20px;
  --max-width: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Manrope", "Inter", system-ui, sans-serif;
  background: radial-gradient(circle at 14% 0%, rgba(47, 77, 99, 0.12), transparent 44%), var(--bg);
  color: var(--text);
  line-height: 1.7;
  padding-bottom: 130px;
}

body[data-theme="dark"] {
  --bg: #101216;
  --surface: #171a20;
  --surface-2: #1f242d;
  --text: #f3efe7;
  --muted: #aab2bc;
  --line: rgba(255, 255, 255, 0.12);
  --accent: #88abc8;
  --glass: rgba(23, 26, 32, 0.68);
}

.container { width: min(calc(100% - 48px), var(--max-width)); margin: 0 auto; }
.section { padding: 44px 0; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.skip-link {
  position: fixed;
  left: 14px;
  top: 14px;
  z-index: 400;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  transform: translateY(calc(-100% - 18px));
  opacity: 0;
  pointer-events: none;
  transition: transform .2s ease, opacity .2s ease;
}
.skip-link:focus {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.hero {
  padding-top: 24px;
  display: flex;
  justify-content: center;
}
.hero-card {
  position: relative;
  width: min(100%, 760px);
  padding: clamp(28px, 4vw, 42px);
  border-radius: 34px;
  border: 1px solid color-mix(in oklab, var(--line) 75%, white 25%);
  background:
    radial-gradient(circle at top, rgba(47, 77, 99, 0.10), transparent 30%),
    linear-gradient(180deg, var(--surface) 0%, color-mix(in oklab, var(--surface) 92%, var(--bg)) 100%);
  box-shadow: 0 24px 70px rgba(10, 12, 18, 0.10);
  overflow: hidden;
  backdrop-filter: blur(20px) saturate(120%);
  -webkit-backdrop-filter: blur(20px) saturate(120%);
}
.hero-card::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: 33px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01));
  pointer-events: none;
}
.hero-card::after {
  content: "";
  position: absolute;
  inset: auto -16% -42% auto;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in oklab, var(--accent) 12%, transparent), transparent 70%);
  pointer-events: none;
}
.hero-card > * { position: relative; z-index: 1; }

.hero-copy h1,
.section-heading h2,
.team-panel h3 {
  margin: 0;
  font-family: "Cormorant Garamond", serif;
  letter-spacing: -0.02em;
  color: var(--text);
}

.hero-portrait-wrap {
  position: relative;
  display: flex;
  justify-content: center;
  margin-bottom: 32px;
}
.hero-portrait-wrap::before {
  content: "";
  position: absolute;
  width: min(70vw, 340px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(136, 171, 200, 0.24), transparent 68%);
  filter: blur(18px);
}
.portrait-frame {
  position: relative;
  width: min(100%, 228px);
  aspect-ratio: 1 / 1;
  padding: 10px;
  border-radius: 50%;
  background: linear-gradient(180deg, rgba(47, 77, 99, 0.08), rgba(47, 77, 99, 0.02));
  border: 1px solid var(--line);
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.10);
}
.hero-photo {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 20%;
}

.hero-copy { text-align: center; }
.hero-copy h1 {
  font-size: clamp(3.3rem, 11vw, 5.9rem);
  line-height: 0.86;
  font-weight: 700;
  color: var(--text);
}
.hero-eyebrow {
  margin: 24px 0 0;
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
}
.hero-subtitle {
  margin: 20px auto 0;
  max-width: 30ch;
  font-size: clamp(1.1rem, 2.3vw, 1.38rem);
  line-height: 1.5;
  color: var(--muted);
}
.hero-support {
  margin: 24px auto 0;
  max-width: 46ch;
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--muted);
}
.hero-metrics {
  display: none;
}
.hero-cta {
  display: flex;
  gap: 12px;
  margin-top: 34px;
  justify-content: center;
  flex-wrap: wrap;
}
.hero-card .button {
  min-width: 170px;
  min-height: 48px;
  flex: 1 1 200px;
  max-width: 240px;
  font-weight: 700;
}

.button {
  min-height: 46px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid var(--line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  transition: transform .2s ease, background .2s ease, border-color .2s ease;
}
.button:hover { transform: translateY(-1px); }
.button.primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 8px 20px rgba(8, 12, 17, 0.12);
}
.button.secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--line);
}

body[data-theme="dark"] .hero-card {
  border-color: rgba(255, 255, 255, 0.1);
  background:
    radial-gradient(circle at top, rgba(136, 171, 200, 0.18), transparent 32%),
    linear-gradient(180deg, rgba(11, 14, 20, 0.98) 0%, rgba(18, 23, 31, 0.94) 100%);
  box-shadow: 0 24px 70px rgba(10, 12, 18, 0.36);
}
body[data-theme="dark"] .portrait-frame {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.04));
}
body[data-theme="dark"] .button.primary {
  background: #dbe8f4;
  color: #0e141b;
  border-color: rgba(255, 255, 255, 0.18);
}
body[data-theme="dark"] .button.secondary {
  background: rgba(255, 255, 255, 0.06);
  color: #f6f1e8;
  border-color: rgba(255, 255, 255, 0.16);
}

.section-kicker { margin: 0 0 10px; font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); font-weight: 800; }
.section-heading h2 { font-size: clamp(2.5rem, 4.8vw, 4rem); line-height: 0.92; font-weight: 700; }
.section-heading.compact { margin-bottom: 28px; }
.section-collapsible-body[hidden] {
  display: none !important;
}
.collapsible-section .section-collapsible-body.open {
  animation: sectionReveal .28s ease;
  padding: 24px 0 0;
  background: transparent;
}
#contact .section-heading { margin-bottom: 30px; }

.impact-grid { display: grid; gap: 14px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.impact-card,
.about-preview,
.accordion-item,
.ai-card,
.team-panel,
.contact-card,
.member-item,
.workflow-pipeline li,
.ramen-map-card,
.ramen-panel,
.ramen-spot-card,
.book-card,
.book-filter,
.city-tab {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 16px;
}
.impact-card { padding: 20px 18px; }
.impact-card h3 {
  margin: 0 0 10px;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(1.8rem, 2.7vw, 2.5rem);
  line-height: 0.96;
  font-weight: 700;
}
.impact-card p { margin: 0; color: var(--muted); font-size: 0.9rem; }

.about-preview { padding: 28px; }
.about-preview p { margin: 0; color: var(--muted); font-size: 1.02rem; }
.about-preview p + p { margin-top: 14px; }

.experience-accordion { display: grid; gap: 12px; }
.accordion-toggle { width: 100%; border: 0; background: transparent; text-align: left; color: inherit; cursor: pointer; padding: 16px 18px; }
.accordion-header { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; }
.accordion-header h3 { margin: 0; font-size: clamp(1.2rem, 1.8vw, 1.52rem); line-height: 1.1; font-weight: 800; letter-spacing: -0.01em; }
.accordion-meta, .accordion-period, .experience-preview { color: var(--muted); font-size: 0.9rem; }
.accordion-meta { font-weight: 600; }
.experience-preview { grid-column: 1 / -1; margin-top: 2px; }
.accordion-body { max-height: 0; overflow: hidden; opacity: 0; padding: 0 18px; transition: max-height .3s ease, opacity .25s ease, padding .3s ease; }
.accordion-item.open .accordion-body { opacity: 1; padding: 0 18px 18px; }
.accordion-body p, .accordion-body li { color: var(--muted); }

@keyframes sectionReveal {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.ramen-intro-block {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
  align-items: flex-end;
  flex-wrap: wrap;
}
.ramen-intro,
.books-intro {
  margin: 0;
  max-width: 64ch;
  color: var(--muted);
  font-size: 0.97rem;
}
@media (min-width: 761px) {
  .ramen-intro,
  .books-intro {
    max-width: none;
    width: 100%;
  }
}
.books-shell-preview,
.ramen-shell-preview {
  gap: 16px;
}
.filter-count {
  opacity: 0.72;
}
.ramen-city-tabs,
.book-filter-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}
.ramen-city-tabs {
  margin-top: 18px;
}
.city-tab,
.book-filter {
  appearance: none;
  cursor: pointer;
  padding: 10px 14px;
  font: inherit;
  color: var(--muted);
  transition: transform .2s ease, border-color .2s ease, background .2s ease, color .2s ease;
}
.city-tab:hover,
.book-filter:hover { transform: translateY(-1px); }
.city-tab.active,
.book-filter.active {
  color: var(--text);
  border-color: color-mix(in oklab, var(--accent) 35%, var(--line));
  background: var(--surface);
}
body[data-theme="dark"] .city-tab.active,
body[data-theme="dark"] .book-filter.active {
  background: var(--surface);
}

.ramen-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 16px;
  align-items: start;
}
.ramen-map-card { overflow: hidden; }
.ramen-panel { overflow: hidden; }
.ramen-map {
  height: 560px;
  width: 100%;
  background: color-mix(in oklab, var(--surface-2) 70%, var(--surface));
}
.ramen-panel {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  height: 560px;
  box-sizing: border-box;
}
.ramen-panel-header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
  padding-bottom: 4px;
}
.ramen-panel-kicker,
.ramen-panel-meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.ramen-spot-list {
  display: grid;
  gap: 12px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  padding: 1px 2px 0 0;
}
.ramen-spot-card {
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr);
  gap: 14px;
  padding: 12px;
  cursor: pointer;
  transform: translateY(0);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.ramen-spot-card:hover,
.ramen-spot-card:focus-visible,
.ramen-spot-card.active {
  transform: translateY(0);
  border-color: color-mix(in oklab, var(--accent) 36%, var(--line));
  box-shadow: 0 0 0 1px color-mix(in oklab, var(--accent) 18%, transparent), 0 10px 24px rgba(10, 12, 18, 0.08);
  outline: none;
}
.ramen-spot-media {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 12px;
  background: var(--surface-2);
}
.ramen-spot-media img,
.map-popup img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.book-cover-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  padding: 8px;
}
.ramen-spot-copy h3,
.book-copy h3 {
  margin: 4px 0 8px;
  font-family: "Cormorant Garamond", serif;
  font-size: 1.7rem;
  line-height: 0.94;
  letter-spacing: -0.01em;
}
.ramen-spot-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.ramen-spot-copy p,
.book-note,
.book-author { margin: 0; color: var(--muted); font-size: 0.9rem; }
.book-author { font-size: 0.85rem; }

.map-popup {
  width: min(240px, 70vw);
}
.map-popup img {
  aspect-ratio: 4 / 3;
  border-radius: 10px;
  margin-bottom: 10px;
}
.map-popup-copy { display: grid; gap: 4px; }
.map-popup-copy p,
.map-popup-copy span {
  margin: 0;
  color: #5a6068;
  font-size: 0.78rem;
  line-height: 1.45;
}
.map-popup-copy strong {
  font-size: 1rem;
  line-height: 1.2;
  color: #141821;
}
.ramen-popup-shell .leaflet-popup-content-wrapper {
  border-radius: 16px;
  background: #fcf9f3;
  box-shadow: 0 14px 34px rgba(12, 14, 20, 0.18);
}
.ramen-popup-shell .leaflet-popup-content { margin: 12px; }
.ramen-popup-shell .leaflet-popup-tip { background: #fcf9f3; }

.books-shell {
  display: grid;
  gap: 18px;
}
.book-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.book-link {
  display: block;
  color: inherit;
  text-decoration: none;
}
.book-link:hover,
.book-link:focus-visible {
  text-decoration: none;
}
.book-card {
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr;
  height: 100%;
}
.book-cover-wrap {
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--surface-2);
}
.book-copy { padding: 16px; }
.book-category {
  display: inline-flex;
  margin-bottom: 8px;
  color: var(--accent);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 800;
}

.ai-section-layout { display: grid; gap: 20px; align-items: start; }
.ai-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr;
  align-items: stretch;
}
@media (min-width: 761px) {
  .ai-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.ai-card { padding: 18px; }
.ai-card h3 { margin: 0 0 8px; font-size: 1.05rem; font-weight: 700; }
.ai-card p { margin: 0; color: var(--muted); font-size: 0.92rem; }

.team-panel { padding: 20px; width: 100%; }
.team-panel h3 { font-size: clamp(1.9rem, 3vw, 2.5rem); line-height: 0.94; margin-bottom: 10px; font-weight: 700; }
.team-summary { margin: 0 0 12px; color: var(--muted); font-size: 0.94rem; }
.member-list { display: grid; gap: 10px; grid-template-columns: 1fr; margin-bottom: 12px; }
.member-item { padding: 12px; min-width: 0; width: 100%; box-sizing: border-box; }
.member-item h4 { margin: 0 0 6px; font-size: 0.92rem; }
.member-item h4 span { display: block; margin-top: 2px; color: var(--muted); font-size: 0.78rem; font-weight: 500; }
.member-item p { margin: 0; color: var(--muted); font-size: 0.82rem; }
@media (min-width: 761px) {
  .member-list { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.workflow-subtitle { margin: 16px 0 10px; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); }
.workflow-pipeline { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: 1fr; gap: 8px; counter-reset: step; }
.workflow-pipeline li { padding: 10px; font-size: 0.8rem; text-align: center; color: var(--muted); }
.workflow-pipeline li::before { content: counter(step); counter-increment: step; display: block; color: var(--accent); font-weight: 800; margin-bottom: 4px; }
@media (min-width: 761px) {
  .workflow-pipeline { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}

.knowhow-panel {
  display: grid;
  gap: 22px;
  align-items: center;
  padding: clamp(24px, 4vw, 34px);
  border: 1px solid var(--line);
  border-radius: 16px;
  background:
    linear-gradient(135deg, color-mix(in oklab, var(--surface) 92%, var(--accent) 8%), var(--surface)),
    var(--surface);
  box-shadow: 0 16px 42px rgba(10, 12, 18, 0.08);
}
.knowhow-copy h2 {
  margin: 0;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(2.4rem, 4.4vw, 3.8rem);
  line-height: 0.94;
  letter-spacing: -0.02em;
}
.knowhow-copy p:last-child {
  margin: 18px 0 0;
  max-width: 72ch;
  color: var(--muted);
}
.knowhow-actions {
  display: grid;
  gap: 12px;
  align-content: center;
  justify-items: start;
}
.knowhow-button {
  min-width: min(100%, 260px);
}
.knowhow-actions p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}
@media (min-width: 860px) {
  .knowhow-panel {
    grid-template-columns: minmax(0, 1fr) minmax(240px, 0.32fr);
  }
}

.contact-card { padding: 30px; text-align: center; margin-top: 20px; }
.closing {
  margin: 0;
  color: var(--text);
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(1.6rem, 2.4vw, 2.1rem);
  font-weight: 600;
  letter-spacing: -0.01em;
}
.contact-icons {
  list-style: none;
  padding: 0;
  margin: 22px 0 0;
  display: inline-flex;
  gap: 12px;
}
.contact-icons li { margin: 0; }
.contact-icon {
  width: 52px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--glass);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  color: var(--text);
  transition: transform .2s ease, border-color .2s ease, background .2s ease;
}
.contact-icon:hover { transform: translateY(-2px) scale(1.03); border-color: color-mix(in oklab, var(--accent) 45%, var(--line)); }
.contact-icon svg { width: 22px; height: 22px; fill: currentColor; }

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  z-index: 120;
  width: max-content;
  max-width: calc(100% - 24px);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
  gap: 4px;
  padding: 8px;
  border-radius: 999px;
  border: 1px solid color-mix(in oklab, var(--line) 80%, white 20%);
  background: var(--glass);
  backdrop-filter: blur(20px) saturate(145%);
  -webkit-backdrop-filter: blur(20px) saturate(145%);
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.18);
}
.nav-item {
  position: relative;
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  border: 1px solid transparent;
  transition: transform .2s ease, color .2s ease, border-color .2s ease, background .2s ease;
  flex: 0 0 auto;
}
.nav-item:hover {
  transform: translateY(-2px) scale(1.04);
  color: var(--text);
  border-color: var(--line);
  background: color-mix(in oklab, var(--surface) 74%, transparent);
}
.nav-item.active {
  color: var(--text);
  border-color: color-mix(in oklab, var(--accent) 34%, var(--line));
  background: color-mix(in oklab, var(--surface) 88%, var(--accent) 12%);
  box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--accent) 16%, transparent);
}
body[data-theme="dark"] .nav-item.active {
  background: color-mix(in oklab, var(--surface) 80%, var(--accent) 20%);
}
.nav-item::after {
  content: none;
}
.nav-icon {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  flex: 0 0 auto;
}
.nav-icon svg {
  width: 18px;
  height: 18px;
  display: block;
}
.nav-item.active .nav-icon {
  color: var(--accent);
}
.nav-label {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  transform: translateX(-50%) translateY(4px);
  opacity: 0;
  pointer-events: none;
  white-space: nowrap;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid color-mix(in oklab, var(--line) 80%, white 20%);
  background: color-mix(in oklab, var(--surface) 96%, transparent);
  color: var(--text);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
  transition: opacity .18s ease, transform .18s ease;
  z-index: 2;
}
.nav-item.active .nav-label {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
@media (hover: hover) and (pointer: fine) {
  .nav-item:hover .nav-label,
  .nav-item:focus-visible .nav-label {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

.nav-separator {
  width: 1px;
  height: 24px;
  margin: 0 2px;
  background: color-mix(in oklab, var(--line) 88%, transparent);
  flex: 0 0 auto;
}

.dock-control {
  border-radius: 999px;
  border: 1px solid var(--line);
  background: color-mix(in oklab, var(--surface) 86%, transparent);
  color: var(--muted);
}
.theme-toggle,
.language-trigger {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
  flex: 0 0 auto;
}

.language-menu-wrap {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
}
.language-menu {
  position: absolute;
  right: 0;
  bottom: calc(100% + 10px);
  z-index: 260;
  display: grid;
  gap: 4px;
  padding: 6px;
  min-width: 116px;
  border-radius: 14px;
  border: 1px solid color-mix(in oklab, var(--line) 80%, white 20%);
  background: color-mix(in oklab, var(--glass) 92%, black 8%);
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.2);
}
.language-menu[hidden] { display: none; }
.language-menu button {
  border: 0;
  background: transparent;
  color: var(--muted);
  min-height: 32px;
  padding: 0 10px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.74rem;
  font-weight: 700;
  text-align: left;
  white-space: nowrap;
}
.language-menu button:hover {
  color: var(--text);
  background: color-mix(in oklab, var(--surface) 78%, transparent);
}
.language-menu button.active {
  background: var(--text);
  color: var(--surface);
}

.site-footer { border-top: 1px solid var(--line); padding: 24px 0 106px; }
.footer-inner p { margin: 0; color: var(--muted); font-size: 0.9rem; }
.footer-copyright { margin-top: 8px !important; font-size: 0.78rem !important; opacity: 0.7; }
.ramen-spot-links,
.map-popup-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 10px;
}
.ramen-rating,
.map-popup-links em {
  font-style: normal;
  font-size: 0.76rem;
  color: var(--muted);
}
.ramen-spot-links a,
.map-popup-links a {
  font-size: 0.76rem;
  font-weight: 700;
  text-decoration: none;
}

.map-popup-links a {
  color: #141821;
}

.ramen-spot-links a {
  color: var(--accent-strong);
}
.ramen-spot-links a:hover,
.map-popup-links a:hover { text-decoration: underline; }

.leaflet-control-attribution,
.leaflet-control-zoom a {
  font-family: inherit;
}
.leaflet-control-zoom a {
  background: var(--surface) !important;
  color: var(--text) !important;
  border-color: var(--line) !important;
}
.leaflet-touch .leaflet-bar a:first-child,
.leaflet-touch .leaflet-bar a:last-child {
  border-radius: 12px;
}
.leaflet-popup-content-wrapper,
.leaflet-popup-tip { color: var(--text); }

[data-reveal] { opacity: 0; transform: translateY(14px); transition: opacity .5s ease, transform .5s ease; }
[data-reveal].visible { opacity: 1; transform: translateY(0); }

@media (max-width: 980px) {
  .ramen-grid { grid-template-columns: 1fr; }
  .ramen-panel {
    min-height: 0;
    height: auto;
  }
  .book-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  body { padding-bottom: 112px; }
  .container { width: min(calc(100% - 24px), var(--max-width)); }
  .section { padding: 32px 0; }
  .section-heading.compact { margin-bottom: 20px; }
  .books-shell,
  .ramen-shell { gap: 12px; }
  .books-shell-preview,
  .ramen-shell-preview { gap: 12px; }
  .books-intro,
  .ramen-intro {
    font-size: 0.94rem;
    line-height: 1.6;
  }
  .book-filter-row,
  .ramen-city-tabs { gap: 8px; }
  .ramen-city-tabs { margin-top: 12px; }
  .book-filter,
  .city-tab { padding: 9px 12px; }
  .collapsible-section .section-collapsible-body.open { padding-top: 16px; }
  .hero { padding-top: 24px; }
  .hero-card {
    width: 100%;
    padding: 26px 18px 22px;
    border-radius: 28px;
  }
  .hero-card::before { border-radius: 27px; }
  .portrait-frame { width: min(100%, 190px); }
  .hero-copy h1 { font-size: clamp(2.9rem, 18vw, 4.2rem); }
  .hero-subtitle { max-width: 20ch; }
  .hero-support {
    max-width: 100%;
    font-size: 0.9rem;
  }

  .hero-card .button {
    max-width: none;
    flex-basis: 100%;
  }
  .impact-grid,
  .book-grid { grid-template-columns: 1fr; }
  .ai-grid { grid-template-columns: 1fr; }
  .accordion-toggle { padding: 16px; }
  .accordion-header { grid-template-columns: 1fr; gap: 8px; }
  .accordion-header h3 { font-size: 1.5rem; }
  .accordion-period,
  .accordion-meta {
    display: block;
    width: 100%;
  }
  .accordion-period {
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.01em;
  }
  .accordion-meta {
    font-size: 1rem;
  }
  .experience-preview {
    margin-top: 0;
    font-size: 0.96rem;
    line-height: 1.55;
  }
  .accordion-body { padding: 0 16px; }
  .accordion-item.open .accordion-body { padding: 0 16px 16px; }
  .member-list {
    display: grid;
    grid-template-columns: 1fr;
    overflow-x: visible;
  }
  .member-item {
    width: 100%;
    min-width: 0;
  }
  .workflow-pipeline { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ramen-shell { padding: 0; }
  .ramen-map { height: 360px; }
  .ramen-panel { padding: 14px; }
  .ramen-spot-card {
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 12px;
  }
  .ramen-spot-copy h3,
  .book-copy h3 { font-size: 1.45rem; }
  .contact-card {
    padding: 20px 16px;
    margin-top: 12px;
  }
  .contact-icons { margin-top: 16px; }
  .bottom-nav {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    width: auto;
    max-width: calc(100% - 20px);
    bottom: 12px;
    gap: 3px;
    padding: 6px;
    overflow: auto;
    justify-content: flex-start;
  }
  .bottom-nav::-webkit-scrollbar { display: none; }
  .nav-item,
  .theme-toggle,
  .language-trigger {
    width: 36px;
    height: 36px;
  }
  .nav-label {
    bottom: calc(100% + 8px);
    font-size: 0.64rem;
    padding: 5px 8px;
    max-width: min(96px, calc(100vw - 24px));
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .bottom-nav {
    overflow: visible;
    padding-right: 10px;
  }
  .language-menu-wrap {
    position: relative;
    flex: 0 0 auto;
    z-index: 130;
  }
  .language-trigger {
    position: relative;
    z-index: 131;
    touch-action: manipulation;
  }
  .language-menu {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: 64px;
    min-width: 0;
    max-width: none;
    width: auto;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    z-index: 9999;
  }
  .language-menu button {
    justify-content: center;
    text-align: center;
  }
  .language-menu button { min-height: 30px; padding: 0 8px; font-size: 0.66rem; }
  .site-footer { padding-bottom: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  [data-reveal] { opacity: 1; transform: none; }
}

.nav-tooltip {
  position: fixed;
  left: 50%;
  bottom: 72px;
  transform: translateX(-50%);
  opacity: 0;
  pointer-events: none;
  white-space: nowrap;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid color-mix(in oklab, var(--line) 80%, white 20%);
  background: color-mix(in oklab, var(--surface) 96%, transparent);
  color: var(--text);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  transition: opacity .18s ease, transform .18s ease, left .18s ease, bottom .18s ease;
  z-index: 180;
}
.nav-tooltip.visible { opacity: 1; }
@media (max-width: 760px) {
  .nav-tooltip {
    bottom: 60px;
    font-size: 0.64rem;
    padding: 5px 8px;
    max-width: calc(100vw - 24px);
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

@media (max-width: 390px) {
  /* Extra-tight phones: keep gutters + chips feeling aligned */
  .container { width: min(calc(100% - 20px), var(--max-width)); }
  .section { padding: 28px 0; }
  .books-intro,
  .ramen-intro { font-size: 0.9rem; line-height: 1.55; }
  .book-filter,
  .city-tab { padding: 8px 10px; }
  .books-shell-preview,
  .ramen-shell-preview { gap: 10px; }
  .ramen-spot-card {
    grid-template-columns: 84px minmax(0, 1fr);
    gap: 10px;
  }
  .ramen-map { height: 320px; }
  .ramen-panel { padding: 12px; }
  .contact-card { padding: 18px 14px; }
}

/* ── Utility buttons (Copy for LLM / View as Markdown) ── */
.hero-cta-utils {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  justify-content: center;
  flex-wrap: wrap;
}
.button.utility {
  min-height: 34px;
  padding: 0 14px;
  font-size: 0.78rem;
  font-weight: 600;
  gap: 5px;
  background: transparent;
  color: var(--muted);
  border-color: var(--line);
  cursor: pointer;
}
.button.utility:hover {
  color: var(--text);
  background: color-mix(in oklab, var(--surface-2) 70%, transparent);
  border-color: color-mix(in oklab, var(--line) 120%, transparent);
}
body[data-theme="dark"] .button.utility {
  color: var(--muted);
  border-color: rgba(255, 255, 255, 0.12);
}
body[data-theme="dark"] .button.utility:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.2);
}
/* Override hero-card .button flex sizing for utility buttons */
.hero-card .button.utility {
  flex: 0 1 auto;
  min-width: 0;
  max-width: none;
  min-height: 34px;
  font-weight: 600;
}

/* ── Toast notification ── */
.site-toast {
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  z-index: 600;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}
.site-toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ── Markdown modal ── */
.md-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: stretch;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s ease;
}
.md-modal-backdrop.visible {
  opacity: 1;
  pointer-events: auto;
}
.md-modal {
  position: relative;
  width: min(calc(100% - 32px), 760px);
  max-height: calc(100dvh - 48px);
  margin: auto;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.28);
  transform: translateY(12px);
  transition: transform .22s ease;
}
.md-modal-backdrop.visible .md-modal {
  transform: translateY(0);
}
.md-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}
.md-modal-header h2 {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
}
.md-modal-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}
.md-modal-copy {
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s ease;
}
.md-modal-copy:hover {
  background: var(--surface-2);
}
.md-modal-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s ease, color .15s ease;
}
.md-modal-close:hover {
  background: var(--surface-2);
  color: var(--text);
}
.md-modal-body {
  overflow-y: auto;
  padding: 20px;
  flex: 1;
}
.md-modal-body pre {
  margin: 0;
  font-family: "SFMono-Regular", "Consolas", "Liberation Mono", monospace;
  font-size: 0.82rem;
  line-height: 1.65;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
}
@media (max-width: 760px) {
  .md-modal {
    max-height: calc(100dvh - 24px);
    border-radius: 16px;
  }
  .md-modal-body pre { font-size: 0.76rem; }
}
