/* ==========================================================================
   The Great Ramen War · 麺道
   Palette: 和紙 washi · 墨 sumi · 朱 shu · 金 kin · 藍 ai · 抹茶 matcha · 鼠 nezumi
   ========================================================================== */

:root {
  --washi: #f3ede2;
  --washi-2: #ebe3d4;
  --card: #fbf8f2;
  --sumi: #1d1a16;
  --sumi-2: #4a443b;
  --sumi-3: #6b6458;
  --line: rgba(29, 26, 22, .12);
  --line-2: rgba(29, 26, 22, .22);
  --shu: #bb3826;
  --shu-ink: #fff7ef;
  --kin: #8f661f;
  --ai: #2d4868;
  --matcha: #56693a;
  --nezumi: #716b61;
  --sea: #d6dcd8;
  --land: #f6f1e7;
  --shadow: 0 1px 0 rgba(29,26,22,.04), 0 10px 30px -12px rgba(29,26,22,.28);
  --shadow-lg: 0 30px 60px -24px rgba(29,26,22,.45);

  --t-S: var(--shu);
  --t-A: var(--kin);
  --t-B: var(--ai);
  --t-C: var(--matcha);
  --t-D: var(--nezumi);

  --f-display: 'Shippori Mincho', 'Hiragino Mincho ProN', 'Yu Mincho', 'YuMincho', serif;
  --f-body: 'Zen Kaku Gothic New', 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Yu Gothic', system-ui, sans-serif;

  --rail: 76px;
  --panel: 384px;
  --drawer: 448px;
  --r: 10px;
  --ease: cubic-bezier(.2, .7, .2, 1);

  color-scheme: light;
}

:root[data-theme="dark"] {
  --washi: #16130f;
  --washi-2: #1c1813;
  --card: #221d17;
  --sumi: #efe7d9;
  --sumi-2: #c7bdab;
  --sumi-3: #a09684;
  --line: rgba(239, 231, 217, .11);
  --line-2: rgba(239, 231, 217, .2);
  --shu: #e2583f;
  --shu-ink: #1a0d09;
  --kin: #d4a650;
  --ai: #86a3cb;
  --matcha: #9cb176;
  --nezumi: #a19a8e;
  --sea: #0e1316;
  --land: #1f1b16;
  --shadow: 0 1px 0 rgba(0,0,0,.2), 0 12px 32px -12px rgba(0,0,0,.7);
  --shadow-lg: 0 30px 60px -20px rgba(0,0,0,.8);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--washi);
  color: var(--sumi);
  font: 400 14px/1.6 var(--f-body);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "palt" 1;
  overflow: hidden;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--shu); outline-offset: 2px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* washi fibre texture — a whisper, not a shout */
.panel::before, .drawer::before, .rail::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .45 0 0 0 0 .38 0 0 0 0 .28 0 0 0 .05 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
:root[data-theme="dark"] .panel::before, :root[data-theme="dark"] .drawer::before, :root[data-theme="dark"] .rail::before { mix-blend-mode: screen; opacity: .35; }

/* ------------------------------------------------------------------ layout */
.app {
  display: grid;
  grid-template-columns: var(--rail) var(--panel) 1fr;
  height: 100dvh;
  position: relative;
}

