/* のむすたーの外国語の案内ページの、最初の画面(街えらび・灯りの地図・地図を開くボタン)。guide_hero.py が書く。guide.css の後に読む */
:root { --akari: #f4b739; --night: #10171d; --night-edge: transparent; --night-ink: #fff9f2; --shu-deep: color-mix(in srgb, var(--shu) 70%, #000);
  --ban-bg: #1d2731; --ban-ink: #fff9f2; --ban-edge: transparent; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --night: #0a0e11; --night-edge: color-mix(in srgb, var(--akari) 60%, transparent); --ban-bg: #0a0e11; --ban-ink: #e5eae7; --ban-edge: #2a343b; }
}
:root[data-theme="dark"] { --night: #0a0e11; --night-edge: color-mix(in srgb, var(--akari) 60%, transparent); --ban-bg: #0a0e11; --ban-ink: #e5eae7; --ban-edge: #2a343b; }
/* 外国語のページの地は、日本語のページより明るくする(韓国・台湾・英語圏の旅行や地図のサービスは、どれも白か、ごく薄い色の地だった。2026-11-24 の調べ) */
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) { --paper: #f4f6f3; --card: #ffffff; --soft: #edf0ed; --rule: #d3d9d5; } }
/* 韓国語は、語の途中で折らない。最初の画面だけでなく、下の見出し・段落・箇条にも付ける(2026-11-24 の見直し: 下の文が「흡/연」「가/게」と割れていた)。
   表の中(th・td)には付けない(長い語の列で、表が横にはみ出すため)。収まらない語だけは折る */
:root[lang="ko"] main :is(h1, h2, h3, h4, p, li, figcaption) { word-break: keep-all; overflow-wrap: break-word; }
/* タイ語の街のページの見出し: ブラウザの語分けが外来語(อิซากายะ・กิอง)の途中で折るので、「:」の前と後ろを、折れないかたまりにする(幅の狭い端末は、はみ出さないよう元のまま) */
.nx-nw { display: inline-block; white-space: nowrap; }
@media (max-width: 350px) { .nx-nw { white-space: normal; } }
.nx-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* 上の行: ロゴ・名前・言葉の切り替え(1行に詰める。前は2段で131pxあった) */
header.site { display: flex; align-items: center; gap: 10px; padding-top: 10px; position: relative; }
header.site .brand { gap: 8px; flex: none; }
header.site .brand .logo { width: 32px; height: 32px; padding: 2px; border-radius: 9px; }
header.site .brand b { font-family: var(--f-display); font-weight: 400; font-size: 18px; line-height: 1; letter-spacing: .02em; color: var(--ink); }
header.site .brand span { font-family: "Zen Kaku Gothic New", "Hiragino Sans", "Yu Gothic UI", "Noto Sans CJK JP", sans-serif; font-weight: 700; font-size: 11.5px; line-height: 1; letter-spacing: 0; color: var(--muted); }
.nx-lang { margin-left: auto; font-size: 13px; }
.nx-lang summary { list-style: none; cursor: pointer; padding: 8px 2px 8px 10px; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
@media (max-width: 350px) { header.site .brand span { display: none; } }   /* 幅の狭い端末では、小さい「のむすたー」を出さない(「Language」が折れるため) */
.nx-lang summary::-webkit-details-marker { display: none; }
.nx-lang[open] summary { color: var(--ink); }
.nx-lang .langs { position: absolute; z-index: 5; right: 16px; top: calc(100% + 2px); display: grid; gap: 0; min-width: 11rem; padding: 6px; background: var(--card); border: 1px solid var(--rule); border-radius: 10px; box-shadow: var(--lift); font-size: 15px; }
.nx-lang .langs a { padding: 9px 12px; border-radius: 6px; color: var(--ink); }
.nx-lang .langs a[aria-current] { background: var(--soft); text-decoration: none; font-weight: 700; }
main { padding-top: 12px; }

/* 見出しと一言 */
.nx-hero { gap: 0; }
.nx-h1 { font-size: clamp(23px, 6.9vw, 27px); line-height: 1.22; letter-spacing: 0; text-wrap: balance; }
.nx-h1.town { font-size: clamp(18px, 5.1vw, 21px); line-height: 1.28; }
.nx-lead { margin-top: 6px; font-size: 14px; line-height: 1.5; color: var(--muted); text-wrap: pretty; }

/* 街えらび: 横に流す丸い札(都市の名前を小さく前に、街の名前を太く)。後ろに「全部の街」と「今いる所から」 */
.nx-towns { display: flex; align-items: center; gap: 6px; margin: 12px -16px 0; padding: 2px 16px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; scroll-snap-type: x proximity; }
.nx-towns::-webkit-scrollbar { display: none; }
.nx-town, .nx-all, .nx-near button { flex: none; display: inline-flex; align-items: baseline; gap: 5px; min-height: 44px; padding: 0 15px; border-radius: 22px; scroll-snap-align: start;
  font: inherit; line-height: 44px; white-space: nowrap; -webkit-tap-highlight-color: transparent; }
.nx-town { border: 1px solid var(--rule); background: var(--card); color: var(--ink); cursor: pointer; }
.nx-town small { font-size: 12px; color: var(--muted); }
.nx-town b { font-size: 15px; font-weight: 700; }
.nx-town[aria-pressed="true"] { background: var(--night); border-color: var(--night); color: var(--night-ink); box-shadow: 0 0 0 1px var(--night-edge); }
.nx-town[aria-pressed="true"] small { color: var(--akari); }
.nx-all, .nx-near button { border: 1px dashed var(--muted); background: none; color: var(--ink); font-size: 14px; text-decoration: none; cursor: pointer; }
.nx-near { flex: none; margin: 0; }
/* 「近くの地図」は、初めは隠してある。端末の時刻の地域が日本の時だけ、処理の文が札の先頭に出す(日本の外の人が押すと、現在地が使えないまま無料の1回を使ってしまうため) */
.nx-near[hidden] { display: none; }
.nx-near.on { order: -1; }

/* 灯りの地図(主役)と数字。円の縁が駅から500m。灯り1つが店1つ */
.nx-scope { display: grid; grid-template-columns: min(168px, 45vw) minmax(0, 1fr); gap: 12px; align-items: start; margin: 12px 0 0; }
/* ベトナム語は字の幅が広く、右の列の行が折れてボタンが下がるので、円を少し小さくして列を広げる */
:root[lang="vi"] .nx-scope { grid-template-columns: min(150px, 40vw) minmax(0, 1fr); }
.nx-lens { position: relative; aspect-ratio: 1; border-radius: 50%; overflow: hidden; background: var(--night); box-shadow: 0 0 0 1.5px var(--night-edge); }
.nx-lens svg { display: block; width: 100%; height: 100%; }
.nx-haze { fill: none; stroke: var(--akari); stroke-width: 5.5; stroke-linecap: round; opacity: .09; }
.nx-dot { fill: none; stroke: var(--akari); stroke-linecap: round; }
.nx-d1 { stroke-width: 1.5; opacity: .85; }
.nx-d2 { stroke-width: 2; }
.nx-d3 { stroke-width: 2.7; }
.nx-radius { fill: none; stroke: #fff9f2; stroke-opacity: .4; stroke-width: .9; stroke-dasharray: 1.5 3; }
.nx-ring { fill: var(--night); stroke: #fff9f2; stroke-width: 1.7; }
.nx-core { fill: #fff9f2; }
.nx-stname, .nx-km { position: absolute; white-space: nowrap; line-height: 1.3; color: #fff9f2; }
.nx-stname { left: 50%; top: calc(50% + 9px); transform: translateX(-50%); display: flex; align-items: baseline; gap: 5px; max-width: 92%; padding: 2px 8px 3px; border-radius: 10px;
  background: color-mix(in srgb, var(--night) 82%, transparent); }
.nx-stname b { font-family: "Zen Kaku Gothic New", "Hiragino Sans", "Yu Gothic UI", "Noto Sans CJK JP", sans-serif; font-weight: 700; font-size: 12.5px; }
.nx-stname i { font-style: normal; font-size: 11.5px; opacity: .82; overflow: hidden; text-overflow: ellipsis; }
.nx-km { right: 5%; top: calc(50% - 21px); padding: 0 5px 1px; border-radius: 8px; background: color-mix(in srgb, var(--night) 78%, transparent); font-size: 11.5px; }
.nx-read { min-width: 0; align-self: center; font-size: 12.5px; line-height: 1.4; color: var(--muted); }
.nx-read p { margin: 0; }
.nx-lab { color: var(--ink); font-weight: 700; text-wrap: balance; }
.nx-num { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 4px; margin-top: 1px; color: var(--ink); font-size: 15px; font-weight: 700; line-height: 1; }
.nx-num b { font-family: var(--f-display); font-weight: 400; font-size: clamp(34px, 11.2vw, 44px); line-height: 1.08; letter-spacing: -.01em; }
.nx-lab2 { margin-top: 1px; color: var(--ink); text-wrap: balance; }
:root[lang="zh-Hans"] .nx-num b, :root[lang="zh-Hans"] header.site .brand b { font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif; font-weight: 800; letter-spacing: 0; }
.nx-key { margin-top: 7px; font-size: 12px; text-wrap: balance; }
.nx-key::before { content: ""; display: inline-block; width: 11px; height: 11px; margin-right: 5px; vertical-align: -1.5px; border-radius: 50%;
  background: radial-gradient(circle, var(--akari) 0 2.3px, var(--night) 2.9px); }
.nx-facts { list-style: none; margin: 6px 0 0; padding: 6px 0 0; border-top: 1px solid var(--rule); display: grid; gap: 1px; }
.nx-facts li::marker { content: none; }
#nx-al { color: var(--ink); }   /* 全席で吸える店の数(紙巻きを席で吸いたい人が、いちばん知りたい数) */

/* 路上の決まり(円の外の話): 黒い帯 */
.nx-ban { display: flex; align-items: center; gap: 8px; margin: 10px 0 0; padding: 7px 12px; border-radius: 9px; background: var(--ban-bg); color: var(--ban-ink);
  box-shadow: inset 0 0 0 1px var(--ban-edge); font-size: 13px; line-height: 1.35; }
.nx-ban svg { flex: none; width: 18px; height: 18px; }
.nx-ban span { min-width: 0; }
.nx-ban b { margin-left: auto; padding-left: 8px; white-space: nowrap; font-weight: 700; }
.nx-ban b:empty { display: none; }
/* 禁止の区域でない街・確かめられなかった街では、帯を出さない。上の display: flex が hidden を打ち消すので、はっきり消す
   (2026-11-24 の見直し: これが無く、すすきの・中洲・国分町・流川・国際通り・野毛にも「路上喫煙禁止」の帯が出ていた) */
.nx-ban[hidden] { display: none; }
/* 英語のページは本文の字体が日本語用のままなので、額の「¥」と両替の額の記号が全角の幅で出る。そこだけ端末の字体にする */
:root[lang="en"] .nx-ban b, :root[lang="en"] .nx-note .fx { font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; }

/* 主のボタン(1つだけ。朱はここだけ)。幅いっぱい・角を丸めた塗りつぶし(海外の旅行や地図のサービスで見慣れた形)。下の厚みで「押せる物」に見せる */
.nx-form { margin: 10px 0 0; }
.nx-go { display: block; width: 100%; min-height: 54px; padding: 9px 18px 10px; border: 0; border-radius: 12px; background: var(--shu); color: var(--on-shu);
  font: inherit; font-size: 18px; font-weight: 700; line-height: 1.25; text-align: center; cursor: pointer; box-shadow: 0 3px 0 var(--shu-deep); -webkit-tap-highlight-color: transparent; }
.nx-go:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--shu-deep); }
.nx-go:focus-visible { outline: 2.5px solid var(--ink); outline-offset: 3px; }
.nx-free { margin: 9px 0 0; text-align: center; font-size: 12.5px; line-height: 1.45; color: var(--ink); text-wrap: balance; }
.nx-note { margin: 7px 0 0; text-align: center; font-size: 12.5px; line-height: 1.5; color: var(--muted); text-wrap: pretty; }
.nx-note a { display: inline-block; }   /* 旅行パスのリンクは、ひとかたまりで次の行へ送る(簡体字で、名前が「旅行通／票」と途中で折れたため。1行に収まらない言葉は、かたまりの中で折れる) */
.nx-note .fx { margin-left: 5px; }
.nx-fxc { margin: 2px 0 0; text-align: center; font-size: 12px; }
.nx-asof { margin: 9px 0 0; text-align: center; font-size: 12px; line-height: 1.5; color: var(--muted); text-wrap: pretty; }
.nx-asof span { display: inline-block; }   /* 文ごとに折れないかたまり(収まらない時は、文ごと次の行へ送る) */
.nx-two { margin: 7px 0 0; text-align: center; font-size: 12px; line-height: 1.5; color: var(--muted); text-wrap: pretty; }
.nx-cn { margin: 9px 0 0; padding: 7px 10px; border-left: 0; border-radius: 8px; font-size: 12.5px; line-height: 1.5; color: var(--muted); }
.nx-list-note { font-size: 13.5px; color: var(--muted); }   /* 下の街の一覧の注(数字は駅から1km) */
.nx-end { gap: 0; }
.nx-end > p:first-of-type { margin-top: 8px; }

/* 区切りの中の折れない物が、ページ全体の幅を押し広げないようにする(スマホでは、広がると全体が縮んで見える)。
   2026-11-24 の見直しの試しで見つけた: 地図の画面の絵が読めない時、絵の代わりの文(1行のまま折れない)が、英語のページの幅を375pxから719pxに広げた。
   本番には絵があるので起きていないが、回線が悪くて絵が読めなかった時に同じ事が起きる。区切りの列の最小の幅を 0 にして、中の物の幅に引きずられないようにする */
main, main > section { grid-template-columns: minmax(0, 1fr); }
/* 地図の画面の絵 */
.nx-shot img { display: block; width: min(100%, 300px); height: auto; margin-top: 6px; border-radius: 16px; border: 1px solid var(--rule); box-shadow: var(--lift); }

/* 入口の標識の読み方 */
.nx-signs ul { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 8px; }
.nx-signs li { display: grid; gap: 2px; padding: 11px 13px 12px; border-radius: 10px; background: var(--card); border: 1px solid var(--rule); box-shadow: inset 4px 0 0 var(--ink); }
.nx-signs li b { font-family: "Zen Kaku Gothic New", "Hiragino Sans", "Yu Gothic UI", "Noto Sans CJK JP", sans-serif; font-weight: 700; font-size: 21px; line-height: 1.3; letter-spacing: .02em; }
.nx-signs li i { font-style: normal; font-size: 12.5px; color: var(--muted); font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; }   /* 読みの長音の線(ō)が、その言葉の字体に無くてずれるため、端末の字体で出す */
.nx-signs li span { font-size: 14.5px; line-height: 1.5; }
.nx-signs-age { font-size: 13.5px; color: var(--muted); }
.nx-signs-age b { font-family: "Zen Kaku Gothic New", "Hiragino Sans", "Yu Gothic UI", "Noto Sans CJK JP", sans-serif; font-weight: 700; color: var(--ink); }

/* 動き: 押した時の反応と、灯りがともる動き。勝手に動くのは灯りのまたたきだけで、6回で止まる */
@media (prefers-reduced-motion: no-preference) {
  .nx-town { transition: background-color .18s, color .18s, border-color .18s, transform .12s; }
  .nx-town:active { transform: scale(.96); }
  .nx-go { transition: transform .08s, box-shadow .08s; }
  .nx-lights { transform-origin: 108px 108px; }
  .nx-lights.on { animation: nx-tomoru .6s cubic-bezier(.2, .7, .2, 1); }
  .nx-d3 { animation: nx-matataki 3.2s ease-in-out 6 alternate; }
  @keyframes nx-tomoru { from { opacity: 0; transform: scale(.86); } to { opacity: 1; transform: none; } }
  @keyframes nx-matataki { from { opacity: 1; } to { opacity: .4; } }
}
