
/* BASE CSS SYSTEM — chewkee.com */

/* Skip link */
.skip-link {
  position: absolute;
  left: -9999px;
  top: var(--s2);
  z-index: 200;
  padding: var(--s2) var(--s4);
  background: var(--seal-vermillion);
  color: var(--ivory);
  font-family: var(--f-ui);
  font-size: 0.875rem;
  border-radius: var(--r-sm);
  text-decoration: none;
}

.skip-link:focus {
  left: var(--s4);
}

*,
*::before,
*::after { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--f-body);
  font-size: 18px;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--seal-vermillion); text-decoration: none; }
a:hover { color: var(--seal-deep); }
a:focus-visible { outline: 2px solid var(--seal-vermillion); outline-offset: 2px; }

/* Every block of text or content on the page sits inside .container.
   .container provides:
     — max-width via the --container token (1180px),
     — center alignment via margin-inline: auto,
     — and a HORIZONTAL GUTTER via padding-inline.
   No block in <main> is full-bleed unless explicitly opting out via .container--bleed.
*/
.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--s4);
}
@media (min-width: 720px) {
  .container { padding-inline: var(--s5); }
}
@media (min-width: 1100px) {
  .container { padding-inline: var(--s6); }
}
.container--bleed {
  max-width: none;
  padding-inline: 0;
}

.section { padding-block: var(--s9); }

/* === Header === */

.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-block: var(--s3);
  gap: var(--s4);
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--s2);
  text-decoration: none;
  color: var(--text);
  flex-shrink: 0;
}

.brand-wordmark {
  font-family: var(--f-display);
  font-size: 1.25rem;
  letter-spacing: -0.01em;
}

.brand-seal {
  font-family: var(--f-cjk);
  font-size: 1rem;
  color: var(--seal-vermillion);
  line-height: 1;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--s3);
  font-family: var(--f-ui);
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.nav-links a {
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
}

.nav-links a:hover { color: var(--seal-vermillion); }

.btn-cta {
  display: inline-block;
  padding: var(--s2) var(--s4);
  background: var(--seal-vermillion);
  color: var(--ivory) !important;
  border-radius: var(--r-pill);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.75rem;
  transition: background 0.2s;
}

.btn-cta:hover { background: var(--seal-deep); color: var(--ivory) !important; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: var(--s2);
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text);
  display: block;
  transition: transform 0.2s;
}

@media (max-width: 900px) {
  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg);
    padding: var(--s4);
    border-bottom: 1px solid var(--line);
    gap: var(--s4);
    text-align: center;
    z-index: 99;
  }
  .nav-links.active { display: flex; }
  .nav-toggle { display: flex; }
}

/* === Buttons === */

.btn {
  display: inline-block;
  padding: var(--s3) var(--s5);
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  text-decoration: none;
  font-family: var(--f-ui);
  font-size: 0.875rem;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.btn-primary {
  background: var(--seal-vermillion);
  color: var(--ivory);
  border-color: var(--seal-vermillion);
}

.btn-primary:hover {
  background: var(--seal-deep);
  border-color: var(--seal-deep);
  color: var(--ivory);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border-color: var(--line);
}

.btn-outline:hover {
  border-color: var(--seal-vermillion);
  color: var(--seal-vermillion);
}

/* === Footer === */

.site-footer {
  background: var(--soy-glaze);
  color: var(--aged-paper);
  padding: var(--s8) 0 var(--s5);
  font-size: 0.9375rem;
  line-height: 1.6;
}

.site-footer a {
  color: var(--aged-paper);
  text-decoration: none;
}

.site-footer a:hover { color: var(--ivory); }

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 0.6fr;
  gap: var(--s7);
}

.footer-name {
  font-family: var(--f-display);
  font-size: 1.25rem;
  color: var(--ivory);
  margin: 0 0 var(--s3);
}

.footer-col address {
  font-style: normal;
  margin-bottom: var(--s3);
}

.footer-hours {
  margin: 0;
  font-size: 0.875rem;
  color: var(--ink-mute);
}

