:root {
  --bg: #f3f4f6;
  --card: #ffffff;
  --ink: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --soft: #f9fafb;
  --brand: #111827;
  --good: #166534;
  --warn: #92400e;
  --radius: 18px;
  --shadow: 0 8px 30px rgba(17,24,39,.07);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
}
button, input, select, textarea, a { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
.hero {
  background: linear-gradient(145deg, #0b1220, #1f2937);
  color: white;
  padding: calc(24px + env(safe-area-inset-top)) 18px 28px;
}
.hero-inner, main { max-width: 760px; margin: 0 auto; }
.eyebrow { font-size: 12px; letter-spacing: .13em; opacity: .72; font-weight: 700; }
h1 { margin: 7px 0 6px; font-size: clamp(28px, 7vw, 38px); line-height: 1.12; }
.hero p { margin: 0; opacity: .8; font-size: 14px; }
.meta-row { display: flex; gap: 10px; margin-top: 15px; font-size: 12px; opacity: .72; flex-wrap: wrap; }
main { padding: 14px 12px calc(44px + env(safe-area-inset-bottom)); }
.toolbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(243,244,246,.93);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 10px 0 8px;
}
.search-wrap input {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0 14px;
  background: white;
  color: var(--ink);
  outline: none;
}
.search-wrap input:focus { border-color: #9ca3af; box-shadow: 0 0 0 3px rgba(17,24,39,.05); }
.chips { display: flex; gap: 8px; margin: 9px 0; overflow-x: auto; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  white-space: nowrap;
  border: 1px solid var(--line);
  background: white;
  color: #374151;
  border-radius: 999px;
  min-height: 36px;
  padding: 0 13px;
}
.chip.active { background: var(--brand); color: white; border-color: var(--brand); }
.sort-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--muted); }
.sort-row select { margin-left: 5px; border: 1px solid var(--line); border-radius: 9px; padding: 5px 7px; background: white; color: var(--ink); }
.text-button { border: 0; background: none; padding: 5px 0; color: #6b7280; text-decoration: underline; text-underline-offset: 2px; }
.notice, .footnote {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  margin: 4px 0 12px;
  font-size: 13px;
  color: #4b5563;
}
.store-list { display: grid; gap: 12px; }
.store-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
  overflow: hidden;
}
.card-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.badges { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 7px; }
.badge { display: inline-flex; min-height: 24px; align-items: center; padding: 0 8px; border-radius: 999px; background: #f3f4f6; font-size: 11px; color: #4b5563; font-weight: 650; }
.badge.priority { background: #ecfdf5; color: var(--good); }
.store-name { margin: 0; font-size: 20px; line-height: 1.25; }
.store-en { margin-top: 3px; font-size: 12px; color: var(--muted); }
.icon-button { border: 1px solid var(--line); background: white; border-radius: 10px; padding: 7px 9px; color: #4b5563; flex: 0 0 auto; }
.primary-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin: 14px 0; }
.action {
  min-height: 48px;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 13px;
  font-weight: 750;
  text-decoration: none;
  border: 1px solid var(--brand);
  cursor: pointer;
}
.action.call { background: var(--brand); color: white; }
.action.nav { background: white; color: var(--brand); }
.facts { margin: 0; border-top: 1px solid var(--line); }
.facts > div { display: grid; grid-template-columns: 88px 1fr; gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--line); }
dt { color: var(--muted); font-size: 12px; }
dd { margin: 0; font-size: 14px; min-width: 0; }
dd small { display: block; color: var(--muted); margin-top: 3px; font-size: 11px; }
.contact-role { display: block; color: #374151; font-size: 12px; margin-top: 1px; }
.phone-link { font-weight: 700; text-decoration: none; border-bottom: 1px dotted #9ca3af; }
.address-button { padding: 0; border: 0; background: none; color: inherit; text-align: left; text-decoration: underline; text-decoration-style: dotted; text-underline-offset: 2px; }
.business-box { margin-top: 12px; background: var(--soft); border-radius: 13px; padding: 12px; border: 1px solid #eef0f2; }
.business-box h3 { margin: 0 0 7px; font-size: 13px; }
.business-box p { margin: 8px 0 0; color: #4b5563; font-size: 12px; }
.corp-contact { display: flex; flex-wrap: wrap; gap: 7px; }
.mini-link { display: inline-flex; align-items: center; min-height: 30px; padding: 0 9px; border-radius: 9px; background: white; border: 1px solid var(--line); text-decoration: none; font-size: 12px; }
details { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 10px; }
summary { cursor: pointer; font-size: 13px; font-weight: 700; }
.record-grid { display: grid; grid-template-columns: 1fr; gap: 9px; padding-top: 10px; }
.record-grid label { font-size: 11px; color: var(--muted); }
.record-grid input, .record-grid select, .record-grid textarea {
  width: 100%;
  margin-top: 4px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 10px;
  background: white;
  color: var(--ink);
  min-height: 40px;
}
.record-grid textarea { resize: vertical; }
.source-note { font-size: 12px; color: var(--muted); margin: 9px 0; }
.source-list { margin: 0; padding-left: 20px; font-size: 12px; }
.source-list li { margin: 5px 0; }
.source-list a { color: #374151; }
.empty { text-align: center; color: var(--muted); padding: 50px 12px; }
.footnote { margin-top: 16px; }
.footnote h2 { margin: 0 0 6px; font-size: 15px; color: var(--ink); }
.footnote p { margin: 7px 0; }
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(22px + env(safe-area-inset-bottom));
  transform: translate(-50%, 18px);
  background: rgba(17,24,39,.94);
  color: white;
  border-radius: 999px;
  padding: 9px 13px;
  font-size: 12px;
  opacity: 0;
  pointer-events: none;
  transition: .18s ease;
  z-index: 99;
  white-space: nowrap;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
@media (min-width: 620px) {
  main { padding-left: 18px; padding-right: 18px; }
  .store-card { padding: 18px; }
  .record-grid { grid-template-columns: 1fr 1fr; }
  .record-grid .full { grid-column: 1 / -1; }
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #0b0f16; --card: #111827; --ink: #f3f4f6; --muted: #9ca3af; --line: #273244; --soft: #0f172a; --brand: #f3f4f6; --shadow: none; }
  .hero { background: #05080d; }
  .toolbar { background: rgba(11,15,22,.94); }
  .search-wrap input, .chip, .sort-row select, .icon-button, .mini-link, .record-grid input, .record-grid select, .record-grid textarea { background: #111827; color: var(--ink); }
  .chip.active { background: #f3f4f6; color: #111827; border-color: #f3f4f6; }
  .badge { background: #1f2937; color: #d1d5db; }
  .badge.priority { background: #123522; color: #bbf7d0; }
  .action.call { background: #f3f4f6; color: #111827; }
  .action.nav { background: #111827; color: #f3f4f6; border-color: #f3f4f6; }
  .business-box p, .source-list a, .contact-role { color: #d1d5db; }
}
