/* Hallmark · redesign: atmospheric Hakka travel guide · macrostructure: route-led directory ·
 * pre-emit critique: P5 H5 E5 S5 R5 V5 · mobile: pass target (34,49,50,51)
 */
:root {
  --page-max: 1160px;
  --bg: #f2eadc;
  --paper: #fffdf8;
  --paper-solid: #fffaf0;
  --paper-soft: #f8ead5;
  --paper-warm: #fffdf8;
  --paper-depth: #ecdfca;
  --paper-button: #f3e5cf;
  --paper-table: #e7d3b2;
  --paper-faint: #fff7e9;
  --ink: #1d1712;
  --ink-soft: #35291f;
  --ink-inverse: #fff7e8;
  --muted: #6d5b4b;
  --muted-strong: #4e4032;
  --line: rgba(74, 60, 46, 0.16);
  --line-strong: rgba(74, 60, 46, 0.32);
  --line-light: rgba(255, 255, 255, 0.78);
  --footer-bg: #2f2b25;
  --red: #b43b36;
  --blue: #245e77;
  --green: #4f7444;
  --gold: #c4852d;
  --teal: #2f7569;
  --hakka-pink: #d65f86;
  --hakka-indigo: #315d94;
  --persimmon: #d87a26;
  --surface-glow: rgba(255, 255, 255, 0.72);
  --focus-ring: rgba(36, 95, 117, 0.52);
  --shadow: 0 1px 2px rgba(38, 31, 23, 0.04);
  --shadow-lift: 0 6px 20px rgba(38, 31, 23, 0.09);
  --shadow-soft: 0 1px 2px rgba(38, 31, 23, 0.05);
  --accent: var(--blue);
  --accent-ink: #ffffff;
  --font-body: "Hiragino Sans", "Noto Sans JP", "Noto Sans TC", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: "Hiragino Mincho ProN", "Yu Mincho", "Songti TC", "Noto Serif TC", Georgia, serif;
  --radius: 4px;
  font-family: var(--font-body);
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html,
body {
  overflow-x: clip;
}

body {
  margin: 0;
  background: #f6f1e7;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.8;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

/* 紙の質感: ごく淡いグレインのみ。装飾模様は置かない */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: radial-gradient(circle, rgba(74, 60, 46, 0.5) 0 0.5px, transparent 1px);
  background-size: 4px 4px;
  opacity: 0.05;
}

/* 街ごとのアクセント（構造は共通、色だけ切り替える） */
body[data-town="zhudong"] { --accent: #4f7444; }
body[data-town="beipu"] { --accent: #245e77; }
body[data-town="neiwan"] { --accent: #b0521f; }

a {
  color: var(--blue);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--red);
}

:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 3px;
  border-radius: 6px;
}

.legal-container {
  max-width: 900px;
  margin: 2rem auto;
  padding: clamp(1.25rem, 4vw, 2rem);
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.legal-container h1 {
  border-bottom: 2px solid var(--accent);
  padding-bottom: 0.5rem;
  margin-bottom: 1.5rem;
}

.legal-container h2 {
  margin-top: 2rem;
  font-size: 1.25rem;
}

.legal-container p,
.legal-container li {
  line-height: 1.7;
}

.consent-settings-button {
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid var(--accent);
  border-radius: 4px;
  background: var(--paper-button);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
}

.consent-settings-button:hover,
.consent-settings-button:focus-visible {
  border-color: var(--ink);
  background: var(--paper-depth);
}

.consent-settings-status {
  min-height: 1.7em;
  color: var(--muted);
}

.legal-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.25rem 0;
}

.legal-notice {
  padding: 1rem;
  border-left: 4px solid var(--accent);
  background: var(--bg-card);
}

.contact-form-card {
  margin: 1.5rem 0;
  padding: clamp(1rem, 3vw, 1.5rem);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--paper-faint);
}

.contact-form-card h2 {
  margin-top: 0;
}

.contact-form-link {
  display: inline-block;
  padding: 0.65rem 1rem;
  color: var(--accent-ink);
  background: var(--accent);
  border-radius: 6px;
  text-decoration: none;
}

.contact-form-link:hover {
  color: var(--accent-ink);
  filter: brightness(0.9);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(250, 246, 238, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.site-header::before {
  content: "";
  display: block;
  height: 3px;
  background: var(--accent);
}

.header-inner {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0 10px;
  align-items: center;
  color: var(--ink);
  font-weight: 800;
  line-height: 1.12;
  min-width: min(260px, 100%);
  text-decoration: none;
}

.brand::before {
  content: "";
  grid-row: span 2;
  width: 38px;
  height: 38px;
  background: url("brand-mark.svg") center / contain no-repeat;
}

.brand span {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.4vw, 2rem);
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.05;
  overflow-wrap: normal;
  white-space: nowrap;
  word-break: keep-all;
  writing-mode: horizontal-tb;
}

.brand small {
  display: block;
  color: var(--muted);
  font-weight: 800;
  font-size: clamp(0.78rem, 1.15vw, 0.95rem);
  line-height: 1.2;
  overflow-wrap: normal;
  white-space: nowrap;
  word-break: keep-all;
  writing-mode: horizontal-tb;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
  min-width: 0;
}

.main-nav a,
.lang button {
  border: 1px solid transparent;
  background: transparent;
  border-radius: 3px;
  color: var(--ink);
  min-height: 44px;
  padding: 9px 12px;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
  text-decoration: none;
  white-space: nowrap;
}

.main-nav a:hover,
.lang button:hover {
  background: var(--paper-depth);
  border-color: var(--line);
}

.main-nav a[aria-current="page"] {
  background: transparent;
  border-color: transparent;
  color: var(--accent);
  box-shadow: inset 0 -2px 0 var(--accent);
  border-radius: 0;
}

.lang button.active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--ink-inverse);
}

