/* Japan is Nippon — washi paper, sumi ink, indigo and vermilion; one colour per region. */

:root {
  --paper: #f5efe3;
  --paper-2: #ece3d1;
  --surface: #fffaf1;
  --ink: #1e2433;
  --muted: #5f6472;
  --line: #ddd2bd;
  --shu: #c6452d;          /* vermilion, as on a torii */
  --indigo: #26446e;       /* ai-iro */
  --radius: 16px;
  --wrap: 1180px;
  --serif: "Fraunces", "Iowan Old Style", Georgia, serif;
  --jp-serif: "Hiragino Mincho ProN", "Yu Mincho", "Noto Serif JP", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Hiragino Sans", sans-serif;

  --r-hokkaido: #4f86b8;
  --r-tohoku: #4c7a57;
  --r-kanto: #c6452d;
  --r-chubu: #7b5c9e;
  --r-kansai: #b8862f;
  --r-chugoku: #2f8584;
  --r-shikoku: #7f9135;
  --r-kyushu: #d06a34;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #14181f;
    --paper-2: #1b2029;
    --surface: #1f2530;
    --ink: #efe8da;
    --muted: #a9a293;
    --line: #333a47;
    --shu: #ff7a5c;
    --indigo: #8fb1e3;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 17px/1.7 var(--sans); }
a { color: var(--indigo); text-underline-offset: 3px; }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.15; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.1rem, 5vw, 3.6rem); margin: 0 0 .3em; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); margin: 0 0 .4em; }
h3 { font-size: 1.2rem; }
[lang="ja"] { font-family: var(--jp-serif); }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.lede { font-size: 1.2rem; max-width: 40em; }
.kicker { display: inline-block; font: 700 .78rem/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--shu); margin-bottom: .7em; }

/* ---------- header & footer */
.site-header { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 64px; gap: 16px; }
.brand { display: flex; align-items: center; gap: .55em; color: var(--ink); text-decoration: none; font: 600 1.2rem var(--serif); }
.brand-mark { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--shu); color: #fff; font: 600 1rem var(--jp-serif); }
.site-nav a { color: var(--ink); text-decoration: none; font-weight: 600; margin-left: 1.4em; }
.site-nav a:hover { color: var(--shu); }
.site-nav .nav-icon, .site-nav .nav-home { display: none; }
.site-nav { margin-left: auto; }
.lang-switch { font-size: .85rem; font-weight: 600; color: var(--ink); text-decoration: none; border: 1px solid var(--line); border-radius: 999px; padding: .3em .9em; white-space: nowrap; }
.lang-switch:hover { border-color: var(--shu); color: var(--shu); }

.site-footer { margin-top: 6em; padding: 3em 0; background: var(--ink); color: var(--paper); font-size: .92rem; }
.site-footer a { color: inherit; }
.site-footer .muted { color: color-mix(in srgb, var(--paper) 65%, transparent); max-width: 44em; }
@media (prefers-color-scheme: dark) { .site-footer { background: #0c0f14; color: var(--ink); } }

.breadcrumbs ol { list-style: none; padding: 0; margin: 18px 0 0; display: flex; flex-wrap: wrap; gap: .35em; font-size: .88rem; color: var(--muted); }
.breadcrumbs li + li::before { content: "›"; margin-right: .35em; }
.breadcrumbs a { color: inherit; }

section.block { margin-top: 4.5em; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 1em; flex-wrap: wrap; margin-bottom: 1.4em; }
.section-head p { margin: 0; max-width: 36em; }
.more { font-weight: 600; text-decoration: none; white-space: nowrap; }
.more:hover { text-decoration: underline; }

/* ---------- home hero */
.home-hero { position: relative; color: #fff; background: var(--ink); overflow: hidden; }
.home-hero img { width: 100%; height: clamp(420px, 62vh, 640px); object-fit: cover; }
.home-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,14,24,.05) 30%, rgba(10,14,24,.72) 100%); }
.home-hero .wrap { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; padding-bottom: clamp(28px, 6vh, 64px); }
.home-hero h1 { max-width: 13em; text-shadow: 0 2px 24px rgba(0,0,0,.35); }
.home-hero .lede { color: rgba(255,255,255,.92); }
.home-hero .kicker { color: #ffd2c4; }
.hero-credit { position: absolute; right: 12px; top: 10px; z-index: 1; font-size: .72rem; color: rgba(255,255,255,.75); }

/* ---------- cards */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 22px; }
.cards.featured > .card:first-child { grid-column: span 2; }
.cards.featured > .card:first-child .card-title { font-size: 1.6rem; }
@media (max-width: 640px) { .cards.featured > .card:first-child { grid-column: auto; } }