.footer-nav nav {
  display: flex;
  flex-direction: column;
  gap: var(--s2);
  font-family: var(--f-ui);
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.footer-legal {
  margin-top: var(--s5);
  display: flex;
  gap: var(--s4);
  align-items: center;
  font-size: 0.8125rem;
}

.footer-legal button {
  background: none;
  border: none;
  color: var(--aged-paper);
  cursor: pointer;
  font-family: var(--f-ui);
  font-size: 0.8125rem;
  padding: 0;
}

.footer-legal button:hover { color: var(--ivory); }

.footer-copy {
  margin-top: var(--s7);
  padding-top: var(--s5);
  border-top: 1px solid var(--soy-mid);
  font-size: 0.8125rem;
  color: var(--ink-mute);
}

.footer-copy p { margin: 0; }

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--s6);
  }
}

/* === Home === */

.home-hero {
  position: relative;
  overflow: hidden;
}

.home-hero picture { display: block; }

.home-hero img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

.home-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(26,20,16,0.7) 0%, rgba(26,20,16,0.1) 50%, transparent 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: var(--s8) var(--s4) var(--s7);
}

.home-hero-overlay h1 {
  font-family: var(--f-display);
  font-size: clamp(2rem, 5vw, 3.5rem);
  color: var(--ivory);
  line-height: 1.05;
  margin: 0 0 var(--s3);
  max-width: 700px;
}

.home-hero-overlay p {
  font-family: var(--f-body);
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--aged-paper);
  font-style: italic;
  margin: 0;
  max-width: 560px;
}

.sec-eyebrow {
  font-family: var(--f-ui);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin: 0 0 var(--s2);
}

.sec-heading {
  font-family: var(--f-display);
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  line-height: 1.1;
  margin: 0 0 var(--s5);
  color: var(--text);
}

.sec-rule {
  width: 40px;
  height: 2px;
  background: var(--seal-vermillion);
  border: none;
  margin: 0 0 var(--s5);
}

/* History teaser */
.history-teaser {
  max-width: var(--content);
}

.history-teaser p {
  font-family: var(--f-body);
  font-size: 1.125rem;
  line-height: 1.65;
  margin: 0 0 var(--s4);
}

.history-teaser em { font-style: italic; }

/* Signature dishes grid */
.dishes-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s5);
}

.dish-card {
  background: var(--ivory);
  border-radius: var(--r-md);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.2s;
}

.dish-card:hover { transform: translateY(-2px); }

.dish-card picture { display: block; }

.dish-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.dish-card-body {
  padding: var(--s4);
}

.dish-card-body h3 {
  font-family: var(--f-display);
  font-size: 1.125rem;
  margin: 0 0 var(--s1);
}

.dish-card-body p {
  font-family: var(--f-body);
  font-size: 0.9375rem;
  color: var(--ink-soft);
  margin: 0;
  font-style: italic;
}

@media (max-width: 640px) {
  .dishes-grid { grid-template-columns: 1fr; }
}

/* Visit section */
.visit-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s7);
  align-items: start;
}

.visit-details address {
  font-style: normal;
  font-family: var(--f-body);
  font-size: 1.0625rem;
  line-height: 1.7;
}

.visit-details .visit-label {
  font-family: var(--f-ui);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-mute);
  margin: var(--s4) 0 var(--s1);
}

.visit-details .visit-label:first-child { margin-top: 0; }

.visit-map {
  background: var(--ivory);
  border-radius: var(--r-md);
  padding: var(--s6);
  text-align: center;
  border: 1px solid var(--line);
}

.visit-map a {
  display: inline-block;
  margin-top: var(--s4);
}

@media (max-width: 640px) {
  .visit-grid { grid-template-columns: 1fr; }
}

/* Franchise teaser */
.franchise-teaser {
  max-width: var(--content);
}