.lang {
  display: flex;
  flex: 0 0 auto;
  gap: 4px;
  padding-left: 8px;
  border-left: 1px solid var(--line);
}

.hero {
  background:
    linear-gradient(180deg, rgba(20, 18, 15, 0.42) 0%, rgba(20, 18, 15, 0.34) 38%, rgba(20, 18, 15, 0.82) 100%),
    var(--hero-image, url("https://commons.wikimedia.org/wiki/Special:FilePath/Old%20Street%20Neiwan.jpg")) center / cover;
  color: #fff;
  min-height: 64vh;
  display: grid;
  align-items: end;
  isolation: isolate;
}

.hero-inner {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: clamp(72px, 10vw, 120px) 20px clamp(52px, 7vw, 76px);
  width: 100%;
}

.hero h1 {
  max-width: 880px;
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 6vw, 4.6rem);
  line-height: 1.1;
  letter-spacing: 0.01em;
  overflow-wrap: anywhere;
  min-width: 0;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.45);
}

.hero p {
  max-width: 720px;
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  margin: 0;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.55);
  padding: 0;
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
  max-width: 900px;
}

.hero-actions a,
.card > p:last-child a,
.shop-list-card > p:last-child a,
.info-band a,
.section-actions a,
.shop-jump a {
  align-items: center;
  background: var(--paper-solid);
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  box-shadow: none;
  color: var(--ink);
  display: inline-flex;
  gap: 7px;
  justify-content: center;
  min-height: 44px;
  padding: 10px 16px;
  font-weight: 700;
  text-decoration: none;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
  white-space: nowrap;
}

/* 最初の行動を主役にし、残りは補助的に見せる */
.hero-actions a:first-child {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}

.hero-actions a:not(:first-child) {
  background: rgba(20, 18, 15, 0.55);
  border-color: rgba(255, 253, 248, 0.72);
  color: #fffaf0;
}

.card > p:last-child a:hover,
.shop-list-card > p:last-child a:hover,
.info-band a:hover,
.section-actions a:hover,
.shop-jump a:hover {
  background: var(--paper-depth);
  border-color: var(--ink-soft);
  color: var(--ink);
}

.hero-actions a:first-child:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--accent-ink);
}

.hero-actions a:not(:first-child):hover {
  background: rgba(20, 18, 15, 0.78);
  color: #fffaf0;
}

.hero-credit {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 6px 20px 0;
  color: var(--muted);
  font-size: 0.7rem;
  opacity: 0.85;
}

