/* 播州弁辞典 — 播州の秋祭り × モダン
   既定は「漆」(lacquer dark)。トグルで「和紙」(light)。 */
:root {
  --bg: #110e0c; --bg-2: #17120f; --surface: #1c1613; --surface-2: #251d18; --ink: #f3eadb; --muted: #bcae97;
  --gold: #d9b154; --gold-soft: rgba(217, 177, 84, .22); --red: #c8281a; --red-ink: #f0705a; --on-red: #fff8ee;
  --link: #e8c46e; --line: rgba(217, 177, 84, .2); --mark: #7a5a12;
  --shadow: 0 1px 0 rgba(255, 220, 150, .04) inset, 0 10px 30px rgba(0, 0, 0, .35);
  --glow: 0 0 18px rgba(255, 168, 64, .35), 0 0 2px rgba(255, 200, 120, .5);
  --pattern: url("shippo-dark.svg");
  --font-sans: system-ui, -apple-system, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Noto Sans CJK JP", "Yu Gothic UI", "Yu Gothic", Meiryo, sans-serif;
  --font-serif: "Hiragino Mincho ProN", "Yu Mincho", YuMincho, "Noto Serif JP", "Noto Serif CJK JP", "BIZ UDPMincho", serif;
  --radius: 14px; --header-h: 132px;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #f5eee1; --bg-2: #efe5d3; --surface: #fffaf2; --surface-2: #f7efe1; --ink: #231a14; --muted: #66574a;
  --gold: #8a6514; --gold-soft: rgba(138, 101, 20, .2); --red: #b2281a; --red-ink: #a8261a; --on-red: #fffaf2;
  --link: #8a3a12; --line: #e2d3b8; --mark: #f5d987;
  --shadow: 0 1px 2px rgba(60, 40, 20, .06), 0 6px 18px rgba(60, 40, 20, .07);
  --glow: none;
  --pattern: url("shippo-light.svg");
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 12px); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font-sans); font-size: 1rem; line-height: 1.85; letter-spacing: .02em;
  overflow-wrap: anywhere; line-break: strict;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); text-underline-offset: .22em; text-decoration-thickness: 1px; }
