/* ==========================================================================
   MACHI CREATE ポータル「AIでつくる街」 2026-09
   ・第2弾：デジタル・シャープ。角丸は使わない。細い罫線・方眼
   ・第3弾：「厚みのある板」の立体感（上面＝明るい／正面／右の側面＝暗い、奥行きは右上45度）。
           3Dの街（面の向きの3段階の濃淡）と同じ光の向きで、カード・ボタン・パネルも板にする
   ・ヒーロー = 地平線まで広がる3Dの街（assets/js/portal-town-2026.js が描く）
   ・「横長レイアウト」の条件は portal-town-2026.js の LAYOUTS と必ず揃えること
       (min-width:900px) and (min-aspect-ratio:11/10), (min-width:640px) and (min-aspect-ratio:3/2)
   ========================================================================== */

:root {
  --ink: #0b0d12;
  --ink-2: #1b2230;
  --muted: #5b6474;
  --paper: #f2f4f7;
  --paper-2: #e7ebf0;
  --card: #ffffff;
  --line: rgba(11, 13, 18, 0.1);
  --line-2: rgba(11, 13, 18, 0.2);
  --lime: #d4ff6b;
  --blue: #2d63ff;
  --violet: #8f6cff;
  --coral: #ff765d;
  --teal: #0f9f8f;
  --amber: #f3a51c;
  --pink: #ff5e9e;
  /* 板の3つの面（3Dの街の濃淡と同じ関係：上面1.0／正面／右の側面） */
  --slab-top: #ffffff;
  --slab-front: #f8f9fb;
  --slab-face: linear-gradient(180deg, #fcfdfe 0%, #f4f6f9 100%);
  --slab-side: #dde3eb;
  --ink-front: #2b323e;
  --ink-top: #444d5c;
  --ink-side: #1c222b;
  --lime-top: #effcc6;
  --lime-side: #b4d94a;
  --f-jp: "Zen Kaku Gothic New", "Hiragino Sans", "Yu Gothic UI", Meiryo, system-ui, sans-serif;
  --f-display: "Raleway", "Zen Kaku Gothic New", "Helvetica Neue", Arial, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  /* 数字は Raleway（お手本と同じ、小文字のように上下に出入りする数字） */
  --f-dot: "Raleway", "Zen Kaku Gothic New", "Helvetica Neue", Arial, sans-serif;
  --f-dotjp: var(--f-jp);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --head-h: 68px;
  --dock-h: 92px;
}

/* ---------------------------------------------------------------------------
   厚みのある板（第3弾）
   要素そのものが「正面」。::before が上面（明るい）、::after が右の側面（暗い）。奥行きは --d（右上へ45度）。
   面は要素の外（上と右）にはみ出すので、並べるときはその分のすき間を空ける。
   ※ 板にする要素に clip-path や overflow:hidden を付けると、面が切れて見えなくなる
   --------------------------------------------------------------------------- */
.slab, .town-panel, .town__status, .town-btn, .brand__mark, .menu-btn,
.guide-card, .guide-card__icon, .machi-auto-topics__card, .rank, .safety-card, .safety__inject, .safety__check,
.btn, .news__badge, .rank__badge, .town-tag b {
  --d: 7px; --st: var(--slab-top); --ss: var(--slab-side);
}
.slab::before, .town-panel::before, .town__status::before, .town-btn::before, .brand__mark::before, .menu-btn::before,
.guide-card::before, .guide-card__icon::before, .machi-auto-topics__card::before, .rank::before, .safety-card::before,
.safety__inject::before, .safety__check::before, .btn::before, .news__badge::before, .rank__badge::before, .town-tag b::before {
  content: ""; position: absolute; pointer-events: none;
  left: 0; right: calc(var(--d) * -1); top: calc(var(--d) * -1); height: var(--d);
  background: var(--st);
  clip-path: polygon(var(--d) 0, 100% 0, calc(100% - var(--d)) 100%, 0 100%);
  transition: background-color 0.25s;
}
.slab::after, .town-panel::after, .town__status::after, .town-btn::after, .brand__mark::after, .menu-btn::after,
.guide-card::after, .guide-card__icon::after, .machi-auto-topics__card::after, .rank::after, .safety-card::after,
.safety__inject::after, .safety__check::after, .btn::after, .news__badge::after, .rank__badge::after, .town-tag b::after {
  content: ""; position: absolute; pointer-events: none;
  top: calc(var(--d) * -1); right: calc(var(--d) * -1); bottom: 0; width: var(--d);
  background: var(--ss);
  clip-path: polygon(0 var(--d), 100% 0, 100% calc(100% - var(--d)), 0 100%);
  transition: background-color 0.25s;
}
/* 墨の板・ライムの板・建物の色の板 */
.slab--ink { --st: var(--ink-top); --ss: var(--ink-side); }
.slab--lime { --st: var(--lime-top); --ss: var(--lime-side); }
.town__status, .town-btn, .brand__mark, .menu-btn, .guide-card__icon, .machi-auto-topics__card, .rank, .safety-card,
.safety__inject, .safety__check, .btn, .news__badge, .rank__badge { position: relative; }
/* 3つの面の立方体（見出しの印）：上面・左の正面・右の側面 */
:root {
  --cube: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23e6ffa3' d='M12 2 21 7 12 12 3 7z'/%3E%3Cpath fill='%23c7ff39' d='M3 7 12 12v10L3 17z'/%3E%3Cpath fill='%2386b500' d='M21 7 12 12v10l9-5z'/%3E%3C/svg%3E");
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--head-h) + 12px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f-jp);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.75;
  font-feature-settings: "palt";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; }
a { color: inherit; }
button { font: inherit; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.menu-open body { overflow: hidden; }

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  padding: 10px 16px; background: var(--ink); color: #fff; text-decoration: none; font-weight: 700;
}
.skip-link:focus { top: 12px; }

/* --------------------------------------------------------------------------
   ヘッダー
   -------------------------------------------------------------------------- */