.hero-note {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 6px 20px 0;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.5;
}

.page-title {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: clamp(30px, 4.4vw, 56px) 20px 20px;
  border-bottom: 1px solid var(--line);
}

.page-title h1 {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.4vw, 3.3rem);
  line-height: 1.04;
  overflow-wrap: anywhere;
  min-width: 0;
}

.page-title p {
  margin: 0;
  max-width: 780px;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.8;
}

main {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: clamp(24px, 3.4vw, 38px) 20px 88px;
}

section {
  margin: 0 0 clamp(34px, 5vw, 56px);
  scroll-margin-top: 110px;
}

main > section {
  position: relative;
}

h2 {
  font-family: var(--font-display);
  font-size: clamp(1.42rem, 2.4vw, 2.05rem);
  margin: 0 0 18px;
  line-height: 1.2;
  display: flex;
  align-items: center;
  gap: 12px;
  letter-spacing: 0;
  overflow-wrap: anywhere;
  min-width: 0;
}

h2::before {
  content: "";
  flex: 0 0 auto;
  width: 3px;
  height: 1.05em;
  border-radius: 0;
  background: var(--accent);
}

h3 {
  margin: 0 0 8px;
  font-size: 1.18rem;
  line-height: 1.35;
  color: var(--ink-soft);
  overflow-wrap: anywhere;
  min-width: 0;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 2.4vw, 24px);
  align-items: stretch;
}

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

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

.map-link-grid .card p a {
  margin: 4px 6px 4px 0;
}

.card,
.info-band,
.table-wrap {
  background: var(--paper-solid);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  position: relative;
}

.card {
  display: grid;
  align-content: start;
  gap: 8px;
  height: 100%;
  padding: clamp(18px, 2.2vw, 24px);
  transform: translateY(0);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.card:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-lift);
  transform: translateY(-2px);
}

.reveal-ready .reveal-on-scroll {
  opacity: 0;
  transform: translate3d(0, 10px, 0);
  transition:
    opacity 380ms ease,
    transform 380ms ease,
    box-shadow 220ms ease,
    border-color 220ms ease;
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}

.reveal-ready .reveal-on-scroll.is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
}

.reveal-ready .card.reveal-on-scroll.is-visible:hover {
  transform: translateY(-3px);
}

.reveal-ready .info-band.reveal-on-scroll.is-visible:hover,
.reveal-ready .table-wrap.reveal-on-scroll.is-visible:hover {
  transform: translateY(-3px);
}

.reveal-ready .photo.reveal-on-scroll.is-visible {
  box-shadow: 0 24px 70px rgba(38, 31, 23, 0.18), 0 8px 20px rgba(38, 31, 23, 0.08);
}

.card-accent {
  min-height: 2px;
  width: 40px;
  border-radius: 0;
  background: var(--accent);
  margin-bottom: 8px;
}

.card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.62;
}

.card > p:last-child {
  margin-top: 2px;
}

.card > p:last-child:has(a) {
  align-self: end;
  margin-top: auto;
}

.photo {
  margin: 0 0 clamp(36px, 6vw, 56px);
  background: var(--paper-solid);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.photo img,
.card-photo {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
}

.photo img {
  aspect-ratio: 16 / 7;
  object-fit: cover;
}

.card-photo {
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 8px;
  margin: 0;
  box-shadow: var(--shadow-soft);
}

.card .image-credit {
  padding: 5px 2px 0;
  font-size: 0.6rem;
  line-height: 1.35;
  border-radius: 0;
  background: transparent;
  opacity: 0.82;
}

.image-credit {
  margin: 0;
  padding: 8px 10px;
  color: var(--muted);
  font-size: 0.76rem;
  background: rgba(255, 250, 242, 0.92);
}

.image-credit a {
  color: var(--blue);
}

.starter-guide {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(14px, 2vw, 20px);
  padding: clamp(18px, 2.8vw, 28px);
  background: var(--paper-warm);
  border: 1px solid var(--line);
  border-top: 3px solid var(--accent);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.starter-step {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 6px 12px;
  align-items: start;
}

.starter-number {
  grid-row: span 2;
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent);
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0;
}

.starter-step h3 {
  margin: 2px 0 0;
}

.starter-step p {
  margin: 0;
  color: var(--muted);
  line-height: 1.62;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 12px;
}

.tag {
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--muted-strong);
  display: inline-flex;
  padding: 4px 11px;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.info-band {
  padding: clamp(18px, 2.6vw, 26px);
  display: grid;
  gap: 14px;
  transition: box-shadow 180ms ease, transform 180ms ease;
}

.info-band:hover,
.table-wrap:hover {
  box-shadow: var(--shadow-lift);
}

.route-map {
  display: grid;
  gap: 12px;
}

.section-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 0;
}