a:hover { color: var(--red-ink); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 4px; }
.skip { position: absolute; left: -9999px; top: 0; }
.skip:focus { left: 1rem; top: 1rem; z-index: 100; background: var(--surface); padding: .5rem 1rem; }
.wrap { width: min(1120px, 100% - 2rem); margin-inline: auto; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- 紅白の締め縄（区切り線） ---------- */
.rope {
  position: relative; height: 10px; border: 0; margin: 2.6rem auto; width: min(1120px, 100% - 2rem); border-radius: 5px;
  background: repeating-linear-gradient(-58deg, var(--red) 0 7px, #f6efe4 7px 14px);
  box-shadow: inset 0 -2px 2px rgba(0, 0, 0, .35), inset 0 2px 1px rgba(255, 255, 255, .35);
  opacity: .92;
}
.rope::before, .rope::after { content: ""; position: absolute; top: 50%; width: 14px; height: 14px; border-radius: 50%; background: var(--gold); translate: 0 -50%; box-shadow: 0 0 0 2px var(--bg); }
.rope::before { left: -4px; } .rope::after { right: -4px; }

/* ---------- header（布団締め風の金・紅・金の縁） ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  -webkit-backdrop-filter: saturate(1.3) blur(10px); backdrop-filter: saturate(1.3) blur(10px);
  box-shadow: 0 1px 0 var(--gold), 0 4px 0 var(--red), 0 5px 0 var(--gold), 0 10px 24px rgba(0, 0, 0, .18);
  margin-bottom: 5px;
}
.bar { display: flex; align-items: center; gap: .75rem; padding-block: .55rem; }
.brand { display: flex; align-items: center; gap: .55rem; color: var(--ink); text-decoration: none; flex: none; }
.brand img { width: 32px; height: 32px; }
.brand span { font-family: var(--font-serif); font-weight: 700; font-size: 1.2rem; letter-spacing: .12em; color: var(--gold); text-shadow: var(--glow); }
.search { position: relative; flex: 1 1 auto; min-width: 0; }
.search .field { position: relative; }
.search input {
  width: 100%; font: inherit; font-size: 1rem; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px;
  padding: .45rem 1rem .45rem 2.3rem; line-height: 1.5; -webkit-appearance: none; appearance: none;
  transition: border-color .2s, box-shadow .2s;
}
.search input::placeholder { color: var(--muted); }
.search input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft); }
.search .icon { position: absolute; left: .85rem; top: 50%; translate: 0 -50%; width: 1rem; height: 1rem; color: var(--gold); pointer-events: none; }
.theme-btn {
  flex: none; width: 2.4rem; height: 2.4rem; border-radius: 50%; border: 1px solid var(--line);
  background: var(--surface); color: var(--gold); cursor: pointer; display: grid; place-items: center; padding: 0;
}
.theme-btn svg { width: 1.15rem; height: 1.15rem; }
.no-js .theme-btn { display: none; }

.gojuon { display: flex; gap: .2rem; overflow-x: auto; scrollbar-width: none; padding: 0 0 .5rem; margin: 0; list-style: none; }
.gojuon::-webkit-scrollbar, .on-nav::-webkit-scrollbar { display: none; }
.gojuon li, .on-nav li { flex: none; }
.gojuon a {
  display: block; min-width: 2.5rem; text-align: center; padding: .1rem .55rem; border-radius: 8px; white-space: nowrap;
  font-family: var(--font-serif); font-weight: 700; font-size: 1.08rem; color: var(--ink); text-decoration: none; border: 1px solid transparent;
  transition: background .2s, color .2s;
}
.gojuon a:hover { color: var(--gold); background: var(--surface); }
.gojuon a[aria-current="page"] { background: var(--red); color: var(--on-red); box-shadow: 0 0 14px rgba(255, 90, 40, .35); }
.gojuon .extra a { font-family: var(--font-sans); font-weight: 500; font-size: .85rem; min-width: auto; padding-top: .3rem; padding-bottom: .3rem; color: var(--muted); }
.gojuon .extra:first-of-type { margin-left: .4rem; border-left: 1px solid var(--line); padding-left: .4rem; }
.on-nav { display: flex; gap: .4rem; padding: 0 0 .55rem; margin: 0; list-style: none; overflow-x: auto; scrollbar-width: none; }
.on-nav a {
  display: inline-flex; align-items: baseline; gap: .3rem; padding: .02rem .75rem; border-radius: 999px; white-space: nowrap;
  background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--ink); font-family: var(--font-serif); font-weight: 700;
}
.on-nav a:hover { border-color: var(--gold); color: var(--gold); }
.on-nav small { font-family: var(--font-sans); font-weight: 400; color: var(--muted); font-size: .75rem; }
.on-nav .empty { opacity: .5; }

/* ---------- search results ---------- */
.results {
  position: absolute; left: 0; right: 0; top: calc(100% + .45rem); z-index: 60;
  background: var(--surface); border: 1px solid var(--gold-soft); border-radius: var(--radius); box-shadow: 0 18px 40px rgba(0, 0, 0, .45);
  max-height: min(70vh, 560px); overflow: auto; padding: .4rem; margin: 0; list-style: none;
}
.results[hidden] { display: none; }
.results.inline { position: static; max-height: 420px; margin-top: .6rem; }
.results .meta { font-size: .8rem; color: var(--muted); padding: .25rem .6rem; }
.results a { display: block; padding: .5rem .75rem; border-radius: 10px; color: var(--ink); text-decoration: none; line-height: 1.6; border-left: 3px solid transparent; }
.results a:hover, .results a[aria-selected="true"] { background: var(--surface-2); border-left-color: var(--red); }
.results .hw { font-family: var(--font-serif); font-weight: 700; font-size: 1.12rem; }
.results .gy { font-size: .72rem; color: var(--gold); border: 1px solid var(--gold-soft); border-radius: 4px; padding: 0 .35rem; margin-left: .5rem; vertical-align: .15em; }
.results .df { display: block; font-size: .88rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.results mark { background: var(--mark); color: inherit; border-radius: 2px; padding: 0 .05em; }

/* ---------- page heads ---------- */
.page-head { position: relative; padding: 2.4rem 0 .4rem; }
.page-head h1 { font-family: var(--font-serif); font-size: clamp(2.2rem, 7vw, 3.4rem); margin: .1rem 0 0; letter-spacing: .14em; line-height: 1.25; color: var(--gold); text-shadow: var(--glow); }
.page-head p { margin: .3rem 0 0; color: var(--muted); }
.page-head .rope { margin: 1.4rem 0 0; width: min(280px, 60%); }
.crumb { font-size: .85rem; color: var(--muted); margin: 0; }
.crumb a { color: var(--muted); }

/* ---------- 音の見出し（提灯） & 見出し語カード ---------- */
.on { margin: 2rem 0 2.8rem; }
.on > h2 { display: flex; align-items: center; gap: 1rem; margin: 0 0 1.1rem; font-family: var(--font-serif); line-height: 1; }
.chochin {
  position: relative; display: grid; place-items: center; width: 3.1rem; height: 3.5rem; flex: none;
  border-radius: 46% / 50%; color: #fff8ee; font-size: 1.55rem; font-weight: 700;
  background:
    repeating-linear-gradient(180deg, rgba(0, 0, 0, .14) 0 1px, transparent 1px 6px),
    radial-gradient(ellipse at 50% 45%, #ff9a52 0%, #e2461f 45%, #a81d12 100%);
  box-shadow: 0 0 22px rgba(255, 110, 40, .45), inset 0 -4px 8px rgba(0, 0, 0, .25);
}
.chochin::before, .chochin::after { content: ""; position: absolute; left: 50%; translate: -50% 0; width: 56%; height: 6px; background: #1a1410; border: 1px solid var(--gold); border-radius: 2px; }
.chochin::before { top: -3px; } .chochin::after { bottom: -3px; }
:root[data-theme="light"] .chochin { box-shadow: 0 4px 12px rgba(170, 40, 20, .3), inset 0 -4px 8px rgba(0, 0, 0, .2); }
.on > h2 .count { font-family: var(--font-sans); font-size: .85rem; color: var(--muted); font-weight: 400; }
.on > h2::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--gold-soft), transparent); }
.entries { display: grid; gap: 1rem; margin: 0; grid-template-columns: 1fr; }
@media (min-width: 760px) { .entries { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .entries { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.entry {
  position: relative; background: linear-gradient(180deg, var(--surface), var(--bg-2)); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.05rem 1.15rem 1.1rem 1.3rem; box-shadow: var(--shadow); scroll-margin-top: calc(var(--header-h) + 16px);
  transition: border-color .25s, transform .25s;
}
:root[data-theme="light"] .entry { background: var(--surface); }
.entry::before { content: ""; position: absolute; left: 0; top: 1rem; bottom: 1rem; width: 3px; border-radius: 0 3px 3px 0; background: linear-gradient(180deg, var(--red), var(--gold)); }
.entry:hover { border-color: var(--gold-soft); }
@media (prefers-reduced-motion: no-preference) { .entry:hover { transform: translateY(-2px); } }
.entry dt { font-family: var(--font-serif); font-weight: 700; font-size: 1.38rem; line-height: 1.45; padding-right: 2rem; letter-spacing: .05em; }
.entry dd { margin: .35rem 0 0; }
.ex { display: block; margin-top: .45rem; padding: .35rem .75rem; background: var(--surface-2); border-left: 2px solid var(--gold); border-radius: 0 8px 8px 0; font-size: .95rem; }
.ln { display: block; }
.permalink { position: absolute; top: .7rem; right: .7rem; width: 1.9rem; height: 1.9rem; display: grid; place-items: center; border-radius: 50%; color: var(--muted); text-decoration: none; opacity: .55; }
.permalink:hover, .permalink:focus-visible { opacity: 1; background: var(--surface-2); color: var(--gold); }
.permalink svg { width: 1rem; height: 1rem; }
.entry:target { border-color: var(--gold); box-shadow: 0 0 0 2px var(--gold), 0 0 26px rgba(255, 168, 64, .35); }
@media (prefers-reduced-motion: no-preference) { .entry:target { animation: lantern 1.8s ease-out 1; } }
@keyframes lantern { from { box-shadow: 0 0 0 2px var(--gold), 0 0 60px rgba(255, 140, 40, .7); } }
.empty-note { color: var(--muted); font-size: .9rem; margin: 0; padding: .8rem 1rem; border: 1px dashed var(--line); border-radius: var(--radius); }
.pager { display: flex; justify-content: space-between; gap: 1rem; margin: 2.5rem 0 1rem; }
.pager a { flex: 1; padding: .9rem 1.1rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); text-decoration: none; color: var(--ink); }
.pager a:hover { border-color: var(--gold); }
.pager a small { display: block; color: var(--muted); font-size: .78rem; }
.pager a b { font-family: var(--font-serif); font-size: 1.2rem; color: var(--gold); }
.pager .next { text-align: right; }

/* ---------- top: hero（祭り写真 × 縦書き題字） ---------- */
.hero { position: relative; isolation: isolate; overflow: hidden; background: #0b0908; color: #f6eedf; }
.hero > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 60% 40%; z-index: -2; filter: saturate(1.05) contrast(1.05); }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, rgba(11, 9, 8, .96) 0%, rgba(11, 9, 8, .82) 42%, rgba(11, 9, 8, .45) 75%, rgba(11, 9, 8, .6) 100%),
              linear-gradient(0deg, rgba(11, 9, 8, .9), transparent 40%); }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background-image: url("shippo-dark.svg"); opacity: .5;
  -webkit-mask-image: linear-gradient(90deg, #000, transparent 55%); mask-image: linear-gradient(90deg, #000, transparent 55%); }
.hero-in { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: 1fr auto auto 1fr auto; gap: 1.2rem 2rem; min-height: 480px; padding: 2.6rem 0 1.6rem; }
.hero .title {
  grid-column: 2; grid-row: 1 / span 4; align-self: center; writing-mode: vertical-rl; text-orientation: upright; margin: 0;
  font-family: var(--font-serif); font-weight: 900; font-size: clamp(3rem, 7vw, 5.2rem); line-height: 1.05; letter-spacing: .14em;
  color: #e9c768; text-shadow: 0 0 28px rgba(255, 160, 60, .45), 0 2px 0 #5a3d0c;
  display: flex; flex-direction: column; gap: .25em; align-items: flex-start;
}
.hero .title small { font-size: .19em; letter-spacing: .55em; color: #f6eedf; font-weight: 500; text-shadow: none; padding-top: .4em; opacity: .8; }
.hero .copy { grid-column: 1; grid-row: 2; }
.eyebrow { display: inline-flex; align-items: center; gap: .6rem; font-size: .85rem; letter-spacing: .28em; color: #e9c768; margin: 0 0 1rem; }
.eyebrow::before { content: ""; width: 2.4rem; height: 6px; border-radius: 3px; background: repeating-linear-gradient(-58deg, #c8281a 0 5px, #f6efe4 5px 10px); }
.hero .lead { font-family: var(--font-serif); font-size: clamp(1.25rem, 3.4vw, 1.75rem); line-height: 1.6; margin: 0 0 .5rem; letter-spacing: .06em; }
.hero .lead b { color: #ff8a64; font-size: 1.15em; }
.hero .sub { color: #d8cbb4; margin: 0 0 1.6rem; max-width: 30em; }
.hero .search input { background: rgba(28, 22, 19, .88); color: #f6eedf; border: 1px solid rgba(233, 199, 104, .55); }
.hero .search input::placeholder { color: #b8a98f; }
.search.big input { font-size: 1.1rem; padding: .85rem 1.2rem .85rem 2.9rem; }
.search.big .icon { left: 1.1rem; width: 1.2rem; height: 1.2rem; color: #e9c768; }
.hero .results { background: #1c1613; color: #f3eadb; }
.hero .results a { color: #f3eadb; }
.hero .results .df, .hero .results .meta { color: #bcae97; }
.hero .results a:hover, .hero .results a[aria-selected="true"] { background: #251d18; }
.hero .results mark { background: #7a5a12; }
.hint { font-size: .82rem; color: #b8a98f; margin: .55rem 0 0 .4rem; }
.hint kbd { font: inherit; border: 1px solid rgba(233, 199, 104, .4); border-radius: 4px; padding: 0 .3rem; }
.hero .credit { grid-column: 1 / -1; grid-row: 5; font-size: .72rem; color: #a89a84; margin: 0; }
.hero .credit a { color: inherit; }
@media (max-width: 640px) {
  .hero-in { min-height: 0; padding: 2rem 0 1.4rem; gap: 1rem; grid-template-rows: auto auto auto; }
  .hero .title { font-size: clamp(2.6rem, 13vw, 3.4rem); grid-row: 1; align-self: start; }
  .hero .copy { grid-row: 1; align-self: center; }
  .hero .searchrow { grid-column: 1 / -1; grid-row: 2; }
  .hero .credit { grid-row: 3; }
  .kbdhint { display: none; }
  .hero::before { background: linear-gradient(90deg, rgba(11, 9, 8, .94), rgba(11, 9, 8, .6)), linear-gradient(0deg, rgba(11, 9, 8, .95), transparent 50%); }
}
@media (min-width: 641px) { .hero .searchrow { grid-column: 1; grid-row: 3; max-width: 640px; } }

/* ---------- top: panels ---------- */
.grid-2 { display: grid; gap: 1.2rem; grid-template-columns: 1fr; margin: 2.4rem auto 0; align-items: start; }
@media (min-width: 900px) { .grid-2 { grid-template-columns: 1fr 1fr; } }
.panel { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem 1.5rem; box-shadow: var(--shadow); }
.panel > h2, .section-title { font-family: var(--font-serif); font-size: 1.35rem; margin: 0 0 .9rem; letter-spacing: .1em; display: flex; align-items: center; gap: .6rem; color: var(--gold); text-shadow: var(--glow); }
.section-title { margin-top: 0; }
.panel > h2::before, .section-title::before { content: ""; width: .6rem; height: .6rem; background: var(--red); transform: rotate(45deg); flex: none; box-shadow: 0 0 10px rgba(255, 90, 40, .5); }
.today { overflow: hidden; padding-right: 4rem; border-color: var(--gold-soft); }
.today .fusa { position: absolute; top: -2px; right: 1.4rem; width: 28px; height: 84px; transform-origin: top center; }
@media (prefers-reduced-motion: no-preference) { .today .fusa { animation: sway 5s ease-in-out infinite; } }
@keyframes sway { 0%, 100% { rotate: -3deg; } 50% { rotate: 3deg; } }
.today .date { font-size: .8rem; color: var(--muted); margin: 0; }
.today .word { font-family: var(--font-serif); font-size: clamp(2.1rem, 8vw, 3rem); font-weight: 700; line-height: 1.3; margin: .2rem 0 .5rem; letter-spacing: .06em; color: var(--ink); }
.today .def { margin: 0 0 1.1rem; }
.actions { display: flex; flex-wrap: wrap; gap: .6rem; }
.btn { display: inline-flex; align-items: center; gap: .4rem; font: inherit; font-size: .92rem; padding: .5rem 1.1rem; border-radius: 999px; border: 1px solid var(--red); background: var(--red); color: var(--on-red); text-decoration: none; cursor: pointer; transition: filter .2s, box-shadow .2s; }
.btn:hover { color: var(--on-red); filter: brightness(1.1); box-shadow: 0 0 16px rgba(255, 90, 40, .4); }
.btn.ghost { background: transparent; color: var(--gold); border-color: var(--gold); }
.btn.ghost:hover { background: var(--gold-soft); color: var(--gold); box-shadow: none; }
.intro p { margin: 0 0 1em; }
.small, .note { font-size: .85rem; color: var(--muted); }

.gyou-grid { display: grid; gap: .75rem; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; padding: 0; list-style: none; }
@media (min-width: 640px) { .gyou-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.gyou-grid a { position: relative; display: block; padding: 1rem 1rem .9rem; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--ink); box-shadow: var(--shadow); transition: transform .2s, border-color .2s, box-shadow .2s; overflow: hidden; }
.gyou-grid a::after { content: ""; position: absolute; right: -18px; top: -18px; width: 56px; height: 56px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 140, 60, .35), transparent 70%); }
.gyou-grid a:hover { border-color: var(--gold); box-shadow: 0 0 20px rgba(255, 160, 60, .18); }
@media (prefers-reduced-motion: no-preference) { .gyou-grid a:hover { transform: translateY(-3px); } }
.gyou-grid b { font-family: var(--font-serif); font-size: 1.6rem; display: block; line-height: 1.3; color: var(--gold); }
.gyou-grid small { color: var(--muted); font-size: .78rem; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gyou-grid .n { color: var(--red-ink); font-weight: 700; font-size: 1rem; }

.links { display: grid; gap: .75rem; grid-template-columns: 1fr; margin: 0; padding: 0; list-style: none; }
@media (min-width: 640px) { .links { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.links a { display: block; height: 100%; padding: 1rem 1.15rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); box-shadow: var(--shadow); transition: border-color .2s; }
.links a:hover { border-color: var(--gold); }
.links b { font-family: var(--font-serif); font-size: 1.12rem; display: block; color: var(--gold); }
.links small { color: var(--muted); }
.links .thumb { display: block; height: 96px; margin: -1rem -1.15rem .8rem; border-radius: var(--radius) var(--radius) 0 0; overflow: hidden; }
.links .thumb img { width: 100%; height: 100%; object-fit: cover; filter: saturate(1.05); }
.ext::after { content: " ↗"; color: var(--muted); font-size: .85em; }
.cta { display: grid; gap: 1rem; align-items: center; grid-template-columns: 1fr; border-color: var(--gold-soft);
  background: linear-gradient(120deg, color-mix(in srgb, var(--red) 16%, var(--surface)), var(--surface) 60%); }
@media (min-width: 760px) { .cta { grid-template-columns: 1fr auto; } }
.cta h2 { margin-bottom: .3rem; }
.cta p { margin: 0; }
.pending { display: inline-block; font-size: .85rem; color: var(--muted); border: 1px dashed var(--line); border-radius: 999px; padding: .4rem 1rem; }
.flag { margin: 1rem 0 0; display: flex; gap: 1rem; align-items: center; }
.flag img { width: 110px; border-radius: 6px; border: 1px solid var(--line); }
.flag figcaption { font-size: .85rem; color: var(--muted); }

/* ---------- eat ---------- */
.notice { background: var(--surface-2); border: 1px solid var(--gold-soft); border-left: 4px solid var(--gold); border-radius: 10px; padding: .9rem 1.1rem; font-size: .92rem; margin: 1.4rem 0 1.6rem; }
.shops { display: grid; gap: 1rem; grid-template-columns: 1fr; margin: 0 0 2rem; padding: 0; list-style: none; }
@media (min-width: 760px) { .shops { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.shop { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.25rem; box-shadow: var(--shadow); }
.shop h3 { font-family: var(--font-serif); font-size: 1.35rem; margin: 0; }
.shop .stars { color: var(--gold); letter-spacing: .12em; margin: .1rem 0 0; }
.shop dl { display: grid; grid-template-columns: auto 1fr; gap: .25rem .9rem; margin: .6rem 0 0; font-size: .95rem; }
.shop dt { color: var(--muted); font-size: .85rem; padding-top: .1rem; }
.shop dd { margin: 0; }
.shop .old { font-size: .78rem; color: var(--muted); margin-left: .4rem; }

/* ---------- photo ---------- */
.gallery { display: grid; gap: .9rem; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0 0 1.4rem; padding: 0; list-style: none; }
@media (min-width: 760px) { .gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.gallery figure { margin: 0; }
.gallery a { display: block; overflow: hidden; border-radius: 10px; border: 1px solid var(--line); background: #000; box-shadow: var(--shadow); }
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .4s, opacity .3s; opacity: .95; }
.gallery a:hover img { opacity: 1; }
@media (prefers-reduced-motion: no-preference) { .gallery a:hover img { transform: scale(1.04); } }
.gallery figcaption { font-size: .85rem; color: var(--muted); padding: .4rem .2rem 0; }
dialog.lightbox { border: 0; padding: 0; background: transparent; max-width: 96vw; max-height: 96vh; color: #fff; }
dialog.lightbox::backdrop { background: rgba(8, 6, 5, .92); }
dialog.lightbox img { max-width: 92vw; max-height: 80vh; width: auto; margin: 0 auto; border-radius: 6px; box-shadow: 0 0 40px rgba(255, 150, 60, .2); }
dialog.lightbox .lb-bar { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: .6rem 1rem; padding: .7rem .2rem 0; }
dialog.lightbox .lb-cap { min-width: 10em; text-align: center; color: #e9c768; }
dialog.lightbox button { font: inherit; background: rgba(255, 255, 255, .1); color: #fff; border: 1px solid rgba(233, 199, 104, .5); border-radius: 999px; padding: .35rem .95rem; cursor: pointer; }
dialog.lightbox button:hover { background: rgba(233, 199, 104, .2); }

/* ---------- footer ---------- */
.site-footer { position: relative; margin-top: 3.5rem; padding: 2rem 0 2.6rem; font-size: .85rem; color: var(--muted); background: var(--bg-2);
  box-shadow: 0 -1px 0 var(--gold), 0 -4px 0 var(--red), 0 -5px 0 var(--gold); }
.site-footer::before { content: ""; position: absolute; inset: 0; background-image: var(--pattern); opacity: .7; pointer-events: none; }
.site-footer > .wrap { position: relative; }
.site-footer .about { font-family: var(--font-serif); color: var(--gold); font-size: 1rem; letter-spacing: .1em; margin: 0 0 .6rem; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: .3rem 1rem; margin-bottom: .8rem; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--gold); }
.site-footer p { margin: .2rem 0; }

/* ---------- redirect / 404 ---------- */
.center-page { min-height: 62vh; display: grid; place-items: center; text-align: center; padding: 2rem 1rem; }
.center-page h1 { font-family: var(--font-serif); font-size: 2rem; margin: .5rem 0; color: var(--gold); }
.center-page .big { font-family: var(--font-serif); font-size: 5rem; color: var(--red-ink); line-height: 1; margin: 0; text-shadow: var(--glow); }

@media (max-width: 520px) {
  .brand span { font-size: 1.02rem; letter-spacing: .06em; }
  .brand img { width: 28px; height: 28px; }
  .bar { gap: .5rem; }
  .theme-btn { width: 2.2rem; height: 2.2rem; }
  .results { position: fixed; left: .5rem; right: .5rem; top: var(--results-top, 56px); max-height: calc(100vh - var(--results-top, 56px) - 1rem); }
  .results.inline { position: static; max-height: 380px; }
  .panel { padding: 1.2rem 1.15rem; }
}
@media (max-width: 380px) { .brand span { display: none; } }
@media print {
  .site-header, .site-footer, .permalink, .pager, .hero { display: none !important; }
  .entry { box-shadow: none; break-inside: avoid; }
  :root { --bg: #fff; --surface: #fff; --ink: #000; }
}

/* テーマボタン：漆では太陽（→和紙へ）、和紙では月（→漆へ） */
.theme-btn .i-moon { display: none; }
:root[data-theme="light"] .theme-btn .i-sun { display: none; }
:root[data-theme="light"] .theme-btn .i-moon { display: block; }
