/* まちナビ: the series portal. Same palette and type as まちいしゃ / まちペット; each service keeps its own color chip. */
:root {
  --bg: #F4F6F2;
  --surface: #FFFFFF;
  --sunken: #EAEFE8;
  --ink: #17251E;
  --muted: #55655C;
  --line: #D6DED6;
  --accent: #1D6E44;
  --accent-ink: #FFFFFF;
  --accent-weak: #E1EFE5;
  --open: #1D6E44; --open-weak: #E1EFE5;
  --soon-weak: #FFF1CC; --soon-ink: #6B4E00;
  --off: #9E3A3A;
  --med: #1D6E44; --med-weak: #E1EFE5;
  --pet: #1F6A86; --pet-weak: #DDEEF4;
  --lost: #8A5A00; --lost-weak: #FFF1C2; --lost-hi: #FFD23F;
  --price: #C8102E; --price-weak: #FBE7EA;
  --kabu: #1C3C6E; --kabu-weak: #DFE6F2;
  --logo-wall: #FFF6E6; --logo-pin: #F2A65A; --logo-ground: #7DAE8E;
  --font-display: "Zen Maru Gothic", "BIZ UDPGothic", "Hiragino Sans", "Yu Gothic", "Meiryo", sans-serif;
  --font-body: "BIZ UDPGothic", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", sans-serif;
  --fs-xs: 0.75rem; --fs-s: 0.8125rem; --fs-m: 0.9375rem; --fs-l: 1.125rem; --fs-xl: 1.5rem; --fs-xxl: 2rem;
  --radius: 10px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0E1511; --surface: #151F19; --sunken: #1B2620; --ink: #E3EAE5; --muted: #9AABA1; --line: #2A3830;
    --accent: #5CC28B; --accent-ink: #0A1A10; --accent-weak: #1B3326;
    --open: #5CC28B; --open-weak: #1B3326; --soon-weak: #3A3014; --soon-ink: #F2D27A; --off: #E58585;
    --med: #5CC28B; --med-weak: #1B3326; --pet: #6CC3E0; --pet-weak: #16303A;
    --lost: #F2C94C; --lost-weak: #3A3014; --lost-hi: #F2C94C; --price: #FF6B7D; --price-weak: #3A1C24;
    --kabu: #93B4E8; --kabu-weak: #17243A;
    --logo-ground: #3E7A58;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0E1511; --surface: #151F19; --sunken: #1B2620; --ink: #E3EAE5; --muted: #9AABA1; --line: #2A3830;
  --accent: #5CC28B; --accent-ink: #0A1A10; --accent-weak: #1B3326;
  --open: #5CC28B; --open-weak: #1B3326; --soon-weak: #3A3014; --soon-ink: #F2D27A; --off: #E58585;
  --med: #5CC28B; --med-weak: #1B3326; --pet: #6CC3E0; --pet-weak: #16303A;
  --lost: #F2C94C; --lost-weak: #3A3014; --lost-hi: #F2C94C; --price: #FF6B7D; --price-weak: #3A1C24;
  --kabu: #93B4E8; --kabu-weak: #17243A;
  --logo-ground: #3E7A58;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font-body); font-size: var(--fs-m); line-height: 1.7; }
a { color: var(--accent); }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { text-wrap: balance; margin: 0; line-height: 1.35; font-family: var(--font-display); font-weight: 700; }
p { margin: 0; }
[hidden] { display: none !important; }
.wrap { max-width: 1120px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.muted { color: var(--muted); }
.num { font-variant-numeric: tabular-nums; }
.small { font-size: var(--fs-xs); }
.ico { width: 18px; height: 18px; flex: none; }

/* header */
.site-head { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 10; background: var(--surface); border-bottom: 1px solid var(--line); }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--surface); }
.head-row { display: flex; align-items: center; gap: 16px; min-height: 56px; }
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); flex: none; }
.brand-mark { width: 36px; height: 36px; flex: none; }
.brand-name { font-family: "M PLUS Rounded 1c", var(--font-display); font-weight: 800; font-size: 1.45rem; letter-spacing: 0.02em; line-height: 1; }
.brand-name b { color: var(--accent); font-weight: 800; }
.brand-sub { font-size: var(--fs-xs); color: var(--muted); letter-spacing: 0.08em; }
.lm-roof { fill: var(--accent); stroke: var(--accent); }
.lm-wall { fill: var(--logo-wall); stroke: var(--accent); }
.lm-pin { fill: var(--logo-pin); }
.lm-dot { fill: var(--logo-wall); }
.lm-ground { fill: var(--logo-ground); }
.head-search { margin-left: auto; display: flex; gap: 6px; flex: 0 1 420px; min-width: 0; }
.head-search input { flex: 1 1 auto; min-width: 0; }
.btn.head-search-btn { display: none; margin-left: auto; padding-inline: 12px; }
input[type="search"], select { font: inherit; font-size: 16px; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; min-height: 42px; max-width: 100%; }
input[type="search"]:focus, select:focus { border-color: var(--accent); }
.svc-nav { display: flex; gap: 4px 6px; flex-wrap: wrap; padding-bottom: 8px; }
.svc-link { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; color: var(--ink); font-size: var(--fs-s); font-weight: 700; padding: 3px 12px 3px 8px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg); white-space: nowrap; }
.svc-link:hover { border-color: currentColor; }
.svc-link .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c); }
.svc-link small { font-weight: 400; color: var(--muted); }
.c-med { --c: var(--med); --cw: var(--med-weak); }
.c-pet { --c: var(--pet); --cw: var(--pet-weak); }
.c-lost { --c: var(--lost); --cw: var(--lost-weak); }
.c-price { --c: var(--price); --cw: var(--price-weak); }
.c-kabu { --c: var(--kabu); --cw: var(--kabu-weak); }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: inherit; font-size: var(--fs-s); font-weight: 700; text-decoration: none; border-radius: 8px; padding: 9px 16px; min-height: 42px; cursor: pointer; border: 1px solid transparent; white-space: nowrap; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { filter: brightness(1.06); }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-svc { background: var(--c); color: var(--accent-ink); }
.c-lost .btn-svc { background: var(--lost-hi); color: #251C00; }
.btn-svc:hover { filter: brightness(1.06); }

/* breadcrumbs + page head */
.crumbs { font-size: var(--fs-xs); color: var(--muted); padding-top: 14px; }
.crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.crumbs li + li::before { content: "›"; margin-right: 4px; }
.crumbs a { color: var(--muted); }
.page-head { padding-block: 10px 18px; display: grid; gap: 8px; }
.page-head h1 { font-size: var(--fs-xxl); }
.page-head h1 small { display: block; font-size: var(--fs-m); color: var(--muted); font-family: var(--font-body); font-weight: 400; margin-top: 2px; }
.page-head .lead { color: var(--muted); max-width: 70ch; }

/* hero (top page) */
.hero { padding-block: 32px 24px; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 32px; align-items: center; }
.hero h1 { font-size: clamp(1.75rem, 1.1rem + 2.6vw, 2.75rem); letter-spacing: 0.02em; }
.hero h1 em { font-style: normal; color: var(--accent); }
.nw { display: inline-block; }
.hero .lead { margin-top: 12px; color: var(--muted); font-size: var(--fs-l); }
.hero-tools { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 20px; display: grid; gap: 16px; }
.tool-label { font-size: var(--fs-xs); font-weight: 700; color: var(--muted); letter-spacing: 0.06em; display: block; margin-bottom: 4px; }
.row-form { display: flex; gap: 8px; flex-wrap: wrap; }
.row-form > input { flex: 1 1 180px; min-width: 0; }
.row-form > select { flex: 1 1 140px; min-width: 130px; }
.here-btn { justify-self: start; }

/* sections */
.sec { padding-block: 22px; }
.sec-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 6px 16px; padding-bottom: 10px; border-bottom: 2px solid var(--ink); margin-bottom: 16px; }
.sec-head h2 { font-size: var(--fs-xl); display: flex; align-items: center; gap: 10px; }
.sec-head h2 .count { font-family: var(--font-body); font-size: var(--fs-m); color: var(--muted); font-weight: 400; }
.sec-head .chip-dot { width: 14px; height: 14px; border-radius: 4px; background: var(--c); flex: none; }
.sec-head a { font-size: var(--fs-s); font-weight: 700; }

