/* Match the main site's neutral surfaces, Arial type, red accents and card grid. */
:root {
  color-scheme: light;
  --background: #f9fafb;
  --surface: #fff;
  --foreground: #111827;
  --body: #4b5563;
  --muted: #6b7280;
  --border: #e5e7eb;
  --chip: #f3f4f6;
  --accent: #ef4444;
  --accent-hover: #dc2626;
  font-family: Arial, Helvetica, sans-serif;
  font-synthesis: none;
  line-height: 1.5;
  color: var(--foreground);
  background: var(--background);
}
:root.dark {
  color-scheme: dark;
  --background: #0a0a0a;
  --surface: #111827;
  --foreground: #f3f4f6;
  --body: #9ca3af;
  --muted: #9ca3af;
  --border: #374151;
  --chip: #1f2937;
}
@media (prefers-color-scheme: dark) {
  :root:not(.dark) {
    color-scheme: light;
  }
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
[hidden] {
  display: none !important;
}
a {
  color: inherit;
  text-underline-offset: 4px;
}
a:hover {
  color: var(--accent);
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  touch-action: manipulation;
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}
p {
  color: var(--body);
}
.site-header {
  max-width: 1152px;
  margin: auto;
  padding: 20px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand {
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.site-header nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  font-size: 14px;
  color: var(--body);
}
.site-header nav a {
  text-decoration: none;
}
.app-link {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 12px;
  font-weight: 600;
}
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  color: var(--body);
  padding: 8px;
  border-radius: 8px;
  cursor: pointer;
}
.theme-toggle:hover {
  background: var(--chip);
  color: var(--foreground);
}
.theme-toggle .sun {
  display: none;
}
.dark .theme-toggle .sun {
  display: block;
}
.dark .theme-toggle .moon {
  display: none;
}
main {
  max-width: 1152px;
  padding: 16px 16px 64px;
  margin: auto;
}
h1 {
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.2;
  letter-spacing: -0.025em;
  margin: 24px 0;
  font-weight: 700;
}
h2 {
  font-size: 24px;
  line-height: 1.3;
  margin: 24px 0 12px;
}
h3 {
  font-size: 20px;
  line-height: 1.4;
}
.directory-intro {
  text-align: center;
  margin: 0 auto 44px;
  max-width: 768px;
}
.directory-intro h1 {
  font-size: 24px;
  letter-spacing: 0;
  margin: 0 0 16px;
}
.directory-intro p {
  margin: 0;
  font-size: 16px;
  line-height: 1.6;
}
.browse-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px;
  margin: 24px 0;
  font-size: 16px;
}
.browse-nav a {
  text-decoration: none;
}
.browse-nav [aria-current] {
  color: var(--accent);
}
.directory-filters {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 24px 0;
}
.facet-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.facet-nav a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--chip);
  font-size: 14px;
  color: var(--body);
  text-decoration: none;
}
.facet-nav a:hover {
  color: var(--foreground);
  border-color: var(--muted);
}
.facet-nav a[aria-current] {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}
.facet-nav span {
  font-size: 12px;
  opacity: 0.8;
}
.directory-count {
  margin: 20px 0;
}
.muted {
  color: var(--muted);
  font-size: 14px;
}
.directory-note {
  text-align: center;
  max-width: 768px;
  margin: 32px auto;
}
.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
  margin: 24px 0;
}
.card {
  min-width: 0;
  border-radius: 8px;
  overflow: hidden;
  box-shadow:
    0 4px 6px -1px rgb(0 0 0/0.1),
    0 2px 4px -2px rgb(0 0 0/0.1);
  transition: box-shadow 0.2s;
}
.card:hover {
  box-shadow: 0 10px 15px -3px rgb(0 0 0/0.15);
}
.card-link {
  display: block;
  height: 100%;
  text-decoration: none;
  color: inherit;
}
.card-link:hover {
  color: inherit;
}
.card img,
.card-placeholder {
  display: block;
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  background: var(--chip);
}
.card-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--muted);
  font-size: 14px;
}
.card-content {
  padding: 24px;
}
.card h2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 20px;
  line-height: 1.4;
  font-weight: 600;
  margin: 0 0 12px;
  overflow-wrap: anywhere;
}
.card .eyebrow {
  font-size: 13px;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  margin: 0 0 12px;
  color: var(--muted);
}
.card p {
  font-size: 14px;
  margin: 8px 0;
}
.card .card-summary {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-price {
  font-weight: 600;
}
.chinese-name {
  color: var(--body);
}
.pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 40px 0 24px;
}
.pagination a {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  text-decoration: none;
  font-size: 14px;
}
.pagination a:hover {
  background: var(--chip);
}
.pagination [aria-current="page"] {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}
.pagination span {
  flex-basis: 100%;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  margin-top: 4px;
}
.hero {
  padding: 32px 0;
  max-width: 880px;
}
.lead {
  font-size: 20px;
  line-height: 1.6;
  max-width: 768px;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}
.actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 24px 0;
}
.button,
button:not(.theme-toggle) {
  display: inline-block;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: white;
  border-radius: 8px;
  padding: 10px 16px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.button:hover,
button:not(.theme-toggle):hover {
  background: var(--accent-hover);
  color: #fff;
}
.button.secondary,
button.secondary {
  background: transparent;
  border-color: var(--border);
  color: var(--foreground);
}
button:disabled {
  opacity: 0.6;
  cursor: wait;
}
.panel {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  margin: 24px 0;
  background: var(--surface);
}
.panel h2:first-child {
  margin-top: 0;
}
.grid .panel {
  margin: 0;
}
.stats {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
  border: 1px solid var(--border);
  padding: 24px;
  border-radius: 12px;
  margin: 24px 0 48px;
}
.stats span {
  display: flex;
  gap: 8px;
  align-items: baseline;
  color: var(--body);
}
.stats strong {
  font-size: 24px;
  color: var(--foreground);
}
label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 18px;
}
input,
textarea,
select {
  display: block;
  width: 100%;
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  color: var(--foreground);
  margin-top: 8px;
}
textarea {
  min-height: 100px;
}
.search {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr auto;
  gap: 16px;
  align-items: end;
  margin: 28px 0;
}
.search button {
  margin-bottom: 18px;
}
.check {
  display: flex;
  align-items: center;
  gap: 10px;
}
.check input {
  width: auto;
  margin: 0;
}
code {
  display: block;
  overflow-wrap: anywhere;
  background: var(--chip);
  border-radius: 8px;
  padding: 12px;
}
.cover {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--chip);
  max-height: 520px;
  object-fit: cover;
  border-radius: 8px;
  margin: 24px 0;
}
.chinese {
  font-size: 22px;
}
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 14px;
  color: var(--muted);
  margin: 16px 0;
}
.prose {
  font-size: 18px;
  max-width: 900px;
  line-height: 1.7;
  color: var(--body);
}
.prose h1 {
  font-size: 36px;
}
.prose h2 {
  margin-top: 40px;
}
.prose img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}
.prose table {
  border-collapse: collapse;
  width: 100%;
  font-size: 15px;
  display: block;
  overflow: auto;
}
.prose td,
.prose th {
  border: 1px solid var(--border);
  padding: 12px;
}
footer {
  border-top: 1px solid var(--border);
  padding: 24px 16px 40px;
  max-width: 1152px;
  margin: auto;
  font-size: 14px;
  color: var(--muted);
}
footer p {
  color: inherit;
}
details {
  margin-top: 32px;
}
summary {
  cursor: pointer;
  font-weight: 600;
}
@media (max-width: 1023px) {
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 767px) {
  .grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .site-header {
    gap: 12px;
    flex-wrap: wrap;
  }
  .site-header nav {
    gap: 12px;
  }
  .site-header .app-link {
    display: none;
  }
  .directory-intro {
    margin-bottom: 32px;
  }
  .directory-intro h1 {
    font-size: 20px;
  }
  .directory-intro p {
    font-size: 15px;
  }
  .card-content {
    padding: 20px;
  }
  .hero {
    padding-top: 16px;
  }
  .search {
    grid-template-columns: 1fr;
  }
  .search button {
    margin: 0;
  }
  .lead {
    font-size: 18px;
  }
  .stats {
    gap: 16px;
  }
  .stats span {
    width: 100%;
  }
  .panel {
    padding: 20px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .card {
    transition: none;
  }
}

.footer-nav { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 16px; }

.venue-photos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.venue-photos figure { margin: 0; min-width: 0; }
.venue-photos img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; }
.venue-photos figcaption { color: var(--muted); font-size: 14px; margin-top: 8px; }
.source-credit { font-size: 13px; }
@media (max-width: 767px) { .venue-photos { grid-template-columns: 1fr; } }
