/* =====================================================================
 * MUST EAT MAP — 屋台の紙とインクを想定したスタイル
 * ===================================================================== */

:root {
  --paper:    #f4ece0;
  --paper-2:  #ebdfcc;
  --card:     #fffaf2;
  --ink:      #1c1714;
  --ink-soft: #6b5d50;
  --ink-thin: #a3948400;
  --red:      #cf4429;
  --red-dark: #a1301c;
  --gold:     #d9992b;
  --line:     #cfc0aa;

  --font-display: "Hiragino Mincho ProN", "Yu Mincho", YuMincho, "Songti SC", "SimSun", Georgia, serif;
  --font-body: "Hiragino Sans", "Yu Gothic", YuGothic, Meiryo, "PingFang SC", "Microsoft YaHei", "Segoe UI", system-ui, sans-serif;

  --maxw: 1080px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background-color: var(--paper);
  background-image:
    radial-gradient(circle at 20% 12%, rgba(217,153,43,.10), transparent 45%),
    radial-gradient(circle at 82% 78%, rgba(207,68,41,.08), transparent 42%);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* ------------------------------------------------------------ header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(244,236,224,.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex; align-items: center; gap: 16px;
  height: 62px;
}
.brand { display: flex; align-items: baseline; gap: 10px; margin-right: auto; }
.brand-mark {
  font-family: var(--font-display);
  font-size: 20px; font-weight: 700; letter-spacing: .14em;
  color: var(--ink);
  white-space: nowrap;
}
.brand-mark em { color: var(--red); font-style: normal; }
.brand-tag {
  font-size: 11.5px; color: var(--ink-soft); letter-spacing: .04em;
  display: none;
}
@media (min-width: 860px) { .brand-tag { display: block; } }

.nav { display: flex; gap: 18px; font-size: 13.5px; }
.nav a { color: var(--ink-soft); border-bottom: 1px solid transparent; padding-bottom: 2px; }
.nav a:hover { color: var(--red); border-color: var(--red); }
@media (max-width: 600px) { .nav { display: none; } }

.lang-switch { display: flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.lang-switch button {
  font-family: inherit; font-size: 12px; letter-spacing: .03em;
  padding: 5px 11px; border: 0; background: transparent; color: var(--ink-soft);
  cursor: pointer; transition: .15s; white-space: nowrap;   /* 「日本語」を1行に保つ */
}
.lang-switch button + button { border-left: 1px solid var(--line); }
.lang-switch button.on { background: var(--ink); color: var(--paper); }

/* ------------------------------------------------------------- hero */
.hero { padding: 64px 0 40px; text-align: center; }
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(26px, 4.6vw, 42px);
  line-height: 1.5; margin: 0 0 22px; font-weight: 700;
}
.hero .note { color: var(--ink-soft); font-size: 14px; line-height: 2; margin: 0; }
.hero .stamp {
  display: inline-block; margin-bottom: 26px;
  font-family: var(--font-display); font-size: 12px; letter-spacing: .3em;
  color: var(--red); border: 2px solid var(--red); border-radius: 4px;
  padding: 5px 14px 5px 18px; transform: rotate(-2deg);
}

/* ------------------------------------------------------------ notice */
.notice {
  margin: 0 auto 40px; max-width: 760px;
  background: rgba(217,153,43,.13);
  border: 1px dashed var(--gold);
  border-radius: 6px;
  padding: 12px 18px; font-size: 12.5px; color: var(--ink-soft); line-height: 1.8;
}
.notice strong { color: var(--red-dark); }

/* ---------------------------------------------------------- headings */
.sec-head { margin: 56px 0 26px; }
.sec-head h2 {
  font-family: var(--font-display); font-size: 24px; margin: 0;
  letter-spacing: .08em; display: flex; align-items: center; gap: 14px;
}
.sec-head h2::after {
  content: ''; flex: 1; height: 1px; background: var(--line);
}
.sec-head p { margin: 6px 0 0; font-size: 13px; color: var(--ink-soft); }

/* ------------------------------------------------------- area cards */
.area-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.area-card {
  display: block; background: var(--card); border: 1px solid var(--line);
  border-radius: 10px; padding: 22px 24px 20px;
  box-shadow: 0 1px 0 rgba(28,23,20,.05);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s;
}
.area-card:hover {
  transform: translateY(-3px); border-color: var(--red);
  box-shadow: 0 10px 22px -12px rgba(28,23,20,.4);
}
.area-card .country { font-size: 11.5px; letter-spacing: .18em; color: var(--ink-soft); }
.area-card h3 {
  font-family: var(--font-display); font-size: 30px; margin: 2px 0 10px; font-weight: 700;
}
.area-card .catch { font-size: 13px; color: var(--ink-soft); line-height: 1.9; margin: 0 0 16px; min-height: 3.8em; }
.area-card .meta { display: flex; gap: 14px; font-size: 12px; color: var(--ink-soft); border-top: 1px dotted var(--line); padding-top: 12px; }
.area-card .meta b { font-family: var(--font-display); font-size: 17px; color: var(--ink); margin-right: 3px; }

/* ------------------------------------------------------ route block */
.route { margin: 44px 0 60px; }
.route-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px 16px; margin-bottom: 4px; }
.route-head h3 { font-family: var(--font-display); font-size: 22px; margin: 0; letter-spacing: .04em; }
.route-head .badge {
  font-size: 11.5px; letter-spacing: .08em; color: var(--paper);
  background: var(--ink); border-radius: 999px; padding: 3px 11px;
}
.route-sub { font-size: 12.5px; color: var(--ink-soft); margin: 0 0 18px; }