/* ------------------------------------------------------------------ rail */
.rail {
  position: relative; z-index: 5;
  display: flex; flex-direction: column; align-items: center;
  padding: 18px 0 16px;
  background: var(--sumi);
  color: var(--washi);
}
:root[data-theme="dark"] .rail { background: #0d0b09; color: var(--sumi); }
.brand { display: flex; flex-direction: column; align-items: center; gap: 14px; text-decoration: none; }
.brand__seal {
  display: grid; place-items: center; width: 42px; height: 42px;
  background: var(--shu); color: #fff7ef; border-radius: 8px;
  font: 700 24px/1 var(--f-display);
  box-shadow: inset 0 0 0 2px rgba(255,247,239,.9), inset 0 0 0 4px var(--shu);
  transform: rotate(-3deg);
}
.brand__v {
  writing-mode: vertical-rl; font: 700 22px/1 var(--f-display); letter-spacing: .35em;
  opacity: .92;
}
.rail__nav { display: flex; flex-direction: column; gap: 4px; margin-top: 28px; }
.rail__btn {
  width: 60px; padding: 10px 0 8px; border: 0; background: transparent; border-radius: 10px;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  color: inherit; opacity: .6; transition: opacity .2s, background .2s;
}
.rail__btn b { font: 700 20px/1.1 var(--f-display); }
.rail__btn span { font-size: 10px; letter-spacing: .12em; text-transform: uppercase; }
.rail__btn:hover { opacity: .9; background: rgba(255,255,255,.05); }
.rail__btn.is-active { opacity: 1; background: rgba(255,255,255,.08); }
.rail__btn.is-active b { color: #f07a62; }
.rail__foot { margin-top: auto; display: flex; flex-direction: column; gap: 6px; }
.rail__icon {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px;
  border: 0; background: transparent; color: inherit; opacity: .6;
}
.rail__icon:hover { opacity: 1; background: rgba(255,255,255,.06); }
.rail__icon svg, .chip svg, .searchbar__icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* ------------------------------------------------------------------ panel */
.panel {
  position: relative; z-index: 4;
  display: flex; flex-direction: column; min-height: 0;
  background: var(--washi);
  border-right: 1px solid var(--line);
}
.panel__head { padding: 26px 26px 14px; position: relative; }
.eyebrow {
  margin: 0 0 6px; font-size: 10.5px; letter-spacing: .22em; text-transform: uppercase; color: var(--sumi-3);
}
.panel__title { margin: 0; font: 700 26px/1.2 var(--f-display); letter-spacing: .02em; }
.panel__title span[lang="ja"] { margin-right: .35em; }
.stats { display: flex; gap: 20px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.stat { display: flex; flex-direction: column; }
.stat b { font: 700 22px/1 var(--f-display); font-variant-numeric: tabular-nums; }
.stat span { margin-top: 5px; font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--sumi-3); }
.panel__body { flex: 1; overflow-y: auto; padding: 4px 18px 120px; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }

/* filters */
.filters { position: sticky; top: 0; z-index: 2; background: var(--washi); padding: 8px 8px 12px; margin: 0 -8px; }
.seg { display: flex; gap: 6px; flex-wrap: wrap; }
.seg + .seg { margin-top: 8px; }
.seg--selects { display: grid; grid-template-columns: 1fr 1fr; }
.seg--selects .select { width: 100%; }
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  height: 30px; padding: 0 12px; border-radius: 999px;
  border: 1px solid var(--line-2); background: transparent; color: var(--sumi-2);
  font-size: 12.5px; transition: all .15s;
}
.pill:hover { border-color: var(--sumi-2); color: var(--sumi); }
.pill[aria-pressed="true"] { background: var(--sumi); border-color: var(--sumi); color: var(--washi); }
.pill--tier { width: 34px; padding: 0; justify-content: center; font: 700 14px/1 var(--f-display); }
.pill--tier[aria-pressed="true"] { background: var(--tc); border-color: var(--tc); color: #fff; }
.select {
  height: 30px; padding: 0 28px 0 12px; border-radius: 999px; border: 1px solid var(--line-2);
  background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='m3 4.5 3 3 3-3' fill='none' stroke='%237a746a' stroke-width='1.4'/%3E%3C/svg%3E") no-repeat right 10px center / 12px;
  appearance: none; font-size: 12.5px; color: var(--sumi-2);
}
.select option { background: var(--card); color: var(--sumi); }

/* shop card */
.list { display: flex; flex-direction: column; gap: 2px; }
.card {
  display: grid; grid-template-columns: 64px 1fr auto; gap: 14px; align-items: center;
  width: 100%; padding: 12px 10px; border: 0; border-radius: var(--r);
  background: transparent; text-align: left; transition: background .15s;
  position: relative;
}
.card:hover { background: var(--washi-2); }
.card.is-active { background: var(--card); box-shadow: var(--shadow); }
.card.is-active::before { content: ""; position: absolute; left: -8px; top: 16px; bottom: 16px; width: 3px; border-radius: 2px; background: var(--shu); }
.card__img {
  width: 64px; height: 64px; border-radius: 8px; overflow: hidden; background: var(--washi-2);
  display: grid; place-items: center; color: var(--sumi-3); font: 700 22px/1 var(--f-display);
  border: 1px solid var(--line);
}
.card__img img { width: 100%; height: 100%; object-fit: cover; }
.card__ja { font: 500 11.5px/1.3 var(--f-display); color: var(--sumi-3); margin: 0 0 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card__name { font: 700 15px/1.3 var(--f-display); margin: 0; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.card__meta { margin: 5px 0 0; font-size: 11.5px; line-height: 1.45; color: var(--sumi-3); display: flex; gap: 2px 10px; flex-wrap: wrap; }
.card__meta span { display: inline-flex; align-items: center; gap: 4px; }
.card__body { min-width: 0; }
.empty { padding: 48px 12px; text-align: center; color: var(--sumi-3); }
.empty b { display: block; font: 700 40px/1 var(--f-display); color: var(--line-2); margin-bottom: 12px; }

/* ------------------------------------------------------------------ hanko (tier seal) */
.hanko {
  --tc: var(--nezumi);
  display: grid; place-items: center; flex: none;
  width: 38px; height: 38px; border-radius: 50%;
  color: var(--tc); font: 700 19px/1 var(--f-display);
  box-shadow: inset 0 0 0 2px var(--tc), inset 0 0 0 4px transparent, inset 0 0 0 5px var(--tc);
  transform: rotate(-8deg);
  position: relative;
}
.hanko--S { --tc: var(--t-S); background: var(--t-S); color: #fff7ef; box-shadow: inset 0 0 0 2px rgba(255,247,239,.85), 0 0 0 1px var(--t-S); }
.hanko--A { --tc: var(--t-A); }
.hanko--B { --tc: var(--t-B); }
.hanko--C { --tc: var(--t-C); }
.hanko--D { --tc: var(--t-D); }
.hanko--none { --tc: var(--line-2); color: var(--sumi-3); font-size: 13px; }
.hanko--lg { width: 72px; height: 72px; font-size: 36px; }
.hanko--sm { width: 26px; height: 26px; font-size: 13px; }
.hanko--wish { --tc: var(--sumi-3); box-shadow: none; border: 1.5px dashed var(--tc); font-size: 12px; }

/* ------------------------------------------------------------------ map */
.stage { position: relative; min-width: 0; isolation: isolate; }
.map { position: absolute; inset: 0; background: var(--sea); }
.maplibregl-ctrl-attrib { font-size: 10px; background: color-mix(in srgb, var(--washi) 80%, transparent) !important; }
.maplibregl-ctrl-attrib a { color: var(--sumi-2) !important; }
.maplibregl-ctrl-scale { background: color-mix(in srgb, var(--washi) 80%, transparent); color: var(--sumi-2); border-color: var(--sumi-2); font: 500 10px/1.4 var(--f-body); }
.maplibregl-ctrl-group { background: var(--card) !important; box-shadow: var(--shadow) !important; border-radius: 10px !important; }
.maplibregl-ctrl-group button + button { border-top-color: var(--line) !important; }
:root[data-theme="dark"] .maplibregl-ctrl-icon { filter: invert(1) hue-rotate(180deg); }
.maplibregl-ctrl-bottom-right { right: 8px; bottom: 90px; }

/* shop marker */
.pin {
  --tc: var(--nezumi);
  width: 34px; height: 34px; border-radius: 50%; border: 0; padding: 0;
  display: grid; place-items: center;
  background: var(--card); color: var(--tc);
  font: 700 16px/1 var(--f-display);
  box-shadow: inset 0 0 0 2px var(--tc), 0 6px 14px -6px rgba(0,0,0,.5);
  /* MapLibre positions markers with position:absolute + transform, so pins must not set either:
     hover/active effects use the independent `translate` and `scale` properties instead */
  transition: scale .25s var(--ease), box-shadow .2s, filter .15s;
}
.pin::after { /* stem */
  content: ""; position: absolute; left: 50%; bottom: -7px; width: 2px; height: 8px; background: var(--tc); transform: translateX(-50%); border-radius: 1px;
}
/* pins never move under the pointer: hover only brightens, and the selected pin grows around its tip,
   so the point stays on the spot (the stem ends 7px below the pin) */
.pin { transform-origin: 50% calc(100% + 7px); cursor: pointer; }
.pin:hover { filter: brightness(1.08) saturate(1.1); }
.pinwrap { width: 34px; height: 34px; } /* positioned by MapLibre; the pin inside is free to scale */
.pinwrap:hover { z-index: 20 !important; }
.pin.is-active { scale: 1.2; z-index: 3; box-shadow: inset 0 0 0 2px var(--tc), 0 0 0 6px color-mix(in srgb, var(--tc) 22%, transparent), 0 10px 20px -8px rgba(0,0,0,.6); }
.pin--S { --tc: var(--t-S); background: var(--t-S); color: #fff7ef; box-shadow: inset 0 0 0 2px rgba(255,247,239,.85), 0 0 0 1.5px var(--t-S), 0 6px 14px -6px rgba(0,0,0,.5); }
.pin--S.is-active { box-shadow: inset 0 0 0 2px rgba(255,247,239,.85), 0 0 0 1.5px var(--t-S), 0 0 0 8px color-mix(in srgb, var(--t-S) 25%, transparent), 0 10px 20px -8px rgba(0,0,0,.6); }
.pin--A { --tc: var(--t-A); } .pin--B { --tc: var(--t-B); } .pin--C { --tc: var(--t-C); } .pin--D { --tc: var(--t-D); }
.pin--wish { background: var(--washi); box-shadow: 0 6px 14px -6px rgba(0,0,0,.4); border: 1.5px dashed var(--sumi-3); color: var(--sumi-3); font-size: 11px; }
.pin--draft { --tc: var(--shu); background: var(--shu); color: #fff; animation: bob 1.4s var(--ease) infinite; }
.pin--station { width: 22px; height: 22px; font: 700 10px/1 var(--f-body); --tc: var(--ai); }
.pin--station::after { display: none; }
.pin--snap { width: 12px; height: 12px; background: var(--ai); box-shadow: 0 0 0 3px var(--card); }
.pin--snap::after { display: none; }
@keyframes bob { 50% { translate: 0 -5px; } }

.maplibregl-popup-content { background: var(--card); color: var(--sumi); border-radius: 10px; padding: 10px 12px; box-shadow: var(--shadow); font-size: 12.5px; }
.maplibregl-popup-tip { border-top-color: var(--card) !important; border-bottom-color: var(--card) !important; }
.pop__name { font: 700 14px/1.3 var(--f-display); }
.pop__ja { font-size: 11px; color: var(--sumi-3); }

/* search */
.searchbar {
  position: absolute; z-index: 3; top: 18px; left: 50%; transform: translateX(-50%);
  width: min(560px, calc(100% - 460px)); /* centred, clear of the map chips on the right */
  display: flex; align-items: center; gap: 10px;
  height: 48px; padding: 0 14px 0 16px;
  background: var(--card); border-radius: 999px; box-shadow: var(--shadow);
  border: 1px solid var(--line);
}
.drawer-open .searchbar { left: calc((100% - var(--drawer)) / 2); width: min(520px, calc(100% - var(--drawer) - 60px)); }
.searchbar input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 14.5px; }
.searchbar input::placeholder { color: var(--sumi-3); }
.searchbar input::-webkit-search-cancel-button { display: none; }
.searchbar__icon { color: var(--sumi-3); flex: none; }
.searchbar__kbd { font: 500 11px/1 var(--f-body); color: var(--sumi-3); border: 1px solid var(--line-2); border-radius: 5px; padding: 3px 6px; }
.searchbar__results {
  position: absolute; left: 0; right: 0; top: calc(100% + 8px);
  background: var(--card); border-radius: 14px; box-shadow: var(--shadow-lg); border: 1px solid var(--line);
  max-height: min(60vh, 520px); overflow-y: auto; padding: 8px;
}
.sr-group { padding: 10px 10px 4px; font-size: 10.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--sumi-3); display: flex; justify-content: space-between; }
.sr-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 9px 10px; border: 0; background: transparent; border-radius: 9px; text-align: left; }
.sr-item:hover, .sr-item[aria-selected="true"] { background: var(--washi-2); }
.sr-item__t { font-weight: 500; }
.sr-item__s { font-size: 11.5px; color: var(--sumi-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sr-item > div { min-width: 0; flex: 1; }
.sr-glyph { width: 26px; height: 26px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--washi-2); font: 700 12px/1 var(--f-display); color: var(--sumi-2); }
mark { background: color-mix(in srgb, var(--shu) 18%, transparent); color: inherit; border-radius: 2px; padding: 0 1px; }

/* map controls */
.mapctl { position: absolute; z-index: 2; top: 18px; right: 18px; display: flex; gap: 8px; }
.drawer-open .mapctl { right: calc(var(--drawer) + 18px); top: 78px; }
.drawer-open .maplibregl-ctrl-bottom-right { right: calc(var(--drawer) + 8px); }
.maplibregl-ctrl-bottom-right { transition: right .45s var(--ease); }
.chip {
  display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 14px;
  border-radius: 999px; border: 1px solid var(--line); background: var(--card); box-shadow: var(--shadow);
  font-size: 12.5px; color: var(--sumi-2);
}
.chip:hover { color: var(--sumi); }
.chip span { font-family: var(--f-display); font-weight: 700; }

.prefTip {
  position: absolute; z-index: 2; pointer-events: none;
  background: var(--sumi); color: var(--washi); padding: 8px 12px; border-radius: 8px;
  font-size: 12px; box-shadow: var(--shadow); white-space: nowrap; transform: translate(-50%, calc(-100% - 14px));
}
.prefTip b { font: 700 15px/1.2 var(--f-display); margin-right: 6px; }
.prefTip small { opacity: .7; display: block; margin-top: 2px; }

/* FAB */
.fab {
  position: absolute; z-index: 3; right: 22px; bottom: 26px;
  display: inline-flex; align-items: center; gap: 12px;
  height: 56px; padding: 0 22px 0 8px; border-radius: 999px; border: 0;
  background: var(--shu); color: #fff7ef; box-shadow: 0 16px 30px -12px color-mix(in srgb, var(--shu) 80%, black);
  transition: transform .2s var(--ease), right .35s var(--ease);
}
.fab:hover { transform: translateY(-2px); }
.fab__plus { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: rgba(255,247,239,.16); font-size: 20px; }
.fab__label { font-size: 13.5px; letter-spacing: .02em; }
.fab__label b { font: 700 16px/1 var(--f-display); margin-right: 6px; }
.drawer-open .fab { right: calc(var(--drawer) + 22px); }

.placing {
  position: absolute; z-index: 3; left: 50%; bottom: 28px; transform: translateX(-50%);
  display: flex; align-items: center; gap: 16px; padding: 12px 12px 12px 20px;
  background: var(--sumi); color: var(--washi); border-radius: 14px; box-shadow: var(--shadow-lg);
  max-width: calc(100% - 40px);
}
.placing p { margin: 0; font-size: 13px; }
.placing b { font: 700 15px/1 var(--f-display); margin-right: 8px; color: #f07a62; }
.placing .btn--ghost { color: var(--washi); border-color: rgba(255,255,255,.25); }

/* ------------------------------------------------------------------ drawer */
.drawer {
  position: absolute; z-index: 6; top: 0; right: 0; bottom: 0; width: var(--drawer);
  background: var(--washi); border-left: 1px solid var(--line); box-shadow: var(--shadow-lg);
  transform: translateX(104%); transition: transform .45s var(--ease);
  display: flex; flex-direction: column;
}
.drawer-open .drawer { transform: none; }
.drawer__inner { position: relative; flex: 1; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }

.hero { position: relative; aspect-ratio: 16 / 10; background: var(--sumi); overflow: hidden; }
.hero img { width: 100%; height: 100%; object-fit: cover; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.25), transparent 35%, transparent 55%, rgba(0,0,0,.55)); }
.hero--empty {
  display: grid; place-items: center;
  background:
    radial-gradient(circle at 50% 120%, color-mix(in srgb, var(--shu) 35%, transparent), transparent 60%),
    var(--sumi);
}
.hero--empty::after { display: none; }
.hero__glyph { font: 700 120px/1 var(--f-display); color: rgba(255,247,239,.07); letter-spacing: .1em; user-select: none; }
.hero__upload { position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 1; cursor: pointer; }
.hero__count { position: absolute; z-index: 1; right: 14px; bottom: 12px; color: #fff; font-size: 11.5px; letter-spacing: .1em; background: rgba(0,0,0,.35); padding: 4px 9px; border-radius: 999px; }
.drawer__close {
  position: absolute; z-index: 2; top: 14px; right: 14px; width: 36px; height: 36px; border-radius: 50%;
  border: 0; background: rgba(20,17,13,.55); color: #fff; font-size: 20px; line-height: 1; backdrop-filter: blur(6px);
}
.drawer__close:hover { background: rgba(20,17,13,.8); }

.d-head { position: relative; padding: 0 28px 22px; display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: end; }
.d-head .hanko--lg { margin-top: -36px; background-color: var(--washi); z-index: 1; }
.d-head .hanko--S.hanko--lg { background: var(--t-S); }
.d-title { padding-top: 22px; }
.d-title .ja { margin: 0 0 4px; font: 500 13px/1.4 var(--f-display); color: var(--sumi-3); letter-spacing: .04em; }
.d-title h2 { margin: 0; font: 700 26px/1.2 var(--f-display); letter-spacing: .01em; }
.d-sub { margin-top: 8px; font-size: 12px; color: var(--sumi-3); display: flex; gap: 12px; flex-wrap: wrap; }
.d-sub a { color: var(--sumi-2); }

.d-sec { padding: 20px 28px; border-top: 1px solid var(--line); }
.d-sec__h { display: flex; align-items: baseline; justify-content: space-between; margin: 0 0 14px; }
.d-sec__h h3 { margin: 0; font: 700 15px/1 var(--f-display); letter-spacing: .04em; }
.d-sec__h h3 span[lang="ja"] { color: var(--shu); margin-right: 8px; }
.d-sec__h small { font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--sumi-3); }

.ratings { display: grid; gap: 12px; }
.rating { display: grid; grid-template-columns: 116px 1fr auto; align-items: center; gap: 12px; }
.rating__l { font-size: 12.5px; color: var(--sumi-2); }
.rating__l b { font: 700 14px/1 var(--f-display); color: var(--sumi); margin-right: 6px; }
.glyphs { display: flex; gap: 5px; }
.glyph { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 6px; font: 700 12px/1 var(--f-display); background: var(--washi-2); color: var(--sumi-3); border: 1px solid transparent; }
.glyph.on { background: var(--sumi); color: var(--washi); }
.rating--zu .glyph.on { background: var(--shu); color: #fff7ef; }
.rating__v { font: 700 13px/1 var(--f-display); color: var(--sumi-3); font-variant-numeric: tabular-nums; min-width: 26px; text-align: right; }
.pending { font-size: 12px; color: var(--sumi-3); font-style: italic; }

.tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tag { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 10px; border-radius: 6px; background: var(--washi-2); font-size: 12px; color: var(--sumi-2); border: 1px solid var(--line); }
.tag b { font: 700 12.5px/1 var(--f-display); color: var(--sumi); }

.station { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; padding: 12px 14px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); }
.station__mark { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--ai); color: #fff; font: 700 15px/1 var(--f-display); }
.station__n { font: 700 16px/1.2 var(--f-display); }
.station__n small { font: 400 12px/1 var(--f-body); color: var(--sumi-3); margin-left: 6px; }
.station__l { font-size: 11.5px; color: var(--sumi-3); margin-top: 3px; }
.station__walk { text-align: right; }
.station__walk b { display: block; font: 700 22px/1 var(--f-display); }
.station__walk span { font-size: 10.5px; letter-spacing: .12em; color: var(--sumi-3); text-transform: uppercase; }

.facts { display: grid; grid-template-columns: 88px 1fr; gap: 8px 14px; margin: 14px 0 0; font-size: 12.5px; }
.facts dt { color: var(--sumi-3); letter-spacing: .06em; }
.facts dd { margin: 0; color: var(--sumi-2); word-break: break-word; }

.notes { font: 500 15px/1.85 var(--f-display); color: var(--sumi-2); white-space: pre-wrap; margin: 0; }
.bowl { margin: 0 0 12px; padding-left: 14px; border-left: 2px solid var(--shu); font: 700 15px/1.5 var(--f-display); }
.bowl small { display: block; font: 400 10.5px/1 var(--f-body); letter-spacing: .16em; text-transform: uppercase; color: var(--sumi-3); margin-bottom: 4px; }

/* visits timeline */
.tl { list-style: none; margin: 0; padding: 0; position: relative; }
.tl::before { content: ""; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 1px; background: var(--line-2); }
.tl li { position: relative; padding: 0 0 18px 30px; }
.tl li::before { content: ""; position: absolute; left: 2px; top: 6px; width: 11px; height: 11px; border-radius: 50%; background: var(--washi); box-shadow: inset 0 0 0 2px var(--shu); }
.tl__d { font: 700 13px/1.3 var(--f-display); }
.tl__d small { font: 400 11.5px/1 var(--f-body); color: var(--sumi-3); margin-left: 8px; }
.tl__b { font-size: 13px; color: var(--sumi-2); margin-top: 2px; }
.tl__n { font-size: 12.5px; color: var(--sumi-3); margin-top: 4px; white-space: pre-wrap; }
.tl__x { display: flex; gap: 8px; margin-top: 6px; }
.linkbtn { border: 0; background: none; padding: 0; font-size: 11.5px; color: var(--sumi-3); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-2); }
.linkbtn:hover { color: var(--shu); }

/* gallery */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.gallery__i { position: relative; aspect-ratio: 1; border-radius: 8px; overflow: hidden; background: var(--washi-2); border: 0; padding: 0; }
.gallery__i img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s var(--ease); }
.gallery__i:hover img { transform: scale(1.05); }
.gallery__i .cover { position: absolute; left: 6px; top: 6px; background: var(--shu); color: #fff; font: 700 10px/1 var(--f-display); padding: 3px 5px; border-radius: 4px; }
.drop {
  aspect-ratio: 1; border-radius: 8px; border: 1.5px dashed var(--line-2); background: transparent;
  display: grid; place-items: center; align-content: center; gap: 4px; color: var(--sumi-3); font-size: 11px; text-align: center; padding: 6px;
  transition: all .15s;
}
.drop b { font: 700 22px/1 var(--f-display); color: var(--sumi-2); }
.drop:hover, .drop.is-over { border-color: var(--shu); color: var(--shu); background: color-mix(in srgb, var(--shu) 6%, transparent); }
.drop.is-busy { pointer-events: none; opacity: .6; }

.d-actions { display: flex; gap: 8px; padding: 20px 28px 40px; border-top: 1px solid var(--line); }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 18px; border-radius: 999px; border: 1px solid transparent;
  font-size: 13px; font-weight: 500; transition: all .15s; white-space: nowrap;
}
.btn--primary { background: var(--sumi); color: var(--washi); }
.btn--primary:hover { background: color-mix(in srgb, var(--sumi) 85%, var(--shu)); }
.btn--shu { background: var(--shu); color: #fff7ef; }
.btn--ghost { background: transparent; border-color: var(--line-2); color: var(--sumi-2); }
.btn--ghost:hover { border-color: var(--sumi-2); color: var(--sumi); }
.btn--danger { background: transparent; color: var(--shu); border-color: color-mix(in srgb, var(--shu) 35%, transparent); margin-left: auto; }
.btn--light { background: rgba(255,247,239,.92); color: #1d1a16; }
.btn--sm { height: 32px; padding: 0 13px; font-size: 12px; }
.btn[disabled] { opacity: .5; pointer-events: none; }

/* ------------------------------------------------------------------ forms */
.form { padding: 70px 28px 40px; }
.form h2 { margin: 0 0 4px; font: 700 26px/1.2 var(--f-display); }
.form .lede { margin: 0 0 22px; color: var(--sumi-3); font-size: 13px; }
.fs { border: 0; margin: 0 0 22px; padding: 0; }
.fs legend { padding: 0; margin: 0 0 10px; font: 700 14px/1 var(--f-display); letter-spacing: .04em; }
.fs legend span[lang="ja"] { color: var(--shu); margin-right: 8px; }
.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; }
.field > span { font-size: 11.5px; letter-spacing: .06em; color: var(--sumi-3); }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.row--3 { grid-template-columns: 2fr 1fr 1fr; }
.input, .textarea {
  width: 100%; height: 40px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--line-2);
  background: var(--card); outline: none; transition: border-color .15s, box-shadow .15s;
}
.textarea { height: auto; min-height: 96px; padding: 10px 12px; resize: vertical; line-height: 1.7; }
.input:focus, .textarea:focus { border-color: var(--sumi-2); box-shadow: 0 0 0 3px color-mix(in srgb, var(--shu) 14%, transparent); }
.tierpick { display: flex; gap: 10px; }
.tierpick label { position: relative; cursor: pointer; }
.tierpick input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.tierpick .hanko { transition: transform .2s var(--ease), opacity .2s; opacity: .45; transform: rotate(-8deg) scale(.92); width: 46px; height: 46px; font-size: 22px; }
.tierpick input:checked + .hanko { opacity: 1; transform: rotate(-8deg) scale(1.08); }
.tierpick input:focus-visible + .hanko { outline: 2px solid var(--shu); outline-offset: 3px; }
.ratepick { display: flex; gap: 5px; }
.ratepick button { width: 34px; height: 32px; border-radius: 7px; border: 1px solid var(--line-2); background: var(--card); font: 700 13px/1 var(--f-display); color: var(--sumi-3); }
.ratepick button.on { background: var(--sumi); border-color: var(--sumi); color: var(--washi); }
.ratepick--zu button.on { background: var(--shu); border-color: var(--shu); color: #fff7ef; }
.ratepick-row { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 10px; margin-bottom: 10px; }
.ratepick-row > span { font-size: 12.5px; color: var(--sumi-2); }
.ratepick-row > span b { font: 700 14px/1 var(--f-display); color: var(--sumi); margin-right: 6px; }
.ratepick-row > span small { display: block; font-size: 11px; color: var(--sumi-3); }
.stylepick { display: flex; flex-wrap: wrap; gap: 6px; }
.stylepick button { height: 30px; padding: 0 11px; border-radius: 7px; border: 1px solid var(--line-2); background: var(--card); font-size: 12px; color: var(--sumi-2); }
.stylepick button b { font: 700 12.5px/1 var(--f-display); margin-right: 5px; color: var(--sumi); }
.stylepick button.on { background: var(--sumi); border-color: var(--sumi); color: var(--washi); }
.stylepick button.on b { color: var(--washi); }
.suggest { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.suggest__i { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--card); text-align: left; width: 100%; font-size: 12.5px; }
.suggest__i:hover, .suggest__i.on { border-color: var(--ai); box-shadow: inset 3px 0 0 var(--ai); }
.suggest__i small { color: var(--sumi-3); margin-left: auto; white-space: nowrap; }
.suggest__i .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ai); flex: none; }
.suggest__i .dot--r { background: var(--shu); }
.hint { font-size: 11.5px; color: var(--sumi-3); margin: 4px 0 0; }
.seg-toggle { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--washi-2); border: 1px solid var(--line); }
.seg-toggle button { border: 0; height: 32px; padding: 0 16px; border-radius: 999px; background: transparent; font-size: 12.5px; color: var(--sumi-2); }
.seg-toggle button.on { background: var(--card); color: var(--sumi); box-shadow: var(--shadow); }
.seg-toggle button b { font-family: var(--f-display); margin-right: 5px; }
.form__foot { position: sticky; bottom: 0; display: flex; gap: 8px; padding: 14px 28px; margin: 0 -28px -40px; background: color-mix(in srgb, var(--washi) 92%, transparent); backdrop-filter: blur(8px); border-top: 1px solid var(--line); }
.form__foot .btn--primary { margin-left: auto; }
.inline-form { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; margin-bottom: 14px; }

