@font-face {
  font-family: "Ma Shan Zheng";
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url("assets/fonts/ma-shan-zheng-chinese-simplified-400-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Noto Serif SC";
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url("assets/fonts/noto-serif-sc-chinese-simplified-400-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Noto Serif SC";
  font-style: normal;
  font-display: swap;
  font-weight: 700;
  src: url("assets/fonts/noto-serif-sc-chinese-simplified-700-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Noto Sans SC";
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url("assets/fonts/noto-sans-sc-chinese-simplified-400-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Noto Sans SC";
  font-style: normal;
  font-display: swap;
  font-weight: 600;
  src: url("assets/fonts/noto-sans-sc-chinese-simplified-600-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Noto Sans SC";
  font-style: normal;
  font-display: swap;
  font-weight: 700;
  src: url("assets/fonts/noto-sans-sc-chinese-simplified-700-normal.woff2") format("woff2");
}

:root {
  color-scheme: light;
  color: #193b2a;
  font-family: "Noto Sans SC", "Microsoft YaHei", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --cream: #f7f2e7;
  --cream-deep: #eee4d2;
  --paper: #fbf7ed;
  --ink: #193b2a;
  --ink-soft: #536257;
  --accent: #d66a32;
  --accent-dark: #a94d2d;
  --gold: #c99a3a;
  --sea: #7bd4d5;
  --sea-dark: #58bcc2;
  --line: rgba(69, 77, 52, 0.17);
  --header-height: 132px;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-width: 320px;
  height: 100%;
  min-height: 100%;
  margin: 0;
}

body {
  min-height: 100vh;
  overflow: hidden;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}

button,
a,
summary {
  -webkit-tap-highlight-color: transparent;
}

button,
input,
select,
textarea {
  color: inherit;
  font: inherit;
}

a {
  color: var(--accent-dark);
  text-underline-offset: 0.18em;
}

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

button:focus-visible,
a:focus-visible,
summary:focus-visible,
.map-stage:focus-visible,
.map-city-label:focus-visible {
  outline: 3px solid rgba(214, 106, 50, 0.72);
  outline-offset: 3px;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.site-header {
  position: relative;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 18px;
  height: var(--header-height);
  padding: 16px clamp(34px, 4.4vw, 72px);
  border-bottom: 1px solid rgba(73, 66, 49, 0.15);
  background:
    linear-gradient(rgba(255, 255, 255, 0.45), rgba(255, 255, 255, 0.45)),
    radial-gradient(circle at 24% 18%, rgba(255, 255, 255, 0.8), transparent 38%),
    #f6f1e7;
  box-shadow: 0 3px 12px rgba(64, 63, 45, 0.1);
}

.brand-mark {
  position: relative;
  display: grid;
  place-items: center;
  width: 108px;
  height: 82px;
  flex: 0 0 auto;
}

.brand-mark img {
  display: block;
  width: 108px;
  height: 78px;
  object-fit: contain;
  filter: drop-shadow(0 2px 1px rgba(46, 45, 28, 0.12));
}

.brand-flower {
  position: absolute;
  top: 7px;
  left: -4px;
  z-index: 1;
  color: #ed7b19;
  font: 24px/1 "Noto Serif SC", serif;
  text-shadow: 0 1px 0 #fff8e9;
}

.brand-copy,
.site-heading {
  min-width: 0;
  padding-top: 3px;
}

.brand-copy h1,
.site-heading h1 {
  margin: 0;
  color: #173a25;
  font-family: "Ma Shan Zheng", "Noto Serif SC", "STKaiti", serif;
  font-size: clamp(42px, 4vw, 58px);
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.06em;
}

.site-purpose {
  margin: 11px 0 0 20px;
  color: #3d4d42;
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-size: clamp(15px, 1.25vw, 20px);
  letter-spacing: 0.13em;
}

.guide-layout {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  width: 100%;
  height: calc(100svh - var(--header-height));
  min-height: 0;
  overflow: hidden;
  background: var(--sea);
}

.guide-layout:has(.city-panel:not([hidden])) {
  grid-template-columns: minmax(0, 1fr) clamp(440px, 39vw, 620px);
}

.map-region,
.map-stage {
  min-width: 0;
  min-height: 0;
  width: 100%;
  height: 100%;
}

.map-stage {
  position: relative;
  overflow: hidden;
  touch-action: none;
  cursor: grab;
  user-select: none;
  background:
    radial-gradient(circle at 22% 17%, rgba(255, 255, 255, 0.12), transparent 25%),
    linear-gradient(135deg, #73d3d4 0%, #7bd7d5 48%, #69c8cc 100%);
}

.map-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.17;
  background-image:
    repeating-linear-gradient(0deg, transparent 0 3px, rgba(255, 255, 255, 0.08) 3px 4px),
    repeating-linear-gradient(90deg, transparent 0 4px, rgba(31, 112, 116, 0.05) 4px 5px);
  mix-blend-mode: soft-light;
}

.map-stage:active,
.map-stage--dragging {
  cursor: grabbing;
}

.map-svg {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  padding: 6px 12px 24px;
  overflow: visible;
}

.map-world {
  transform-origin: center;
  will-change: transform;
}

.ocean-waves path {
  fill: none;
  stroke: rgba(225, 250, 244, 0.48);
  stroke-width: 5;
  stroke-linecap: round;
}

.japan-land-shadow {
  fill: #4d9ca0;
  stroke: none;
}

.japan-land {
  fill: url("#land-main");
  stroke: #775c32;
  stroke-width: 4.4;
  stroke-linejoin: round;
}

.japan-land-gloss {
  fill: url("#land-gloss");
  stroke: rgba(246, 235, 151, 0.55);
  stroke-width: 1.4;
  pointer-events: none;
}

.prefecture-lines path {
  fill: none;
  stroke: rgba(100, 136, 55, 0.38);
  stroke-width: 1.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

.city-label-layer {
  pointer-events: none;
}

.map-city-label {
  cursor: pointer;
  outline: none;
  pointer-events: auto;
}

.map-city-label-hitbox {
  fill: transparent;
  stroke: none;
}

.map-city-label-selected-bg {
  fill: #fff9ec;
  stroke: #d16c32;
  stroke-width: 1.4;
  filter: drop-shadow(0 2px 2px rgba(52, 56, 35, 0.2));
}

.map-city-label-tail {
  fill: #fff9ec;
  stroke: #d16c32;
  stroke-width: 1.1;
  stroke-linejoin: round;
}

.map-city-label-text {
  fill: #1a442f;
  stroke: #fffdf4;
  stroke-width: 2.6;
  paint-order: stroke fill;
  font-family: "Noto Sans SC", "Microsoft YaHei", sans-serif;
  font-size: 8.8px;
  font-weight: 700;
  letter-spacing: 0.04em;
  pointer-events: none;
  transition: fill 160ms ease, transform 160ms ease;
}

.map-city-label:hover .map-city-label-text,
.map-city-label:focus-visible .map-city-label-text {
  fill: #b04d2a;
}

.map-city-label:focus-visible .map-city-label-hitbox {
  fill: rgba(255, 250, 234, 0.86);
  stroke: #d16c32;
  stroke-width: 1.4;
}

.map-city-label--selected .map-city-label-text {
  fill: #213e2c;
  stroke-width: 0;
}

.map-hint {
  position: absolute;
  z-index: 5;
  left: 50%;
  bottom: 23px;
  margin: 0;
  padding: 8px 13px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 10px;
  color: rgba(23, 66, 50, 0.82);
  background: rgba(244, 251, 239, 0.73);
  box-shadow: 0 4px 14px rgba(39, 89, 79, 0.1);
  backdrop-filter: blur(8px);
  font-size: 12px;
  letter-spacing: 0.05em;
  pointer-events: none;
  transform: translateX(-50%);
}

.map-controls {
  position: absolute;
  left: 22px;
  bottom: 22px;
  z-index: 12;
  display: grid;
  grid-template-columns: repeat(3, 44px);
  height: 44px;
  overflow: hidden;
  border: 1px solid rgba(91, 86, 60, 0.19);
  border-radius: 12px;
  background: rgba(255, 251, 240, 0.94);
  box-shadow: 0 7px 18px rgba(43, 82, 72, 0.16);
  backdrop-filter: blur(8px);
}

.map-controls button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-right: 1px solid rgba(78, 75, 55, 0.14);
  color: var(--ink);
  background: transparent;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.map-controls button:last-child {
  border-right: 0;
}

.map-controls button:hover:not(:disabled),
.map-controls button:focus-visible {
  color: #fff;
  background: #315d43;
  outline: none;
}

.map-controls button:disabled {
  color: #9ea99f;
  cursor: default;
  background: transparent;
}

.city-panel {
  position: relative;
  z-index: 16;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  height: calc(100% - 42px);
  margin: 21px 24px 21px 0;
  overflow: hidden;
  border: 1px solid rgba(94, 82, 59, 0.15);
  border-radius: 26px;
  background:
    radial-gradient(circle at 50% 2%, rgba(255, 255, 255, 0.72), transparent 40%),
    var(--paper);
  box-shadow: 0 11px 25px rgba(45, 71, 57, 0.21), 0 2px 4px rgba(57, 51, 36, 0.13);
}

.city-panel[hidden] {
  display: none;
}

.city-panel-header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  min-height: 72px;
  flex: 0 0 auto;
  padding: 10px 64px;
  border-bottom: 1px solid rgba(82, 76, 55, 0.1);
}

.city-panel-header::before,
.city-panel-header::after {
  content: "◆";
  color: #d0a136;
  font-size: 12px;
}

.city-panel-header h2 {
  margin: 0;
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.panel-close {
  position: absolute;
  top: 11px;
  right: 12px;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 2px solid #df8757;
  border-radius: 50%;
  color: #315843;
  background: #fffaf0;
  cursor: pointer;
}

.panel-close:hover,
.panel-close:focus-visible {
  color: #fff;
  background: #c75c34;
  outline: none;
}

.panel-close svg {
  width: 24px;
  height: 24px;
}

.food-list {
  min-height: 0;
  flex: 1 1 auto;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 14px 16px 26px;
  scrollbar-width: thin;
  scrollbar-color: #d6c3a0 transparent;
}

.food-card {
  position: relative;
  margin: 0;
  padding: 0 24px;
  text-align: center;
}

.food-card-photo {
  position: relative;
  width: 100%;
  margin: 0 0 24px;
  overflow: hidden;
  border-radius: 14px;
  background: #e8dfcf;
  box-shadow: inset 0 0 0 1px rgba(71, 66, 45, 0.08);
}

.food-card-image {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  user-select: none;
  -webkit-user-drag: none;
}

.food-card-pager {
  position: absolute;
  right: 28px;
  bottom: 28px;
  z-index: 2;
  display: flex;
  align-items: center;
  overflow: hidden;
  height: 40px;
  margin: 0;
  border: 1px solid rgba(78, 66, 44, 0.17);
  border-radius: 11px;
  color: #314f3d;
  background: rgba(255, 251, 240, 0.93);
  box-shadow: 0 4px 13px rgba(44, 45, 30, 0.16);
  backdrop-filter: blur(8px);
}

.food-card-pager-button {
  display: grid;
  place-items: center;
  width: 48px;
  height: 40px;
  min-height: 40px;
  padding: 0;
  border: 0;
  color: #31533e;
  background: transparent;
  font-size: 0;
  cursor: pointer;
}

.food-card-pager-button::before {
  content: "‹";
  font-size: 25px;
  line-height: 1;
}

.food-card-pager-button:last-child::before {
  content: "›";
}

.food-card-pager-button:hover:not(:disabled),
.food-card-pager-button:focus-visible {
  color: #fff;
  background: #315d43;
  outline: none;
}

.food-card-pager-button:disabled {
  opacity: 0.36;
  cursor: default;
}

.food-card-pager-status {
  min-width: 48px;
  text-align: center;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.restaurant-kicker {
  margin: 0 0 8px;
  color: #9f6e25;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.2em;
}

.tabelog-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  max-width: 530px;
  margin: 0 auto 10px;
}

.tabelog-badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 3px 9px;
  border: 1px solid;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: 0.035em;
}

.tabelog-badge--bronze {
  border-color: #884626;
  color: #fffaf0;
  background: #a95d38;
}

.tabelog-badge--hyakumeiten {
  border-color: #83a88e;
  color: #234b35;
  background: #e5f0e4;
}

.tabelog-badge--hall {
  border-color: #bd9130;
  color: #4c3510;
  background: #f4dfa0;
  box-shadow: inset 0 0 0 1px rgba(255, 252, 229, 0.72);
}

.tabelog-badge--past {
  border-style: dashed;
  color: #5e584a;
  background: #f1eee6;
}

.food-card-title {
  max-width: 530px;
  margin: 0 auto 14px;
  color: #1c422d;
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-size: clamp(26px, 2.35vw, 38px);
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: 0.04em;
}

.must-eat,
.why-special {
  max-width: 520px;
  margin: 0 auto;
  text-align: left;
}

.must-eat {
  color: #263e31;
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.85;
}

.why-special {
  margin-top: 11px;
  color: #526157;
  font-size: 14px;
  line-height: 1.8;
}

.must-eat strong,
.why-special strong,
.availability-note strong,
.drive-estimate strong {
  color: var(--ink);
}

.food-card-details {
  max-width: 520px;
  margin: 20px auto 0;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  text-align: left;
}

.food-card-details-summary {
  display: flex;
  align-items: center;
  min-height: 48px;
  color: #31543f;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}

.food-card-details-summary::-webkit-details-marker {
  display: none;
}

.food-card-details-summary::after {
  content: "+";
  margin-left: auto;
  color: #b95d31;
  font-size: 22px;
  font-weight: 400;
}

.food-card-details[open] .food-card-details-summary::after {
  content: "−";
}

.food-card-details > :not(summary) {
  margin: 0 0 10px;
}

.availability-note,
.drive-estimate,
.restaurant-reason {
  color: #58645b;
  font-size: 13px;
  line-height: 1.75;
}

.food-card-details h4 {
  margin: 18px 0 7px;
  color: var(--ink);
  font-size: 14px;
}

.restaurant-list,
.verification-list,
.source-list {
  margin: 0;
  padding-left: 1.2em;
}

.restaurant-item,
.source-item,
.verification-list li {
  margin-bottom: 7px;
  font-size: 13px;
  line-height: 1.55;
}

.food-list-empty {
  margin: 26px 0;
  color: var(--ink-soft);
  text-align: center;
}

noscript p {
  margin: 0;
  padding: 20px;
  color: var(--ink);
  background: var(--paper);
}

@media (max-width: 1040px) {
  .guide-layout:has(.city-panel:not([hidden])) {
    grid-template-columns: minmax(0, 1fr) 440px;
  }

  .food-card {
    padding-inline: 12px;
  }

  .food-card-pager {
    right: 16px;
  }
}

@media (max-width: 760px) {
  :root {
    --header-height: 88px;
  }

  body {
    overflow: hidden;
  }

  .site-header {
    height: var(--header-height);
    gap: 9px;
    padding: 7px 16px;
  }

  .brand-mark {
    width: 76px;
    height: 62px;
  }

  .brand-mark img {
    width: 78px;
    height: 58px;
  }

  .brand-flower {
    top: 4px;
    left: -2px;
    font-size: 17px;
  }

  .brand-copy h1,
  .site-heading h1 {
    font-size: clamp(27px, 8vw, 34px);
    letter-spacing: 0.035em;
  }

  .site-purpose {
    margin: 6px 0 0 4px;
    font-size: 11px;
    letter-spacing: 0.08em;
  }

  .guide-layout,
  .guide-layout:has(.city-panel:not([hidden])) {
    position: relative;
    display: block;
    height: calc(100svh - var(--header-height));
  }

  .map-stage {
    width: 100%;
    height: 100%;
  }

  .map-svg {
    width: 100%;
    height: 47%;
    padding: 2px 5px 4px;
  }

  .map-city-label-text {
    font-size: 8.5px;
    stroke-width: 2.5px;
  }

  .map-hint {
    top: 7px;
    bottom: auto;
    white-space: nowrap;
    font-size: 10px;
  }

  .map-controls {
    top: calc(47% - 52px);
    bottom: auto;
    left: 12px;
    grid-template-columns: repeat(3, 44px);
    height: 44px;
    border-radius: 11px;
  }

  .city-panel {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 30;
    width: 100%;
    height: 55%;
    margin: 0;
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 25px 25px 0 0;
    box-shadow: 0 -8px 25px rgba(35, 71, 60, 0.2);
  }

  .city-panel::before {
    content: "";
    flex: 0 0 auto;
    align-self: center;
    width: 42px;
    height: 4px;
    margin-top: 7px;
    border-radius: 999px;
    background: rgba(63, 82, 70, 0.25);
  }

  .city-panel-header {
    min-height: 58px;
    padding: 7px 54px;
  }

  .city-panel-header h2 {
    font-size: 23px;
  }

  .city-panel-header::before,
  .city-panel-header::after {
    font-size: 9px;
  }

  .panel-close {
    top: 7px;
    right: 9px;
    width: 44px;
    height: 44px;
  }

  .food-list {
    padding: 10px 12px 26px;
  }

  .food-card {
    padding-inline: 8px;
  }

  .food-card-photo {
    margin-bottom: 17px;
    border-radius: 13px;
  }

  .food-card-image {
    aspect-ratio: 16 / 10;
  }

  .food-card-pager {
    right: 12px;
    bottom: 21px;
  }

  .restaurant-kicker {
    margin-bottom: 6px;
    font-size: 11px;
  }

  .food-card-title {
    font-size: 25px;
  }

  .must-eat {
    font-size: 15px;
    line-height: 1.75;
  }

  .why-special {
    font-size: 13px;
  }
}

@media (max-width: 380px) {
  .brand-copy h1,
  .site-heading h1 {
    font-size: 25px;
  }

  .site-purpose {
    font-size: 10px;
  }
}

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

@media print {
  body {
    height: auto;
    overflow: visible;
  }

  .site-header,
  .guide-layout {
    height: auto;
  }

  .guide-layout {
    display: block;
  }

  .map-stage {
    height: 560px;
  }

  .map-controls,
  .panel-close,
  .map-hint {
    display: none;
  }

  .city-panel {
    border: 0;
    box-shadow: none;
  }
}