/* service cards */
.svc-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.svc-card { background: var(--surface); border: 1px solid var(--line); border-top: 5px solid var(--c); border-radius: var(--radius); padding: 16px; display: grid; gap: 10px; align-content: start; }
.svc-card h3 { font-size: var(--fs-l); }
.svc-card .what { font-size: var(--fs-xs); font-weight: 700; color: var(--c); letter-spacing: 0.04em; }
.svc-card p { font-size: var(--fs-s); color: var(--muted); }
.svc-card .big { font-size: var(--fs-xl); font-weight: 700; color: var(--ink); font-family: var(--font-display); }
.svc-card .big small { font-size: var(--fs-s); color: var(--muted); font-weight: 400; margin-left: 2px; }
.svc-card .btn { justify-self: start; }

/* area stats strip */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.stat { display: grid; gap: 2px; text-decoration: none; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-left: 5px solid var(--c); border-radius: 8px; padding: 10px 14px; }
.stat:hover { border-color: var(--c); }
.stat .k { font-size: var(--fs-xs); font-weight: 700; color: var(--muted); }
.stat .v { font-size: var(--fs-xl); font-weight: 700; font-family: var(--font-display); line-height: 1.2; }
.stat .v small { font-size: var(--fs-s); font-weight: 400; color: var(--muted); margin-left: 2px; }