.section-actions a,
.shop-jump a {
  white-space: nowrap;
}

.section-actions.center {
  justify-content: center;
}

.shop-jump {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 28px;
}

.shop-count {
  color: var(--muted);
  font-weight: 800;
  margin: -10px 0 18px;
}

.shop-list {
  display: grid;
  gap: 12px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.shop-list-card {
  background: var(--paper-solid);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: grid;
  gap: 10px;
  overflow: hidden;
  padding: 20px 18px 18px;
  position: relative;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.shop-list-card::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 2px;
  background: var(--accent);
}

.shop-list-card:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-lift);
  transform: translateY(-2px);
}

.shop-list-card h3 {
  margin: 0;
}

.shop-list-card p {
  color: var(--muted);
  margin: 0;
}

.town-pill {
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--muted-strong);
  display: inline-flex;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
  padding: 3px 10px;
}

.route-row {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 16px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.route-row:last-child {
  border-bottom: 0;
}

.route-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.node {
  border: 1px solid var(--line);
  background: var(--paper-warm);
  border-radius: 3px;
  padding: 6px 11px;
  font-size: 0.9rem;
}

.arrow {
  color: var(--muted);
  font-weight: 800;
}

.table-wrap {
  overflow-x: auto;
  transition: box-shadow 180ms ease;
}

table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

th,
td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  background: var(--paper-soft);
  color: #3b3328;
  font-size: 0.92rem;
  position: sticky;
  top: 0;
  z-index: 1;
}

tbody tr {
  transition: background 150ms ease;
}

tbody tr:hover {
  background: rgba(255, 255, 255, 0.55);
}

tr:last-child td {
  border-bottom: 0;
}

.notice {
  border: 1px solid var(--line);
  border-left: 3px solid var(--gold);
  padding: 16px 18px;
  background: #fffaef;
  border-radius: var(--radius);
}

.source-list {
  display: grid;
  gap: 12px;
}

.source-list li {
  padding-bottom: 10px;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--footer-bg);
  color: #f6efe4;
}