.franchise-teaser p {
  font-family: var(--f-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  margin: 0 0 var(--s5);
}

/* Pullquote */
.pullquote {
  text-align: center;
  padding: var(--s9) var(--s4);
  background: var(--aged-paper);
}

.pullquote blockquote {
  font-family: var(--f-display);
  font-size: clamp(1.5rem, 3.5vw, 2.5rem);
  font-style: italic;
  line-height: 1.2;
  color: var(--text);
  margin: 0 auto;
  max-width: 680px;
}

.pullquote blockquote::before { content: "\201C"; }
.pullquote blockquote::after { content: "\201D"; }

.pullquote .seal-mark {
  display: block;
  font-family: var(--f-cjk);
  font-style: normal;
  font-size: 2.5rem;
  color: var(--seal-vermillion);
  margin-top: var(--s5);
}

/* === History === */

.page-masthead {
  padding-block: var(--s9) var(--s7);
  border-bottom: 1px solid var(--line);
}

.page-masthead .sec-num {
  font-family: var(--f-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: var(--ink-mute);
  display: block;
  margin-bottom: var(--s3);
}

.page-masthead h1 {
  font-family: var(--f-display);
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.1;
  margin: 0;
}

.page-masthead .cjk-subhead {
  font-family: var(--f-cjk);
  font-size: 1.5rem;
  color: var(--ink-soft);
  margin-top: var(--s2);
  display: block;
}

.history-intro {
  max-width: var(--content);
  padding-block: var(--s8);
}

.history-intro p {
  font-family: var(--f-body);
  font-size: 1.125rem;
  line-height: 1.65;
  margin: 0 0 var(--s4);
}

.history-intro .cn {
  font-family: var(--f-cjk);
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--ink-soft);
}

/* Hero banner for inner pages */
.page-hero {
  position: relative;
  overflow: hidden;
}

.page-hero img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

.page-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(26,20,16,0.65) 0%, rgba(26,20,16,0.15) 50%, transparent 100%);
  display: flex;
  align-items: flex-end;
  padding: var(--s7) var(--s4);
}

.page-hero-overlay .hero-caption {
  font-family: var(--f-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--aged-paper);
}

/* Timeline */
.timeline {
  padding: var(--s8) 0;
}

.timeline-year {
  padding: var(--s8) 0;
}

.timeline-year + .timeline-year {
  border-top: 1px solid var(--rule);
}

.timeline-year-eyebrow {
  font-family: var(--f-ui);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--seal-vermillion);
  margin: 0 0 var(--s3);
}

.timeline-year-heading {
  display: flex;
  align-items: baseline;
  gap: var(--s4);
  flex-wrap: wrap;
  margin: 0 0 var(--s2);
}

.timeline-year-heading h2 {
  font-family: var(--f-display);
  font-size: clamp(1.375rem, 2.5vw, 1.75rem);
  line-height: 1.15;
  margin: 0;
}

.timeline-year-heading .cjk-title {
  font-family: var(--f-cjk);
  font-size: 1.125rem;
  color: var(--ink-soft);
}

.timeline-meta {
  font-family: var(--f-ui);
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin: 0 0 var(--s5);
}

.timeline-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s7);
}

.timeline-body .en {
  font-family: var(--f-body);
  font-size: 1.0625rem;
  line-height: 1.65;
}

.timeline-body .en p { margin: 0 0 var(--s4); }
.timeline-body .en p:last-child { margin-bottom: 0; }

.timeline-body .cn {
  font-family: var(--f-cjk);
  font-size: 1rem;
  line-height: 1.75;
  color: var(--ink-soft);
}

.timeline-body .cn p { margin: 0 0 var(--s4); }
.timeline-body .cn p:last-child { margin-bottom: 0; }

@media (max-width: 720px) {
  .timeline-body {
    grid-template-columns: 1fr;
    gap: var(--s5);
  }
}

/* Seal divider between year blocks */
.timeline-divider {
  text-align: center;
  padding: var(--s5) 0;
  border-top: 1px solid var(--rule);
}

.timeline-divider .seal-inset {
  font-family: var(--f-cjk);
  font-size: 1.5rem;
  color: var(--seal-vermillion);
  line-height: 1;
}

/* Read-next cards */
.read-next {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s5);
  padding: var(--s8) 0;
  border-top: 1px solid var(--line);
}

.read-next-card {
  background: var(--ivory);
  border-radius: var(--r-md);
  padding: var(--s5);
  border: 1px solid var(--line);
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.2s;
}

.read-next-card:hover {
  border-color: var(--seal-vermillion);
  color: var(--text);
}

.read-next-card .rn-eyebrow {
  font-family: var(--f-ui);
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin: 0 0 var(--s2);
}

.read-next-card .rn-title {
  font-family: var(--f-display);
  font-size: 1.125rem;
  line-height: 1.2;
  margin: 0;
}

@media (max-width: 640px) {
  .read-next { grid-template-columns: 1fr; }
}