/* ------------------------------------------------------------------ tier board */
.tierboard { display: flex; flex-direction: column; gap: 10px; padding-top: 6px; }
.trow { display: grid; grid-template-columns: 58px 1fr; gap: 0; border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); background: var(--card); min-height: 64px; }
.trow__k { display: grid; place-items: center; align-content: center; gap: 4px; background: var(--tc); color: #fff; }
.trow__k b { font: 700 28px/1 var(--f-display); }
.trow__k small { font: 500 12px/1 var(--f-display); opacity: .8; }
.trow--S { --tc: var(--t-S); } .trow--A { --tc: var(--t-A); } .trow--B { --tc: var(--t-B); } .trow--C { --tc: var(--t-C); } .trow--D { --tc: var(--t-D); }
.trow--none { --tc: var(--line-2); }
.trow--none .trow__k { color: var(--sumi-2); }
.trow__v { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px; align-content: flex-start; }
.tcard { width: 64px; border: 0; background: none; padding: 0; text-align: center; align-self: flex-start; }
.tcard__img { width: 64px; height: 64px; border-radius: 8px; overflow: hidden; background: var(--washi-2); display: grid; place-items: center; font: 700 20px/1 var(--f-display); color: var(--sumi-3); border: 1px solid var(--line); transition: transform .2s var(--ease); }
.tcard:hover .tcard__img { transform: translateY(-2px); box-shadow: var(--shadow); }
.tcard__img img { width: 100%; height: 100%; object-fit: cover; }
.tcard__n { display: block; margin-top: 4px; font-size: 10.5px; line-height: 1.25; color: var(--sumi-2); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; min-height: 2.5em; } /* always two lines tall, so the images line up */
.trow__empty { font-size: 12px; color: var(--sumi-3); align-self: center; padding: 0 6px; font-style: italic; }

/* ------------------------------------------------------------------ journey */
.journey { list-style: none; margin: 8px 0 0; padding: 0 0 0 4px; position: relative; }
.journey::before { content: ""; position: absolute; left: 22px; top: 20px; bottom: 20px; width: 0; border-left: 1.5px dashed color-mix(in srgb, var(--shu) 55%, transparent); }
.jstep { position: relative; display: grid; grid-template-columns: 38px 1fr; gap: 10px; align-items: center; padding: 4px 0; }
.jstep__n { position: relative; z-index: 1; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--washi); box-shadow: inset 0 0 0 1.5px var(--shu); color: var(--shu); font: 700 14px/1 var(--f-display); font-variant-numeric: tabular-nums; }
.jstep--todo .jstep__n { box-shadow: inset 0 0 0 1.5px var(--line-2); color: var(--sumi-3); }
/* every step is the same card: photo · date/name/bowl · tier and price */
.jcard {
  display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; align-items: center; gap: 12px;
  width: 100%; height: 88px; padding: 10px 12px 10px 10px; /* fixed, so every step lines up */ text-align: left;
  border: 1px solid var(--line); border-radius: var(--r); background: var(--card); box-shadow: var(--shadow);
  transition: transform .2s var(--ease), border-color .2s;
}
.jcard:hover { transform: translateX(2px); border-color: var(--line-2); }
.jcard__img { width: 56px; height: 56px; border-radius: 8px; overflow: hidden; background: var(--washi-2); display: grid; place-items: center; font: 700 18px/1 var(--f-display); color: var(--sumi-3); }
.jcard__img img { width: 100%; height: 100%; object-fit: cover; }
.jcard__body { display: grid; gap: 1px; min-width: 0; }
.jcard__d { font-size: 10.5px; letter-spacing: .05em; text-transform: uppercase; color: var(--sumi-3); }
.jcard__d, .jcard__bowl { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jcard__name { font: 700 14px/1.25 var(--f-display); color: var(--sumi); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.jcard__bowl { font-size: 12px; color: var(--sumi-2); }
.jcard__side { display: grid; justify-items: end; gap: 6px; }
.jcard__side small { font-size: 11.5px; font-weight: 700; color: var(--sumi-2); font-variant-numeric: tabular-nums; }
.jstep--todo .jcard { box-shadow: none; background: transparent; border-style: dashed; }
/* prefecture legs */
.jleg { position: relative; z-index: 1; display: flex; align-items: baseline; gap: 8px; margin: 14px 0 4px 48px; font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--shu); }
.jleg:first-child { margin-top: 2px; }
.jleg b { font-weight: 700; }
.jleg span { letter-spacing: .06em; color: var(--sumi-3); text-transform: none; }
.jleg--todo { color: var(--sumi-3); }

/* ------------------------------------------------------------------ prefectures */
.regions { display: flex; flex-direction: column; gap: 18px; padding-top: 4px; }
.region__h { display: flex; justify-content: space-between; align-items: baseline; padding: 0 6px 6px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.region__h h4 { margin: 0; font: 700 14px/1 var(--f-display); }
.region__h h4 span { color: var(--sumi-3); font: 400 11px/1 var(--f-body); letter-spacing: .12em; text-transform: uppercase; margin-left: 8px; }
.region__h small { font-size: 11px; color: var(--sumi-3); font-variant-numeric: tabular-nums; }
.prefs { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 8px; }
.pref { display: flex; align-items: center; gap: 8px; padding: 7px 8px; border: 0; background: transparent; border-radius: 7px; text-align: left; font-size: 12.5px; color: var(--sumi-3); }
.pref:hover { background: var(--washi-2); color: var(--sumi); }
.pref b { font: 700 14px/1 var(--f-display); color: var(--sumi-2); min-width: 3.2em; }
.pref.has b { color: var(--sumi); }
.pref .n { margin-left: auto; font: 700 12px/1 var(--f-display); font-variant-numeric: tabular-nums; }
.pref .bar { width: 6px; height: 6px; border-radius: 50%; background: var(--line-2); flex: none; }
.pref.has .bar { background: var(--tc, var(--sumi)); }
.pref.is-active { background: var(--card); box-shadow: var(--shadow); color: var(--sumi); }
.conquest { margin: 4px 0 18px; padding: 16px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: center; }
.conquest__n { font: 700 40px/1 var(--f-display); font-variant-numeric: tabular-nums; }
.conquest__n small { font-size: 16px; color: var(--sumi-3); }
.conquest__t { font-size: 12.5px; color: var(--sumi-2); }
.conquest__bar { height: 4px; border-radius: 2px; background: var(--washi-2); margin-top: 8px; overflow: hidden; }
.conquest__bar i { display: block; height: 100%; background: var(--shu); border-radius: 2px; }

.prefbanner { display: flex; align-items: center; gap: 10px; padding: 10px 12px; margin: 0 0 10px; border-radius: 9px; background: var(--card); border: 1px solid var(--line); font-size: 12.5px; }
.prefbanner b { font: 700 16px/1 var(--f-display); }
.prefbanner button { margin-left: auto; }

/* lightbox & toast */
.lightbox { position: fixed; inset: 0; z-index: 50; background: rgba(12,10,8,.92); display: grid; place-items: center; padding: 40px; }
.lightbox img { max-width: 100%; max-height: calc(100vh - 120px); border-radius: 6px; box-shadow: var(--shadow-lg); }
.lightbox__close { position: absolute; top: 18px; right: 22px; width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255,255,255,.1); color: #fff; font-size: 26px; }
.lightbox__cap { position: absolute; bottom: 20px; left: 0; right: 0; text-align: center; color: rgba(255,255,255,.8); font: 500 14px/1 var(--f-display); margin: 0; }
.lightbox__acts { position: absolute; bottom: 50px; display: flex; gap: 8px; }
.toast {
  position: fixed; z-index: 60; left: 50%; bottom: 100px; transform: translate(-50%, 20px); opacity: 0;
  background: var(--sumi); color: var(--washi); padding: 11px 18px; border-radius: 10px; font-size: 13px;
  box-shadow: var(--shadow-lg); transition: all .3s var(--ease); pointer-events: none;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast b { color: #f07a62; font-family: var(--f-display); margin-right: 6px; }

/* entrance */
@keyframes rise { from { opacity: 0; transform: translateY(6px); } }
.panel__body > * { animation: rise .4s var(--ease) both; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ------------------------------------------------------------------ responsive */
@media (max-width: 1180px) {
  :root { --panel: 330px; --drawer: 400px; }
}
@media (max-width: 900px) {
  :root { --drawer: 100vw; }
  body { overflow: hidden; }
  .app { grid-template-columns: 1fr; grid-template-rows: 1fr auto; }
  .rail {
    grid-row: 2; flex-direction: row; justify-content: space-around; padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
    height: auto;
  }
  .rail::before { display: none; }
  .brand, .rail__foot { display: none; }
  .rail__nav { flex-direction: row; margin: 0; gap: 2px; width: 100%; justify-content: space-around; }
  .rail__btn { width: auto; flex: 1; padding: 6px 0; }
  .panel {
    position: absolute; z-index: 4; left: 0; right: 0; bottom: 0; height: 46%;
    border-right: 0; border-top: 1px solid var(--line); border-radius: 18px 18px 0 0;
    box-shadow: 0 -20px 40px -20px rgba(0,0,0,.3);
    transition: height .35s var(--ease);
  }
  .panel.is-min { height: 132px; }
  .panel__head { padding: 20px 20px 10px; cursor: grab; }
  .panel__head::after { content: ""; position: absolute; top: 8px; left: 50%; width: 40px; height: 4px; border-radius: 2px; background: var(--line-2); transform: translateX(-50%); }
  .panel__title { font-size: 21px; }
  .stats { margin-top: 10px; padding-top: 10px; }
  .stage { grid-row: 1; grid-column: 1; }
  .searchbar, .drawer-open .searchbar { top: 12px; left: 12px; right: 12px; width: auto; transform: none; height: 46px; }
  .searchbar__kbd { display: none; }
  .mapctl { top: 66px; right: 12px; }
  .fab { right: 14px; bottom: calc(46% + 14px); height: 52px; padding: 0 8px; }
  .fab__label { display: none; }
  .drawer { top: 0; width: 100%; z-index: 20; }
  .drawer-open .fab, .drawer-open .mapctl { right: 12px; }
  .placing { bottom: calc(46% + 14px); }
}

/* prefecture labels (HTML, so they use our mincho) */
.plabel {
  pointer-events: none; display: flex; align-items: center; gap: 4px;
  font: 500 11px/1 var(--f-display); color: var(--sumi-3); letter-spacing: .08em;
  text-shadow: 0 0 3px var(--land), 0 0 6px var(--land);
  transition: opacity .3s;
}
.plabel--on { color: var(--sumi); font-weight: 700; }
.plabel i { font-style: normal; font: 700 9.5px/1 var(--f-body); background: var(--shu); color: #fff; border-radius: 999px; padding: 2px 5px; text-shadow: none; }

/* password dialog */
dialog.pw { border: 0; border-radius: 16px; padding: 26px; width: min(380px, calc(100% - 32px)); background: var(--card); color: var(--sumi); box-shadow: var(--shadow-lg); }
dialog.pw::backdrop { background: rgba(12,10,8,.55); backdrop-filter: blur(3px); }
dialog.pw h3 { margin: 0 0 14px; font: 700 18px/1.3 var(--f-display); }
.pw__foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }

/* owner mode: viewers see the journal, only the signed-in owner sees the pens */
body:not(.is-owner) [data-owner] { display: none !important; }
.is-owner #ownerBtn { opacity: 1; color: #f07a62; }

/* map: English-first labels */
.prefTip span[lang="ja"] { opacity: .6; font-size: 11px; }
.plabel span { text-transform: uppercase; letter-spacing: .16em; font-size: 10px; } /* regions, set apart from the base map's city names */
.pin--station svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* prefecture clusters: one seal per prefecture at country scale, click to zoom in */
.plabel--cluster { flex-direction: column; gap: 3px; }
.pcluster {
  --tc: var(--nezumi);
  pointer-events: auto; position: relative; display: grid; place-items: center;
  width: 32px; height: 32px; border-radius: 50%; border: 0; padding: 0;
  background: var(--tc); color: #fff7ef; text-shadow: none;
  box-shadow: inset 0 0 0 2px rgba(255,247,239,.8), 0 0 0 1.5px var(--tc), 0 6px 14px -6px rgba(0,0,0,.55);
  transition: transform .2s var(--ease);
}
.pcluster:hover { transform: scale(1.12); }
.pcluster:focus-visible { outline: 2px solid var(--sumi); outline-offset: 3px; }
.pcluster b { font: 700 15px/1 var(--f-display); }
.pcluster small {
  position: absolute; top: -5px; right: -7px; min-width: 16px; height: 16px; padding: 0 3px; border-radius: 999px;
  display: grid; place-items: center; font: 700 9.5px/1 var(--f-body);
  background: var(--card); color: var(--tc); box-shadow: 0 0 0 1.5px var(--tc);
}
.pcluster--S { --tc: var(--t-S); } .pcluster--A { --tc: var(--t-A); } .pcluster--B { --tc: var(--t-B); }
.pcluster--C { --tc: var(--t-C); } .pcluster--D { --tc: var(--t-D); }
.pcluster--wish { background: var(--washi); color: var(--sumi-3); box-shadow: inset 0 0 0 1.5px var(--sumi-3); }

/* Journey: one trip per year */
.jyears { margin: 4px 0 6px; }
.jyears .pill small { font-size: 10.5px; opacity: .6; font-variant-numeric: tabular-nums; }

/* About: a data-driven self-roast */
.about { padding: 4px 2px 32px; }
.about__lede { font: 500 16px/1.6 var(--f-display); color: var(--sumi); margin: 4px 0 18px; }
.about__stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.about__stats .stat b { font-size: 20px; }
.about__stats .stat small { font-size: 12px; opacity: .5; }
.about__h { display: flex; align-items: baseline; gap: 10px; margin: 26px 0 12px; font: 700 17px/1.3 var(--f-display); }
.about__h span { color: var(--shu); }
.about__p { margin: 0 0 12px; color: var(--sumi-2); line-height: 1.65; }
.findings { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.finding { display: grid; grid-template-columns: 38px 1fr; gap: 12px; padding: 12px 14px 12px 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--card); }
.finding__ja { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--shu); color: #fff7ef; font: 700 18px/1 var(--f-display); }
.finding h4 { margin: 2px 0 4px; font: 700 14.5px/1.35 var(--f-display); color: var(--sumi); }
.finding p { margin: 0; font-size: 13px; line-height: 1.6; color: var(--sumi-2); }
.about__perfect { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-shop { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--card); color: var(--sumi); font-size: 12.5px; }
.chip-shop:hover { border-color: var(--sumi-2); }
.about__verdict { padding: 14px 16px; border-left: 3px solid var(--shu); background: var(--card); border-radius: 0 var(--r) var(--r) 0; color: var(--sumi); }
.about__foot { margin-top: 22px; font-size: 11.5px; color: var(--sumi-3); line-height: 1.6; }
@media (max-width: 900px) { .about__stats { grid-template-columns: repeat(2, 1fr); } }

/* public static build: no owner controls at all */
.is-static #ownerBtn { display: none !important; }

/* place search: explicit, attributed */
.sr-item--find .sr-glyph { background: var(--shu); color: #fff7ef; }
.sr-attr { margin: 2px 10px 8px; font-size: 10.5px; color: var(--sumi-3); }

/* "Near here" card after a place search */
.near {
  position: absolute; z-index: 3; top: 78px; left: 50%; transform: translateX(-50%);
  width: min(420px, calc(100% - 32px)); max-height: calc(100% - 180px); overflow: auto;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 14px 14px 10px;
}
.near__h { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.near__h h3 { margin: 2px 0 0; font: 700 17px/1.3 var(--f-display); }
.near__x { border: 0; background: none; font-size: 22px; line-height: 1; color: var(--sumi-3); padding: 2px 6px; }
.near__sub { margin: 6px 0 8px; font-size: 12.5px; color: var(--sumi-2); }
.near__list { display: grid; gap: 4px; }
.near__i { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; width: 100%; padding: 8px; border: 0; border-radius: 10px; background: none; text-align: left; }
.near__i:hover { background: var(--washi-2); }
.near__i b { display: block; font: 700 14px/1.3 var(--f-display); color: var(--sumi); }
.near__i small { display: block; font-size: 11.5px; color: var(--sumi-3); }
.near__i em { font-style: normal; font-size: 12px; font-weight: 700; color: var(--sumi-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.drawer-open .near { display: none; }
@media (max-width: 900px) { .near { top: 66px; max-height: calc(54% - 80px); } }
