:root {
  --rice: #f4efe3;
  --paper: #fffaf0;
  --ink: #1d1b18;
  --muted: #6f675c;
  --line: #c9bda8;
  --chili: #d94829;
  --chili-dark: #a82e18;
  --teal: #176c67;
  --gold: #e2ad37;
  --shadow: 6px 6px 0 var(--ink);
  --page: min(1180px, calc(100% - 40px));
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--rice);
  color: var(--ink);
  font-family: "PingFang SC", "Noto Sans CJK SC", "Microsoft YaHei", system-ui, sans-serif;
  line-height: 1.6;
}
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .34;
  background-image: radial-gradient(#8d806b 0.55px, transparent 0.55px); background-size: 5px 5px;
}
button, input, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
button { color: inherit; }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: 8px; left: 8px; z-index: 99; padding: 10px 14px; background: var(--ink); color: white; transform: translateY(-150%); }
.skip-link:focus { transform: none; }

.site-header {
  width: var(--page); min-height: 86px; margin: auto; display: flex; align-items: center; justify-content: space-between;
  border-bottom: 2px solid var(--ink);
}
.brand { display: inline-flex; align-items: center; gap: 12px; line-height: 1.15; }
.brand-seal { display: grid; place-items: center; width: 45px; height: 45px; background: var(--chili); color: #fff; border-radius: 50% 44% 48% 42%; font-family: STKaiti, KaiTi, serif; font-size: 25px; transform: rotate(-4deg); }
.brand strong, .brand small { display: block; }
.brand strong { font-family: STSong, SimSun, serif; font-size: 20px; letter-spacing: .08em; }
.brand small { color: var(--muted); font-size: 11px; letter-spacing: .2em; margin-top: 4px; }
.site-header nav { display: flex; gap: 28px; font-weight: 700; font-size: 14px; }
.site-header nav a { padding: 12px 0; border-bottom: 2px solid transparent; }
.site-header nav a:hover { border-color: var(--chili); }

.hero { width: var(--page); margin: 38px auto 94px; display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(260px, .65fr); border: 2px solid var(--ink); box-shadow: var(--shadow); background: var(--paper); }
.hero-copy { padding: clamp(38px, 7vw, 82px); border-right: 2px solid var(--ink); }
.eyebrow { margin: 0 0 13px; color: var(--chili-dark); font: 800 12px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .14em; }
.hero h1 { margin: 0; font-family: STSong, SimSun, serif; font-size: clamp(52px, 8vw, 104px); font-weight: 900; line-height: .98; letter-spacing: -.07em; }
.hero h1 em { color: var(--chili); font-style: normal; }
.hero-lead { max-width: 590px; margin: 26px 0 34px; color: var(--muted); font-size: clamp(16px, 2vw, 20px); }
.search-box { max-width: 620px; display: flex; border: 2px solid var(--ink); background: #fff; box-shadow: 4px 4px 0 var(--gold); }
.search-box input { width: 100%; min-width: 0; border: 0; padding: 15px 17px; background: transparent; outline: 0; }
.search-box button, .primary-button { min-height: 48px; border: 0; padding: 0 20px; background: var(--ink); color: #fff; cursor: pointer; font-weight: 800; white-space: nowrap; }
.search-box button:hover, .primary-button:hover { background: var(--chili-dark); }
.hero-poster { position: relative; min-height: 410px; overflow: hidden; display: flex; flex-direction: column; justify-content: center; align-items: center; background: var(--teal); color: #fff; }
.hero-poster::before, .hero-poster::after { content: ""; position: absolute; width: 260px; height: 260px; border: 2px solid rgba(255,255,255,.3); border-radius: 50%; }
.hero-poster::after { width: 190px; height: 190px; }
.poster-number { z-index: 1; font: 900 clamp(72px, 10vw, 126px)/.9 Georgia, serif; color: #fff3c7; }
.poster-label { z-index: 1; text-align: center; font-weight: 700; line-height: 1.35; letter-spacing: .16em; }
.poster-bowl { position: absolute; right: 16px; top: 14px; padding: 10px; border: 1px solid #fff; writing-mode: vertical-rl; font-family: STKaiti, KaiTi, serif; }

.catalog, .manifesto { width: var(--page); margin: 0 auto; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; border-bottom: 2px solid var(--ink); padding-bottom: 18px; }
.section-heading h2, .manifesto h2 { margin: 0; font-family: STSong, SimSun, serif; font-size: clamp(34px, 5vw, 56px); line-height: 1.12; }
.section-heading > p { margin: 0 0 5px; color: var(--muted); }
.district-scroll { display: flex; gap: 10px; overflow-x: auto; padding: 18px 2px 20px; scrollbar-width: none; }
.district-scroll::-webkit-scrollbar { display: none; }
.filter-chip { flex: 0 0 auto; min-height: 44px; border: 1.5px solid var(--ink); border-radius: 999px; padding: 0 18px; background: transparent; cursor: pointer; font-weight: 700; }
.filter-chip:hover, .filter-chip.active { background: var(--ink); color: #fff; }
.shop-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px 20px; }
.shop-card { position: relative; min-width: 0; border: 1.5px solid var(--ink); background: var(--paper); transition: transform .18s ease, box-shadow .18s ease; }
.shop-card:hover { transform: translate(-3px,-3px); box-shadow: 5px 5px 0 var(--chili); }
.shop-card-button { width: 100%; display: block; padding: 0; border: 0; text-align: left; background: transparent; cursor: pointer; }
.shop-image { position: relative; aspect-ratio: 4/3; overflow: hidden; border-bottom: 1.5px solid var(--ink); background: var(--gold); }
.shop-image img { width: 100%; height: 100%; display: block; object-fit: cover; transition: transform .4s ease; }
.shop-card:hover img { transform: scale(1.035); }
.shop-image-empty { width: 100%; height: 100%; display: grid; place-items: center; background: repeating-linear-gradient(135deg,#edc967,#edc967 12px,#f8dfa0 12px,#f8dfa0 24px); font: 900 40px STKaiti, KaiTi, serif; }
.shop-index { position: absolute; left: 12px; top: 12px; padding: 4px 8px; background: var(--paper); border: 1px solid var(--ink); font: 800 12px ui-monospace, monospace; }
.shop-info { padding: 18px; }
.shop-meta { display: flex; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 12px; font-weight: 700; }
.shop-info h3 { margin: 6px 0 8px; font-family: STSong, SimSun, serif; font-size: 25px; line-height: 1.2; }
.shop-info > p { margin: 0; color: var(--muted); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tag-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.tag { display: inline-flex; align-items: center; min-height: 27px; padding: 2px 8px; background: #e6dfd1; font-size: 12px; }
.score { color: var(--chili-dark); }
.skeleton-card { aspect-ratio: .78; border: 1px solid var(--line); background: linear-gradient(100deg,#e7dfd1 20%,#f8f3e8 40%,#e7dfd1 60%); background-size: 200% 100%; animation: shimmer 1.4s infinite; }
@keyframes shimmer { to { background-position-x: -200%; } }
.empty-state { margin: 26px 0; padding: 54px 20px; border: 1.5px dashed var(--ink); text-align: center; }
.empty-state span { display: inline-grid; place-items: center; width: 80px; height: 54px; border: 3px solid var(--ink); border-radius: 8px 8px 40px 40px; font-family: STKaiti, KaiTi, serif; }
.empty-state h3 { margin: 18px 0 4px; font-size: 22px; }
.empty-state p { margin: 0 0 18px; color: var(--muted); }
.empty-state button, .text-button { min-height: 44px; border: 1.5px solid var(--ink); background: transparent; padding: 8px 15px; cursor: pointer; font-weight: 700; }

.manifesto { margin-top: 110px; margin-bottom: 100px; padding: clamp(28px, 5vw, 58px); display: grid; grid-template-columns: .6fr 1.4fr .4fr; gap: 36px; align-items: start; border: 2px solid var(--ink); background: var(--gold); box-shadow: var(--shadow); }
.manifesto p:not(.eyebrow) { max-width: 620px; margin: 22px 0 0; font-size: 18px; }
.manifesto-stamp { justify-self: end; padding: 16px 13px; border: 3px double var(--chili-dark); color: var(--chili-dark); font: 700 20px/1.2 STKaiti, KaiTi, serif; text-align: center; transform: rotate(5deg); }

.detail-view { width: var(--page); margin: 38px auto 100px; }
.back-button { min-height: 44px; margin-bottom: 22px; border: 0; background: transparent; padding: 4px 0; cursor: pointer; font-weight: 800; }
.back-button:hover { color: var(--chili); }
.detail-hero { display: grid; grid-template-columns: 1.1fr .9fr; border: 2px solid var(--ink); background: var(--paper); box-shadow: var(--shadow); }
.detail-photo { min-height: 470px; border-right: 2px solid var(--ink); background: var(--gold); }
.detail-photo img { width: 100%; height: 100%; min-height: 470px; display: block; object-fit: cover; }
.detail-photo .shop-image-empty { min-height: 470px; }
.detail-copy { padding: clamp(28px, 5vw, 58px); align-self: center; }
.detail-copy h1 { margin: 8px 0 16px; font: 900 clamp(40px, 6vw, 70px)/1.05 STSong, SimSun, serif; }
.detail-note { color: var(--muted); font-size: 17px; }
.facts { margin: 26px 0 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.facts li { display: grid; grid-template-columns: 76px 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.facts strong { color: var(--chili-dark); font-size: 13px; }
.map-actions { display: flex; align-items: stretch; gap: 9px; margin-top: 18px; }
.map-link { min-height: 52px; display: inline-flex; align-items: center; justify-content: center; border: 1.5px solid var(--ink); cursor: pointer; font-weight: 800; transition: background .18s ease, color .18s ease; }
.map-link-primary { flex: 1 1 auto; gap: 10px; padding: 8px 16px; background: var(--ink); color: #fff; }
.map-link-primary:hover { background: var(--teal); }
.map-link-primary svg { flex: 0 0 auto; }
.map-link-primary span, .map-link-primary strong, .map-link-primary small { display: block; }
.map-link-primary strong { line-height: 1.2; }
.map-link-primary small { margin-top: 2px; color: #ded6c8; font-size: 11px; font-weight: 500; }
.map-link-secondary { flex: 0 0 auto; padding: 8px 14px; background: transparent; font-size: 13px; }
.map-link-secondary:hover { background: var(--gold); }
.detail-columns { display: grid; grid-template-columns: .8fr 1.2fr; gap: 40px; margin-top: 68px; }
.taste-panel h2, .comments-panel h2 { margin: 0; font: 800 32px/1.2 STSong, SimSun, serif; }
.taste-card { margin-top: 16px; padding: 20px; border: 1.5px solid var(--ink); background: var(--paper); }
.taste-card header { display: flex; align-items: center; justify-content: space-between; }
.taste-card h3 { margin: 0; font-size: 18px; }
.taste-score { color: var(--chili); font: 900 26px Georgia, serif; }
.taste-card p { color: var(--muted); margin: 14px 0 0; }
.meter { height: 8px; margin-top: 9px; border: 1px solid var(--ink); background: #fff; }
.meter span { display: block; height: 100%; background: var(--teal); }
.comments-head { display: flex; justify-content: space-between; align-items: end; gap: 20px; padding-bottom: 14px; border-bottom: 2px solid var(--ink); }
.comments-head p { margin: 0; color: var(--muted); }
.comment-form { margin: 20px 0 32px; padding: 22px; border: 1.5px solid var(--ink); background: var(--paper); }
.form-row { display: grid; grid-template-columns: .7fr 1.3fr; gap: 18px; }
.field label, .field legend { display: block; margin-bottom: 7px; font-weight: 800; font-size: 14px; }
.field input[type="text"], .field textarea { width: 100%; border: 1.5px solid var(--ink); border-radius: 0; padding: 12px; background: #fff; }
.field textarea { min-height: 120px; resize: vertical; }
.rating-options, .tag-options { display: flex; flex-wrap: wrap; gap: 7px; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice span { display: inline-flex; align-items: center; min-height: 42px; padding: 7px 11px; border: 1px solid var(--ink); background: #fff; cursor: pointer; font-size: 13px; font-weight: 700; }
.choice input:checked + span { background: var(--teal); color: white; }
.choice input:focus-visible + span { outline: 3px solid var(--teal); outline-offset: 2px; }
.field + .field { margin-top: 18px; }
.form-note { display: flex; justify-content: space-between; gap: 14px; margin-top: 8px; color: var(--muted); font-size: 12px; }
.form-actions { display: flex; align-items: center; gap: 14px; margin-top: 20px; }
.form-actions p { margin: 0; color: var(--muted); font-size: 12px; }
.primary-button:disabled { opacity: .55; cursor: wait; }
.honeypot { position: absolute !important; left: -10000px !important; }
.comment-list { display: grid; gap: 12px; }
.comment { padding: 18px 0; border-bottom: 1px solid var(--line); }
.comment-header { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.comment-author { display: flex; align-items: center; gap: 10px; }
.comment-avatar { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; background: var(--chili); color: #fff; font-family: STKaiti, KaiTi, serif; }
.comment-author strong, .comment-author time { display: block; }
.comment-author time { color: var(--muted); font-size: 12px; }
.rating-badge { padding: 4px 8px; background: var(--gold); font-size: 12px; font-weight: 800; }
.comment-content { margin: 14px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.comment-footer { display: flex; justify-content: space-between; align-items: end; }
.delete-comment { border: 0; background: transparent; color: var(--muted); cursor: pointer; text-decoration: underline; font-size: 12px; min-height: 40px; }
.comment-empty { padding: 42px 14px; text-align: center; color: var(--muted); border-bottom: 1px solid var(--line); }
.detail-loading, .error-panel { min-height: 60vh; display: grid; place-items: center; text-align: center; }
.error-panel button { margin-top: 14px; }

body > footer { width: var(--page); min-height: 110px; margin: auto; border-top: 2px solid var(--ink); display: flex; align-items: center; justify-content: space-between; gap: 30px; }
.footer-brand { font: 800 20px STSong, SimSun, serif; }
.footer-brand span { color: var(--muted); font: 11px ui-monospace, monospace; margin-left: 12px; }
body > footer > div:last-child { display: flex; gap: 22px; font-size: 13px; font-weight: 700; }
body > footer a:hover { color: var(--chili); }
.toast { position: fixed; z-index: 50; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translateX(-50%); max-width: calc(100% - 32px); padding: 12px 18px; background: var(--ink); color: #fff; box-shadow: 4px 4px 0 var(--chili); font-weight: 700; }

.doc { width: min(780px, calc(100% - 40px)); margin: 0 auto; padding: 52px 0 88px; }
.doc h1 { margin: 26px 0 32px; font: 900 clamp(38px, 7vw, 62px)/1.1 STSong, SimSun, serif; border-bottom: 2px solid var(--ink); padding-bottom: 18px; }
.doc h2 { margin: 32px 0 8px; font-size: 21px; }
.doc p { margin: 0 0 14px; color: var(--muted); }
.back-link { font-weight: 800; }

@media (max-width: 900px) {
  .shop-grid { grid-template-columns: repeat(2, 1fr); }
  .detail-hero { grid-template-columns: 1fr; }
  .detail-photo, .detail-photo img { min-height: 360px; }
  .detail-photo { border-right: 0; border-bottom: 2px solid var(--ink); }
  .detail-columns { grid-template-columns: 1fr; }
  .manifesto { grid-template-columns: 1fr 2fr; }
  .manifesto-stamp { display: none; }
}

@media (max-width: 680px) {
  :root { --page: calc(100% - 28px); --shadow: 4px 4px 0 var(--ink); }
  .site-header { min-height: 72px; }
  .site-header nav { display: none; }
  .hero { margin-top: 22px; margin-bottom: 70px; grid-template-columns: 1fr; }
  .hero-copy { padding: 34px 22px 30px; border-right: 0; border-bottom: 2px solid var(--ink); }
  .hero h1 { font-size: clamp(50px, 17vw, 74px); }
  .hero-poster { min-height: 185px; flex-direction: row; gap: 14px; }
  .hero-poster::before { width: 170px; height: 170px; }
  .hero-poster::after { width: 120px; height: 120px; }
  .poster-number { font-size: 78px; }
  .search-box { display: grid; }
  .search-box button { min-height: 50px; }
  .section-heading { align-items: start; flex-direction: column; gap: 6px; }
  .shop-grid { grid-template-columns: 1fr; gap: 18px; }
  .shop-image { aspect-ratio: 16/10; }
  .manifesto { margin-top: 72px; margin-bottom: 70px; grid-template-columns: 1fr; gap: 16px; }
  .detail-view { margin-top: 20px; }
  .detail-photo, .detail-photo img, .detail-photo .shop-image-empty { min-height: 260px; }
  .detail-columns { margin-top: 52px; gap: 52px; }
  .map-actions { flex-direction: column; }
  .map-link { width: 100%; }
  .form-row { grid-template-columns: 1fr; }
  .form-actions { align-items: stretch; flex-direction: column; }
  body > footer { padding: 28px 0; align-items: start; flex-direction: column; }
  body > footer > div:last-child { flex-wrap: wrap; }
  .footer-brand span { display: block; margin: 7px 0 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