/* エリアpage／ルートguideへの動線リンク（アプリ→静的紹介ページ） */
.guide-jump {
  display: inline-block; margin: 14px 0 0;
  font-size: 13px; font-weight: 600; letter-spacing: .02em;
  color: var(--red); text-decoration: none;
  border-bottom: 1.5px solid transparent; padding-bottom: 1px;
  transition: border-color .15s ease;
}
.guide-jump:hover { border-bottom-color: var(--red); }
.route-guide-jump { margin-top: 18px; }

/* -------------------------------------------------- hand-drawn map */
.map-frame {
  position: relative; background: var(--card);
  border: 1px solid var(--line); border-radius: 10px;
  padding: 10px; margin-bottom: 26px; overflow: hidden;
}
.map-frame::before {
  content: ''; position: absolute; inset: 6px; border: 1px dashed var(--line);
  border-radius: 6px; pointer-events: none;
}
.map-frame svg { display: block; width: 100%; height: auto; }

.mp-street      { stroke: #c4b298; stroke-width: .9; stroke-linecap: round; fill: none; }
.mp-street.main { stroke: #ab967a; stroke-width: 1.7; }
/* 地図の文字は、下の線と重なっても読めるよう紙色で縁取る（paint-order で塗りを上に） */
.mp-street-label, .mp-mark-label, .mp-pin-name {
  stroke: #fffaf2; stroke-width: 1.1; stroke-linejoin: round;
  paint-order: stroke fill;
}
.mp-street-label{ font-family: var(--font-body); font-size: 1.9px; fill: #94826c; letter-spacing: .06em; }
.mp-mark-label  { font-family: var(--font-body); font-size: 2px; fill: #6b5d50; text-anchor: middle; }
.mp-mark-icon   { font-size: 3px; text-anchor: middle; }
.mp-link        { stroke: var(--red); stroke-width: .55; stroke-dasharray: 1.6 1.4; fill: none; opacity: .7; }
.mp-pin-body    { fill: var(--red); stroke: #fffaf2; stroke-width: .5; cursor: pointer; }
.mp-pin-num     { font-family: var(--font-display); font-size: 2.6px; font-weight: 700; fill: #fffaf2; text-anchor: middle; pointer-events: none; }
.mp-pin-name    { font-family: var(--font-body); font-size: 2.2px; font-weight: 600; fill: var(--ink);
                  text-anchor: middle; pointer-events: none; stroke-width: 1.4; }
.mp-g:hover .mp-pin-body { fill: var(--red-dark); }

/* ------------------------------------------- 写真枠（無い間の代替表示） */
.ph {
  position: relative; display: grid; place-items: center; overflow: hidden;
  background-color: var(--paper-2);
  background-image: repeating-linear-gradient(45deg,
    rgba(28,23,20,.028) 0 8px, transparent 8px 16px);
}
.ph-0 { background-color: #eadfcb; }
.ph-1 { background-color: #ecdfd3; }
.ph-2 { background-color: #e6e0cd; }
.ph-3 { background-color: #eddcd0; }
.ph-glyph {
  font-family: var(--font-display); font-weight: 700;
  color: rgba(28,23,20,.14); line-height: 1; user-select: none;
}
.ph-note {
  position: absolute; right: 10px; bottom: 8px;
  font-size: 10px; letter-spacing: .08em; color: rgba(28,23,20,.32);
}
.ph img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ------------------------------------------------------- dish cards */
.dish-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }

.dish {
  position: relative; display: flex; flex-direction: column;
  background: var(--card); border: 1px solid var(--line);
  border-radius: 10px; overflow: hidden;
  transition: border-color .18s, transform .18s, box-shadow .18s;
}
.dish:hover { border-color: var(--red); transform: translateY(-3px); box-shadow: 0 12px 24px -16px rgba(28,23,20,.5); }
.dish.is-hot { border-color: var(--red); box-shadow: 0 0 0 3px rgba(207,68,41,.14); }

.dish-photo { aspect-ratio: 16 / 10; }
.dish-photo .ph-glyph { font-size: 62px; }

.dish .num {
  position: absolute; top: 12px; left: 12px;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--red); color: #fffaf2;
  font-family: var(--font-display); font-size: 15px; font-weight: 700;
  display: grid; place-items: center;
  box-shadow: 0 2px 6px rgba(28,23,20,.3);
}

.dish-body { display: flex; flex-direction: column; gap: 8px; padding: 16px 20px 16px; flex: 1; }
.row-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.cat {
  font-size: 11px; letter-spacing: .1em; color: var(--ink-soft);
  border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px;
}
.flag {
  font-size: 10.5px; letter-spacing: .06em; color: var(--ink-soft);
  border: 1px solid var(--line); border-radius: 3px; padding: 1px 6px; white-space: nowrap;
}
.flag.ok { color: #3d6b45; border-color: #7fa585; background: rgba(125,165,133,.12); }

.area-tag { font-size: 11px; letter-spacing: .06em; color: var(--gold); }
.dish .shop { display: block; font-size: 13px; color: var(--ink-soft); letter-spacing: .02em; }
.dish .name {
  display: block; font-family: var(--font-display); font-size: 25px; font-weight: 700;
  line-height: 1.35; margin: -6px 0 0;
}
.name .x { color: var(--red); font-size: 15px; font-style: normal; margin-right: 2px; }

/* 現地語の表記。看板の文字をそのまま出すので、現地の文字が読めるフォントを先に置く */
.local {
  display: block; margin-top: -2px;
  font-family: "Leelawadee UI", "Noto Sans Thai", "Tahoma", var(--font-body);
  font-size: 13px; color: var(--ink-soft); letter-spacing: .01em; line-height: 1.6;
}
.local i { color: var(--red); font-style: normal; font-size: 10.5px; margin: 0 1px; }
.detail-body .local { font-size: 15px; margin: -4px 0 2px; }
/* カードは一覧なので3行で切る。全文は詳細ビューで読ませる */
.dish .point {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3;
  overflow: hidden; font-size: 13.5px; line-height: 1.85;
  padding-left: 12px; border-left: 3px solid var(--gold);
}
.dish .facts {
  margin-top: auto; padding-top: 12px; border-top: 1px dotted var(--line);
  display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 11.5px; color: var(--ink-soft);
}
.dish .facts b { font-weight: 600; color: var(--ink); }

/* ---------------------------------------------------------- filters */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 22px; }
.filters button {
  font-family: inherit; font-size: 12.5px; cursor: pointer;
  border: 1px solid var(--line); background: transparent; color: var(--ink-soft);
  border-radius: 999px; padding: 5px 14px; transition: .15s;
}
.filters button:hover { border-color: var(--red); color: var(--red); }
.filters button.on { background: var(--ink); border-color: var(--ink); color: var(--paper); }

/* ------------------------------------------------------------- misc */
.back-link { display: inline-block; margin: 30px 0 0; font-size: 13px; color: var(--ink-soft); }
.back-link:hover { color: var(--red); }

.how { max-width: 720px; margin: 70px auto 0; text-align: center; }
.how h2 { font-family: var(--font-display); font-size: 20px; letter-spacing: .1em; margin: 0 0 12px; }
.how p { font-size: 13.5px; color: var(--ink-soft); line-height: 2; margin: 0; }

.site-footer {
  margin-top: 90px; border-top: 1px solid var(--line);
  padding: 28px 0 40px; text-align: center;
  font-size: 12px; color: var(--ink-soft); letter-spacing: .06em;
}
.site-footer .mk { font-family: var(--font-display); letter-spacing: .18em; color: var(--ink); }
.foot-operator { margin-top: 14px; font-size: 11.5px; letter-spacing: .06em; }
.foot-operator span { color: var(--ink-soft); margin-right: 6px; }
.foot-operator a { color: var(--ink); border-bottom: 1px solid var(--line); padding-bottom: 1px; }
.foot-operator a:hover { color: var(--red); border-color: var(--red); }
.foot-note {
  max-width: 560px; margin: 18px auto 0; font-size: 11px; line-height: 1.9;
  color: var(--ink-soft); opacity: .8;
}

/* -------------------------------------------------------- 世界地図 */
.world-frame {
  position: relative; background: var(--card); border: 1px solid var(--line);
  border-radius: 10px; padding: 14px;
}
.world-frame::before {
  content: ''; position: absolute; inset: 8px; border: 1px dashed var(--line);
  border-radius: 6px; pointer-events: none;
}
.world-stage { position: relative; }
.world { display: block; width: 100%; height: auto; }

/* 実際の海岸線（Natural Earth）。暖色紙の地図として、陸は淡い木の色で塗る */
.w-land { fill: #e6cda3; stroke: #ccb187; stroke-width: .18; stroke-linejoin: round; }
.w-link { fill: none; stroke: var(--red); stroke-width: .32; opacity: .5;
          stroke-dasharray: 1.2 1.4; stroke-linecap: round; }

/* 地図の上に重ねる、タップしやすいHTMLのピン（掲載エリアのみ） */
.world-pins { position: absolute; inset: 0; pointer-events: none; }
.wp { position: absolute; transform: translate(-50%, -50%); pointer-events: auto; text-decoration: none; }
.wp-dot {
  position: relative; display: grid; place-items: center;
  width: clamp(24px, 3.6vw, 32px); aspect-ratio: 1; border-radius: 50%;
  background: var(--red); color: #fffaf2; font: 700 12.5px/1 var(--font-display);
  box-shadow: 0 2px 8px rgba(28,23,20,.24);
}
.wp-dot::after {
  content: ''; position: absolute; inset: -5px; border-radius: 50%;
  border: 1.5px solid var(--red); opacity: .4; animation: wpPulse 3s ease-in-out infinite;
}
@keyframes wpPulse { 0%,100% { transform: scale(1); opacity: .4; } 50% { transform: scale(1.2); opacity: .08; } }
@media (prefers-reduced-motion: reduce) { .wp-dot::after { animation: none; } }
.wp-name {
  position: absolute; left: 50%; top: calc(100% + 5px); transform: translateX(-50%);
  white-space: nowrap; font: 600 12.5px/1.2 var(--font-body); color: var(--ink);
  background: rgba(255,250,242,.92); padding: 2px 8px; border-radius: 999px;
  border: 1px solid var(--line);
}
.wp:hover .wp-name, .wp-btn:hover .wp-name { color: var(--red); border-color: var(--red); }
/* 密集する首都圏まわりで、ラベルを外側へ逃がす */
.wp-l .wp-name { transform: translateX(-76%); }
.wp-r .wp-name { transform: translateX(-24%); }

.wp-group .wp-btn { position: relative; background: none; border: 0; padding: 0; cursor: pointer; font: inherit; }
.wp-caret { display: inline-block; margin-left: 3px; font-size: 9px; transition: transform .15s; }
.wp-group.open .wp-caret { transform: rotate(180deg); }
.wp-list {
  position: absolute; left: 50%; top: calc(100% + 30px); transform: translateX(-50%) scale(.96);
  display: flex; flex-direction: column; min-width: 108px; gap: 2px; padding: 5px;
  background: var(--card); border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 10px 26px rgba(28,23,20,.18);
  opacity: 0; visibility: hidden; transition: opacity .15s ease, transform .15s ease; z-index: 6;
}
.wp-group.open .wp-list { opacity: 1; visibility: visible; transform: translateX(-50%) scale(1); }
.wp-list a { text-decoration: none; color: var(--ink); font: 600 13px/1 var(--font-body);
             padding: 10px 12px; border-radius: 6px; text-align: center; }
.wp-list a:hover { background: var(--paper-2); color: var(--red); }

@media (max-width: 640px) {
  .wp-dot { width: 28px; }
  .world-frame { padding: 10px; }
}

/* ---------------------------------------------------------- 検索 */
.search-box { margin-bottom: 26px; }
.search-box input {
  width: 100%; font-family: inherit; font-size: 16px; color: var(--ink);
  background: var(--card); border: 1px solid var(--line); border-radius: 8px;
  padding: 13px 16px; margin-bottom: 12px;
}
.search-box input:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px rgba(207,68,41,.10); }
.search-box .filters { margin-bottom: 8px; }
.search-count { font-size: 12px; color: var(--ink-soft); letter-spacing: .06em; }
.empty { text-align: center; color: var(--ink-soft); font-size: 13.5px; padding: 40px 0; }

/* ------------------------------------------------------ 一皿の詳細 */
.modal {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(28,23,20,.55); backdrop-filter: blur(3px);
  display: grid; place-items: center; padding: 20px; overflow-y: auto;
}
.modal-panel {
  position: relative; width: min(620px, 100%); max-height: 92vh; overflow-y: auto;
  background: var(--card); border-radius: 12px; border: 1px solid var(--line);
  box-shadow: 0 30px 70px -30px rgba(0,0,0,.7);
}
.modal-close {
  position: absolute; top: 12px; right: 12px; z-index: 2;
  width: 34px; height: 34px; border: 0; border-radius: 50%; cursor: pointer;
  background: rgba(28,23,20,.55); color: #fffaf2; font-size: 20px; line-height: 1;
}
.modal-close:hover { background: var(--red); }

.detail-photo { aspect-ratio: 3 / 2; border-radius: 12px 12px 0 0; }
.detail-photo .ph-glyph { font-size: 92px; }
/* 写真がまだ無いときは、空白を大きく取らずに帯として見せる */
.detail-photo.no-photo { aspect-ratio: 16 / 5; }
.detail-photo.no-photo .ph-glyph { font-size: 62px; }

.detail-body { padding: 22px 26px 26px; display: flex; flex-direction: column; gap: 10px; }
.detail-body .shop { font-size: 14px; color: var(--ink-soft); }
.detail-body .name { font-family: var(--font-display); font-size: 32px; margin: -6px 0 2px; line-height: 1.3; }
.detail-body .row-top { justify-content: flex-start; gap: 8px; }

.must {
  background: rgba(217,153,43,.12); border-left: 3px solid var(--gold);
  border-radius: 0 6px 6px 0; padding: 12px 16px; font-size: 14.5px; line-height: 1.9;
}
.must-h { display: block; font-size: 11px; letter-spacing: .14em; color: var(--gold); margin-bottom: 3px; }

.about { font-size: 13.5px; line-height: 1.95; color: var(--ink-soft); padding: 2px 2px 0; }
.about-h {
  display: block; font-size: 11px; letter-spacing: .14em; color: var(--ink);
  margin-bottom: 4px; padding-bottom: 4px; border-bottom: 1px dotted var(--line);
}

.detail-facts {
  display: grid; grid-template-columns: auto 1fr; gap: 6px 18px;
  margin: 4px 0 0; font-size: 13px; border-top: 1px dotted var(--line); padding-top: 14px;
}
.detail-facts dt { color: var(--ink-soft); font-size: 11.5px; letter-spacing: .08em; }
.detail-facts dd { margin: 0; }
.detail-facts dd b { font-weight: 600; }

.others { border-top: 1px dotted var(--line); padding-top: 14px; margin-top: 6px; }
.others-h { display: block; font-size: 11px; letter-spacing: .12em; color: var(--ink-soft); margin-bottom: 8px; }
.others ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.others a { display: flex; align-items: baseline; gap: 8px; font-size: 13.5px; }
.others a:hover { color: var(--red); }
.others a b {
  flex: 0 0 20px; height: 20px; border-radius: 50%; background: var(--paper-2);
  color: var(--ink-soft); font-family: var(--font-display); font-size: 11.5px;
  display: grid; place-items: center;
}
.others a i { color: var(--red); font-style: normal; font-size: 11px; }

.detail-back { font-size: 12.5px; color: var(--ink-soft); margin-top: 8px; }
.detail-back:hover { color: var(--red); }

[hidden] { display: none !important; }