.card { position: relative; display: flex; flex-direction: column; background: var(--surface); border-radius: var(--radius);
  overflow: hidden; color: var(--ink); text-decoration: none; box-shadow: 0 1px 0 var(--line), 0 10px 30px -18px rgba(30,36,51,.35);
  transition: transform .2s ease, box-shadow .2s ease; }
.card:hover { transform: translateY(-4px); box-shadow: 0 1px 0 var(--line), 0 22px 40px -20px rgba(30,36,51,.45); }
.card-media { aspect-ratio: 3 / 2; overflow: hidden; background: var(--region); }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.card:hover .card-media img { transform: scale(1.04); }
.card-media.placeholder { display: grid; place-items: center; color: rgba(255,255,255,.9); font: 600 2.6rem var(--jp-serif); }
.card-body { display: flex; flex-direction: column; gap: .3em; padding: 16px 18px 20px; border-top: 4px solid var(--region); flex: 1; }
.card-meta { font: 700 .72rem/1.3 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--region); }
.card-title { font: 600 1.25rem/1.2 var(--serif); }
.card-ja { font-size: .92rem; color: var(--muted); }
.card-text { font-size: .95rem; color: var(--muted); }
.badge { position: absolute; top: 12px; left: 12px; padding: .3em .8em; border-radius: 999px; background: var(--paper); color: var(--shu);
  font: 700 .72rem var(--sans); letter-spacing: .04em; box-shadow: 0 2px 10px rgba(0,0,0,.15); }