/* === / History === */

/* === Menu === */

@supports (view-transition-name: auto) {
  @view-transition { navigation: auto; }
}

.menu-header {
  padding-block: var(--s7) var(--s4);
}

.menu-header h1 {
  font-family: var(--f-display);
  font-size: clamp(2rem, 5vw, 3rem);
  margin: 0;
}

.menu-updated {
  font-family: var(--f-ui);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin: var(--s2) 0 0;
}

/* Action row */
.menu-actions {
  display: flex;
  gap: var(--s3);
  padding-bottom: var(--s5);
  border-bottom: 1px solid var(--line);
}

.action-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--s1);
  padding: var(--s2) var(--s4);
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  background: var(--ivory);
  color: var(--text);
  font-family: var(--f-ui);
  font-size: 0.8125rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.15s;
}

.action-btn:hover {
  border-color: var(--seal-vermillion);
  color: var(--seal-vermillion);
}

/* Menu intro (curated page) */
.menu-intro {
  max-width: var(--content);
  padding-block: var(--s7) var(--s5);
}

.menu-intro p {
  font-family: var(--f-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  margin: 0 0 var(--s4);
}

.menu-intro em { font-style: italic; }

/* Menu body — use padding-block ONLY so .container's padding-inline survives.
   Mixing `padding:` shorthand with `.container` on the same element zeroes
   the horizontal gutter (this used to be a recurring bug — see CLAUDE.md §8.5). */
.menu-body {
  padding-block: var(--s6) var(--s8);
}

/* Phone-only: tighten chrome so 4 full cards fit in the first viewport.
   Two tiers: <= 768px (most phones) and short-viewport boost (<= 820px tall)
   for older iPhones like the XS/X with only 812 CSS pixels of height. */
@media (max-width: 768px) {
  .page-instore-menu:not(.page-instore-menu-b) .menu-header { padding-block: var(--s4) var(--s1); }
  .page-instore-menu:not(.page-instore-menu-b) .menu-header h1 {
    font-size: clamp(2rem, 9vw, 2.5rem);
    margin-block-end: var(--s1);
  }
  .page-instore-menu:not(.page-instore-menu-b) .menu-updated { display: none; }  /* it also appears at the bottom of the page */
  .page-instore-menu:not(.page-instore-menu-b) .menu-body   { padding-block: var(--s3) var(--s7); }
  .page-instore-menu:not(.page-instore-menu-b) .menu-cat    { margin-bottom: var(--s5); }
  .page-instore-menu:not(.page-instore-menu-b) .menu-cat h2 {
    font-size: 1.25rem;
    margin: 0 0 var(--s1);
    padding-bottom: var(--s2);
  }
  .page-instore-menu:not(.page-instore-menu-b) .cat-desc    { margin: var(--s1) 0 var(--s2); }
  .page-instore-menu:not(.page-instore-menu-b) .menu-grid   { margin-top: var(--s2); gap: var(--s3); }

  /* Compact the cards themselves: tighter text padding + smaller name */
  .page-instore-menu:not(.page-instore-menu-b) .menu-item .name  { padding: var(--s2) var(--s3) 0; }
  .page-instore-menu:not(.page-instore-menu-b) .menu-item .price { padding: var(--s1) var(--s3) var(--s2); font-size: 1.0625rem; }
  .page-instore-menu:not(.page-instore-menu-b) .menu-item .item-en { font-size: 0.9375rem; }
}

/* Short viewport (older iPhones XS/X, 812 CSS px tall): squeeze one more
   notch so row 2 names + prices fully clear the sticky bottom nav. */
@media (max-width: 768px) and (max-height: 820px) {
  .page-instore-menu:not(.page-instore-menu-b) .menu-header { padding-block: var(--s3) 0; }
  .page-instore-menu:not(.page-instore-menu-b) .menu-header h1 { font-size: 1.75rem; }
  .page-instore-menu:not(.page-instore-menu-b) .menu-body   { padding-block: var(--s2) var(--s6); }
  .page-instore-menu:not(.page-instore-menu-b) .menu-cat h2 { font-size: 1.125rem; }
  .page-instore-menu:not(.page-instore-menu-b) .menu-item .thumb { aspect-ratio: 5 / 4; }  /* shorter image */
}

/* Category */
.menu-cat {
  margin-bottom: var(--s7);
  scroll-margin-top: var(--s8);
}

.menu-cat h2 {
  font-family: var(--f-display);
  font-size: clamp(1.375rem, 2.5vw, 1.75rem);
  line-height: 1.15;
  margin: 0 0 var(--s2);
  padding-bottom: var(--s3);
  border-bottom: 2px solid var(--seal-vermillion);
}

.menu-cat h2 .cat-zh {
  font-family: var(--f-cjk);
  font-size: 0.9em;
  color: var(--ink-soft);
  font-weight: normal;
}

.cat-desc {
  font-family: var(--f-ui);
  font-size: 0.8125rem;
  color: var(--ink-mute);
  margin: var(--s2) 0 var(--s4);
}

.cat-footnote {
  font-family: var(--f-ui);
  font-size: 0.75rem;
  color: var(--ink-mute);
  margin: var(--s4) 0 0;
  font-style: italic;
}

/* ─────────────────────────────────────────────────────────────────────
   Card-size toggle (Layout A only).  Tab-style dual buttons next to the
   "Menu" H1.  No outer pill chrome — each button stands on its own;
   active button gets a thin ink-black underline and full-color icon.
   ───────────────────────────────────────────────────────────────────── */
.menu-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s3);
}
.view-toggle {
  display: inline-flex;
  gap: var(--s1);
  flex-shrink: 0;
}
.view-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  color: var(--ink-mute);
  cursor: pointer;
  border-radius: var(--r-sm);
  position: relative;
  transition: color 0.15s, background 0.15s;
}
.view-btn::after {            /* underline indicator for active state */
  content: "";
  position: absolute;
  left: 18%;
  right: 18%;
  bottom: 3px;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.18s ease;
}
.view-btn:hover {
  color: var(--ink-black);
}
.view-btn[aria-pressed="true"] {
  color: var(--ink-black);
}
.view-btn[aria-pressed="true"]::after {
  transform: scaleX(1);
}
.view-btn:focus-visible {
  outline: 2px solid var(--seal-vermillion);
  outline-offset: 2px;
}

