/* みんなのモンゴルポータル — 配色テーマ「ゴビの夕焼け」
   色はすべてここの変数で決めています。色を変えたいときは :root の値を書きかえてください。 */
:root {
  --accent: #b5462a;      /* 朱色：ボタン・見出しの線 */
  --accent-deep: #8e3420;
  --gold: #d9a441;        /* 砂の金：飾り・タグ */
  --navy: #1f2a44;        /* 紺：ヘッダー・濃い面 */
  --bg: #f6ecdc;          /* 背景 */
  --bg-soft: #efe1ca;
  --card: #fffaf2;
  --ink: #2a2330;         /* 本文 */
  --muted: #7d6a58;
  --line: #e6d4b8;
  --hl: #fbe3b8;
  --link: #9a3a22;
  --on-accent: #fff;
  --shadow: 0 8px 24px #5a3a1a14;
  --radius: 16px;
  --font-head: "Zen Maru Gothic", "Hiragino Maru Gothic ProN", "Hiragino Sans", sans-serif;
  --font-body: "Hiragino Sans", "Noto Sans JP", system-ui, sans-serif;
  --font-cyr: "Helvetica Neue", Arial, "Hiragino Sans", sans-serif;
  --header-h: 60px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --accent: #e0714f;
    --accent-deep: #b5462a;
    --gold: #e6b85c;
    --navy: #0f1524;
    --bg: #141925;
    --bg-soft: #1a2030;
    --card: #1e2433;
    --ink: #f3e9da;
    --muted: #b3a48f;
    --line: #313a4f;
    --hl: #3b2f20;
    --link: #f0946f;
    --on-accent: #1a0f0a;
    --shadow: 0 8px 24px #0008;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; } /* hidden を付けた要素は、ほかの指定があっても必ず隠す */
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }
body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--link); }
img { max-width: 100%; }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.4; font-weight: 700; }
.mn, .mn-name, .cyr, [lang="mn"] { font-family: var(--font-cyr); }
.skip { position: absolute; left: -999px; top: 8px; z-index: 3000; background: var(--card); padding: 8px 12px; border-radius: 8px; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

/* ---------- 共通ヘッダー ---------- */
.site-header {
  position: sticky; top: 0; z-index: 2000;
  height: var(--header-h);
  background: var(--navy);
  color: #fff;
  box-shadow: 0 2px 12px #0003;
  transition: background .35s, box-shadow .35s;
}
.site-header .inner {
  max-width: 1120px; height: 100%; margin: 0 auto; padding: 0 16px;
  display: flex; align-items: center; gap: 16px;
}
.logo {
  display: flex; align-items: center; gap: 8px;
  color: #fff; text-decoration: none; font-family: var(--font-head); font-weight: 700;
  font-size: 1.05rem; letter-spacing: .04em; white-space: nowrap;
}
.logo .mark {
  width: 32px; height: 32px; border-radius: 50%;
  background: radial-gradient(circle at 50% 62%, var(--gold) 0 28%, transparent 29%), linear-gradient(180deg, #e0714f, #b5462a);
  box-shadow: inset 0 -6px 0 #0002;
}
.site-nav { margin-left: auto; }
.site-nav ul { display: flex; gap: 2px; list-style: none; margin: 0; padding: 0; }
.site-nav li { flex-shrink: 0; } /* 項目の文字が1文字ずつ折り返されないように */
/* プルダウン（各タブの中の項目） */
.site-nav .has-sub { position: relative; display: flex; align-items: center; }
.site-nav .has-sub > a { padding-right: 4px; }
.sub-toggle { background: none; border: 0; color: #fff; opacity: .7; cursor: pointer; padding: 6px 8px 6px 2px; font-size: .75rem; line-height: 1; border-radius: 6px; }
.sub-toggle:hover, .has-sub.open .sub-toggle { opacity: 1; }
.sub-toggle span { display: inline-block; transition: transform .2s; }
.has-sub.open .sub-toggle span { transform: rotate(180deg); }
.site-nav .sub {
  display: none; position: absolute; top: 100%; left: 0; z-index: 10; min-width: 210px; margin: 0; padding: 8px;
  list-style: none; flex-direction: column; gap: 2px;
  background: var(--navy); border: 1px solid #ffffff22; border-radius: 12px; box-shadow: 0 12px 28px #0006;
}
.site-nav .sub::before { content: ""; position: absolute; left: 0; right: 0; top: -10px; height: 10px; } /* マウスを下に動かしても閉じないように */
.site-nav .sub a { display: block; padding: 8px 12px; border-radius: 8px; font-size: .88rem; font-weight: 600; white-space: nowrap; opacity: .9; }
.site-nav .sub a:hover { background: #ffffff1f; opacity: 1; }
@media (min-width: 901px) {
  .site-nav .has-sub:hover > .sub, .site-nav .has-sub:focus-within > .sub, .site-nav .has-sub.open > .sub { display: flex; }
  .site-nav .has-sub:nth-last-child(-n+2) > .sub { left: auto; right: 0; } /* 右端の2つは右寄せで開いてはみ出さないように */
}
.site-nav a {
  display: block; padding: 6px 12px; border-radius: 999px;
  color: #fff; text-decoration: none; font-size: .9rem; font-weight: 600; opacity: .88;
  transition: background .2s, opacity .2s;
}
.site-nav a:hover { background: #ffffff1f; opacity: 1; }
.site-nav a[aria-current="page"] { background: var(--gold); color: #1f2a44; opacity: 1; }
.menu-btn {
  display: none; margin-left: auto;
  background: none; border: 0; color: #fff; padding: 8px; cursor: pointer; border-radius: 8px;
}
.menu-btn span, .menu-btn span::before, .menu-btn span::after {
  display: block; width: 22px; height: 2px; background: currentColor; border-radius: 2px; position: relative; transition: transform .25s, opacity .25s;
}
.menu-btn span::before, .menu-btn span::after { content: ""; position: absolute; left: 0; }
.menu-btn span::before { top: -7px; }
.menu-btn span::after { top: 7px; }
.menu-btn[aria-expanded="true"] span { background: transparent; }
.menu-btn[aria-expanded="true"] span::before { transform: translateY(7px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span::after { transform: translateY(-7px) rotate(-45deg); }

/* トップページではヘッダーをスライドショーに重ね、スクロールしたら色を付ける */
.has-hero .site-header { position: fixed; left: 0; right: 0; background: linear-gradient(180deg, #0008, transparent); box-shadow: none; }
.has-hero .site-header.scrolled { background: var(--navy); box-shadow: 0 2px 12px #0003; }

@media (max-width: 900px) { /* メニューが1行に収まらない幅では三本線のメニューにする */
  .menu-btn { display: block; }
  .site-nav {
    position: absolute; top: var(--header-h); left: 0; right: 0;
    background: var(--navy); padding: 8px 16px 16px;
    box-shadow: 0 12px 24px #0004;
    display: none;
  }
  .site-nav.open { display: block; animation: drop .25s ease-out; }
  .site-nav ul { flex-direction: column; gap: 4px; }
  .site-nav a { padding: 10px 14px; border-radius: 10px; font-size: 1rem; }
  .site-nav { max-height: calc(100dvh - var(--header-h)); overflow-y: auto; }
  .site-nav .has-sub { flex-wrap: wrap; }
  .site-nav .has-sub > a { flex: 1; }
  .sub-toggle { padding: 10px 14px; font-size: 1rem; }
  .site-nav .sub { position: static; flex-basis: 100%; min-width: 0; margin: 2px 0 6px 14px; padding: 4px; background: #ffffff0d; border: 0; box-shadow: none; }
  .site-nav .sub::before { display: none; }
  .site-nav .has-sub.open > .sub { display: flex; }
  .has-hero .site-header:has(.site-nav.open) { background: var(--navy); }
}
@media (max-width: 360px) {
  .site-header .inner { gap: 8px; }
  .logo { font-size: .9rem; letter-spacing: 0; min-width: 0; }
  .logo .mark { width: 26px; height: 26px; flex-shrink: 0; }
}
@keyframes drop { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

/* ---------- スライドショー（トップ） ---------- */
.hero-slides {
  position: relative; height: min(88vh, 760px); min-height: 480px;
  overflow: hidden; background: var(--navy); color: #fff;
}
/* 切り替え：次の写真を上に重ねてゆっくり浮かび上がらせ、前の写真は下にそのまま残す
   （同時に薄くすると途中で暗くなるため）。写真のゆっくりした拡大は途切れさせない */
.slide {
  position: absolute; inset: 0; z-index: 0; opacity: 0; visibility: hidden;
  transition: opacity 1.8s ease-in-out, visibility 0s linear 1.8s;
}
.slide.leaving { z-index: 1; opacity: 1; visibility: visible; transition: none; }
.slide.active { z-index: 2; opacity: 1; visibility: visible; transition: opacity 1.8s ease-in-out; }
.slide .media {
  position: absolute; inset: 0; transform: scale(1.02); will-change: transform;
  transition: transform 0s linear 2s; /* 見えなくなってから元の大きさに戻す */
}
.slide.active .media, .slide.leaving .media { transform: scale(1.1); transition: transform 10s linear; }
.slide.leaving .media { transition: none; } /* 消えていく写真は拡大したまま止めておく */
.slide .media img, .slide .media svg { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-slides::after { /* 文字を読みやすくする影 */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, #0000 35%, #0f152499 78%, #0f1524d9);
}
.hero-copy {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  max-width: 1120px; margin: 0 auto; padding: 0 16px 72px;
}
.hero-copy .kicker { font-family: var(--font-cyr); letter-spacing: .2em; font-size: .85rem; opacity: .85; }
.hero-copy h1 {
  margin: 6px 0 8px; font-size: clamp(2rem, 6vw, 3.6rem); letter-spacing: .06em;
  text-shadow: 0 2px 18px #0006;
}
.hero-copy .lead { max-width: 560px; margin: 0 0 20px; font-size: clamp(.95rem, 2.2vw, 1.1rem); opacity: .95; }
.hero-copy .cta { display: flex; flex-wrap: wrap; gap: 10px; }
.slide-caption {
  position: absolute; right: 16px; bottom: 28px; z-index: 3;
  font-size: .8rem; background: #0f152499; padding: 4px 10px; border-radius: 999px;
  backdrop-filter: blur(4px); max-width: calc(100% - 32px);
}
.slide-caption .tag-img { color: var(--gold); margin-left: 6px; }
.slide-ctrl {
  position: absolute; left: 0; right: 0; bottom: 28px; z-index: 3;
  max-width: 1120px; margin: 0 auto; padding: 0 16px;
  display: flex; align-items: center; gap: 8px; pointer-events: none;
}
.slide-ctrl > * { pointer-events: auto; }
.dots { display: flex; gap: 6px; }
.dots button { /* 押しやすいように当たり判定は高めに、見た目は細い線 */
  width: 28px; height: 24px; padding: 0; border: 0; cursor: pointer; background: none;
  transition: width .3s;
}
.dots button::before { content: ""; display: block; height: 4px; border-radius: 4px; background: #ffffff66; transition: background .3s; }
.dots button[aria-current="true"] { width: 44px; }
.dots button[aria-current="true"]::before { background: var(--gold); }
.round-btn {
  width: 36px; height: 36px; border-radius: 50%; border: 1px solid #ffffff55;
  background: #0f152466; color: #fff; cursor: pointer; font-size: .9rem; line-height: 1;
  display: grid; place-items: center; backdrop-filter: blur(4px);
}
.round-btn:hover { background: #0f1524aa; }
.slide-ctrl .prev, .slide-ctrl .next { font-size: 1.2rem; }

/* ---------- 下層ページの見出し帯 ---------- */
.page-hero {
  position: relative; overflow-x: clip;
  background: linear-gradient(160deg, #1f2a44 0%, #5a3a4a 45%, #b5462a 80%, #d9a441 110%);
  color: #fff; padding: 56px 16px 64px;
}
.page-hero .inner { position: relative; z-index: 1; max-width: 1120px; margin: 0 auto; }
.page-hero h1 { margin: 0; font-size: clamp(1.7rem, 5vw, 2.5rem); letter-spacing: .06em; }
.page-hero p { margin: 8px 0 0; max-width: 620px; opacity: .92; }
.page-hero .crumb { font-size: .8rem; opacity: .8; margin-bottom: 6px; }
.page-hero .crumb a { color: #fff; }
.page-hero svg.dunes { position: absolute; left: 0; right: 0; bottom: -3px; width: 100%; height: 73px; } /* 下に少しはみ出させて境目の線を消す */

/* ---------- レイアウト ---------- */
main { max-width: 1120px; margin: 0 auto; padding: 8px 16px 56px; }
section { padding: 48px 0 8px; }
.sec-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.sec-head h2 { margin: 0; font-size: clamp(1.35rem, 3.5vw, 1.7rem); position: relative; padding-left: 18px; }
.sec-head h2::before {
  content: ""; position: absolute; left: 0; top: .2em; bottom: .2em; width: 7px; border-radius: 4px;
  background: linear-gradient(180deg, var(--gold), var(--accent));
}
.sec-head .sub { color: var(--muted); font-size: .9rem; }
.intro { margin: 0 0 20px; max-width: 760px; }
.hint { font-size: .8rem; color: var(--muted); }

.grid { display: grid; gap: 16px; }
.grid.stats { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.grid.cards { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); }

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow);
}
.card h3 { margin: 0 0 6px; font-size: 1.12rem; }
.card p { margin: 0; }
.card .mn-name { color: var(--muted); font-size: .85rem; margin-bottom: 6px; }
.card .emoji { font-size: 2rem; line-height: 1; margin-bottom: 10px; }

.stat .label { font-size: .8rem; color: var(--muted); }
.stat .value { font-family: var(--font-head); font-size: 1.2rem; font-weight: 700; color: var(--accent); line-height: 1.4; word-break: keep-all; overflow-wrap: anywhere; }
.stat .note { font-size: .78rem; color: var(--muted); }

.tag {
  display: inline-block; font-size: .72rem; font-weight: 700;
  padding: 1px 8px; border-radius: 8px; margin: 8px 6px 0 0;
  background: var(--hl); color: var(--ink);
}
.tag.whs { background: var(--gold); color: #2a2118; }
.link-btn { display: inline-block; margin-top: 10px; font-size: .88rem; font-weight: 700; color: var(--link); text-decoration: none; }
.link-btn:hover { text-decoration: underline; }

.btn {
  display: inline-flex; align-items: center; gap: 6px; border: 0; border-radius: 999px;
  padding: 11px 22px; font: inherit; font-weight: 700; cursor: pointer; text-decoration: none;
  background: var(--accent); color: var(--on-accent);
  box-shadow: 0 4px 14px #b5462a44; transition: transform .15s, box-shadow .2s, background .2s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 20px #b5462a55; }
.btn:active { transform: translateY(0); }
.btn.light { background: #fff; color: #1f2a44; box-shadow: 0 4px 14px #0003; }
.btn.ghost { background: transparent; color: var(--ink); border: 2px solid var(--line); box-shadow: none; }
.btn.ghost-light { background: #ffffff1a; color: #fff; border: 1px solid #ffffff66; box-shadow: none; backdrop-filter: blur(4px); }
.btn.secondary { background: var(--navy); color: #fff; box-shadow: none; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

/* ページ案内カード（トップ） */
.nav-cards { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); } /* 6枚が3列×2段に並ぶ */
.nav-card {
  position: relative; display: block; overflow: hidden; text-decoration: none; color: var(--ink);
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 20px 20px;
  box-shadow: var(--shadow); transition: transform .25s, box-shadow .25s, border-color .25s;
}
.nav-card:hover { transform: translateY(-4px); border-color: var(--gold); box-shadow: 0 14px 30px #5a3a1a22; }
.nav-card .emoji { font-size: 2.2rem; line-height: 1; }
.nav-card h3 { margin: 12px 0 4px; font-size: 1.1rem; }
.nav-card p { margin: 0; font-size: .9rem; color: var(--muted); }
.nav-card .go { position: absolute; right: 18px; top: 20px; color: var(--accent); font-weight: 700; transition: transform .25s; }
.nav-card:hover .go { transform: translateX(4px); }

.quick-links { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 16px; }
.quick-links.top { margin: 20px 0 0; padding: 12px 14px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.quick-links.top a { box-shadow: none; background: var(--bg-soft); }
.quick-links span { font-size: .85rem; color: var(--muted); font-weight: 700; }
.quick-links a { text-decoration: none; font-size: .9rem; font-weight: 700; color: var(--ink); padding: 6px 14px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); }
.quick-links a:hover { border-color: var(--accent); color: var(--accent); }
.soon { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.soon li {
  list-style: none; background: var(--bg-soft); border: 1px dashed var(--line); border-radius: 12px; padding: 14px 16px;
}
.soon li b { display: block; font-family: var(--font-head); }
.soon li > span { font-size: .85rem; color: var(--muted); }
.soon-badge { display: inline-block; font-size: .7rem; font-weight: 700; background: var(--gold); color: #2a2118; border-radius: 999px; padding: 0 8px; margin-left: 6px; vertical-align: 2px; }
ul.soon { padding: 0; margin: 0; }

/* ---------- 文化・シャガイ ---------- */
.shagai {
  display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: center;
  background: linear-gradient(135deg, var(--hl), var(--card)); border: 2px solid var(--gold);
}
.shagai .bones { font-size: 2.6rem; letter-spacing: .1em; }
.shagai-frame { margin-top: 14px; }
.shagai-frame iframe { width: 100%; height: 860px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); }

/* ---------- ナーダム ---------- */
.naadam { background: linear-gradient(150deg, #1f2a44, #5a3a4a 60%, #b5462a); color: #fff; border: 0; }
.naadam h3, .naadam p { color: #fff; }
.naadam .big { font-family: var(--font-head); font-size: 1.7rem; font-weight: 700; color: var(--gold); }
.games { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px; }
.games div { background: #ffffff1c; border-radius: 12px; padding: 12px; text-align: center; font-size: .9rem; }
.games div span { display: block; font-size: 1.8rem; }
.card p + p { margin-top: 8px; }

/* ---------- あいさつ ---------- */
.phrases { width: 100%; border-collapse: collapse; background: var(--card); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.phrases th, .phrases td { padding: 11px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.phrases th { background: var(--bg-soft); font-size: .85rem; }
.phrases td.cyr { font-weight: 700; font-size: 1.05rem; }
.phrases td.kana { color: var(--accent); font-weight: 700; }
.phrases tr:last-child td { border-bottom: 0; }

/* ---------- 旅行のコツ ---------- */
.tips { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.tips li { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px 12px 50px; position: relative; }
.tips li::before { content: attr(data-i); position: absolute; left: 14px; top: 11px; font-size: 1.3rem; }

/* ---------- 写真マップ ---------- */
#map { height: 560px; border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow); z-index: 1; }
.empty-note { color: var(--muted); font-size: .9rem; }

/* 投稿の管理バー（自分のMacだけ） */
.admin-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; justify-content: space-between;
  background: var(--hl); border: 1px dashed var(--gold); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 16px;
}
.admin-bar .admin-note { display: block; font-size: .8rem; color: var(--muted); }

/* 種類でしぼりこむボタン */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.chip {
  font: inherit; font-size: .88rem; font-weight: 700; cursor: pointer;
  padding: 6px 12px; border-radius: 999px; border: 2px solid var(--c, var(--navy));
  background: var(--card); color: var(--ink); opacity: .55; transition: opacity .2s, background .2s;
}
.chip[aria-pressed="true"] { opacity: 1; background: color-mix(in srgb, var(--c, var(--navy)) 14%, var(--card)); }
.chip span { font-weight: 500; color: var(--muted); margin-left: 2px; }
.chip .dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: #1f2a44; border: 2px solid #fff; box-shadow: 0 0 0 1px #0003; vertical-align: -1px; }
.spot-chip { --c: #1f2a44; border-style: dashed; }
.chip-sep { width: 1px; align-self: stretch; background: var(--line); margin: 0 4px; }

/* ピン */
.post-pin {
  position: relative; width: 36px; height: 36px; border-radius: 50%;
  background: #fff; border: 3px solid var(--c); box-shadow: 0 3px 8px #0005;
  display: grid; place-items: center; font-size: 18px; line-height: 1;
}
.post-pin::after { /* 下向きのしっぽ */
  content: ""; position: absolute; left: 50%; bottom: -11px; transform: translateX(-50%);
  border: 7px solid transparent; border-top: 8px solid var(--c);
}
.pin { width: 22px; height: 22px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); border: 3px solid #fff; box-shadow: 0 2px 6px #0006; }
.pin.spot { background: #1f2a44; width: 16px; height: 16px; border-width: 2px; }

/* ふきだし */
.leaflet-popup-content-wrapper { border-radius: 12px; }
.leaflet-popup-content { margin: 12px 14px; font-family: var(--font-body); line-height: 1.6; color: #2a2330; }
.pop img { display: block; width: 240px; max-width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; margin-bottom: 8px; }
.pop b { display: block; font-size: 1rem; margin-top: 4px; }
.pop .meta { color: #7d6a58; font-size: .8rem; }
.pop p { margin: 4px 0 0 !important; }
.pop .link-btn { margin: 0; padding: 0; background: none; border: 0; font: inherit; font-weight: 700; color: #9a3a22; cursor: pointer; }

/* 種類のラベル */
.badge {
  display: inline-block; font-size: .72rem; font-weight: 700; line-height: 1.6;
  padding: 0 8px; border-radius: 999px; margin-right: 4px;
  color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent); border: 1px solid color-mix(in srgb, var(--c) 40%, transparent);
}
.badge.sample { --c: #7d6a58; }
@media (prefers-color-scheme: dark) { .badge:not(.pop .badge) { filter: brightness(1.6); } }

/* 投稿の一覧 */
.post-list { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); }
.post-card { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.post-card .thumb { display: grid; place-items: center; aspect-ratio: 16 / 10; background: var(--bg-soft); border: 0; padding: 0; cursor: pointer; font-size: 2.4rem; overflow: hidden; }
.post-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.post-card .thumb:hover img { transform: scale(1.04); }
.post-card .body { padding: 14px 16px 16px; display: flex; flex-direction: column; flex: 1; }
.post-card h3 { margin: 6px 0 4px; font-size: 1.08rem; }
.post-card p { margin: 0; font-size: .92rem; }
.post-card .meta { color: var(--muted); font-size: .85rem; margin-top: 4px; }
.card-actions { display: flex; gap: 16px; margin-top: auto; padding-top: 10px; }
.card-actions .link-btn { margin: 0; padding: 0; background: none; border: 0; font: inherit; font-size: .88rem; font-weight: 700; color: var(--link); cursor: pointer; }

/* ダイアログ共通 */
dialog { width: min(720px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); border: 1px solid var(--line); border-radius: var(--radius); padding: 0; background: var(--card); color: var(--ink); }
dialog::backdrop { background: #0009; }
.dlg-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--card); z-index: 1000; }
.dlg-head h3 { margin: 0; }
.dlg-body { padding: 16px 18px 22px; }
.close { background: none; border: 0; font-size: 1.6rem; color: var(--muted); cursor: pointer; line-height: 1; padding: 4px 8px; }
.btn.small { padding: 7px 14px; font-size: .88rem; }
.btn.danger { color: #b5462a; border-color: #b5462a55; }
.actions .spacer { flex: 1; }

/* くわしく見る */
.detail-img { display: block; width: 100%; max-height: 60vh; object-fit: cover; border-radius: 12px; margin-bottom: 12px; }
.detail-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: .85rem; color: var(--muted); }
.detail-lead { font-size: 1.05rem; font-weight: 700; margin: 10px 0 6px; }
.detail-desc { white-space: pre-wrap; margin: 6px 0 10px; }
.detail-dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; background: var(--bg-soft); border-radius: 10px; padding: 10px 14px; margin: 10px 0; }
.detail-dl dt { font-weight: 700; }
.detail-dl dd { margin: 0; }

/* 投稿フォーム */
.step { border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px 16px; margin: 0 0 16px; min-width: 0; }
.step legend { font-family: var(--font-head); font-weight: 700; font-size: 1.05rem; padding: 0 6px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.step legend small { font-family: var(--font-body); font-weight: 400; font-size: .8rem; color: var(--muted); }
.num { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: var(--on-accent); font-size: .9rem; }
.req { font-family: var(--font-body); font-size: .68rem; font-weight: 700; color: #fff; background: #b5462a; border-radius: 4px; padding: 1px 6px; }
.step-hint { font-size: .86rem; color: var(--muted); margin: 0 0 10px; }
.drop {
  position: relative; display: grid; place-items: center; min-height: 150px; padding: 16px;
  border: 2px dashed var(--line); border-radius: 12px; background: var(--bg); cursor: pointer; text-align: center; overflow: hidden;
  transition: border-color .2s, background .2s;
}
.drop:hover, .drop.over { border-color: var(--accent); background: var(--hl); }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.drop img { width: 100%; max-height: 260px; object-fit: contain; border-radius: 8px; margin-bottom: 8px; }
.drop-text { font-size: .9rem; color: var(--muted); }
.drop-text b { color: var(--ink); }
.field { margin-bottom: 14px; }
.field label, .field .label { display: block; font-weight: 700; font-size: .9rem; margin-bottom: 4px; }
.field label small { font-weight: 400; color: var(--muted); }
.field input[type=text], .field input[type=date], .field textarea, .row input[type=text], .search-row input {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; font: inherit; font-size: 16px; background: var(--bg); color: var(--ink);
}
.field textarea { min-height: 110px; resize: vertical; }
.counter { margin: 2px 0 0; text-align: right; font-size: .75rem; color: var(--muted); }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.row label { font-size: .85rem; font-weight: 700; }
.search-row { display: flex; gap: 8px; margin-bottom: 8px; }
.search-row .btn { flex-shrink: 0; white-space: nowrap; }
.geo-results { list-style: none; margin: 0 0 10px; padding: 4px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); max-height: 200px; overflow: auto; }
.geo-results button { display: block; width: 100%; text-align: left; font: inherit; font-size: .85rem; padding: 8px 10px; border: 0; border-radius: 8px; background: none; color: var(--ink); cursor: pointer; }
.geo-results button:hover { background: var(--hl); }
.geo-results .muted { padding: 8px 10px; font-size: .85rem; color: var(--muted); }
#pickMap { height: 280px; border-radius: 12px; border: 1px solid var(--line); }
.latlng { margin-top: 10px; font-size: .88rem; }
.latlng summary { cursor: pointer; color: var(--muted); }
.latlng .row { margin-top: 8px; }
.suggest { font-size: .85rem; margin: 6px 0 0; }
.suggest .link-btn { margin: 0 0 0 6px; padding: 0; background: none; border: 0; font: inherit; font-weight: 700; color: var(--link); cursor: pointer; }
.cat-pick { display: flex; flex-wrap: wrap; gap: 8px; }
.cat-opt input { position: absolute; opacity: 0; }
.cat-opt span { display: inline-block; padding: 7px 14px; border-radius: 999px; border: 2px solid var(--line); cursor: pointer; font-size: .9rem; font-weight: 700; background: var(--bg); }
.cat-opt input:checked + span { border-color: var(--c); background: color-mix(in srgb, var(--c) 16%, var(--card)); }
.cat-opt input:focus-visible + span { outline: 3px solid var(--gold); outline-offset: 2px; }
.status { font-size: .86rem; padding: 8px 12px; border-radius: 10px; background: var(--bg-soft); margin: 8px 0 0; }
.status.ok { background: #2f7d4a22; }
.status.warn { background: #b5462a22; }
.privacy { font-size: .86rem; margin-top: 10px; padding: 10px 12px; border-radius: 10px; background: var(--bg-soft); border: 1px solid var(--line); }
.privacy ul { margin: 6px 0 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.privacy li.warn { color: var(--ink); }
.check { display: flex; align-items: flex-start; gap: 8px; margin-top: 10px; font-size: .9rem; font-weight: 700; cursor: pointer; }
.check input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--accent); flex-shrink: 0; }
.check small { font-weight: 400; color: var(--muted); }
.folder { font-size: .88rem; padding: 8px 12px; border-radius: 10px; background: var(--bg-soft); }
.folder.ok { background: #2f7d4a22; }
.dl-steps { padding-left: 1.3em; margin: 0; }
.dl-steps li { margin-bottom: 10px; font-size: .9rem; }
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 3000; transform: translate(-50%, 20px);
  background: var(--navy); color: #fff; padding: 10px 18px; border-radius: 999px; box-shadow: 0 8px 24px #0005;
  font-size: .9rem; opacity: 0; pointer-events: none; transition: opacity .3s, transform .3s; max-width: calc(100vw - 32px); text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- 写真つきの見出し帯・写真 ---------- */
.page-hero.photo-hero { background-size: cover; background-position: center 40%; }
.page-hero.photo-hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(160deg, #1f2a44e6 0%, #1f2a44b3 45%, #b5462a99 100%); }
figure.photo { margin: 0; }
figure.photo img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 12px; background: var(--bg-soft); box-shadow: var(--shadow); }
figure.photo figcaption { font-size: .85rem; color: var(--muted); margin-top: 6px; line-height: 1.6; }
figure.photo figcaption b { color: var(--ink); }
figure.zoom img { cursor: zoom-in; transition: transform .25s, box-shadow .25s; }
figure.zoom img:hover { transform: translateY(-2px); box-shadow: 0 12px 28px #5a3a1a33; }
.lightbox { /* どのブラウザでも画面の真ん中に、はみ出さずに出す */
  position: fixed; inset: 0; margin: auto; box-sizing: border-box;
  width: min(1100px, calc(100vw - 24px)); max-width: calc(100vw - 24px); height: fit-content; max-height: calc(100dvh - 24px);
  overflow: auto; background: #0f1524; border: 0; padding: 12px; color: #fff;
}
.lightbox img { display: block; width: auto; height: auto; max-width: 100%; max-height: calc(100dvh - 130px); margin: 0 auto; border-radius: 8px; cursor: zoom-out; }
.lightbox .lb-cap { margin: 8px 4px 0; font-size: .9rem; opacity: .9; overflow-wrap: anywhere; }
.lightbox .close { position: absolute; top: 6px; right: 8px; color: #fff; z-index: 1; text-shadow: 0 1px 4px #000; }

/* ---------- 料理図鑑 ---------- */
.dish-jump { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 8px; }
.dish-jump a { text-decoration: none; font-size: .88rem; font-weight: 700; color: var(--ink); padding: 5px 12px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); }
.dish-jump a:hover { border-color: var(--accent); color: var(--accent); }
.dish-group { padding-top: 24px; scroll-margin-top: calc(var(--header-h) + 12px); }
.dish-group-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin: 0 0 14px; font-size: 1.25rem; padding-bottom: 8px; border-bottom: 2px dashed var(--line); }
.dish-group-head span { font-family: var(--font-body); font-size: .85rem; font-weight: 400; color: var(--muted); }
.dish-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); align-items: stretch; } /* 同じ行のカードは同じ高さに */
.dish { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.dish-cover { position: relative; display: block; width: 100%; aspect-ratio: 4 / 3; padding: 0; border: 0; background: var(--bg-soft); cursor: zoom-in; overflow: hidden; }
.dish-cover img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s; }
.dish-cover:hover img { transform: scale(1.04); }
.dish-cover .count { position: absolute; right: 10px; bottom: 10px; font-size: .78rem; font-weight: 700; color: #fff; background: #0f1524b3; padding: 3px 10px; border-radius: 999px; backdrop-filter: blur(4px); }
.dish-cover.empty { display: grid; place-items: center; align-content: center; gap: 4px; cursor: default; color: var(--muted); }
.dish-cover.empty span { font-size: 3rem; line-height: 1; opacity: .7; }
.dish-cover.empty small { font-size: .8rem; }
.dish-body { display: flex; flex-direction: column; flex: 1; padding: 12px 16px 16px; }
.dish-name { margin: 0; font-family: var(--font-head); font-size: 1.15rem; }
.dish-body .mn-name { margin: 0 0 6px; }
.dish-body p { margin: 0; font-size: .93rem; }
.cover-cap { /* 写真の説明は2行までにして、カードの写真の位置をそろえる（全文は写真を押すと見られる） */
  margin: 0; padding: 6px 16px; font-size: .78rem; line-height: 1.5; color: var(--muted); background: var(--bg-soft); border-bottom: 1px solid var(--line);
  height: calc(3em + 12px); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.cover-cap span { margin-left: 6px; white-space: nowrap; opacity: .85; }
.dish-cover.empty + .dish-body { padding-top: 12px; }
.recipe { margin-top: auto; margin-bottom: 0; } /* 作り方は下にそろえる */
.dish-body > p:last-of-type { margin-bottom: 12px; }
.recipe { border: 1px solid var(--line); border-radius: 12px; background: var(--bg); }
.recipe summary { cursor: pointer; padding: 10px 14px; font-weight: 700; color: var(--accent); list-style: none; }
.recipe summary::-webkit-details-marker { display: none; }
.recipe summary::after { content: "＋"; float: right; }
.recipe[open] summary::after { content: "－"; }
.recipe > :not(summary) { margin-left: 14px; margin-right: 14px; }
.recipe h4 { margin: 8px 14px 4px; font-size: .92rem; }
.recipe ul, .recipe ol { padding-left: 1.4em; font-size: .9rem; margin-top: 0; }
.recipe ol li { margin-bottom: 6px; }
.recipe .serves { font-size: .85rem; color: var(--muted); }
.recipe .hint { margin-bottom: 12px; }
.gallery .gl-stage { position: relative; display: flex; justify-content: center; min-height: 200px; }
.gallery .gl-prev, .gallery .gl-next { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; font-size: 1.4rem; z-index: 1; }
.gallery .gl-prev { left: 8px; }
.gallery .gl-next { right: 8px; }
.gallery img { cursor: default; touch-action: pan-y; }
.gallery .lb-cap { display: flex; justify-content: space-between; gap: 12px; }
.gallery .gl-cap { min-width: 0; }
.gallery .gl-num { flex-shrink: 0; opacity: .8; }

/* ---------- まとめたページの目次・大見出し ---------- */
.page-toc { display: flex; flex-wrap: wrap; gap: 8px; margin: 24px 0 0; padding: 12px 14px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.page-toc::before { content: "このページの内容"; width: 100%; font-size: .78rem; color: var(--muted); }
.page-toc a { text-decoration: none; font-size: .9rem; font-weight: 700; color: var(--ink); padding: 5px 12px; border-radius: 999px; background: var(--bg-soft); border: 1px solid var(--line); }
.page-toc a:hover { border-color: var(--accent); color: var(--accent); }
.part-head {
  display: flex; align-items: center; gap: 14px; margin: 56px 0 0; padding: 18px 20px; border-radius: var(--radius);
  background: linear-gradient(135deg, #1f2a44, #5a3a4a 60%, #b5462a); color: #fff; scroll-margin-top: calc(var(--header-h) + 12px);
}
.part-head > span { font-size: 2.2rem; line-height: 1; }
.part-head h2 { margin: 0; font-size: clamp(1.3rem, 3.5vw, 1.6rem); }
.part-head p { margin: 2px 0 0; font-size: .9rem; opacity: .9; }

/* 写真マップの検索 */
.map-search { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 12px; }
.map-search input { flex: 1; min-width: 0; max-width: 520px; padding: 12px 16px; border: 2px solid var(--line); border-radius: 999px; font: inherit; font-size: 16px; background: var(--card); color: var(--ink); }
.map-search input:focus { border-color: var(--accent); outline: none; }
.search-count { font-size: .88rem; font-weight: 700; color: var(--accent); }
.list-head { margin: 0; font-size: 1.15rem; }

/* ---------- ウランバートル案内 ---------- */
#ubMap { height: 440px; border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow); z-index: 1; }
.ub-jump { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.ub-jump .chip { text-decoration: none; }
a.thumb { text-decoration: none; color: inherit; }
@media (max-width: 600px) { #ubMap { height: 340px; } }

/* ---------- 鉄道 ---------- */
.class-list { display: grid; gap: 16px; }
.class-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); border-left: 6px solid var(--line); }
.class-card.lux { border-left-color: var(--gold); }
.class-card:nth-child(2) { border-left-color: var(--accent); }
.class-card:nth-child(3) { border-left-color: #6a4f9a; }
.class-card:nth-child(4) { border-left-color: #3f7d5a; }
.class-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.class-head h3 { margin: 0; font-size: 1.2rem; }
.class-head .mn-name { margin: 0; }
.class-head .rank { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--accent); color: var(--on-accent); font-family: var(--font-head); font-weight: 700; flex-shrink: 0; }
.class-head .cap { margin-left: auto; font-size: .82rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--hl); }
.class-photos { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr)); margin: 12px 0 4px; } /* 写真の枚数が違っても1枚の大きさは同じにする */
.class-photos.two-up { grid-template-columns: 1fr 1fr; margin: 0; }
.mine { margin: 10px 0 0 !important; font-size: .88rem; font-weight: 700; color: var(--accent); }
.mine.none { color: var(--muted); font-weight: 400; }
.steps-list { margin: 0 0 14px; padding-left: 1.3em; display: grid; gap: 8px; }
.tt-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); margin-top: 12px; }
.tt h3 { font-size: 1rem; margin-bottom: 10px; }
.tt-table, .fare-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.tt-table th, .tt-table td, .fare-table th, .fare-table td { padding: 7px 6px; border-bottom: 1px solid var(--line); text-align: center; white-space: nowrap; }
.tt-table thead th, .fare-table thead th { font-size: .78rem; color: var(--muted); font-weight: 700; background: var(--bg-soft); }
.tt-table td:first-child { font-weight: 700; color: var(--accent); }
.tt-table tr.rev td { background: color-mix(in srgb, var(--bg-soft) 60%, transparent); }
.fare-table tbody th { text-align: left; font-weight: 700; white-space: normal; }
.fare-table td { font-weight: 700; }
.fare-table td:last-child { font-weight: 400; font-size: .8rem; color: var(--muted); white-space: normal; }
.table-scroll { overflow-x: auto; }
.gallery-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); grid-auto-rows: 1fr; } /* 6枚が3列×2段できれいに並ぶ幅 */
.trips { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr)); grid-auto-rows: 1fr; }
.trip { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); }
.trip-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.trip-head .when { font-family: var(--font-head); font-weight: 700; color: var(--accent); white-space: nowrap; }
.badge-class { font-size: .72rem; font-weight: 700; padding: 1px 10px; border-radius: 999px; background: var(--hl); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.badge-class.lux { background: var(--gold); color: #2a2118; }
.trip-route { margin: 2px 0 10px; font-size: 1.05rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* 写真は2×2。説明は写真の上に重ねる（3枚のときは1枚目を横長に） */
.trip-grid { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 6px; aspect-ratio: 4 / 3; border-radius: 12px; overflow: hidden; }
.trip-grid.n3 > figure:first-child { grid-column: 1 / -1; }
.trip-grid figure { position: relative; margin: 0; min-height: 0; overflow: hidden; background: var(--bg-soft); }
.trip-grid img { display: block; width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; transition: transform .35s; }
.trip-grid figure:hover img { transform: scale(1.05); }
.trip-grid figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 8px 5px; pointer-events: none;
  font-size: .74rem; line-height: 1.35; color: #fff; text-shadow: 0 1px 3px #000a;
  background: linear-gradient(transparent, #000b);
}
@media (max-width: 600px) {
  .class-head .cap { margin-left: 46px; }
  .tt-table, .fare-table { font-size: .8rem; }
  .tt-table th, .tt-table td { padding: 6px 3px; }
}

.ticket-read { margin: 0 0 16px; }
.ticket-read h3 { margin: 0 0 10px; }
.ticket-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ticket-dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; margin: 12px 0 0; font-size: .9rem; }
.ticket-dl dt { font-weight: 700; font-family: var(--font-cyr); }
.ticket-dl dd { margin: 0; }
.rental-intro { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 20px; align-items: start; margin-bottom: 20px; }
.rental-intro p { margin: 0 0 10px; }
.rental-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(min(420px, 100%), 1fr)); grid-auto-rows: 1fr; } /* 10枚が2列×5段、どの段も同じ高さ */
.rental-card { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.rental-card figure.photo img { border-radius: 0; box-shadow: none; }
.rental-body { padding: 12px 16px 16px; flex: 1; }
.rental-body h3 { margin: 0; font-size: 1.08rem; }
.rental-body .mn-name { margin: 0 0 6px; font-size: .8rem; }
.rental-body p { margin: 0; font-size: .9rem; }
.rental-price { font-weight: 700; color: var(--accent); margin-bottom: 6px !important; }
@media (max-width: 700px) { .rental-intro { grid-template-columns: 1fr; } }

/* ---------- 日本とモンゴル ---------- */
.yokozuna { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.yz {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 10px; box-shadow: var(--shadow);
  border-top: 4px solid var(--gold);
}
.yz .gen { font-size: .78rem; color: var(--muted); }
.yz b { font-family: var(--font-head); font-size: 1.3rem; letter-spacing: .08em; }
.yz span:last-child { font-size: .85rem; }
.yz.now { border-top-color: var(--accent); }
.yz.now span:last-child { color: var(--accent); font-weight: 700; }
.timeline { list-style: none; margin: 0; padding: 0 0 0 4px; position: relative; }
.timeline::before { content: ""; position: absolute; left: 11px; top: 8px; bottom: 8px; width: 3px; border-radius: 3px; background: linear-gradient(180deg, var(--gold), var(--accent)); }
.timeline li { position: relative; display: grid; grid-template-columns: 130px 1fr; gap: 4px 16px; padding: 0 0 18px 34px; }
.timeline li::before { content: ""; position: absolute; left: 1px; top: 6px; width: 17px; height: 17px; border-radius: 50%; background: var(--card); border: 3px solid var(--gold); }
.timeline li.key::before { background: var(--accent); border-color: var(--accent); }
.timeline .yr { font-family: var(--font-head); font-weight: 700; color: var(--accent); }
.timeline b { display: block; }
@media (max-width: 600px) {
  .timeline li { grid-template-columns: 1fr; }
}

/* ---------- 通貨 ---------- */
.fx { padding: 22px; }
.fx-rate { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; padding-bottom: 14px; border-bottom: 1px dashed var(--line); }
.fx-main { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.fx-label { font-size: .85rem; color: var(--muted); }
.fx-main b { font-family: var(--font-head); font-size: clamp(1.6rem, 5vw, 2.2rem); color: var(--accent); }
.fx-sub { font-size: .9rem; color: var(--muted); }
.fx-compare { flex-basis: 100%; font-size: .88rem; background: var(--bg-soft); border-radius: 10px; padding: 8px 12px; margin-top: 6px; }
.fx-inputs { display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; gap: 12px; margin: 18px 0 12px; }
.fx-field { min-width: 0; }
.fx-field > span:first-child { display: block; font-size: .85rem; font-weight: 700; margin-bottom: 4px; }
.fx-box { display: flex; align-items: center; border: 2px solid var(--line); border-radius: 14px; background: var(--bg); padding: 0 14px; transition: border-color .2s; }
.fx-box:focus-within { border-color: var(--accent); }
.fx-box input { flex: 1; min-width: 0; width: 100%; border: 0; background: none; font: inherit; font-family: var(--font-head); font-size: 1.6rem; font-weight: 700; color: var(--ink); padding: 10px 0; text-align: right; outline: none; }
.fx-box i { font-style: normal; font-weight: 700; color: var(--muted); margin-left: 8px; }
.fx-eq { font-size: 1.4rem; color: var(--gold); padding-bottom: 14px; }
.fx-quick { display: flex; flex-wrap: wrap; gap: 8px; }
.fx-quick button { font: inherit; font-size: .88rem; font-weight: 700; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); cursor: pointer; }
.fx-quick button:hover { border-color: var(--accent); color: var(--accent); }
.fx-tip { margin: 14px 0 4px; font-size: .92rem; background: var(--hl); border-radius: 10px; padding: 10px 12px; }
.price-groups { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); }
.price-card h3 { margin-bottom: 8px; }
.price-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.price-table th, .price-table td { padding: 7px 0; border-bottom: 1px solid var(--line); text-align: left; font-weight: 400; }
.price-table tr:last-child th, .price-table tr:last-child td { border-bottom: 0; }
.price-table td { text-align: right; white-space: nowrap; padding-left: 12px; line-height: 1.4; }
.price-table .mnt { display: block; font-weight: 700; }
.price-table .jpy { display: block; font-size: .85rem; color: var(--accent); font-weight: 700; }
.notes { display: flex; flex-wrap: wrap; gap: 2px 0; margin: 8px 0 4px; }
.notes span { font-weight: 700; font-size: 1rem; } /* 押せるボタンに見えないよう、ただの文字にする */
.notes span:not(:last-child)::after { content: "・"; margin: 0 2px; color: var(--muted); font-weight: 400; }
@media (max-width: 600px) {
  .fx { padding: 16px; }
  .fx-inputs { grid-template-columns: 1fr; gap: 8px; }
  .fx-eq { display: none; }
  .fx-box input { font-size: 1.4rem; }
}

/* ---------- 出典・フッター ---------- */
.sources { font-size: .85rem; padding-left: 1.2em; }
.sources li { margin-bottom: 4px; }
.site-footer { background: var(--navy); color: #e9dcc8; margin-top: 40px; }
.site-footer .inner { max-width: 1120px; margin: 0 auto; padding: 36px 16px 40px; display: grid; gap: 20px; grid-template-columns: 1.2fr 2fr; }
.site-footer a { color: #fff; }
.site-footer .logo { margin-bottom: 8px; }
.site-footer p { margin: 0; font-size: .82rem; opacity: .8; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 6px 16px; font-size: .9rem; }
.site-footer ul a { text-decoration: none; opacity: .9; }
.site-footer ul a:hover { text-decoration: underline; }
.footer-band { height: 10px; background: repeating-linear-gradient(90deg, var(--gold) 0 14px, transparent 14px 18px, var(--gold) 18px 22px, transparent 22px 28px), var(--accent); }
.to-top {
  position: fixed; right: 16px; bottom: 16px; z-index: 1500; width: 44px; height: 44px; border-radius: 50%;
  border: 0; background: var(--accent); color: var(--on-accent); font-size: 1.1rem; cursor: pointer; box-shadow: 0 6px 16px #0003;
  opacity: 0; transform: translateY(10px); pointer-events: none; transition: opacity .3s, transform .3s;
}
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }

/* ---------- 動き：スクロールでふわっと表示 ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; transition-delay: var(--d, 0s); }
.js .reveal.in { opacity: 1; transform: none; }
.hero-copy > * { animation: rise .9s ease both; }
.hero-copy > *:nth-child(2) { animation-delay: .15s; }
.hero-copy > *:nth-child(3) { animation-delay: .3s; }
.hero-copy > *:nth-child(4) { animation-delay: .45s; }
@keyframes rise { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .js .reveal { opacity: 1; transform: none; }
}

/* ---------- スマホ ---------- */
@media (max-width: 600px) {
  section { padding-top: 36px; }
  .hero-slides { height: 70svh; min-height: 460px; } /* 縦長の画面では写真の左右が大きく切れるので、少し低くして切り取りを減らす */
  .hero-copy { padding-bottom: 84px; }
  .slide-caption { top: calc(var(--header-h) + 8px); bottom: auto; right: 12px; font-size: .75rem; } /* スマホではボタンと重ならないよう上に */
  .page-hero { padding: 40px 16px 56px; }
  #map { height: 420px; }
  .admin-bar .btn { width: 100%; justify-content: center; }
  #pickMap { height: 240px; }
  .dlg-body { padding: 14px 12px 20px; }
  .step { padding: 12px 12px 14px; }
  .step legend small { flex-basis: 100%; padding-left: 34px; }
  .shagai { grid-template-columns: 1fr; }
  .shagai-frame iframe { height: 760px; }
  .games { gap: 6px; }
  .games div { padding: 8px 4px; font-size: .8rem; }
  .phrases thead { display: none; }
  .phrases, .phrases tbody { display: block; }
  .phrases tr { display: grid; grid-template-columns: 1fr 1fr; column-gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
  .phrases tr:last-child { border-bottom: 0; }
  .phrases td { display: block; padding: 0; border: 0; }
  .phrases td:first-child { grid-column: 1 / -1; font-size: .8rem; color: var(--muted); }
  .phrases td:nth-child(4) { display: none; }
  .row { grid-template-columns: 1fr; }
  .site-footer .inner { grid-template-columns: 1fr; }
}

/* ---------- 鉄道ページ：見た目の整理（2026-10） ---------- */
/* 写真のモザイク：同じ大きさの枠の中に2〜4枚。説明は写真の上に重ねる */
.mosaic, .trip-grid { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 6px; aspect-ratio: 4 / 3; border-radius: 12px; overflow: hidden; }
.mosaic.n1 { grid-template-columns: 1fr; grid-template-rows: 1fr; }
.mosaic.n2 { grid-template-rows: 1fr; }
.mosaic.n3 > figure:first-child { grid-column: 1 / -1; }
.mosaic figure, .mosaic-row figure { position: relative; margin: 0; min-height: 0; overflow: hidden; background: var(--bg-soft); }
.mosaic img, .mosaic-row img { display: block; width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; transition: transform .35s; }
.mosaic figure:hover img, .mosaic-row figure:hover img { transform: scale(1.04); }
.mosaic figcaption, .mosaic-row figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 10px 6px; pointer-events: none;
  font-size: .76rem; line-height: 1.4; color: #fff; text-shadow: 0 1px 3px #000a; background: linear-gradient(transparent, #000b);
}
/* 座席区分のカード：左に文章、右に写真 */
.class-card { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 22px; align-items: center; padding: 20px; }
.class-text p { font-size: .95rem; }
.class-text .mine { margin-top: 12px !important; }
/* 横に並べる写真（2枚・同じ大きさ） */
.mosaic-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.mosaic-row figure { aspect-ratio: 16 / 9; border-radius: 12px; }
.mosaic-row.tickets { margin-top: 0; }
.mosaic-row.tickets figure { aspect-ratio: 1 / 1; }
/* 切符の買い方 */
.buy-grid { display: grid; gap: 14px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.buy-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.buy-card h3 { margin: 6px 0 4px; font-size: 1.05rem; }
.buy-card p { margin: 0; font-size: .92rem; }
.buy-icon { font-size: 1.8rem; line-height: 1; }
.sub-head { margin: 32px 0 12px; font-size: 1.15rem; }
.ticket-read { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 18px; align-items: stretch; margin: 0; }
.ticket-dl.card { margin: 0; align-content: center; }
.tips.three { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 18px; }
/* 時刻表は1路線ずつ横いっぱいに */
.tt-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; margin-top: 12px; }
.tt-list .tt-table th, .tt-list .tt-table td { padding: 8px 10px; }
/* 貸し切り車両：左に資料、右に説明の小さなカード */
.rental-grid { grid-template-columns: repeat(auto-fill, minmax(min(480px, 100%), 1fr)); grid-auto-rows: 1fr; }
.rental-card { flex-direction: row; }
.rental-card > figure.photo { flex: 0 0 46%; }
.rental-card > figure.photo img { height: 100%; aspect-ratio: auto; object-fit: cover; }
.rental-body { display: flex; flex-direction: column; justify-content: center; }
@media (max-width: 860px) {
  .class-card { grid-template-columns: 1fr; }
  .buy-grid, .tips.three { grid-template-columns: 1fr; }
  .ticket-read { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .rental-card { flex-direction: column; }
  .rental-card > figure.photo img { aspect-ratio: 4 / 3; }
}

/* 観光地カードはどの段も同じ高さに */
#spotCards { grid-auto-rows: 1fr; }

/* ---------- 文化のカード（写真つき）・ナーダムの写真 ---------- */
.grid.cards.photo-cards { grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); grid-auto-rows: 1fr; }
.photo-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.photo-card .mosaic { border-radius: 0; aspect-ratio: 16 / 10; flex-shrink: 0; }
.photo-card .mosaic.empty { display: grid; place-items: center; align-content: center; gap: 4px; background: var(--bg-soft); color: var(--muted); }
.photo-card .mosaic.empty span { font-size: 3rem; line-height: 1; opacity: .7; }
.photo-card .mosaic.empty small { font-size: .8rem; }
.pc-body { padding: 14px 18px 18px; }
.photo-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 16px; }
.photo-strip figure { position: relative; margin: 0; aspect-ratio: 3 / 2; border-radius: 12px; overflow: hidden; background: var(--bg-soft); }
.photo-strip img { display: block; width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; transition: transform .35s; }
.photo-strip figure:hover img { transform: scale(1.04); }
.photo-strip figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 10px 6px; pointer-events: none; font-size: .78rem; color: #fff; text-shadow: 0 1px 3px #000a; background: linear-gradient(transparent, #000b); }
.shagai-photo { margin: 0; width: 200px; aspect-ratio: 4 / 3; border-radius: 12px; overflow: hidden; }
.shagai-photo img { display: block; width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; }
@media (max-width: 600px) { .photo-strip { grid-template-columns: 1fr 1fr; } .shagai-photo { width: 100%; } }

/* トップの紹介文：言葉の途中で折り返さない（まとまりごとに改行） */
.hero-copy .lead { max-width: 640px; line-height: 1.9; }
.hero-copy .lead span { display: inline-block; }

/* 下層ページの見出し帯の説明文：広い画面では1行に。狭い画面では行の長さをそろえて折り返す */
.page-hero p { max-width: none; text-wrap: balance; word-break: auto-phrase; }

/* ---------- スマホだけの調整（トップ） ---------- */
/* タイトルは「みんなの／モンゴルポータル」の区切りでだけ改行する（パソコンでは1行のまま） */
.hero-copy h1 span { display: inline-block; }
@media (max-width: 600px) {
  /* 「すぐ見る」は1行に並べて、横にすべらせて見る */
  .quick-links.top {
    flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none;
    -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent);
            mask-image: linear-gradient(90deg, #000 85%, transparent);
    scroll-snap-type: x proximity;
  }
  .quick-links.top::-webkit-scrollbar { display: none; }
  .quick-links.top > * { flex-shrink: 0; scroll-snap-align: start; }
  .quick-links.top a:last-child { margin-right: 40px; }
}

/* ---------- このサイトについて ---------- */
.about-maker { display: flex; gap: 20px; align-items: flex-start; }
.about-maker .mark {
  flex-shrink: 0; width: 64px; height: 64px; border-radius: 50%;
  background: radial-gradient(circle at 50% 62%, var(--gold) 0 28%, transparent 29%), linear-gradient(180deg, #e0714f, #b5462a);
  box-shadow: inset 0 -10px 0 #0002;
}
.about-maker h3 { margin-top: 4px; }
.grid.two.about-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 1fr; } /* 4枚を2枚ずつ、大きさをそろえる */
.about-contact .btn { margin: 4px 0 8px; }
@media (max-width: 600px) {
  .about-maker { flex-direction: column; gap: 12px; }
  .grid.two.about-grid { grid-template-columns: 1fr; grid-auto-rows: auto; }
  .about-maker .mark { width: 52px; height: 52px; }
}