.site-head {
  position: fixed; inset: 0 0 auto; z-index: 50;
  height: var(--head-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 clamp(16px, 3vw, 40px);
  color: var(--ink);
  transition: background-color 0.35s, box-shadow 0.35s, color 0.35s;
}
.site-head.is-scrolled {
  background: rgba(242, 244, 247, 0.86);
  -webkit-backdrop-filter: saturate(1.3) blur(12px);
  backdrop-filter: saturate(1.3) blur(12px);
  box-shadow: 0 1px 0 var(--line-2);
}
.town-night .site-head:not(.is-scrolled), .menu-open .site-head { color: #fff; }
.menu-open .site-head { z-index: 70; background: transparent; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }

.brand { display: inline-flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; }
.brand__mark {
  --d: 3px; --st: var(--ink-top); --ss: var(--ink-side);
  width: 34px; height: 34px; margin-top: 3px;
  display: grid; place-items: center;
  background: var(--ink-front); color: var(--lime);
  font: 800 15px/1 var(--f-display); letter-spacing: 0.02em;
}
.town-night .site-head:not(.is-scrolled) .brand__mark, .menu-open .brand__mark { --st: var(--lime-top); --ss: var(--lime-side); background: var(--lime); color: var(--ink); }
.brand__name { font: 800 14px/1 var(--f-display); letter-spacing: 0.14em; }
.site-head__right { display: flex; align-items: center; gap: clamp(4px, 1.4vw, 16px); }
.site-head__link { padding: 10px 6px; font: 500 11px/1 var(--f-mono); letter-spacing: 0.14em; text-decoration: none; opacity: 0.75; }
.site-head__link::before { content: "/"; margin-right: 6px; opacity: 0.5; }
.site-head__link:hover { opacity: 1; }
.menu-btn {
  --d: 3px;
  display: inline-flex; align-items: center; gap: 10px;
  height: 38px; margin-top: 3px; padding: 0 14px;
  border: 0; background: var(--slab-front); color: var(--ink); cursor: pointer;
  font: 700 11px/1 var(--f-mono); letter-spacing: 0.16em;
  box-shadow: inset 0 0 0 1px rgba(11, 13, 18, 0.08);
}
.menu-btn:hover { --st: var(--lime-top); --ss: var(--lime-side); background: var(--lime); }
.town-night .site-head:not(.is-scrolled) .menu-btn, .menu-open .menu-btn { --st: var(--ink-top); --ss: var(--ink-side); background: var(--ink-front); color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12); }
.menu-btn__lines { display: grid; gap: 4px; width: 16px; }
.menu-btn__lines i { display: block; height: 1.5px; background: currentColor; transition: transform 0.35s var(--ease); }
.menu-btn[aria-expanded="true"] .menu-btn__lines i:first-child { transform: translateY(2.75px) rotate(45deg); }
.menu-btn[aria-expanded="true"] .menu-btn__lines i:last-child { transform: translateY(-2.75px) rotate(-45deg); }
@media (max-width: 640px) {
  .site-head__link { display: none; }
  .brand__name { font-size: 11px; }
  :root { --head-h: 58px; }
}

/* メニュー（全画面） */
.site-menu {
  position: fixed; inset: 0; z-index: 60;
  display: grid; place-items: center;
  padding: calc(var(--head-h) + 20px) 24px 40px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px) 0 0 / 56px 56px,
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px) 0 0 / 56px 56px,
    rgba(36, 42, 53, 0.97);
  color: #fff;
  opacity: 0; transition: opacity 0.35s var(--ease);
  overflow-y: auto;
}
.site-menu[hidden] { display: none; } /* display:grid が hidden 属性を上書きしないように */
.site-menu.is-open { opacity: 1; }
.site-menu__inner { width: min(760px, 100%); }
.site-menu__eyebrow { margin: 0 0 18px; font: 500 11px/1 var(--f-mono); letter-spacing: 0.2em; color: rgba(255, 255, 255, 0.55); }
.site-menu__list { list-style: none; margin: 0; padding: 0; border-top: 1px solid rgba(255, 255, 255, 0.16); }
.site-menu__list a {
  display: grid; grid-template-columns: 64px 1fr auto; align-items: center; gap: 8px;
  padding: 14px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  color: #fff; text-decoration: none;
  transform: translateY(12px); opacity: 0;
  transition: transform 0.6s var(--ease), opacity 0.6s var(--ease), padding 0.35s var(--ease);
}
.site-menu.is-open .site-menu__list a { transform: none; opacity: 1; }
.site-menu.is-open .site-menu__list li:nth-child(2) a { transition-delay: 0.04s; }
.site-menu.is-open .site-menu__list li:nth-child(3) a { transition-delay: 0.08s; }
.site-menu.is-open .site-menu__list li:nth-child(4) a { transition-delay: 0.12s; }
.site-menu.is-open .site-menu__list li:nth-child(5) a { transition-delay: 0.16s; }
.site-menu.is-open .site-menu__list li:nth-child(6) a { transition-delay: 0.2s; }
.site-menu__list span { font: 900 26px/1 var(--f-dot); color: var(--c); }
.site-menu__list b { font-size: clamp(22px, 3.4vw, 34px); font-weight: 900; transition: color 0.25s; }
.site-menu__list small { font: 500 10px/1 var(--f-mono); letter-spacing: 0.16em; color: rgba(255, 255, 255, 0.5); }
.site-menu__list a:hover { padding-left: 12px; }
.site-menu__list a:hover b { color: var(--c); }
.site-menu__sub { list-style: none; margin: 28px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 22px; }
.site-menu__sub a { color: rgba(255, 255, 255, 0.72); text-decoration: none; font-size: 14px; }
.site-menu__sub a:hover { color: #fff; }

/* --------------------------------------------------------------------------
   3Dの街（ヒーロー）
   -------------------------------------------------------------------------- */
.town {
  position: relative;
  height: 100vh; height: 100svh; min-height: 640px;
  overflow: hidden; isolation: isolate;
  color: var(--ink);
  background: #eef1f5;
}
.town__sky, .town__sky::after { position: absolute; inset: 0; }
.town__sky {
  z-index: 0;
  /* 下の端の色は 3D の霞（#eef1f5）と同じにしてある＝地平線がつながる */
  /* 第4弾：地平線の少し上に柔らかい光。上ほど少し深い色 */
  background:
    radial-gradient(46% 22% at 64% 21%, rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0) 72%),
    linear-gradient(180deg, #d0d9e4 0%, #e1e7ee 22%, #eef1f5 44%, #eef1f5 100%);
}
.town__sky::after {
  content: "";
  opacity: 0;
  transition: opacity 1.4s var(--ease);
  background:
    radial-gradient(1.2px 1.2px at 12% 14%, #fff 50%, transparent 55%),
    radial-gradient(1px 1px at 26% 8%, #fff 50%, transparent 55%),
    radial-gradient(1.2px 1.2px at 41% 20%, #fff 50%, transparent 55%),
    radial-gradient(1px 1px at 57% 10%, #fff 50%, transparent 55%),
    radial-gradient(1.2px 1.2px at 69% 5%, #fff 50%, transparent 55%),
    radial-gradient(1px 1px at 78% 22%, #fff 50%, transparent 55%),
    radial-gradient(1.2px 1.2px at 90% 12%, #fff 50%, transparent 55%),
    radial-gradient(60% 30% at 50% 44%, rgba(80, 120, 255, 0.22), transparent 70%),
    linear-gradient(180deg, #02040a 0%, #060b18 34%, #0a1020 52%, #0a1020 100%);
}
.town.is-night .town__sky::after { opacity: 1; }
.town.is-night { color: #fff; }

/* 方眼（空の部分だけ） */
.town__grid {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(11, 13, 18, 0.07) 1px, transparent 1px) 0 0 / 64px 64px,
    linear-gradient(rgba(11, 13, 18, 0.07) 1px, transparent 1px) 0 0 / 64px 64px;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 22%, transparent 46%);
  mask-image: linear-gradient(180deg, #000 0%, #000 22%, transparent 46%);
}
.town.is-night .town__grid {
  background:
    linear-gradient(90deg, rgba(120, 160, 255, 0.08) 1px, transparent 1px) 0 0 / 64px 64px,
    linear-gradient(rgba(120, 160, 255, 0.08) 1px, transparent 1px) 0 0 / 64px 64px;
}

.town__stage { position: absolute; inset: 0; z-index: 2; }
.town__canvas { display: block; width: 100%; height: 100%; touch-action: pan-y; cursor: grab; outline: none; opacity: 0; transition: opacity 0.8s var(--ease); }
.town.is-live .town__canvas { opacity: 1; }
.town.is-dragging .town__canvas { cursor: grabbing; }

/* 3Dが使えない・JSが無いときは、3Dの街を撮った静止画を表示（node tools/shot.mjs preview still で作り直せる） */
.no-js .town__stage, .town.is-static .town__stage {
  background: #eef1f5 url("../images/portal-town-2026-still.webp") 50% 100% / cover no-repeat;
}
.no-js .town__stage::after, .town.is-static .town__stage::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(238, 241, 245, 0.96) 0%, rgba(238, 241, 245, 0.7) 34%, rgba(238, 241, 245, 0) 60%);
}
.no-js .town__hud, .no-js .town__hint, .no-js .town__loader,
.town.is-static .town__hud, .town.is-static .town__hint, .town.is-static .town__loader { display: none; }

/* 四隅の括弧（画面の枠） */
/* 第4弾：四隅の括弧と空の方眼は出さない（引き算） */
.town__frame, .town__grid { display: none; }
.town__frame { position: absolute; inset: calc(var(--head-h) + 6px) clamp(10px, 1.6vw, 22px) calc(var(--dock-h) + 10px); z-index: 3; pointer-events: none; }
.town__frame i { position: absolute; width: 16px; height: 16px; border: 0 solid rgba(11, 13, 18, 0.45); }
.town__frame i:nth-child(1) { left: 0; top: 0; border-width: 1.5px 0 0 1.5px; }
.town__frame i:nth-child(2) { right: 0; top: 0; border-width: 1.5px 1.5px 0 0; }
.town__frame i:nth-child(3) { left: 0; bottom: 0; border-width: 0 0 1.5px 1.5px; }
.town__frame i:nth-child(4) { right: 0; bottom: 0; border-width: 0 1.5px 1.5px 0; }
.town.is-night .town__frame i { border-color: rgba(255, 255, 255, 0.4); }

/* 上：見出しと状態表示 */
.town__ui {
  position: absolute; z-index: 5; left: 0; right: 0; top: var(--head-h);
  display: flex; align-items: flex-start; justify-content: space-between; gap: 24px;
  padding: clamp(10px, 2.2vh, 26px) clamp(24px, 4vw, 64px) 0;
  pointer-events: none;
}
.town__ui a, .town__ui button { pointer-events: auto; }
.town__ui::before {
  content: ""; position: absolute; z-index: -1; left: 0; top: calc(var(--head-h) * -1); width: min(900px, 70vw); height: 150%;
  background: radial-gradient(ellipse 70% 60% at 22% 38%, rgba(238, 241, 245, 0.92) 30%, rgba(238, 241, 245, 0) 72%);
  pointer-events: none;
}
.town.is-night .town__ui::before { background: radial-gradient(ellipse 70% 60% at 22% 38%, rgba(3, 5, 11, 0.9) 30%, rgba(3, 5, 11, 0) 72%); }
.town__kicker {
  display: flex; align-items: center; gap: 10px; margin: 0 0 14px;
  font: 500 11px/1 var(--f-mono); letter-spacing: 0.2em; text-transform: uppercase;
}
.town__kicker i { font-style: normal; opacity: 0.4; }
.town__kicker-mark { width: 10px; height: 10px; background: var(--lime); box-shadow: 0 0 0 1px var(--ink); }
.town__title {
  margin: 0;
  font-family: var(--f-jp);
  font-size: clamp(40px, min(5.6vw, 10vh), 96px);
  font-weight: 700; line-height: 1; letter-spacing: -0.035em;
}
.town__title span { display: inline; }
.town__title span:last-child { position: relative; }
/* 下線はライムの棒を「厚みのある板」に：正面（ライム）＋右下へ落ちる濃い面 */
.town__title span:last-child::after {
  content: ""; position: absolute; left: 0.04em; right: 0.2em; bottom: -0.02em; height: 0.08em;
  background: var(--lime);
  clip-path: polygon(0 0, 100% 0, calc(100% - 0.12em) 100%, 0 100%);
}
.town__title span:last-child::before {
  content: ""; position: absolute; left: 0.07em; right: 0.17em; bottom: -0.05em; height: 0.08em;
  background: var(--lime-side);
  clip-path: polygon(0 0, 100% 0, calc(100% - 0.12em) 100%, 0 100%);
}
.town__lead { margin: 22px 0 0; max-width: 36em; color: var(--muted); font-size: 14px; line-height: 1.85; }
.town.is-night .town__lead { color: rgba(255, 255, 255, 0.72); }
.town.is-night .town__kicker-mark { box-shadow: none; }

.town__status {
  --d: 5px;
  flex: none; min-width: 230px; margin: 10px 5px 0 0; padding: 10px 16px;
  background: rgba(248, 249, 251, 0.92);
  box-shadow: inset 0 0 0 1px rgba(11, 13, 18, 0.06);
  font: 500 11px/1 var(--f-mono); letter-spacing: 0.1em;
}
.town__status div { display: flex; align-items: baseline; gap: 10px; padding: 5px 0; }
.town__status dt { color: var(--muted); }
.town__status dt::after { content: ""; flex: 1; }
.town__status div::after { content: none; }
.town__status dd { margin: 0 0 0 auto; font-weight: 700; font-variant-numeric: tabular-nums; }
.town__blink { color: var(--teal); animation: townBlink 1.2s steps(1) infinite; }
@keyframes townBlink { 50% { opacity: 0; } }
.town.is-night .town__status { --st: var(--ink-top); --ss: var(--ink-side); background: rgba(20, 25, 34, 0.9); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08); }
.town.is-night .town__status dt { color: rgba(255, 255, 255, 0.55); }
.town.is-night .town__blink { color: var(--lime); }

/* 建物の上の札 */
.town__pins { position: absolute; inset: 0; z-index: 4; pointer-events: none; }
.town-tag {
  position: absolute; left: 0; top: 0;
  transform: translate3d(-999px, -999px, 0);
  pointer-events: auto;
  display: block; width: 0; height: 0;
  color: #fff; text-decoration: none; border: 0; padding: 0; background: none; cursor: pointer;
  will-change: transform;
}
.town-tag b, .town-tag span {
  position: absolute; bottom: 22px;
  height: 20px; display: grid; place-items: center;
  font: 700 10px/1 var(--f-mono); letter-spacing: 0.08em; white-space: nowrap;
  opacity: 0; transform: translateY(6px);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease), background-color 0.25s, color 0.25s;
}
.town-tag b {
  /* 札の番号も小さな板（建物の色の正面＋明るい上面＋暗い側面） */
  /* 第4弾：ふだんは白い小さな板に建物の色の番号（色を減らす）。選ばれたら建物の色の板になる */
  --d: 3px; --st: #fff; --ss: var(--slab-side);
  right: 0; min-width: 24px; padding: 0 5px; background: var(--slab-front); color: var(--c); font-family: var(--f-display); font-size: 12px; font-weight: 800;
  box-shadow: inset 0 0 0 1px rgba(11, 13, 18, 0.07);
}
.town-tag span { left: 0; padding: 0 7px; background: var(--ink); }
.town-tag::before {
  content: ""; position: absolute; left: -3.5px; top: -3.5px; width: 7px; height: 7px;
  background: var(--c); box-shadow: 0 0 0 1.5px #fff;
  opacity: 0; transition: opacity 0.4s var(--ease);
}
.town-tag::after {
  content: ""; position: absolute; left: -0.5px; bottom: 0; width: 1px; height: 22px;
  background: rgba(11, 13, 18, 0.35); opacity: 0; transition: opacity 0.4s var(--ease);
}
.town-tag.is-in b { opacity: 1; transform: none; }
/* 見えていない札（英名ラベル・出る前の番号）はマウスを素通しする。透明でも場所を取って、後ろの建物のクリックを奪っていた */
.town-tag b, .town-tag span { pointer-events: none; }
.town-tag.is-in b, .town-tag.is-open span { pointer-events: auto; }
.town-tag b { right: auto; left: -12px; }
.town-tag span { left: 13px; }
.town-tag.is-open span { opacity: 1; transform: none; }
.town-tag.is-in::before, .town-tag.is-in::after { opacity: 1; }
.town-tag.is-open span { background: color-mix(in srgb, var(--c) 70%, #fff); color: var(--ink); }
.town-tag.is-open b { --st: color-mix(in srgb, var(--c) 40%, #fff); --ss: color-mix(in srgb, var(--c) 80%, #000); background: color-mix(in srgb, var(--c) 70%, #fff); color: var(--ink); box-shadow: none; }
.town.is-night .town-tag b { --st: var(--ink-top); --ss: var(--ink-side); background: var(--ink-front); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1); }
.town.is-night .town-tag.is-open b { --st: color-mix(in srgb, var(--c) 40%, #fff); --ss: color-mix(in srgb, var(--c) 80%, #000); background: color-mix(in srgb, var(--c) 70%, #fff); color: var(--ink); }
.town.is-night .town-tag::after { background: rgba(255, 255, 255, 0.7); }
.town.is-night .town-tag::before { box-shadow: 0 0 0 1.5px #fff; }

/* ホバーで出る情報パネル（HUD） */
.town-panel {
  /* 墨の厚い板。上の縁に建物の色の細い線 */
  --d: 7px; --st: var(--ink-top); --ss: var(--ink-side);
  position: absolute; z-index: 6; left: 0; top: 0;
  width: 318px;
  padding: 18px 16px 16px;
  background: var(--ink-front); color: #fff;
  box-shadow: inset 0 3px 0 var(--c, var(--lime));
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity 0.22s var(--ease), transform 0.35s var(--ease), visibility 0s linear 0.35s;
}
.town-panel.is-open { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
/* 出た直後のパネルはマウスを素通しする（ほかの建物へ向かう途中でたまたま出たパネルに捕まらないように）。
   0.28秒たつと JS が is-armed を付けて、パネルの中のリンクを押せるようになる */
.town-panel { pointer-events: none; }
.town-panel.is-open.is-armed { pointer-events: auto; }
.tp-head { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font: 500 10px/1 var(--f-mono); letter-spacing: 0.12em; }
.tp-no { color: var(--c); font-weight: 700; }
.tp-en { font-weight: 700; }
.tp-path { margin-left: auto; color: rgba(255, 255, 255, 0.45); letter-spacing: 0.04em; }
.tp-name { margin: 0; font-size: 21px; font-weight: 900; line-height: 1.25; letter-spacing: -0.01em; }
.tp-desc { margin: 6px 0 12px; font-size: 12.5px; line-height: 1.7; color: rgba(255, 255, 255, 0.72); }
.tp-rows { margin: 0 0 12px; padding: 10px 0 0; border-top: 1px solid rgba(255, 255, 255, 0.14); display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; }
.tp-rows dt { font: 500 9.5px/1.6 var(--f-mono); letter-spacing: 0.12em; color: rgba(255, 255, 255, 0.5); white-space: nowrap; }
.tp-rows dd { margin: 0; font-size: 12px; line-height: 1.55; font-weight: 700; }
.tp-latest {
  display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto auto; column-gap: 10px;
  margin: 0 0 12px; padding: 10px 0 0; border-top: 1px dashed rgba(255, 255, 255, 0.22);
  color: #fff; text-decoration: none;
}
.tp-latest__k { grid-column: 1 / -1; margin-bottom: 6px; font: 500 9.5px/1 var(--f-mono); letter-spacing: 0.14em; color: var(--c); }
.tp-latest img { grid-row: 2 / 4; width: 72px; height: 46px; object-fit: cover; border: 1px solid rgba(255, 255, 255, 0.18); }
.tp-latest__t { font-size: 12px; font-weight: 700; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tp-latest time { font: 500 10px/1.6 var(--f-mono); color: rgba(255, 255, 255, 0.5); }
.tp-latest:hover .tp-latest__t { text-decoration: underline; text-underline-offset: 3px; }
.tp-go {
  --d: 3px; --st: color-mix(in srgb, var(--c) 40%, #fff); --ss: color-mix(in srgb, var(--c) 80%, #000);
  position: relative; display: inline-flex; align-items: center; gap: 8px;
  margin-top: 4px; padding: 9px 13px; background: color-mix(in srgb, var(--c) 72%, #fff); color: var(--ink); text-decoration: none;
  font: 700 11px/1 var(--f-mono); letter-spacing: 0.12em;
  transition: transform 0.3s var(--ease);
}
.tp-go::before, .tp-go::after { content: ""; position: absolute; pointer-events: none; }
.tp-go::before { left: 0; right: calc(var(--d) * -1); top: calc(var(--d) * -1); height: var(--d); background: var(--st); clip-path: polygon(var(--d) 0, 100% 0, calc(100% - var(--d)) 100%, 0 100%); }
.tp-go::after { top: calc(var(--d) * -1); right: calc(var(--d) * -1); bottom: 0; width: var(--d); background: var(--ss); clip-path: polygon(0 var(--d), 100% 0, 100% calc(100% - var(--d)), 0 100%); }
.tp-go:hover { transform: translate(-2px, 2px); }

/* 下：建物のドック */
.town-dock {
  /* 画面の下に横たわる1枚の長い板：上面（明るい帯）が街との境目になる */
  position: absolute; z-index: 5; left: 0; right: 0; bottom: 0;
  background: rgba(248, 249, 251, 0.9);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.town-dock::before {
  content: ""; position: absolute; left: 0; right: 0; top: -6px; height: 6px;
  background: rgba(255, 255, 255, 0.96);
  clip-path: polygon(6px 0, 100% 0, 100% 100%, 0 100%);
  box-shadow: inset 0 -1px 0 rgba(11, 13, 18, 0.08);
}
.town-dock ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.town-dock li + li { border-left: 1px solid var(--line); }
.town-dock a {
  position: relative; display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: center;
  height: var(--dock-h); padding: 0 clamp(10px, 1.4vw, 20px);
  text-decoration: none; transition: background-color 0.25s;
}
/* 選ばれた建物の区画は、上面が建物の色に光る（3Dの街の輪郭線が建物の色に光るのと同じ） */
.town-dock a::before {
  content: ""; position: absolute; left: 0; right: 0; top: -6px; height: 6px;
  background: color-mix(in srgb, var(--c) 40%, #fff);
  clip-path: polygon(6px 0, 100% 0, calc(100% - 6px) 100%, 0 100%);
  opacity: 0; transition: opacity 0.3s var(--ease);
}
.town-dock a:hover, .town-dock a.is-active { background: #fff; }
.town-dock a:hover::before, .town-dock a.is-active::before { opacity: 1; }
.town-dock__no { grid-row: span 2; font: 800 30px/1 var(--f-dot); color: color-mix(in srgb, var(--c) 82%, #fff); }
.town-dock__jp { font-size: 14px; font-weight: 900; line-height: 1.3; }
.town-dock__en { font: 500 10px/1.2 var(--f-mono); letter-spacing: 0.14em; color: var(--muted); }
.town-dock__en::after { content: " →"; opacity: 0; transition: opacity 0.25s; }
.town-dock a:hover .town-dock__en::after, .town-dock a.is-active .town-dock__en::after { opacity: 1; }
.town.is-night .town-dock { background: rgba(10, 13, 20, 0.86); }
.town.is-night .town-dock li + li { border-color: rgba(255, 255, 255, 0.08); }
.town.is-night .town-dock a:hover, .town.is-night .town-dock a.is-active { background: rgba(255, 255, 255, 0.07); }
.town.is-night .town-dock__en { color: rgba(255, 255, 255, 0.5); }
.town.is-night .town-dock::before { background: rgba(43, 51, 65, 0.95); box-shadow: none; }

/* 右下のボタン */
.town__hud { position: absolute; z-index: 5; right: clamp(22px, 2.8vw, 42px); bottom: calc(var(--dock-h) + 24px); display: flex; gap: 14px; }
.town-btn {
  --d: 4px;
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border: 0; background: var(--slab-front); color: var(--ink);
  box-shadow: inset 0 0 0 1px rgba(11, 13, 18, 0.06);
  cursor: pointer; transition: background-color 0.25s, color 0.25s, transform 0.3s var(--ease);
}
.town-btn:hover { --st: var(--ink-top); --ss: var(--ink-side); background: var(--ink); color: var(--lime); }
.town-btn:active { transform: translate(-2px, 2px); }
.town-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: square; stroke-linejoin: miter; }
.town-btn .i-sun, .town-btn[aria-pressed="true"] .i-moon { display: none; }
.town-btn[aria-pressed="true"] .i-sun { display: block; }
.town-btn .i-wave { display: none; }
.town-btn[aria-pressed="true"] .i-wave { display: block; }
.town-btn[aria-pressed="true"] .i-mute { display: none; }
.town.is-night .town-btn { --st: var(--ink-top); --ss: var(--ink-side); background: var(--ink-front); color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1); }

.town__hint {
  position: absolute; z-index: 5; left: clamp(24px, 4vw, 64px); bottom: calc(var(--dock-h) + 26px);
  margin: 0; font: 500 11px/1 var(--f-mono); letter-spacing: 0.06em; color: var(--muted);
  opacity: 0; transition: opacity 0.8s var(--ease) 0.4s; pointer-events: none;
}
.town.is-ready .town__hint { opacity: 1; }
.town.has-active .town__hint { opacity: 0; transition-delay: 0s; }
.town.is-night .town__hint { color: rgba(255, 255, 255, 0.6); }
.town__hint-touch { display: none; }
@media (hover: none) { .town__hint-mouse { display: none; } .town__hint-touch { display: inline; } }

.town__loader {
  position: absolute; z-index: 5; left: 50%; bottom: calc(var(--dock-h) + 70px);
  transform: translateX(-50%);
  display: flex; align-items: baseline; gap: 10px;
  font: 500 11px/1 var(--f-mono); letter-spacing: 0.24em; color: var(--muted);
  transition: opacity 0.6s var(--ease); pointer-events: none;
}
.town__loader b { font: 800 36px/1 var(--f-display); letter-spacing: 0.02em; color: var(--ink); }
.town.is-ready .town__loader { opacity: 0; }
.town.is-night .town__loader b { color: var(--lime); }

/* 縦長・狭い画面 */
@media not all and (min-width: 900px) and (min-aspect-ratio: 11/10) {
  @media not all and (min-width: 640px) and (min-aspect-ratio: 3/2) {
    :root { --dock-h: 64px; }
    .town { min-height: 620px; }
    .town__ui { padding: 8px 18px 0; }
    .town__status { display: none; }
    .town__kicker { margin-bottom: 10px; font-size: 10px; }
    .town__title { font-size: clamp(34px, 10.4vw, 58px); }
    .town__lead { margin-top: 12px; font-size: 13px; line-height: 1.75; }
    .town__lead-more { display: none; }
    .town-dock ol { display: flex; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
    .town-dock ol::-webkit-scrollbar { display: none; }
    .town-dock li { flex: none; }
    .town-dock a { height: var(--dock-h); padding: 0 14px; column-gap: 8px; }
    .town-dock__no { font-size: 22px; }
    .town-dock__jp { font-size: 12.5px; white-space: nowrap; }
    .town__hud { right: 12px; bottom: calc(var(--dock-h) + 12px); }
    .town-btn { width: 36px; height: 36px; }
    .town__hint { left: 16px; bottom: calc(var(--dock-h) + 22px); font-size: 10px; }
    .town__frame { display: none; }
    .town-panel { left: 12px !important; right: 19px; top: auto !important; bottom: calc(var(--dock-h) + 60px); width: auto; }
    .town-tag span { display: none; }
    .town-tag b { right: -12px; }
  }
}
/* 横長で高さが低めの画面（ノートPCなど） */
@media (max-height: 820px) and (min-width: 900px) and (min-aspect-ratio: 11/10),
       (max-height: 820px) and (min-width: 640px) and (min-aspect-ratio: 3/2) {
  :root { --dock-h: 78px; }
  .town__lead-more { display: none; }
  .town__lead { margin-top: 12px; font-size: 13px; }
  .town-dock__no { font-size: 24px; }
}
@media (max-height: 560px) and (min-aspect-ratio: 3/2) {
  .town__lead, .town__kicker, .town__status { display: none; }
  .town__title { font-size: clamp(28px, 4vw, 44px); }
}

/* 建物に入るときの色の幕 */
.town-wipe {
  position: fixed; inset: 0; z-index: 1000; pointer-events: none;
  background: var(--c, #0b0d12);
  clip-path: circle(0 at var(--x, 50%) var(--y, 50%));
}
.town-wipe.is-on { clip-path: circle(150vmax at var(--x, 50%) var(--y, 50%)); transition: clip-path 0.62s cubic-bezier(0.7, 0, 0.84, 0); }

/* 広告の表記 */
.notice { border-bottom: 1px solid var(--line-2); background: var(--card); }
.notice p { width: min(1200px, 100% - 48px); margin: 0 auto; padding: 11px 0; font: 500 11.5px/1.7 var(--f-jp); color: var(--muted); text-align: center; }

/* --------------------------------------------------------------------------
   共通のセクション
   -------------------------------------------------------------------------- */
.wrap { width: min(1200px, 100% - 48px); margin-inline: auto; }
.sec { position: relative; padding: clamp(88px, 11vw, 156px) 0; }
.anchor { position: absolute; top: 0; }
.sec__head { max-width: 820px; margin: 0 0 clamp(30px, 4vw, 52px); }
.sec__head--row { max-width: none; display: flex; align-items: flex-end; justify-content: space-between; gap: 12px 40px; flex-wrap: wrap; }
.sec__head--row .sec__lead { margin: 0; max-width: 32em; }
/* 小見出し：お手本の「— Business 05」「◆ お問い合わせ」の書き方（ひし形＋英字） */
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  margin: 0 0 16px;
  font: 700 12px/1 var(--f-display); letter-spacing: 0.16em; text-transform: uppercase;
}
.eyebrow::before { content: ""; width: 16px; height: 8px; background: var(--ink); clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); }
.eyebrow::after { content: ""; width: 34px; height: 1px; background: currentColor; opacity: 0.3; }
.eyebrow--lime { color: var(--lime); }
.eyebrow--lime::before { background: var(--lime); }
.sec__title { margin: 0; font-size: clamp(28px, 3.5vw, 48px); font-weight: 700; line-height: 1.2; letter-spacing: -0.02em; }
.sec__title::before {
  /* 見出しの印は、3つの面の小さな立方体 */
  content: ""; display: inline-block; width: 0.78em; height: 0.78em; margin-right: 0.3em; vertical-align: -0.06em;
  background: var(--cube) center / contain no-repeat;
}
.sec__lead { margin: 18px 0 0; color: var(--muted); font-size: 15px; line-height: 1.95; }
.sec__more { margin: 34px 0 0; text-align: center; }

/* ボタンも板。押すと奥へ沈む（右上の面の分だけずれる） */
.btn {
  --d: 4px;
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  min-height: 48px; margin-top: 4px; padding: 0 22px;
  font: 700 12px/1 var(--f-mono); letter-spacing: 0.1em; text-decoration: none; border: 0;
  transition: background-color 0.25s, color 0.25s, transform 0.3s var(--ease);
}
.btn:hover { transform: translate(2px, -2px); }
.btn:active { transform: translate(-3px, 3px); }
.btn--dark { --st: var(--ink-top); --ss: var(--ink-side); background: var(--ink-front); color: #fff; }
.btn--dark:hover { background: #1d2431; color: var(--lime); }
.btn--line { background: var(--slab-front); color: var(--ink); box-shadow: inset 0 0 0 1px rgba(11, 13, 18, 0.12); }
.btn--line:hover { --st: var(--ink-top); --ss: var(--ink-side); background: var(--ink); color: var(--lime); box-shadow: none; }
.btn--lime { --st: var(--lime-top); --ss: var(--lime-side); background: var(--lime); color: var(--ink); }
.btn--ghost { --st: rgba(255, 255, 255, 0.16); --ss: rgba(0, 0, 0, 0.55); background: rgba(255, 255, 255, 0.06); color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16); }
.btn--ghost:hover { color: var(--lime); }

/* スクロールで少し浮き上がる。透明にはしない（検索エンジンや縮小表示でも中身が必ず見えるように） */
.js .reveal { transform: translateY(22px); transition: transform 1s var(--ease); }
.js .reveal.is-in { transform: none; }
@media (prefers-reduced-motion: reduce) { .js .reveal { transform: none; transition: none; } }

/* ---- 街の案内図 ---- */
/* 第4弾：方眼はやめて、余白で見せる */
.guide { background: var(--paper); }
/* 案内図のカード：厚みのある板を並べる（面の分だけすき間を空ける）。ホバーで上面と側面が建物の色に */
.guide__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px 30px; padding: 9px 9px 0 0; }
.guide-card {
  --d: 9px;
  position: relative; counter-increment: none;
  display: flex; flex-direction: column; gap: 10px;
  padding: 30px 28px 28px;
  background: var(--slab-face);
  box-shadow: inset 0 0 0 1px rgba(11, 13, 18, 0.05);
  text-decoration: none;
  transition: transform 0.4s var(--ease), background-color 0.3s;
}
.guide-card:hover {
  --st: color-mix(in srgb, var(--c) 30%, #fff); --ss: color-mix(in srgb, var(--c) 60%, #fff);
  background: #fff; transform: translate(3px, -3px);
}
.guide-card__icon {
  --d: 4px; --st: color-mix(in srgb, var(--c) 30%, #fff); --ss: color-mix(in srgb, var(--c) 72%, #fff);
  width: 56px; height: 56px; margin: 8px 0 10px;
  display: grid; place-items: center;
  background: color-mix(in srgb, var(--c) 62%, #fff);
  color: #fff;
}
.guide-card__icon svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: square; stroke-linejoin: miter; }
.guide-card__no { font: 700 13px/1 var(--f-display); letter-spacing: 0.06em; color: var(--c); }
.guide-card__title { margin: 0; font-size: 22px; font-weight: 900; line-height: 1.35; }
.guide-card__desc { margin: 0; flex: 1; color: var(--muted); font-size: 14px; line-height: 1.85; }
.guide-card__go { margin-top: 6px; display: inline-flex; align-items: center; gap: 8px; font: 700 12px/1 var(--f-mono); letter-spacing: 0.06em; }
.guide-card__go::after { content: "→"; color: var(--c); transition: transform 0.35s var(--ease); }
.guide-card:hover .guide-card__go::after { transform: translateX(5px); }

/* ---- トピックス（topics.js の出力と同じ形） ---- */
.topics { background: var(--card); border-block: 1px solid var(--line-2); }
.machi-auto-topics__inner { width: min(1200px, 100% - 48px); margin-inline: auto; }
.machi-auto-topics__head { max-width: 820px; margin: 0 0 clamp(30px, 4vw, 52px); }
.machi-auto-topics__head p { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 16px; font: 700 12px/1 var(--f-display); letter-spacing: 0.16em; }
.machi-auto-topics__head p::before { content: ""; width: 16px; height: 8px; background: var(--ink); clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); }
.machi-auto-topics__head p::after { content: ""; width: 34px; height: 1px; background: currentColor; opacity: 0.3; }
.machi-auto-topics__head h2 { margin: 0; font-size: clamp(28px, 3.5vw, 48px); font-weight: 700; line-height: 1.2; letter-spacing: -0.02em; }
.machi-auto-topics__head h2::before { content: ""; display: inline-block; width: 0.78em; height: 0.78em; margin-right: 0.3em; vertical-align: -0.06em; background: var(--cube) center / contain no-repeat; }
.machi-auto-topics__head span { display: block; margin-top: 18px; color: var(--muted); font-size: 15px; line-height: 1.95; }
/* トピックスのカード（お手本1の構成）：
     ┌ — 分類 ┐                ┌─┐
     │        │   写真          │縦│
     │                         │書│
     │                         │き│
     │                         ├─┤
     │                         │→│
     タイトル・本文
   topics.js が作る形（.machi-auto-topics__copy の中に 分類／見出し／本文／リンク）のまま、
   copy を display:contents にして、カード全体のグリッドに並べ直している */
.machi-auto-topics__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 34px 30px; padding: 8px 8px 0 0; }
.machi-auto-topics__card {
  --d: 8px;
  display: grid; grid-template-columns: minmax(0, 1fr) 46px;
  grid-template-areas: "media vert" "media go" "title title" "text text";
  grid-template-rows: auto auto auto auto;
  align-content: start;
  padding: 0 0 22px 0;
  background: var(--slab-face);
  box-shadow: inset 0 0 0 1px rgba(11, 13, 18, 0.05);
  transition: transform 0.4s var(--ease);
}
.machi-auto-topics__card:hover { transform: translate(3px, -3px); --st: #fff; --ss: #aeb9c8; }
.machi-auto-topics__media { grid-area: media; position: relative; display: block; aspect-ratio: 4 / 3.3; overflow: hidden; background: var(--paper-2); }
.machi-auto-topics__media img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s var(--ease), filter 0.4s; }
.machi-auto-topics__card:hover .machi-auto-topics__media img { transform: scale(1.04); }
/* 左上の切り欠き：写真の角をカードの色で切り取って、そこに「— 分類」 */
.machi-auto-topics__media span {
  position: absolute; left: 0; top: 0; padding: 12px 14px 10px 14px;
  background: #fcfdfe; color: var(--ink);
  font: 700 12px/1 var(--f-display); letter-spacing: 0.06em;
}
.machi-auto-topics__media span::before { content: "— "; }
.machi-auto-topics__placeholder { display: grid; place-items: center; height: 100%; font: 800 14px/1 var(--f-display); letter-spacing: 0.2em; color: var(--muted); }
.machi-auto-topics__copy { display: contents; }
/* 右の縦書き（分類） */
.machi-auto-topics__copy > p:first-child {
  grid-area: vert; align-self: start; justify-self: center;
  margin: 16px 0 12px; display: block;
  writing-mode: vertical-rl; text-orientation: mixed;
  font: 800 15px/1 var(--f-display); letter-spacing: 0.14em; color: var(--ink);
}
.machi-auto-topics__copy h3 { grid-area: title; margin: 18px 20px 8px; font-size: 16px; line-height: 1.6; font-weight: 900; }
.machi-auto-topics__copy h3 a { text-decoration: none; }
.machi-auto-topics__copy p:not(:first-child) { grid-area: text; margin: 0 20px; color: var(--muted); font-size: 13px; line-height: 1.8; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
/* 右下の四角い矢印ボタン（文字は読み上げ用に残し、見た目は矢印だけ） */
.machi-auto-topics__link {
  grid-area: go; align-self: end; justify-self: center;
  width: 34px; height: 34px; margin-bottom: 2px;
  display: grid; place-items: center;
  background: #fff; color: var(--ink); text-decoration: none;
  font-size: 0; box-shadow: inset 0 0 0 1px rgba(11, 13, 18, 0.1);
  transition: background-color 0.25s, color 0.25s;
}
.machi-auto-topics__link b { font: 700 15px/1 var(--f-mono); color: inherit; }
.machi-auto-topics__card:hover .machi-auto-topics__link { background: var(--ink); color: var(--lime); }

/* ---- AI活用blog ---- */
.post-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 48px; border-top: 1px solid var(--ink); counter-reset: post; }
.post { position: relative; counter-increment: post; padding: 22px 0 24px 48px; border-bottom: 1px solid var(--line-2); }
.post::before { content: counter(post, decimal-leading-zero); position: absolute; left: 0; top: 20px; font: 800 24px/1 var(--f-dot); color: var(--ink); }
.post__meta { display: flex; align-items: center; gap: 12px; font: 500 11px/1 var(--f-mono); color: var(--muted); }
.post__meta span { padding: 4px 7px; border: 1px solid var(--line-2); color: var(--ink); font: 700 10.5px/1 var(--f-jp); }
.post__title { margin: 12px 0 8px; font-size: 16.5px; line-height: 1.6; font-weight: 900; }
.post__title a { text-decoration: none; background: linear-gradient(var(--lime), var(--lime)) 0 88% / 0 0.4em no-repeat; transition: background-size 0.45s var(--ease); }
.post__title a::after { content: ""; position: absolute; inset: 0; }
.post:hover .post__title a { background-size: 100% 0.4em; }
.post__desc { margin: 0; color: var(--muted); font-size: 13.5px; line-height: 1.8; }

/* ---- ランキング ---- */
.recommend { background: var(--paper-2); }
.rank__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px 30px; padding: 9px 9px 0 0; }
.rank { --d: 9px; display: flex; flex-direction: column; padding: 30px 28px; background: var(--slab-face); box-shadow: inset 0 0 0 1px rgba(11, 13, 18, 0.05); }
.rank__badge { --d: 3px; --st: var(--ink-top); --ss: var(--ink-side); align-self: flex-start; margin: 4px 0 14px; padding: 6px 10px; background: var(--ink-front); color: var(--lime); font: 700 11px/1 var(--f-jp); }
.rank__title { margin: 0 0 12px; font-size: 19px; font-weight: 900; line-height: 1.45; }
.rank__list { list-style: none; counter-reset: r; flex: 1; margin: 0 0 22px; padding: 0; }
.rank__list li { counter-increment: r; display: grid; grid-template-columns: 34px 1fr; column-gap: 12px; padding: 13px 0; border-top: 1px solid var(--line); }
.rank__list li::before { content: counter(r, decimal-leading-zero); grid-row: span 2; font: 900 22px/1.1 var(--f-dot); color: var(--muted); }
.rank__list li:first-child::before { color: var(--ink); }
.rank__list b { font-size: 15px; font-weight: 900; }
.rank__list span { grid-column: 2; color: var(--muted); font-size: 13px; line-height: 1.7; }
.rank .btn { align-self: stretch; }

/* ---- 注意点 ---- */
.safety__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px 30px; padding: 9px 9px 0 0; }
.safety-card { --d: 9px; padding-bottom: 26px; background: var(--slab-face); box-shadow: inset 0 0 0 1px rgba(11, 13, 18, 0.05); }
.safety-card__media { aspect-ratio: 5 / 3; overflow: hidden; background: var(--paper-2); }
.safety-card__media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.safety-card__no { margin: 22px 24px 8px; font: 500 10px/1 var(--f-mono); letter-spacing: 0.18em; color: var(--muted); }
.safety-card__title { margin: 0 24px 10px; font-size: 19px; font-weight: 900; line-height: 1.45; }
.safety-card__summary { margin: 0 24px 14px; color: var(--muted); font-size: 14px; line-height: 1.85; }
.safety-card__points { margin: 0 24px; padding: 0; list-style: none; display: grid; gap: 8px; }
.safety-card__points li { position: relative; padding-left: 18px; font-size: 13px; line-height: 1.75; }
.safety-card__points li::before { content: ""; position: absolute; left: 2px; top: 0.7em; width: 7px; height: 7px; background: var(--lime); box-shadow: 0 0 0 1px var(--ink); }
.safety__inject {
  --d: 10px; --st: var(--ink-top); --ss: var(--ink-side);
  margin: 44px 10px 0 0; padding: clamp(24px, 3vw, 40px);
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: 20px 40px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px) 0 0 / 40px 40px,
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px) 0 0 / 40px 40px,
    var(--ink-front);
  color: rgba(255, 255, 255, 0.8);
}
.safety__inject .eyebrow::after { content: none; }
.safety__inject h3 { margin: 0; color: #fff; font-size: clamp(20px, 2.2vw, 26px); font-weight: 900; line-height: 1.45; }
.safety__inject p { margin: 0; font-size: 14px; line-height: 1.95; }
.safety__inject strong { color: #fff; background: linear-gradient(transparent 70%, rgba(199, 255, 57, 0.35) 70%); }
.safety__check {
  --d: 10px;
  margin: 44px 10px 0 0; padding: clamp(24px, 3vw, 40px);
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: 20px 40px;
  background: var(--slab-face); box-shadow: inset 0 0 0 1px rgba(11, 13, 18, 0.05);
}
.safety__check h3 { margin: 0 0 10px; font-size: clamp(20px, 2.2vw, 26px); font-weight: 900; }
.safety__check-head p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.9; }
.safety__check ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 18px; }
.safety__check li { position: relative; padding: 12px 14px 12px 44px; background: var(--paper); font-size: 13.5px; line-height: 1.7; }
.safety__check li::before {
  content: ""; position: absolute; left: 14px; top: 13px; width: 18px; height: 18px;
  background: var(--lime) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230b0d12' stroke-width='3.2' stroke-linecap='square'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 12px no-repeat;
  box-shadow: 0 0 0 1px var(--ink);
}
.safety__sources { margin-top: 28px; }
.safety__sources-title { margin: 0 0 12px; font: 500 10px/1 var(--f-mono); letter-spacing: 0.18em; color: var(--muted); }
.safety__sources ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.safety__sources a { display: inline-block; padding: 8px 12px; border: 1px solid var(--line-2); font-size: 12.5px; text-decoration: none; background: var(--card); }
.safety__sources a::after { content: " ↗"; font-family: var(--f-mono); color: var(--muted); }
.safety__sources a:hover { border-color: var(--ink); }
.safety__disclaimer { margin: 16px 0 0; color: var(--muted); font-size: 12px; line-height: 1.8; }

/* ---- 比較方針 ---- */
.policy { background: var(--card); border-block: 1px solid var(--line-2); }
.policy__list { list-style: none; counter-reset: p; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--ink); }
.policy__list li { counter-increment: p; padding: 26px 26px 30px 0; border-bottom: 1px solid var(--line-2); }
.policy__list li:not(:nth-child(3n + 1)) { padding-left: 26px; border-left: 1px solid var(--line-2); }
.policy__list li::before { content: counter(p, decimal-leading-zero); display: block; margin-bottom: 14px; font: 800 28px/1 var(--f-dot); color: var(--ink); }
.policy__list h3 { margin: 0 0 8px; font-size: 17px; font-weight: 900; }
.policy__list p { margin: 0; color: var(--muted); font-size: 13.5px; line-height: 1.85; }

/* ---- 運営者 ---- */
.about__inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: 20px 60px; align-items: start; }
.about__body p { margin: 0 0 16px; font-size: 16px; line-height: 2; }
.about__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px !important; }

/* ---- 更新情報 ---- */
.news { padding-top: 0; }
.news__list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.news__list a { display: grid; grid-template-columns: 120px auto 1fr; align-items: center; gap: 18px; padding: 20px 4px; border-bottom: 1px solid var(--line-2); text-decoration: none; transition: padding 0.35s var(--ease), background-color 0.25s; }
.news__list a:hover { padding-left: 14px; background: rgba(255, 255, 255, 0.6); }
.news__list time { font: 500 12px/1 var(--f-mono); color: var(--muted); }
.news__badge { --d: 2px; --st: var(--ink-top); --ss: var(--ink-side); padding: 5px 8px; background: var(--ink-front); color: var(--lime); font-size: 11px; font-weight: 700; line-height: 1; }
.news__title { font-size: 15px; font-weight: 700; }

/* ---- CTA ---- */
.cta {
  background:
    linear-gradient(90deg, rgba(11, 13, 18, 0.04) 1px, transparent 1px) 0 0 / 64px 64px,
    linear-gradient(rgba(11, 13, 18, 0.04) 1px, transparent 1px) 0 0 / 64px 64px,
    linear-gradient(135deg, #eef1f5 0%, #e2e7ee 100%);
  color: var(--ink); overflow: hidden;
}
.cta .eyebrow--lime { color: var(--ink); }
.cta .eyebrow--lime::before { background: var(--lime-side); }
.cta .eyebrow::after { background: var(--ink); }
.cta .btn--ghost { --st: #fff; --ss: var(--slab-side); background: var(--slab-front); color: var(--ink); box-shadow: inset 0 0 0 1px rgba(11, 13, 18, 0.1); }
.cta .btn--ghost:hover { --st: var(--ink-top); --ss: var(--ink-side); background: var(--ink-front); color: var(--lime); box-shadow: none; }
/* お手本2：大きな英字＋面ごとに濃淡のある紙飛行機（ゆっくり漂う） */
.cta__planes {
  position: absolute; right: max(-2%, calc(50% - 760px)); top: 56%; z-index: 0;
  width: min(600px, 52vw); height: auto; transform: translateY(-50%);
  pointer-events: none;
}
.cta__plane { transform-box: fill-box; transform-origin: center; animation: ctaFloat 9s ease-in-out infinite; }
.cta__plane--small { animation-duration: 7s; animation-delay: -2.5s; }
@keyframes ctaFloat { 50% { transform: translate(-10px, -12px) rotate(-2deg); } }
@media (prefers-reduced-motion: reduce) { .cta__plane { animation: none; } }
.cta__inner { position: relative; z-index: 1; }

.cta__word { margin: 0 0 18px; font: 600 clamp(64px, 11vw, 168px)/0.9 var(--f-display); letter-spacing: -0.035em; color: #2b323e; }
.cta__title { margin: 0; max-width: 16em; font-size: clamp(24px, 3vw, 40px); font-weight: 700; line-height: 1.3; letter-spacing: -0.02em; }
.cta__desc { margin: 20px 0 0; max-width: 34em; color: var(--muted); font-size: 15px; line-height: 1.9; }
.cta__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 34px; }

/* ---- フッター ---- */
.site-foot { background: #262c37; color: rgba(255, 255, 255, 0.72); padding: 64px 0 36px; }
.site-foot__top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 40px; padding-bottom: 40px; border-bottom: 1px solid rgba(255, 255, 255, 0.12); }
.brand--foot { color: #fff; }
.brand--foot .brand__mark { --st: var(--lime-top); --ss: var(--lime-side); background: var(--lime); color: var(--ink); }
.site-foot__brand p { margin: 16px 0 0; font-size: 13px; line-height: 1.8; }
.site-foot__nav { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.site-foot__nav h3 { margin: 0 0 14px; color: #fff; font: 700 11px/1 var(--f-mono); letter-spacing: 0.16em; }
.site-foot__nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.site-foot__nav a { font-size: 13px; text-decoration: none; }
.site-foot__nav a:hover { color: var(--lime); }
.site-foot__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 30px; padding-top: 24px; font-size: 12px; }
.site-foot__bottom p { margin: 0; }
.site-foot__bottom p:last-child { font-family: var(--f-mono); letter-spacing: 0.06em; }

/* ---- レスポンシブ ---- */
@media (max-width: 1080px) {
  .machi-auto-topics__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
  .guide__grid, .rank__grid, .safety__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .policy__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .policy__list li:not(:nth-child(3n + 1)) { padding-left: 0; border-left: 0; }
  .policy__list li:nth-child(2n) { padding-left: 26px; border-left: 1px solid var(--line-2); }
  .safety__inject, .safety__check, .about__inner, .site-foot__top { grid-template-columns: minmax(0, 1fr); }
  .cta__planes { opacity: 0.45; right: -18%; width: 80vw; }
}
@media (max-width: 640px) {
  .wrap, .machi-auto-topics__inner, .notice p { width: min(1200px, 100% - 32px); }
  .guide__grid, .rank__grid, .safety__grid, .post-list, .policy__list, .machi-auto-topics__grid { grid-template-columns: minmax(0, 1fr); }
  .guide__grid, .rank__grid, .safety__grid, .machi-auto-topics__grid { gap: 28px; padding-right: 7px; }
  .guide-card, .rank, .safety-card, .machi-auto-topics__card { --d: 6px; }
  .safety__inject, .safety__check { --d: 7px; margin-right: 7px; }
  .policy__list li:nth-child(2n) { padding-left: 0; border-left: 0; }
  .safety__check ol { grid-template-columns: minmax(0, 1fr); }
  .guide-card { padding: 24px 20px; }
  .post { padding-left: 40px; }
  .news__list a { grid-template-columns: auto 1fr; gap: 8px 12px; }
  .news__badge { justify-self: start; }
  .news__title { grid-column: 1 / -1; }
  .site-foot__nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ==========================================================================
   第6弾：少しの透過（すりガラス）で、シンプルに・要素の主張を抑える
   ・板の上面・側面も半透明に（厚みはそのまま、存在感だけ軽く）
   ・MVの表示類（状況表示・情報パネル・建物リスト・ボタン）は明るいすりガラス、夜は暗いすりガラス
   ・ページのカードは半透明の白＋細い光の縁。背景にごく淡い色のにじみ（ガラス越しにほんのり見える）
   ここから下を消せば第5弾の見た目に戻る
   ========================================================================== */
:root {
  --slab-top: rgba(255, 255, 255, 0.78);
  --slab-side: rgba(148, 163, 184, 0.26);
  --slab-face: linear-gradient(180deg, rgba(255, 255, 255, 0.74) 0%, rgba(255, 255, 255, 0.5) 100%);
  --glass: rgba(255, 255, 255, 0.5);
  --glass-edge: inset 0 0 0 1px rgba(255, 255, 255, 0.72);
  --glass-blur: blur(16px) saturate(1.4);
  --glass-shadow: 0 10px 30px rgba(24, 34, 52, 0.06);
  --glass-dark: rgba(18, 23, 32, 0.5);
}

/* ---- MV ---- */
.site-head.is-scrolled { background: rgba(242, 244, 247, 0.6); }
.menu-btn, .town-btn, .town__status {
  background: var(--glass);
  -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
  box-shadow: var(--glass-edge), var(--glass-shadow);
}
.town__status { background: rgba(255, 255, 255, 0.4); }
.town-night .site-head:not(.is-scrolled) .menu-btn, .menu-open .menu-btn,
.town.is-night .town-btn, .town.is-night .town__status {
  --st: rgba(255, 255, 255, 0.1); --ss: rgba(0, 0, 0, 0.35);
  background: var(--glass-dark); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}
.town-tag b { background: rgba(255, 255, 255, 0.72); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.85); }
.town.is-night .town-tag b { background: rgba(18, 23, 32, 0.6); }
.town-dock { background: rgba(248, 249, 251, 0.5); -webkit-backdrop-filter: blur(18px) saturate(1.4); backdrop-filter: blur(18px) saturate(1.4); }
.town-dock::before { background: rgba(255, 255, 255, 0.55); box-shadow: none; }
.town-dock li + li { border-left-color: rgba(11, 13, 18, 0.06); }
.town-dock a:hover, .town-dock a.is-active { background: rgba(255, 255, 255, 0.5); }
.town.is-night .town-dock { background: rgba(10, 13, 20, 0.5); }
.town.is-night .town-dock::before { background: rgba(255, 255, 255, 0.08); }

/* 情報パネル：黒い板 → 明るいすりガラス（上の縁に建物の色の細い線） */
.town-panel {
  --st: rgba(255, 255, 255, 0.72); --ss: rgba(148, 163, 184, 0.3);
  background: rgba(250, 251, 253, 0.66); color: var(--ink);
  -webkit-backdrop-filter: blur(18px) saturate(1.5); backdrop-filter: blur(18px) saturate(1.5);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.78), inset 0 2px 0 var(--c, var(--lime)), 0 18px 44px rgba(20, 30, 50, 0.1);
}
.town-panel .tp-path, .town-panel .tp-rows dt, .town-panel .tp-latest time { color: var(--muted); }
.town-panel .tp-desc { color: #4a5363; }
.town-panel .tp-rows { border-top-color: rgba(11, 13, 18, 0.08); }
.town-panel .tp-latest { color: var(--ink); border-top-color: rgba(11, 13, 18, 0.12); }
.town-panel .tp-latest img { border-color: rgba(11, 13, 18, 0.08); }
.town.is-night .town-panel {
  --st: rgba(255, 255, 255, 0.1); --ss: rgba(0, 0, 0, 0.4);
  background: rgba(16, 20, 28, 0.62); color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1), inset 0 2px 0 var(--c, var(--lime)), 0 18px 44px rgba(0, 0, 0, 0.3);
}
.town.is-night .town-panel .tp-path, .town.is-night .town-panel .tp-rows dt, .town.is-night .town-panel .tp-latest time { color: rgba(255, 255, 255, 0.5); }
.town.is-night .town-panel .tp-desc { color: rgba(255, 255, 255, 0.72); }
.town.is-night .town-panel .tp-rows { border-top-color: rgba(255, 255, 255, 0.12); }
.town.is-night .town-panel .tp-latest { color: #fff; border-top-color: rgba(255, 255, 255, 0.2); }

/* ---- ページ ---- */
/* 背景にごく淡い色のにじみ（すりガラスのカード越しに、ほんのり色が見える） */
.guide { background: radial-gradient(38% 46% at 8% 14%, rgba(212, 255, 107, 0.16), transparent 70%), radial-gradient(40% 50% at 92% 86%, rgba(143, 108, 255, 0.08), transparent 70%), var(--paper); }
.topics { background: radial-gradient(36% 50% at 92% 12%, rgba(45, 99, 255, 0.06), transparent 70%), radial-gradient(34% 44% at 6% 88%, rgba(255, 94, 158, 0.06), transparent 70%), #fafbfc; }
.recommend { background: radial-gradient(40% 50% at 86% 14%, rgba(212, 255, 107, 0.14), transparent 70%), radial-gradient(40% 50% at 10% 90%, rgba(45, 99, 255, 0.06), transparent 70%), var(--paper-2); }
.safety { background: radial-gradient(36% 40% at 90% 8%, rgba(15, 159, 143, 0.06), transparent 70%), radial-gradient(40% 46% at 6% 70%, rgba(212, 255, 107, 0.12), transparent 70%), var(--paper); }
.guide-card, .machi-auto-topics__card, .rank, .safety-card, .safety__check {
  -webkit-backdrop-filter: blur(14px) saturate(1.3); backdrop-filter: blur(14px) saturate(1.3);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.78), 0 10px 30px rgba(24, 34, 52, 0.05);
}
.guide-card:hover { background: rgba(255, 255, 255, 0.82); }
/* 案内図のアイコン：建物の色のすりガラスの小さな板 */
.guide-card__icon {
  --st: color-mix(in srgb, var(--c) 30%, transparent); --ss: color-mix(in srgb, var(--c) 55%, transparent);
  background: color-mix(in srgb, var(--c) 66%, transparent);
}
/* トピックスの切り欠きラベルも、写真の上のすりガラスに */
.machi-auto-topics__media span { background: rgba(255, 255, 255, 0.7); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.machi-auto-topics__link { background: rgba(255, 255, 255, 0.6); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.85), 0 0 0 1px rgba(11, 13, 18, 0.05); }
.safety__check li { background: rgba(242, 244, 247, 0.6); }
.btn--line { background: var(--glass); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); box-shadow: var(--glass-edge), 0 0 0 1px rgba(11, 13, 18, 0.06); }
.btn--dark { background: rgba(43, 50, 62, 0.88); }
/* 見出しの立方体の印は小さく（主張を抑える） */
.sec__title::before, .machi-auto-topics__head h2::before { width: 0.6em; height: 0.6em; margin-right: 0.36em; vertical-align: 0.02em; }