/* When the "Larger" button is active, force the grid to 1 column at every
   breakpoint.  This is the accessibility-friendly mode: one big card per
   row, full image, easy to read text. */
.page-instore-menu.view-large .menu-grid {
  grid-template-columns: 1fr !important;
  max-width: 520px;        /* don't let single cards stretch absurdly wide on desktop */
  margin-inline: auto;
}
.page-instore-menu.view-large .menu-item .thumb {
  aspect-ratio: 16 / 10;   /* slightly cinematic so the dish breathes */
}
.page-instore-menu.view-large .menu-item .item-en {
  font-size: 1.125rem;
}
.page-instore-menu.view-large .menu-item .price {
  font-size: 1.25rem;
}

/* Menu grid — responsive card layout.
   TWO-UP (default toggle state): 2 col phone → 3 tablet → 4 desktop.
   LARGER toggle state: 1 col everywhere (see .view-large rule below). */
.menu-grid {
  display: grid;
  gap: var(--s4);
  grid-template-columns: repeat(2, 1fr);
  margin-top: var(--s4);
}

@media (min-width: 768px) {
  .menu-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1024px) {
  .menu-grid { grid-template-columns: repeat(4, 1fr); }
}

/* Menu item card */
.menu-item {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--aged-paper);
  border-radius: var(--r-md);
  overflow: hidden;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  font-size: 1rem;
}

.menu-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: var(--rule);
}

.page-instore-menu:not(.page-instore-menu-b) .menu-item {
  font-size: 1.0625rem;
}

.menu-item .name {
  padding: var(--s3) var(--s4) 0;
  flex: 1;
  min-width: 0;
}

.menu-item .item-en {
  font-family: var(--f-body);
  font-weight: 500;
}

.menu-item .item-zh {
  font-family: var(--f-cjk);
  font-size: 0.9em;
  color: var(--ink-soft);
}

.menu-item .item-portion {
  font-family: var(--f-ui);
  font-size: 0.6875rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-mute);
  display: block;
}

/* Card photo. Rendered as <button class="thumb"> when an image exists
   (clickable, opens the lightbox at any breakpoint), or as
   <span class="thumb empty"> for items without a photo (those get the
   stylized brand stamp, non-clickable). */