/* ---------- word of the day */
.word-panel { display: grid; grid-template-columns: auto 1fr; gap: 10px 36px; align-items: center; padding: clamp(24px, 4vw, 44px);
  border-radius: var(--radius); background: var(--indigo); color: #f5efe3; position: relative; overflow: hidden; }
.word-panel::before { content: ""; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px; border-radius: 50%; background: var(--shu); opacity: .9; }
.word-panel > * { position: relative; }
.word-panel .kicker { color: #ffd2c4; grid-column: 1 / -1; margin: 0; }
.word-kanji { font: 600 clamp(3.2rem, 9vw, 5.6rem)/1 var(--jp-serif); }
.word-romaji { font: italic 1.3rem var(--serif); opacity: .85; }
.word-meaning { font: 600 1.5rem/1.2 var(--serif); margin: .2em 0 .4em; }
.word-panel p { margin: 0; }
.word-panel a { color: #fff; }
@media (max-width: 640px) { .word-panel { grid-template-columns: 1fr; } }
@media (prefers-color-scheme: dark) { .word-panel { background: #22375a; } }

/* ---------- tile map */
.tilemap { display: grid; grid-template-columns: repeat(13, minmax(0, 1fr)); gap: 6px; max-width: 820px; }
.tile { aspect-ratio: 1; display: grid; place-items: center; border-radius: 10px; text-decoration: none; position: relative;
  background: color-mix(in srgb, var(--region) 22%, var(--paper)); color: var(--ink); font: 600 .56rem/1.05 var(--sans); text-align: center; overflow: hidden; letter-spacing: -.01em;
  transition: transform .15s ease, background .15s ease; }
.tile:hover, .tile:focus-visible { transform: scale(1.15); z-index: 2; background: var(--region); color: #fff; }
.tile.has-spots { background: var(--region); color: #fff; }
.tile.current { outline: 3px solid var(--ink); outline-offset: 2px; background: var(--region); color: #fff; }
.tile .abbr { display: none; }
@media (max-width: 700px) {
  .tilemap { gap: 3px; }
  .tile { border-radius: 5px; font-size: .56rem; }
  .tile .full { display: none; }
  .tile .abbr { display: inline; }
}
.tilemap-wrap { display: grid; grid-template-columns: minmax(0, 820px) minmax(200px, 1fr); gap: 32px; align-items: start; }
@media (max-width: 900px) { .tilemap-wrap { grid-template-columns: minmax(0, 1fr); gap: 14px; } }
.legend { list-style: none; padding: 0; margin: 0; display: grid; gap: .5em; font-size: .95rem; }
.legend li { display: flex; align-items: center; gap: .6em; }
.legend i { flex: none; width: 14px; height: 14px; border-radius: 4px; background: var(--region); }
.tilemap.mini { width: 100%; max-width: 280px; gap: 3px; }
.tilemap.mini .tile { border-radius: 4px; font-size: 0; }
.tilemap.mini .tile:not(.current) { background: color-mix(in srgb, var(--region) 25%, var(--paper)); }

/* ---------- spot page */
.spot-hero { position: relative; margin-top: 18px; border-radius: var(--radius); overflow: hidden; background: var(--ink); color: #fff; }
.spot-hero img { width: 100%; max-height: 620px; object-fit: cover; }
.spot-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 45%, rgba(10,14,24,.78) 100%); }
.spot-hero .spot-title { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; padding: clamp(20px, 4vw, 40px); }
.spot-hero h1 { margin: 0; text-shadow: 0 2px 20px rgba(0,0,0,.4); }
.spot-hero .ja-name { font-size: 1.3rem; opacity: .9; margin: .2em 0 0; }
.spot-hero .kicker { color: #ffd2c4; }
.spot-hero figcaption { position: absolute; right: 12px; top: 10px; z-index: 1; font-size: .72rem; color: rgba(255,255,255,.8); }
.spot-hero figcaption a { color: inherit; }
.spot-title-plain { margin-top: 24px; }

.spot-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 48px; margin-top: 36px; align-items: start; }
@media (max-width: 900px) { .spot-layout { grid-template-columns: 1fr; } }
.spot-aside { display: grid; gap: 20px; position: sticky; top: 88px; }
@media (max-width: 900px) { .spot-aside { position: static; } }
.panel { padding: 20px; border-radius: var(--radius); background: var(--surface); box-shadow: 0 1px 0 var(--line); }
.panel h2 { font-size: 1.05rem; margin-bottom: .6em; }
.panel dl { margin: 0; }
.panel dt { font-weight: 700; font-size: .85rem; color: var(--muted); }
.panel dd { margin: 0 0 .7em; }
.word-mini .word-kanji { font-size: 2.6rem; }
.word-mini .word-romaji { font-size: 1rem; color: var(--muted); }

.prose { font-size: 1.08rem; }
.prose > .lede { font: 500 1.35rem/1.5 var(--serif); margin-top: 0; }
.prose h2 { font-size: 1.6rem; margin-top: 1.6em; }
.prose h2::before { content: ""; display: block; width: 40px; height: 4px; border-radius: 2px; background: var(--shu); margin-bottom: .6em; }
.prose ul { padding-left: 1.2em; }
.prose li { margin: .4em 0; }
.sources { margin-top: 3em; padding-top: 1.5em; border-top: 1px solid var(--line); font-size: .92rem; }
.sources h2 { font-size: 1.1rem; }
.sources ul { padding-left: 1.2em; }

/* ---------- prefecture page */
.pref-header { margin-top: 18px; padding: clamp(24px, 5vw, 56px); border-radius: var(--radius); background: var(--region); color: #fff;
  display: grid; grid-template-columns: 1fr 240px; gap: 24px; align-items: end; overflow: hidden; position: relative; }
.pref-header h1 { margin: 0; }
.pref-header .kicker { color: rgba(255,255,255,.85); }
.pref-header .pref-ja { font: 600 clamp(3rem, 10vw, 7rem)/1 var(--jp-serif); opacity: .22; position: absolute; left: clamp(24px, 5vw, 56px); bottom: -.12em; pointer-events: none; }
.pref-header > div { position: relative; padding-bottom: 3.2em; }
.pref-header .tilemap.mini .tile:not(.current) { background: rgba(255,255,255,.22); }
.pref-header .tilemap.mini .tile.current { background: #fff; outline-color: #fff; }
@media (max-width: 640px) { .pref-header { grid-template-columns: 1fr; } }
.empty-note { padding: 28px; border-radius: var(--radius); background: var(--paper-2); }

/* ---------- 404 */
.notfound { padding: 5em 0 2em; }

/* ---------- region colours (last, so they win over component defaults) */
:root { --region: var(--indigo); }
.region-hokkaido { --region: var(--r-hokkaido); }
.region-tohoku { --region: var(--r-tohoku); }
.region-kanto { --region: var(--r-kanto); }
.region-chubu { --region: var(--r-chubu); }
.region-kansai { --region: var(--r-kansai); }
.region-chugoku { --region: var(--r-chugoku); }
.region-shikoku { --region: var(--r-shikoku); }
.region-kyushu { --region: var(--r-kyushu); }

/* ---------- articles */
.article-head { margin-top: 1.6em; max-width: 50em; }
.article-head h1 { font-size: clamp(2rem, 4.4vw, 3.2rem); }
.byline { font-size: .92rem; margin: 0; }
.byline a { color: inherit; }
.article-image { margin: 28px 0 0; border-radius: var(--radius); overflow: hidden; }
.article-image img { width: 100%; max-height: 560px; object-fit: cover; }
.article-image figcaption { font-size: .75rem; color: var(--muted); padding: 6px 2px; }
.place-links { list-style: none; padding: 0; margin: 0; display: grid; gap: .4em; }
.place-links li { display: flex; align-items: center; gap: .5em; }
.place-links i { flex: none; width: 12px; height: 12px; border-radius: 3px; background: var(--region); }
.card-article .card-body { border-top-color: var(--shu); }
.card-article .card-meta { color: var(--shu); }
.card-article .card-media.placeholder { background: var(--indigo); font: 600 1.6rem var(--serif); }
.pager { display: flex; justify-content: space-between; margin-top: 2.5em; font-weight: 600; }

  color: var(--ink); text-decoration: none; transition: background .15s; }

/* ---------- prefecture intro */
.pref-hero { margin: 28px 0 0; border-radius: var(--radius); overflow: hidden; }
.pref-hero img { width: 100%; max-height: 520px; object-fit: cover; }
.pref-hero figcaption { font-size: .75rem; color: var(--muted); padding: 6px 2px; }

/* ---------- photo gallery */
.gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin: 1.6em 0; }
.gallery figure { margin: 0; }
.gallery img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 12px; }
.gallery figcaption, .pref-hero figcaption, .spot-hero figcaption { font-size: .72rem; }
.gallery figcaption { color: var(--muted); margin-top: .35em; line-height: 1.4; }
.gallery figcaption a, .pref-hero figcaption a { color: inherit; }

/* ---------- ranking */
.home-map { padding-top: 2.2em; }
.home-map h1 { font-size: clamp(2rem, 4.4vw, 3.2rem); }
.rank { position: absolute; top: 10px; left: 10px; z-index: 1; min-width: 38px; height: 38px; padding: 0 8px; display: grid; place-items: center;
  border-radius: 999px; background: var(--ink); color: #fff; font: 700 1.1rem var(--serif); box-shadow: 0 2px 10px rgba(0,0,0,.25); }
.rank.top { background: var(--shu); }

/* ---------- essentials */
.emergency-line { display: inline-block; margin: .4em 0 0; padding: .45em .9em; border-radius: 999px; background: var(--shu); color: #fff; font-weight: 700; font-size: .95rem; }
.essentials-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; margin-top: 2em; }
.essential-card { display: grid; gap: .5em; padding: 24px; border-radius: var(--radius); background: var(--surface); color: var(--ink); text-decoration: none;
  box-shadow: 0 1px 0 var(--line), 0 10px 30px -18px rgba(30,36,51,.35); transition: transform .2s; }
.essential-card:hover { transform: translateY(-3px); }
.essential-card strong { font: 600 1.35rem var(--serif); }
.essential-card span:last-child { color: var(--muted); }
.essential-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--indigo); color: #fff; font: 700 1.4rem var(--jp-serif); }
.trouble-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.trouble-list a { display: grid; gap: .2em; padding: 16px 18px; border-radius: 12px; background: var(--surface); color: var(--ink); text-decoration: none; box-shadow: 0 1px 0 var(--line); }
.trouble-list a:hover { box-shadow: 0 0 0 2px var(--shu); }
.trouble-list strong { font: 600 1.15rem var(--serif); }
.first-steps { padding: 20px 24px; border-radius: var(--radius); background: var(--surface); border-left: 6px solid var(--shu); box-shadow: 0 1px 0 var(--line); }
.first-steps h2 { margin-top: 0; }
.first-steps h2::before { display: none; }
.first-steps ol { margin: 0; padding-left: 1.4em; }
.first-steps li { margin: .5em 0; font-weight: 600; }
.contacts dt { font-weight: 700; margin-top: .6em; }
.contacts dd { margin: 0; }
.contacts .tel { font: 700 1.3rem var(--sans); color: var(--shu); text-decoration: none; }
.plain-links { list-style: none; padding: 0; margin: 0; display: grid; gap: .4em; }
.scene-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 1em; }
.scene-links a { padding: .3em .8em; border-radius: 999px; background: var(--paper-2); color: var(--ink); text-decoration: none; font-size: .9rem; }
.signs-tools { position: sticky; top: 64px; z-index: 5; padding: 12px 0; background: color-mix(in srgb, var(--paper) 94%, transparent); }
.signs-tools input { width: 100%; max-width: 520px; padding: .7em 1em; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-size: 1rem; }
.sign-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.sign-card { padding: 16px; border-radius: 12px; background: var(--surface); box-shadow: 0 1px 0 var(--line); }
.sign-plate { display: inline-block; padding: .15em .6em; border-radius: 6px; background: var(--indigo); color: #fff; font: 700 1.35rem var(--jp-serif); }
.sign-reading { margin-top: .4em; font-size: .9rem; color: var(--muted); }
.sign-meaning { margin: .5em 0 .3em; font-weight: 600; }
.sign-action { margin: 0; font-size: .92rem; }
.manner-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.manner-list li { display: grid; grid-template-columns: 36px 1fr; gap: 12px; align-items: start; padding: 12px 16px; border-radius: 12px; background: var(--surface); box-shadow: 0 1px 0 var(--line); }
.manner-mark { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; font-weight: 700; color: #fff; }
.is-do .manner-mark { background: var(--r-tohoku); }
.is-dont .manner-mark { background: var(--shu); }
.manner-related { margin-top: .8em; font-size: .95rem; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- prefecture: tabs, map, ranked list */
.pref-summary { margin: .5em 0 0; max-width: 40em; opacity: .95; }
.tabs { display: flex; gap: 4px; margin: 22px 0 0; border-bottom: 2px solid var(--line); }
.tabs a { padding: .7em 1.2em; border-radius: 12px 12px 0 0; color: var(--muted); text-decoration: none; font-weight: 700; margin-bottom: -2px;
  border-bottom: 3px solid transparent; }
.tabs a[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--shu); background: var(--surface); }
.tab-count { display: inline-block; min-width: 1.6em; padding: 0 .4em; border-radius: 999px; background: var(--paper-2); font-size: .8rem; text-align: center; }
.tab-panel { padding-top: 24px; }
.spot-explorer { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 24px; align-items: start; }
@media (max-width: 900px) { .spot-explorer { grid-template-columns: 1fr; } }
.map-wrap { position: sticky; top: 80px; }
@media (max-width: 900px) { .map-wrap { position: static; } }
.map-box { position: relative; border-radius: var(--radius); overflow: hidden; box-shadow: 0 1px 0 var(--line), 0 10px 30px -18px rgba(30,36,51,.35); }
.pref-map { display: block; width: 100%; height: min(64vh, 580px); touch-action: none; cursor: grab; background: #a9c8da; }
.pref-map:active { cursor: grabbing; }
.pref-map .sea { fill: #a9c8da; }
.pref-map .land-other { fill: #ebe5d8; stroke: #bdb3a1; stroke-width: .25; vector-effect: non-scaling-stroke; }
.pref-map .land-own { fill: color-mix(in srgb, var(--region) 14%, #fffaf0); stroke: var(--region); stroke-width: 1.6; vector-effect: non-scaling-stroke; }
.pref-map .pin path { fill: var(--ink); stroke: #fff; stroke-width: 1.4; vector-effect: non-scaling-stroke; }
.pref-map .pin.top path { fill: var(--shu); }
.pref-map .pin text { fill: #fff; font-family: var(--sans); font-weight: 700; text-anchor: middle; dominant-baseline: central; pointer-events: none; }
.pref-map .pin:hover path, .pref-map .pin.active path { fill: var(--indigo); }
@media (prefers-color-scheme: dark) {
  .pref-map, .pref-map .sea { background: #1d2a36; fill: #1d2a36; }
  .pref-map .land-other { fill: #2a2f38; stroke: #3c4350; }
  .pref-map .land-own { fill: color-mix(in srgb, var(--region) 30%, #20252e); }
}
.map-controls { position: absolute; top: 10px; right: 10px; display: grid; gap: 6px; }
.map-controls button { width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  font-size: 1.2rem; cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,.12); }
.map-credit { margin: .4em 2px 0; font-size: .75rem; color: var(--muted); }
.map-credit a { color: inherit; }
.spot-rank-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.spot-rank-list a { position: relative; display: grid; grid-template-columns: 120px 1fr; gap: 14px; align-items: center; padding: 10px; border-radius: 14px;
  background: var(--surface); color: var(--ink); text-decoration: none; box-shadow: 0 1px 0 var(--line); transition: box-shadow .15s; }
.spot-rank-list li.active a, .spot-rank-list a:hover { box-shadow: 0 0 0 2px var(--indigo); }
.spot-rank-list img, .spot-rank-list .thumb-placeholder { width: 120px; height: 80px; border-radius: 10px; object-fit: cover; }
.spot-rank-list .thumb-placeholder { display: grid; place-items: center; background: var(--paper-2); font: 600 1.3rem var(--jp-serif); color: var(--muted); }
.spot-rank-list .rank { top: 4px; left: 4px; min-width: 30px; height: 30px; font-size: .95rem; }
.spot-rank-text { display: grid; gap: .15em; }
.spot-rank-text strong { font: 600 1.1rem/1.25 var(--serif); }
.spot-rank-text .muted { font-size: .88rem; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
@media (max-width: 640px) { .spot-rank-list a { grid-template-columns: 88px 1fr; } .spot-rank-list img, .spot-rank-list .thumb-placeholder { width: 88px; height: 64px; } }
@media (max-width: 640px) {
  .pref-header .tilemap.mini { display: none; }
  .pref-header .pref-ja { font-size: 3.2rem; }
  /* Phones: one slim top bar (logo + language); the main menu becomes a tab bar at the bottom. */
  /* No sticky/blur header here: backdrop-filter would anchor the fixed tab bar to the header instead of the screen. */
  .site-header { position: static; backdrop-filter: none; background: var(--paper); }
  .site-header .wrap { min-height: 50px; }
  .lang-switch { font-size: .78rem; padding: .25em .75em; }
  .site-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: grid; grid-template-columns: repeat(4, 1fr);
    margin: 0; padding: 4px 4px calc(4px + env(safe-area-inset-bottom));
    background: color-mix(in srgb, var(--paper) 94%, transparent); backdrop-filter: blur(10px); border-top: 1px solid var(--line); }
  .site-nav a, .site-nav .nav-home { display: flex; flex-direction: column; align-items: center; gap: 2px; margin: 0; padding: 5px 2px;
    font-size: .68rem; font-weight: 600; color: var(--muted); white-space: nowrap; border-radius: 10px; }
  .site-nav .nav-icon { display: block; width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8;
    stroke-linecap: round; stroke-linejoin: round; }
  .site-nav a[aria-current="page"] { color: var(--shu); }
  body { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
}

/* ---------- phone: home first view */
@media (max-width: 640px) {
  .brand { font-size: 1.05rem; }
  .brand-mark { width: 30px; height: 30px; }
  /* The heading sits in the empty sea at the top left of the tile map. */
  .home-map { position: relative; padding-top: 1.2em; }
  .home-map .section-head { position: absolute; top: 1.2em; left: 0; z-index: 1; margin: 0; max-width: 66%; pointer-events: none; }
  .home-map h1 { font-size: 1.5rem; margin: 0; word-break: keep-all; }
  .legend { display: flex; flex-wrap: wrap; gap: .3em .8em; font-size: .74rem; color: var(--muted); }
  .legend li { gap: .3em; }
  .legend i { width: 9px; height: 9px; border-radius: 3px; }
  .section-head { align-items: start; }
  .section-head .more { font-size: .9rem; }
  section.home-ranking { margin-top: 1.4em; }
  .home-ranking .section-head { align-items: baseline; row-gap: .2em; margin-bottom: .8em; }
  .home-ranking h2 { font-size: 1.35rem; margin: 0; }
  /* Ranking: swipe sideways through photo cards; the next card peeks in. */
  .cards.swipe { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -16px; padding: 0 16px 8px; scroll-padding-inline: 16px;
    scrollbar-width: none; }
  .cards.swipe::-webkit-scrollbar { display: none; }
  .cards.swipe > .card { flex: 0 0 78%; scroll-snap-align: start; }
  .cards.swipe .card-body { padding: 12px 14px 14px; }
  .cards.swipe .card-title { font-size: 1.1rem; }
  .cards.swipe .card-text { font-size: .85rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .cards.swipe .rank { min-width: 32px; height: 32px; font-size: .95rem; }
}