/* now-open panel */
.now { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; display: grid; gap: 12px; }
.now-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.now-head h2 { font-size: var(--fs-l); display: flex; align-items: center; gap: 8px; }
.pulse { width: 10px; height: 10px; border-radius: 50%; background: var(--open); box-shadow: 0 0 0 4px var(--open-weak); }
.now-time { font-size: var(--fs-s); color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font: inherit; font-size: var(--fs-xs); font-weight: 700; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; cursor: pointer; white-space: nowrap; }
.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.now-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; list-style: none; margin: 0; padding: 0; }
.now-list li { border: 1px solid var(--line); border-left: 4px solid var(--c); border-radius: 8px; padding: 8px 12px; display: grid; gap: 2px; min-width: 0; }
.now-list a { font-weight: 700; text-decoration: none; color: var(--ink); overflow-wrap: anywhere; }
.now-list a:hover { color: var(--accent); text-decoration: underline; }
.now-list .meta { font-size: var(--fs-xs); color: var(--muted); }
.now-note { font-size: var(--fs-xs); color: var(--muted); }

/* facility lists */
.cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 28px; }
.fac-block { padding-block: 18px; min-width: 0; }
.fac-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; border-top: 1px solid var(--line); }
.fac-list li { padding: 10px 2px; border-bottom: 1px solid var(--line); display: grid; gap: 2px; min-width: 0; }
.fac-list a { font-weight: 700; text-decoration: none; color: var(--ink); overflow-wrap: anywhere; }
.fac-list a:hover { color: var(--accent); text-decoration: underline; }
.fac-list .meta { font-size: var(--fs-xs); color: var(--muted); display: flex; flex-wrap: wrap; gap: 2px 10px; }
.tag { display: inline-block; font-size: var(--fs-xs); font-weight: 700; padding: 0 7px; border-radius: 4px; background: var(--cw, var(--sunken)); color: var(--c, var(--muted)); letter-spacing: 0.03em; }
.tag.now-open { background: var(--open-weak); color: var(--open); }
.tag.now-soon { background: var(--soon-weak); color: var(--soon-ink); }
.tag.now-off, .tag.now-ended { background: var(--sunken); color: var(--muted); }
.more-link { display: inline-flex; margin-top: 10px; font-size: var(--fs-s); font-weight: 700; }
.empty { color: var(--muted); font-size: var(--fs-s); padding: 10px 0; }

/* lost pets */
.lost-box { background: var(--lost-weak); border-radius: 14px; padding: 16px 18px; display: grid; gap: 14px; }
.lost-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.lost-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; list-style: none; margin: 0; padding: 0; }
.lost-card { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; display: grid; grid-template-columns: 84px minmax(0, 1fr); min-width: 0; }
.lost-card a { color: inherit; text-decoration: none; display: contents; }
.lost-card .ph { width: 84px; height: 100%; min-height: 84px; object-fit: cover; background: var(--sunken); display: grid; place-items: center; font-size: 2rem; }
.lost-card .bd { padding: 8px 10px; display: grid; gap: 2px; align-content: start; min-width: 0; }
.lost-card .ttl { font-weight: 700; overflow-wrap: anywhere; }
.lost-card .meta { font-size: var(--fs-xs); color: var(--muted); }
.kind-lost, .kind-found, .kind-home { font-size: var(--fs-xs); font-weight: 700; border-radius: 4px; padding: 0 6px; justify-self: start; }
.kind-lost { background: var(--price); color: var(--accent-ink); }
.kind-found { background: var(--pet); color: var(--accent-ink); }
.kind-home { background: var(--open); color: var(--accent-ink); }
.lost-msg { font-size: var(--fs-s); color: var(--muted); }