.menu-item .thumb {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  background: var(--aged-paper);
  /* Reset <button> defaults */
  border: 0;
  padding: 0;
  margin: 0;
  cursor: zoom-in;
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  overflow: hidden;
}

.menu-item .thumb:focus-visible {
  outline: 2px solid var(--seal-vermillion);
  outline-offset: -2px;
}

.menu-item .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.menu-item:hover .thumb img {
  transform: scale(1.05);
}

.menu-item .thumb:focus-visible {
  outline: 2px solid var(--seal-vermillion);
  outline-offset: -2px;
}

/* No-photo card: brand stamp 剣記 on parchment instead of an empty box */
.menu-item .thumb.empty {
  cursor: default;
  background: linear-gradient(135deg, var(--aged-paper) 0%, var(--parchment) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}
.menu-item .thumb.empty::after {
  content: "剣記";
  font-family: var(--f-cjk);
  font-size: clamp(2rem, 6vw, 3rem);
  color: var(--seal-vermillion);
  opacity: 0.25;
  letter-spacing: 0.1em;
}

@media print {
  .menu-item .thumb { display: none; }
}

/* ─────────────────────────────────────────────────────────────────────
   Layout B — compact card variant at /instore-menu-b/

   2 cols on phone, 3 on phablet, 4 on tablet, 5 on desktop.  Square
   aspect.  Smaller typography.  Lightbox disabled (small cards already
   render the photo at lightbox-equivalent size).
   ───────────────────────────────────────────────────────────────────── */

/* Layout B is the dense compact view — meaningfully more cards-per-row
   than Layout A at every breakpoint, so the visual difference is obvious. */
.page-instore-menu-b .menu-grid {
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s2);
}
@media (min-width: 480px) {
  .page-instore-menu-b .menu-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (min-width: 768px) {
  .page-instore-menu-b .menu-grid { grid-template-columns: repeat(5, 1fr); gap: var(--s3); }
}
@media (min-width: 1024px) {
  .page-instore-menu-b .menu-grid { grid-template-columns: repeat(6, 1fr); }
}

.page-instore-menu-b .menu-item {
  font-size: 0.8125rem;
}
.page-instore-menu-b .menu-item .item-en {
  font-size: 0.8125rem;
  line-height: 1.25;
}
.page-instore-menu-b .menu-item .item-zh {
  display: none; /* not enough room for bilingual at 3-up on phone */
}
/* B uses square aspect (vs A's 4:3) — denser grid fits more cards. */
.page-instore-menu-b .menu-item .thumb {
  aspect-ratio: 1 / 1;
}
.page-instore-menu-b .menu-item .thumb img {
  /* Disable the hover-zoom on Layout B — too jittery at small sizes */
  transition: none;
}
.page-instore-menu-b .menu-item:hover .thumb img {
  transform: none;
}
.page-instore-menu-b .menu-item .name {
  padding: var(--s1) var(--s2) 0;
}
.page-instore-menu-b .menu-item .item-portion {
  display: none; /* portion text feels noisy at compact size */
}
.page-instore-menu-b .menu-item .price {
  padding: 0 var(--s2) var(--s2);
  font-size: 0.875rem;
}
.page-instore-menu-b .menu-item .thumb.empty::after {
  font-size: clamp(1.25rem, 4vw, 1.75rem);
}

/* Layout switch link in the menu footer */
.layout-switch {
  margin-top: var(--s4);
  text-align: center;
}
.layout-switch a {
  font-family: var(--f-ui);
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-mute);
  text-decoration: none;
  padding: var(--s2) var(--s4);
  border-radius: var(--r-pill);
  border: 1px solid var(--rule);
  transition: color 0.15s, background 0.15s;
}
.layout-switch a:hover {
  color: var(--seal-vermillion);
  background: var(--aged-paper);
}

/* Lightbox dialog (in-store menu).  Uses native <dialog> + ::backdrop.
   On browsers without <dialog>, JS no-ops and the thumb does nothing. */