.footer-inner {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 28px 20px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-inner a {
  color: #f6dba8;
}

.footer-note {
  flex: 1 1 320px;
  margin: 0;
  font-weight: 800;
  line-height: 1.8;
  color: #fff7e8;
}

.share-actions {
  max-width: var(--page-max);
  margin: 10px auto 28px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.share-button {
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid var(--accent);
  border-radius: 3px;
  background: var(--accent);
  color: var(--accent-ink);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease;
}

.share-button:hover {
  background: var(--ink);
  border-color: var(--ink);
}

.share-status {
  min-height: 1.4em;
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.mobile-bottom-nav {
  display: none;
}

.i18n {
  display: none;
}

body[data-lang="ja"] .i18n-ja,
body[data-lang="en"] .i18n-en,
body[data-lang="zh"] .i18n-zh {
  display: initial;
}

body[data-lang="ja"] .i18n-block.i18n-ja,
body[data-lang="en"] .i18n-block.i18n-en,
body[data-lang="zh"] .i18n-block.i18n-zh {
  display: block;
}

@media (max-width: 1120px) {
  .header-inner {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .brand {
    min-width: 0;
    width: 100%;
  }

  .brand::before {
    width: 34px;
    height: 34px;
  }

  .main-nav {
    justify-content: flex-start;
    width: 100%;
  }

  .lang {
    margin-left: auto;
  }

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

  .grid.two {
    grid-template-columns: 1fr;
  }

  .starter-guide {
    grid-template-columns: 1fr;
  }

  main {
    padding-top: 28px;
  }

  section {
    margin-bottom: 48px;
  }

  .card {
    padding: 18px;
  }

  .card-photo {
    aspect-ratio: 16 / 9;
  }
}

@media (max-width: 860px) {
  body::before {
    opacity: 0.18;
    background-size: 46px 46px, 46px 46px;
    background-position: 0 0, 23px 23px;
  }

  .header-inner {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .main-nav {
    justify-content: flex-start;
    max-width: 100%;
    overflow: visible;
    padding-bottom: 0;
    flex-wrap: wrap;
  }

  .lang {
    border-left: 0;
    border-top: 1px solid var(--line);
    padding: 8px 0 0;
    width: 100%;
  }

  .grid.two {
    grid-template-columns: 1fr;
  }

  h2 {
    font-size: clamp(1.42rem, 7vw, 2rem);
    margin-bottom: 12px;
  }

  h3 {
    font-size: 1.08rem;
  }

  .card,
  .shop-list-card,
  .info-band {
    box-shadow: 0 10px 28px rgba(38, 31, 23, 0.1);
  }

  .card {
    gap: 8px;
    padding: 16px;
  }

  main {
    padding-top: 20px;
  }

  section {
    margin-bottom: 34px;
  }

  .notice {
    padding: 14px 16px;
    font-size: 0.96rem;
    line-height: 1.65;
  }

  .card p {
    line-height: 1.65;
  }

  .card .image-credit {
    font-size: 0.66rem;
  }

  .route-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  body {
    padding-bottom: calc(76px + env(safe-area-inset-bottom));
  }

  .site-header {
    position: sticky;
  }

  .header-inner {
    align-items: stretch;
    flex-direction: column;
    gap: 8px;
    padding-block: 10px;
  }

  .brand {
    min-width: 0;
    width: 100%;
  }

  .brand span {
    max-width: 100%;
    font-size: clamp(1.18rem, 6vw, 1.54rem);
    line-height: 1.08;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .brand small {
    display: block;
    max-width: 100%;
    font-size: 0.78rem;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .main-nav {
    flex: 0 0 auto;
    justify-content: flex-end;
    width: 100%;
  }

  .main-nav > a {
    display: none;
  }

  .lang {
    display: flex;
    justify-content: flex-end;
    width: 100%;
    padding: 0;
    border: 0;
  }

  .hero {
    min-height: 58vh;
  }

  .hero-inner {
    padding-top: 58px;
    padding-bottom: 42px;
  }

  .main-nav a,
  .lang button {
    min-height: 44px;
    padding: 8px 10px;
    font-size: 0.85rem;
    white-space: nowrap;
  }

  main {
    padding-inline: 14px;
  }

  .page-title,
  .hero-inner,
  .header-inner,
  .footer-inner,
  .share-actions {
    padding-inline: 14px;
  }

  .page-title {
    padding-top: 18px;
    padding-bottom: 14px;
  }

  .page-title h1 {
    font-size: clamp(1.85rem, 10vw, 2.8rem);
  }

  .page-title p {
    font-size: 0.98rem;
    line-height: 1.58;
  }

  .source-list {
    gap: 8px;
  }

  .source-list li {
    padding-bottom: 6px;
  }

  .photo img {
    aspect-ratio: 4 / 3;
  }

  .card-photo {
    aspect-ratio: 4 / 3;
  }

  .hero h1 {
    font-size: clamp(2.3rem, 11vw, 3.6rem);
  }

  .hero p {
    padding: 12px;
    font-size: 1rem;
  }

  .hero-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .hero-actions a,
  .section-actions a,
  .shop-jump a {
    width: 100%;
    min-width: 0;
  }

  .section-actions,
  .shop-jump {
    display: grid;
    grid-template-columns: 1fr;
  }

  .mobile-bottom-nav {
    position: fixed;
    right: 10px;
    bottom: 10px;
    left: 10px;
    z-index: 30;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 4px;
    padding: 8px;
    padding-bottom: calc(8px + env(safe-area-inset-bottom));
    background: rgba(252, 249, 242, 0.96);
    border: 1px solid var(--line);
    border-radius: 4px;
    box-shadow: 0 4px 20px rgba(38, 31, 23, 0.14);
    backdrop-filter: blur(14px);
  }

  .mobile-bottom-nav a {
    display: grid;
    place-items: center;
    min-height: 44px;
    padding: 6px 4px;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 800;
    line-height: 1.15;
    text-align: center;
    text-decoration: none;
    border-radius: 8px;
  }

  .mobile-bottom-nav a[aria-current="page"] {
    color: var(--accent-ink);
    background: var(--accent);
  }
}

@media (max-width: 380px) {
  .brand span {
    font-size: clamp(1.08rem, 7vw, 1.34rem);
  }

  .brand small {
    display: block;
    font-size: 0.7rem;
  }

  .lang button {
    padding-inline: 8px;
    font-size: 0.78rem;
  }

  .mobile-bottom-nav a {
    font-size: 0.72rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }

  .reveal-ready .reveal-on-scroll {
    opacity: 1;
    transform: none;
  }
}

/* ==========================================================================
   新竹県エリア情報（天気 & ニュース）スタイル
   ========================================================================== */
.hsinchu-info-section {
  margin: clamp(24px, 4vw, 40px) 0;
  padding: clamp(18px, 3vw, 30px);
  background: var(--paper-warm);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hsinchu-info-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 0;
  margin-bottom: 20px;
  font-size: clamp(1.2rem, 2.5vw, 1.5rem);
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}

.hsinchu-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}

@media (max-width: 860px) {
  .hsinchu-info-grid {
    grid-template-columns: 1fr;
  }
}

.info-box {
  background: #ffffff;
  border: 1px solid var(--line-light);
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
  align-self: start;
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
  box-sizing: border-box;
}

.info-box-title {
  margin-top: 0;
  margin-bottom: 14px;
  font-size: 1.05rem;
  color: var(--teal);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* 週間天気予報スタイル（横並び表示） */
.weather-location-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.location-btn {
  background: var(--bg-card, #f8f6f0);
  color: var(--ink-light, #555555);
  border: 1px solid var(--line, #e2dacd);
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s ease;
}

.location-btn:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 3px;
}

.location-btn:hover {
  background: var(--line-light, #eae3d5);
  color: var(--ink, #222222);
  border-color: var(--teal, #2b7a78);
}

.location-btn.active {
  background: var(--teal, #2b7a78);
  color: #ffffff;
  border-color: var(--teal, #2b7a78);
  box-shadow: 0 2px 6px rgba(43, 122, 120, 0.3);
}

.weather-grid {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  justify-content: flex-start !important;
  align-items: stretch !important;
  gap: 6px !important;
  width: 100% !important;
  overflow-x: auto !important;
  padding-bottom: 8px !important;
  -webkit-overflow-scrolling: touch;
}

.weather-card {
  flex: 0 0 96px !important;
  min-width: 92px !important;
  max-width: 105px !important;
  min-height: 185px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 10px 4px !important;
  background: var(--paper, #ffffff);
  border: 1px solid var(--line-light, #e0e0e0);
  border-radius: 8px;
  text-align: center;
  font-size: 0.82rem;
  box-sizing: border-box !important;
}

.weather-uv {
  font-size: 0.7rem;
  font-weight: 600;
  margin-top: 4px;
  line-height: 1.25;
  word-break: break-word;
  text-align: center;
  width: 100%;
}

.weather-date {
  font-weight: bold;
  color: var(--ink);
  margin-bottom: 4px;
  font-size: 0.8rem;
}

.weather-icon {
  font-size: 1.6rem;
  margin: 4px 0;
}

.weather-text {
  font-size: 0.72rem;
  color: var(--muted);
  margin-bottom: 4px;
  white-space: nowrap;
}

.weather-temp {
  font-weight: 700;
  font-size: 0.78rem;
}

.temp-max {
  color: #d9534f;
}

.temp-min {
  color: #337ab7;
}

.weather-pop {
  font-size: 0.7rem;
  color: #2b7a78;
  margin-top: 2px;
}

/* ニューススタイル（クリック選択・アコーディオン展開方式：全文完全表示） */
.news-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: none !important;
  height: auto !important;
  overflow: visible !important;
  padding-right: 0;
  padding-bottom: 6px;
}

.news-item-details {
  background: var(--paper, #ffffff);
  border: 1px solid var(--line-light, #e2dacd);
  border-radius: 8px;
  overflow: hidden;
  height: auto !important;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.news-item-details[open] {
  border-color: var(--teal, #2b7a78);
  box-shadow: 0 2px 8px rgba(43, 122, 120, 0.12);
}

.news-summary-header {
  padding: 10px 14px;
  cursor: pointer;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: relative;
  background: #fdfbf7;
  user-select: none;
  transition: background 0.15s ease;
}

.news-summary-header::-webkit-details-marker {
  display: none;
}

.news-summary-header::after {
  content: '▼';
  position: absolute;
  right: 14px;
  top: 14px;
  font-size: 0.7rem;
  color: var(--muted, #888);
  transition: transform 0.2s ease;
}

.news-item-details[open] .news-summary-header::after {
  transform: rotate(180deg);
  color: var(--teal, #2b7a78);
}

.news-summary-header:hover {
  background: var(--line-light, #f5efe6);
}

.news-meta-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.76rem;
}

.news-date {
  color: var(--muted, #777);
  font-weight: 500;
}

.news-title-text {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink, #222);
  line-height: 1.35;
  padding-right: 20px;
}

.news-body-content {
  padding: 14px 14px 16px 14px;
  background: #ffffff;
  border-top: 1px dashed var(--line-light, #eee);
  animation: fadeInNews 0.2s ease-in-out;
  overflow: visible;
  height: auto;
  box-sizing: border-box;
}

@keyframes fadeInNews {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.news-summary {
  font-size: 0.88rem;
  color: var(--ink-light, #444);
  line-height: 1.6;
  margin-top: 0;
  margin-bottom: 12px;
  word-break: break-word;
  overflow-wrap: anywhere;
  overflow: visible;
}

.news-language-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.news-language-panel {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line-light, #e2dacd);
  border-radius: 6px;
  background: var(--paper-solid, #fffdf8);
}

.news-original-panel {
  background: #f7f3ed;
}

.news-language-label {
  margin: 0 0 6px;
  color: var(--teal, #245f75);
  font-size: 0.75rem;
  line-height: 1.3;
}

.news-language-panel .news-summary,
.news-original-title,
.news-original-summary {
  margin: 0;
  overflow-wrap: anywhere;
}

.news-original-title {
  font-weight: 700;
  line-height: 1.5;
}

.news-original-summary {
  margin-top: 7px;
  color: var(--ink-light, #444);
  font-size: 0.84rem;
  line-height: 1.55;
}

.news-translation-warning,
.news-translation-note {
  color: var(--muted, #666);
  font-size: 0.78rem;
  line-height: 1.5;
}

.news-translation-warning {
  margin: 8px 0 0;
}

.news-translation-note {
  margin: 12px 0 0;
  padding-top: 10px;
  border-top: 1px dashed var(--line-light, #e2dacd);
}

.news-source {
  font-size: 0.78rem;
  text-align: right;
  margin-top: 6px;
}

@media (max-width: 640px) {
  .news-language-pair {
    grid-template-columns: 1fr;
  }
}

.news-source a {
  color: var(--teal);
  text-decoration: none;
}

.news-source a:hover {
  text-decoration: underline;
}

/* ニューストピック選択フィルター */
.news-topic-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.topic-btn {
  background: var(--bg-card, #f8f6f0);
  color: var(--ink-light, #555555);
  border: 1px solid var(--line, #e2dacd);
  border-radius: 20px;
  padding: 5px 14px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.topic-btn:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 3px;
}

.topic-btn:hover {
  background: var(--line-light, #eae3d5);
  color: var(--ink, #222222);
  border-color: var(--terracotta, #b85235);
}

.topic-btn.active {
  background: var(--terracotta, #b85235);
  color: #ffffff;
  border-color: var(--terracotta, #b85235);
  box-shadow: 0 2px 6px rgba(184, 82, 53, 0.25);
}

.info-empty {
  padding: 16px;
  font-size: 0.88rem;
  color: var(--muted, #777);
  text-align: center;
  background: var(--bg-card, #faf8f5);
  border-radius: 8px;
  border: 1px dashed var(--line, #e2dacd);
}

/* 免責・注記表示 */
.info-disclaimer {
  margin-top: 18px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
  font-size: 0.73rem;
  color: var(--muted);
  line-height: 1.5;
}

.info-disclaimer a {
  color: var(--teal);
  text-decoration: underline;
}

/* ==========================================================================
   編集型レイアウトの調整（読みやすさ・余白のリズム・写真の扱い）
   ========================================================================== */

/* 本文の行長を読みやすい範囲に保つ */
.card p,
.info-band p,
.starter-step p,
.notice p,
.shop-list-card p {
  max-width: 62ch;
}

.page-title p,
.hero p {
  max-width: 58ch;
}

/* 見出しと内容の間隔を詰めて、章の区切りは余白で示す */
main > section + section {
  padding-top: clamp(18px, 2.6vw, 30px);
  border-top: 1px solid var(--line);
}

h2 {
  align-items: baseline;
}

h2::before {
  align-self: center;
}

/* 画像なしカードが縦に間延びしないようにする */
.card {
  min-height: 0;
}

.card > h3 + p {
  margin-top: 2px;
}

/* 写真は比率を固定してレイアウトシフトを防ぐ */
.photo img,
.card-photo {
  background: var(--paper-depth);
}

/* 外部リンクの識別（色だけに頼らない） */
main a[href^="http"]:not(.share-button)::after {
  content: " ↗";
  font-size: 0.85em;
  color: var(--muted);
}

.image-credit a[href^="http"]::after,
.hero-credit a[href^="http"]::after {
  content: none;
}

/* 表の可読性 */
tbody tr:hover {
  background: var(--paper-faint);
}

/* フッター */
.footer-inner a {
  color: #f3d9a6;
}

@media (max-width: 720px) {
  main > section + section {
    padding-top: 20px;
  }
}

/* --- タブレット幅: 2列を保ち、ヘッダーを二段のコンパクト構成にする --- */
@media (max-width: 1120px) and (min-width: 721px) {
  .header-inner {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    padding: 8px 20px;
    gap: 8px 14px;
  }

  .brand {
    flex: 0 0 auto;
    width: auto;
  }

  .brand span {
    font-size: 1.25rem;
  }

  .brand small {
    font-size: 0.74rem;
  }

  .main-nav {
    flex: 1 1 100%;
    justify-content: flex-start;
    gap: 2px;
  }

  .main-nav a {
    padding: 8px 9px;
    font-size: 0.86rem;
  }

  .lang {
    width: auto;
    margin-left: auto;
    padding: 0 0 0 8px;
    border-top: 0;
    border-left: 1px solid var(--line);
  }

  .lang button {
    padding: 8px 10px;
    font-size: 0.84rem;
  }

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

/* スマホ幅では1列に戻す */
@media (max-width: 720px) {
  .grid,
  .grid.two,
  .grid.four {
    grid-template-columns: 1fr;
  }
}

/* --- PC幅: ブランド・主要ページ・言語切替を一段に収める（英語でも折返さない） --- */
@media (min-width: 1121px) {
  .brand {
    min-width: 0;
  }

  .main-nav {
    flex-wrap: nowrap;
    gap: 2px;
  }

  .main-nav a {
    padding: 9px 9px;
    font-size: 0.88rem;
  }

  .lang {
    padding-left: 10px;
  }

  .lang button {
    padding: 9px 9px;
    font-size: 0.85rem;
  }
}

/* --- スマホ: 主CTAを1本立て、補助リンクは2列にまとめる --- */
@media (max-width: 720px) {
  .hero-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .hero-actions a {
    width: 100%;
    padding-inline: 8px;
    font-size: 0.95rem;
  }

  .hero-actions a:first-child {
    grid-column: 1 / -1;
  }
}

/* クレジットは控えめだが読める濃度を保つ */
.hero-credit {
  color: var(--muted-strong);
  font-size: 0.72rem;
  opacity: 1;
}

.image-credit {
  color: var(--muted-strong);
}