/* prices */
.goods { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; list-style: none; margin: 0; padding: 0; }
.goods li { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; display: grid; gap: 6px; }
.goods a.name { font-weight: 700; color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
.goods a.name:hover { color: var(--price); text-decoration: underline; }
.goods .maker { font-size: var(--fs-xs); color: var(--muted); }
.prices { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: var(--fs-s); }
.prices b { font-size: var(--fs-l); color: var(--price); font-variant-numeric: tabular-nums; }
.prices .used b { color: var(--pet); }
.c-kabu .goods a.name:hover { color: var(--kabu); }
.c-kabu .prices b { color: var(--kabu); }
.goods .yt { font-size: var(--fs-s); color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.goods small { font-weight: 400; color: var(--muted); }
.kabu-months { display: grid; gap: 18px; }
.kabu-month { display: grid; gap: 8px; }
.kabu-month h3 { font-size: var(--fs-m); display: flex; align-items: baseline; gap: 8px; }
.kabu-month h3 .count { font-family: var(--font-body); font-size: var(--fs-s); color: var(--muted); font-weight: 400; }
.kabu-month h3 a { margin-left: auto; font-family: var(--font-body); font-size: var(--fs-s); color: var(--kabu); }
.kabu-month h3 { flex-wrap: wrap; }

/* prefecture grid */
.regions { display: grid; gap: 10px; }
.region { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 8px 16px; align-items: baseline; padding: 10px 0; border-bottom: 1px solid var(--line); }
.region h3 { font-size: var(--fs-m); }
.region ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 16px; }
.region a { font-weight: 700; text-decoration: none; }
.region a:hover { text-decoration: underline; }

/* city table on prefecture pages */
.city-filter { max-width: 320px; margin-bottom: 12px; }
.city-table { width: 100%; border-collapse: collapse; font-size: var(--fs-s); }
.city-table th, .city-table td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; }
.city-table th:first-child, .city-table td:first-child { text-align: left; white-space: normal; }
.city-table thead th { font-size: var(--fs-xs); color: var(--muted); font-weight: 700; border-bottom: 2px solid var(--line); }
.city-table td a { font-weight: 700; }
.city-table tbody tr:hover { background: var(--surface); }
.table-wrap { overflow-x: auto; }
.near-cities { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.near-cities a { display: inline-block; font-size: var(--fs-s); text-decoration: none; border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 2px 12px; }
.near-cities a:hover { border-color: var(--accent); }

/* search page */
.search-big { display: flex; gap: 8px; flex-wrap: wrap; }
.search-big input { flex: 1 1 260px; }
.search-big select { flex: 0 1 160px; }
.res-group { padding-block: 14px; }
.res-group h2 { font-size: var(--fs-l); display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.res-group h2 .count { font-family: var(--font-body); font-size: var(--fs-s); color: var(--muted); font-weight: 400; }
.res-group h2 .chip-dot { width: 12px; height: 12px; border-radius: 3px; background: var(--c); flex: none; }
.res-more { font: inherit; font-size: var(--fs-s); font-weight: 700; color: var(--accent); background: none; border: 0; padding: 8px 0; cursor: pointer; text-decoration: underline; }
.hint { background: var(--surface); border: 1px dashed var(--line); border-radius: 10px; padding: 14px 16px; color: var(--muted); font-size: var(--fs-s); }

/* text pages */
.prose { max-width: 760px; padding-block: 8px 32px; display: grid; gap: 14px; }
.prose h2 { font-size: var(--fs-l); margin-top: 10px; }
.prose ul { margin: 0; padding-left: 1.3em; }
.prose table { border-collapse: collapse; width: 100%; font-size: var(--fs-s); }
.prose th, .prose td { border-bottom: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
.prose th { white-space: nowrap; color: var(--muted); width: 9em; }

/* footer */
.site-foot { margin-top: 32px; background: var(--surface); border-top: 1px solid var(--line); padding-block: 24px; font-size: var(--fs-s); }
.foot-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) repeat(2, minmax(0, 1fr)); gap: 20px 32px; }
.foot-grid h2 { font-size: var(--fs-s); color: var(--muted); letter-spacing: 0.06em; margin-bottom: 6px; font-family: var(--font-body); }
.foot-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.foot-grid a { color: var(--ink); }
.copy { margin-top: 18px; color: var(--muted); font-size: var(--fs-xs); }

@media (max-width: 1320px) {
  .svc-link small { display: none; }
}
@media (max-width: 1100px) {
  /* five cards: three on the first row, two wider ones below */
  .svc-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .svc-card { grid-column: span 2; }
  .svc-card:nth-child(n+4) { grid-column: span 3; }
}
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; gap: 20px; padding-top: 22px; }
  .cols { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .foot-grid > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .brand-sub { display: none; }
  .head-search { display: none; }
  .btn.head-search-btn { display: inline-flex; }
  .svc-link { padding: 2px 10px 2px 7px; font-size: var(--fs-xs); }
  .svc-link small { display: none; }
  .svc-grid { grid-template-columns: 1fr; }
  .svc-card, .svc-card:nth-child(n+4) { grid-column: auto; }
  .page-head h1 { font-size: var(--fs-xl); }
  .region { grid-template-columns: 1fr; gap: 4px; }
  .city-table .opt { display: none; }
  .foot-grid { grid-template-columns: 1fr; }
}