.lightbox[open] {
  border: 0;
  padding: 0;
  background: transparent;
  max-width: 95vw;
  max-height: 95vh;
  width: auto;
  overflow: visible;
}
.lightbox::backdrop {
  background: rgba(26, 20, 16, 0.85);
  backdrop-filter: blur(4px);
}
.lightbox figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s3);
}
.lightbox img {
  max-width: 90vw;
  max-height: 80vh;
  width: auto;
  height: auto;
  border-radius: var(--r-md);
  box-shadow: 0 20px 60px -20px rgba(0, 0, 0, 0.6);
  background: var(--surface);
  /* Source images are small (96–300 px). Allow the browser to upscale
     with smooth interpolation rather than aggressive pixelation. */
  image-rendering: auto;
}
.lightbox figcaption {
  color: var(--ivory);
  font-family: var(--f-body);
  font-size: 1.0625rem;
  text-align: center;
  max-width: 90vw;
}
.lightbox-close {
  position: absolute;
  top: -44px;
  right: 0;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: var(--r-pill);
  background: var(--ivory);
  color: var(--ink-black);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox-close:hover,
.lightbox-close:focus-visible {
  background: var(--seal-vermillion);
  color: var(--ivory);
  outline: none;
}

.menu-item .leader { display: none; }

.menu-item .price {
  padding: var(--s2) var(--s4) var(--s4);
  font-family: var(--f-ui);
  font-size: 1.125rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: var(--seal-vermillion);
  white-space: nowrap;
}

.page-instore-menu:not(.page-instore-menu-b) .menu-item .price {
  font-size: 1.1875rem;
}

.menu-item .item-portion {
  margin-top: var(--s1);
}

/* Bottom sticky TOC (mobile) */
.menu-toc {
  position: sticky;
  bottom: 0;
  z-index: 50;
  background: var(--bg);
  box-shadow: 0 -1px 0 var(--rule);
  padding-block: var(--s2);
  padding-bottom: calc(var(--s2) + env(safe-area-inset-bottom, 0px));
}

.menu-toc-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding-inline: var(--s3);
  display: flex;
  gap: var(--s2);
  justify-content: space-between;   /* spread chips evenly so they fit phone */
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  scroll-snap-type: x proximity;
}

.menu-toc-inner > a {
  scroll-snap-align: start;
}

.menu-toc-inner::-webkit-scrollbar { display: none; }

.menu-toc a,
.menu-toc-aside a {
  font-family: var(--f-ui);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-soft);
  text-decoration: none;
  white-space: nowrap;
  padding: var(--s1) var(--s2);
  border-radius: var(--r-sm);
  transition: color 0.15s, background 0.15s;
}

.menu-toc a:hover,
.menu-toc-aside a:hover {
  color: var(--seal-vermillion);
  background: var(--aged-paper);
}

/* Desktop aside TOC */
.menu-toc-aside {
  display: none;
}

@media (min-width: 880px) {
  .menu-toc { display: none; }
  .menu-toc-aside {
    display: flex;
    flex-direction: column;
    gap: var(--s2);
    position: sticky;
    top: calc(60px + var(--s5));
    float: right;
    width: 160px;
    margin-right: calc(-160px - var(--s7));
    padding: var(--s4) 0;
  }
}

@media (min-width: 880px) and (max-width: 1200px) {
  .menu-toc-aside { display: none; }
  .menu-toc { display: block; }
}

/* Menu footer note */
.menu-footer-note {
  padding-block: var(--s5) var(--s8);
  border-top: 1px solid var(--line);
  font-family: var(--f-ui);
  font-size: 0.8125rem;
  color: var(--ink-mute);
}

.menu-footer-note p { margin: 0 0 var(--s3); }

/* === / Menu === */

/* === Contact / Delivery / Franchise === */

/* Hours table */
.hours-table {
  margin: var(--s3) 0 var(--s4);
}

.hours-row {
  display: flex;
  align-items: baseline;
  gap: var(--s2);
  padding: var(--s2) 0;
  font-family: var(--f-ui);
  font-size: 0.9375rem;
  font-variant-numeric: tabular-nums;
}

.hours-day {
  flex-shrink: 0;
  width: 110px;
}

.hours-row .leader {
  flex: 1;
  border-bottom: 1px dotted var(--rule);
  align-self: end;
  margin-bottom: 0.35em;
  min-width: 10px;
}

.hours-time {
  flex-shrink: 0;
  font-weight: 500;
}

