:root {
  color-scheme: light;
  --paper: #f5f1e7;
  --surface: #e9e6db;
  --ink: #384330;
  --muted: #6b705e;
  --line: #d7d9ca;
  font-family: 'PingFang SC', 'Microsoft YaHei', 'Noto Sans CJK SC', sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
  -webkit-tap-highlight-color: transparent;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 280px; }
body.viewer-open { overflow: hidden; }
button, a { touch-action: manipulation; }
button { font: inherit; color: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }
button:focus-visible, a:focus-visible { outline: 2px solid #64774e; outline-offset: 4px; }
button:disabled { opacity: .3; cursor: default; }
img { display: block; max-width: 100%; }
h1:focus, main:focus { outline: none; }
h1, h2, p { margin: 0; }
h1, h2, p, a, figcaption, .brand-name, .header-note, .category-name, .footer-brand, #viewer-category, #viewer-label, #viewer-description { overflow-wrap: anywhere; }
h1 { font-size: 28px; font-weight: 650; line-height: 1.4; letter-spacing: -.035em; }
h2 { font-size: 22px; font-weight: 600; line-height: 1.45; letter-spacing: -.02em; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link { position: fixed; top: 8px; left: 18px; padding: 12px 16px; background: var(--ink); color: var(--paper); transform: translateY(-160%); z-index: 2; }
.skip-link:focus { transform: translateY(0); }
.site-header, main, .site-footer { width: min(calc(100% - 48px), 960px); margin-inline: auto; }
.site-header { min-height: 64px; padding-block: 12px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); }
.brand { min-width: 0; flex: 1; }
.brand-name { font-size: 23px; font-weight: 650; letter-spacing: .04em; }
.header-note { min-width: 0; max-width: 38%; font-size: 13px; color: var(--muted); }
main { padding-top: 22px; }
.home-opening { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, .8fr); gap: 40px; align-items: center; }
.home-opening.without-directory { grid-template-columns: minmax(0, 720px); }
.photo-card { margin: 0; min-width: 0; }
.photo-button { display: block; width: 100%; padding: 0; border: 0; position: relative; border-radius: 4px; background: var(--surface); }
.photo-button img { position: static; width: 100%; height: auto; object-fit: contain; border-radius: 4px; }
.cover-photo img { max-height: 360px; object-fit: contain; }
.photo-caption { font-size: 13px; color: var(--muted); line-height: 1.6; margin-top: 7px; }
.photo-zoom { position: absolute; right: 11px; bottom: 11px; width: 28px; height: 28px; display: grid; place-items: center; color: var(--ink); background: rgba(245,241,231,.92); border-radius: 2px; font-size: 20px; }
.section-heading { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 12px; margin-bottom: 14px; }
.section-heading > *, .tea-card-copy > h2, .site-footer > * { min-width: 0; }
.text-link, .back-link { font-size: 13px; line-height: 1.6; }
.directory .section-heading { margin-bottom: 6px; }
.directory-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 17px 0; border-bottom: 1px solid var(--line); }
.directory-copy { display: block; min-width: 0; }
.category-name { display: block; font-size: 22px; font-weight: 600; line-height: 1.4; }
.category-teas { display: block; margin-top: 5px; font-size: 13px; line-height: 1.6; color: var(--muted); overflow-wrap: anywhere; }
.card-arrow { flex-shrink: 0; font-size: 22px; line-height: 1; }
.collection-preview, .photo-section { margin-top: 32px; }
.photo-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 26px 24px; }
.page-heading { margin-bottom: 18px; }
.back-link { display: inline-block; color: var(--muted); padding: 0 0 11px; }
.tea-intro { font-size: 14px; line-height: 1.7; margin-top: 6px; color: var(--muted); max-width: 42em; overflow-wrap: anywhere; }
.tea-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 24px; align-items: start; }
.tea-card { display: block; min-width: 0; }
.tea-card-image { background: var(--surface); border-radius: 4px; }
.tea-card-image img { position: static; width: 100%; height: auto; max-height: 360px; object-fit: contain; border-radius: 4px; }
.tea-card-copy { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 11px; }
.tea-hero { max-width: 720px; }
.tea-hero.portrait { max-width: 420px; }
.page-actions { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 14px; border-top: 1px solid var(--line); margin-top: 28px; padding-top: 18px; }
.page-actions a { padding-block: 6px; }
.empty-state { padding: 28px 18px; background: var(--surface); color: var(--muted); font-size: 14px; line-height: 1.7; }
.photo-button .empty-state { display: grid; place-items: center; min-height: 120px; }
.site-footer { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 36px; padding: 20px 0 max(24px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; line-height: 1.6; }
dialog { position: fixed; inset: 0; width: 100%; max-width: none; height: 100%; max-height: none; margin: 0; padding: 0; border: 0; background: #222d21; color: var(--paper); }
dialog::backdrop { background: #222d21; }
.viewer-shell { height: 100%; height: 100dvh; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; padding: max(12px, env(safe-area-inset-top)) 24px max(16px, env(safe-area-inset-bottom)); }
.viewer-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; }
.viewer-bar > div { min-width: 0; max-height: 30dvh; overflow: auto; }
#viewer-category { display: block; font-size: 19px; font-weight: 600; line-height: 1.5; }
#viewer-label { display: block; color: #bec6b5; font-size: 13px; line-height: 1.6; }
#viewer-description { color: #bec6b5; font-size: 13px; margin-top: 3px; line-height: 1.6; }
.icon-button { width: 44px; height: 44px; flex-shrink: 0; display: grid; place-items: center; padding: 0; border: 1px solid #5b6653; border-radius: 50%; background: transparent; color: inherit; }
.icon-button svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.viewer-stage { min-height: 0; display: flex; align-items: center; justify-content: center; padding-block: 14px; }
.viewer-stage img { width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; }
.viewer-stage .empty-state { max-width: 440px; background: #36412f; color: #bec6b5; }
.viewer-controls { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; width: min(100%, 560px); margin-inline: auto; }
.viewer-nav { min-height: 44px; padding: 8px; color: inherit; border: 0; background: transparent; font-size: 14px; }
.viewer-nav span { margin-inline: 4px; font-size: 18px; }
#viewer-count { font-size: 14px; color: #bec6b5; font-variant-numeric: tabular-nums; }
.noscript { padding: 25px; text-align: center; }
@media (hover: hover) {
  .directory-row:hover .category-name, .tea-card:hover h2, .text-link:hover, .back-link:hover { color: #6b7b50; }
  .photo-button:hover .photo-zoom { background: var(--paper); }
  .viewer-nav:hover:not(:disabled), .icon-button:hover { background: #36412f; }
}
button:active:not(:disabled) { transform: translateY(1px); }
@media (max-width: 600px) {
  .site-header, main, .site-footer { width: calc(100% - 36px); }
  .site-header { min-height: 56px; padding-block: 10px; }
  .brand-name { font-size: 22px; }
  main { padding-top: 14px; }
  h1 { font-size: 27px; }
  .home-opening { display: block; }
  .cover-photo img { max-height: 220px; }
  .directory { margin-top: 22px; }
  .directory-row { padding-block: 12px; }
  .category-name { font-size: 21px; }
  .category-teas { margin-top: 3px; }
  .photo-grid { grid-template-columns: 1fr; gap: 25px; }
  .preview-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .tea-list { grid-template-columns: 1fr; gap: 26px; }
  .viewer-shell { padding-inline: 14px; }
  .page-heading { margin-bottom: 15px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