.hours-closed .hours-time {
  color: var(--seal-vermillion);
  font-weight: 600;
}

/* Contact action buttons */
.contact-actions {
  display: flex;
  gap: var(--s3);
  padding-top: var(--s5);
}

/* Press contact card */
.press-contact {
  background: var(--ivory);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: var(--s5);
  margin: var(--s5) 0;
  max-width: 360px;
}

.press-contact p { margin: 0 0 var(--s2); }
.press-contact p:last-child { margin-bottom: 0; }

/* Delivery router */
.delivery-router {
  text-align: center;
  padding-block: var(--s8) var(--s6);
}

.delivery-buttons {
  display: flex;
  flex-direction: column;
  gap: var(--s4);
  max-width: 320px;
  margin: 0 auto var(--s5);
}

.btn-lg {
  padding: var(--s4) var(--s6);
  font-size: 1rem;
  text-align: center;
}

.delivery-phone {
  font-family: var(--f-ui);
  font-size: 0.875rem;
  color: var(--ink-mute);
}

/* Map iframe */
.visit-map iframe {
  width: 100%;
  height: 400px;
  border: 0;
  border-radius: var(--r-md);
}

/* === / Contact / Delivery / Franchise === */

/* === Recipes === */

/* Recipe index grid */
.recipe-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s5);
  padding: var(--s7) 0;
}

.recipe-card {
  background: var(--ivory);
  border-radius: var(--r-md);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.2s;
  text-decoration: none;
  color: var(--text);
  display: block;
}

.recipe-card:hover {
  transform: translateY(-2px);
  color: var(--text);
}

.recipe-card picture { display: block; }

.recipe-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.recipe-card-body {
  padding: var(--s4);
}

.recipe-card-body h2 {
  font-family: var(--f-display);
  font-size: 1.125rem;
  margin: 0 0 var(--s1);
}

.recipe-card-body p {
  font-family: var(--f-body);
  font-size: 0.9375rem;
  color: var(--ink-soft);
  margin: 0 0 var(--s2);
  font-style: italic;
}

.recipe-card-meta {
  font-family: var(--f-ui);
  font-size: 0.75rem;
  color: var(--ink-mute);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* Recipe post layout */
.recipe-meta-strip {
  display: flex;
  gap: var(--s5);
  font-family: var(--f-ui);
  font-size: 0.8125rem;
  font-variant-numeric: tabular-nums;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-mute);
  padding: var(--s4) 0;
  border-bottom: 1px solid var(--line);
  margin-bottom: var(--s6);
  flex-wrap: wrap;
}

.recipe-meta-strip span {
  white-space: nowrap;
}

.recipe-layout {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: var(--s7);
  padding-bottom: var(--s8);
}

@media (max-width: 720px) {
  .recipe-layout { grid-template-columns: 1fr; }
}

.recipe-ingredients h2,
.recipe-steps h2 {
  font-family: var(--f-display);
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  margin: 0 0 var(--s4);
}

.recipe-ingredients ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.recipe-ingredients li {
  padding: var(--s2) 0;
  border-bottom: 1px solid var(--aged-paper);
  font-family: var(--f-body);
  font-size: 1.0625rem;
  line-height: 1.5;
}

.recipe-ingredients li:last-child { border-bottom: none; }

.recipe-steps ol {
  padding-left: var(--s5);
  margin: 0;
}

.recipe-steps li {
  padding: var(--s3) 0;
  font-family: var(--f-body);
  font-size: 1.0625rem;
  line-height: 1.65;
}

.recipe-notes {
  background: var(--aged-paper);
  border-radius: var(--r-md);
  padding: var(--s5);
  margin-top: var(--s7);
}

.recipe-notes p {
  font-family: var(--f-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  font-style: italic;
  margin: 0;
}

.recipe-section-label {
  font-family: var(--f-ui);
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--seal-vermillion);
  margin: var(--s6) 0 var(--s3);
}

.recipe-section-label:first-child { margin-top: 0; }

.recipe-cta {
  text-align: center;
  padding-block: var(--s7) var(--s8);
  font-family: var(--f-body);
  font-size: 1.0625rem;
  color: var(--ink-soft);
}

@media (max-width: 640px) {
  .recipe-grid { grid-template-columns: 1fr; }
}

/* === / Recipes === */
