:root {
  --paper: #f4ecd9;
  --paper-deep: #ead9b8;
  --ink: #2a1f12;
  --ink-soft: #6b5a46;
  --ink-muted: #8f7e6a;
  --accent: #8a2426;
  --accent-dark: #6a1a1c;
  --rule: #b89c6e;
  --shadow: 0 14px 32px -14px rgba(60, 40, 20, 0.35);
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  font-family: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  color: var(--ink);
  background:
    radial-gradient(ellipse at 20% -10%, rgba(138, 36, 38, 0.08), transparent 60%),
    radial-gradient(ellipse at 100% 100%, rgba(60, 40, 20, 0.12), transparent 60%),
    repeating-linear-gradient(
      0deg,
      transparent 0 2px,
      rgba(90, 60, 30, 0.015) 2px 4px
    ),
    var(--paper);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.15  0 0 0 0 0.1  0 0 0 0 0.05  0 0 0 0.08 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.6;
}

.paper {
  position: relative;
  z-index: 1;
  max-width: 1240px;
  margin: 0 auto;
  padding: 40px 28px 24px;
  padding-left: max(28px, env(safe-area-inset-left));
  padding-right: max(28px, env(safe-area-inset-right));
}

/* ── Header ─────────────────────── */

.masthead {
  text-align: center;
  padding: 18px 0 24px;
}
.masthead h1 {
  font-family: "Playfair Display", "Cormorant Garamond", Georgia, serif;
  font-size: clamp(2.4rem, 6vw, 4.4rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  margin: 6px 0 2px;
  color: var(--ink);
  text-shadow: 0 1px 0 rgba(255,255,255,0.4);
}
.masthead .tagline {
  font-style: italic;
  font-size: 1.15rem;
  color: var(--accent);
  margin: 0 0 2px;
  letter-spacing: 0.02em;
}
.masthead .dateline {
  font-size: 1rem;
  color: var(--ink-soft);
  margin: 10px 0 2px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.masthead .clock {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.35rem;
  color: var(--accent);
  margin: 0 0 4px;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.rule {
  height: 1px;
  background: linear-gradient(to right, transparent, var(--rule) 20%, var(--rule) 80%, transparent);
  position: relative;
  margin: 0 auto;
  max-width: 720px;
}
.rule::before, .rule::after {
  content: "✦";
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: var(--rule);
  background: var(--paper);
  padding: 0 10px;
  font-size: 0.8rem;
}
.rule.top::before { left: 50%; transform: translate(-50%,-50%); }
.rule.bottom::before { left: 50%; transform: translate(-50%,-50%); }
.rule.top::after { display: none; }
.rule.bottom::after { display: none; }
.rule.top { margin-bottom: 4px; }
.rule.bottom { margin-top: 18px; }

/* ── Nav ─────────────────────── */

.daynav {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  margin: 6px 0 28px;
}
.daynav a {
  font-family: inherit;
  font-size: 1rem;
  color: var(--ink-soft);
  text-decoration: none;
  padding: 8px 18px;
  border: 1px solid transparent;
  border-radius: 999px;
  transition: all 0.15s ease;
  letter-spacing: 0.04em;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
}
.daynav a:hover {
  color: var(--ink);
  border-color: var(--rule);
}
.daynav a.active {
  background: var(--accent);
  color: var(--paper);
  border-color: var(--accent-dark);
  font-weight: 600;
}

/* ── Grid ─────────────────────── */

.menu-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 28px;
  margin-top: 8px;
}

.shop-card {
  flex: 0 1 340px;
  max-width: 420px;
}

.msg {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--ink-muted);
  font-style: italic;
  padding: 40px 20px;
  font-size: 1.1rem;
}
.msg.error { color: var(--accent); font-style: normal; }

/* ── Shop Card ─────────────────────── */

.shop-card {
  background:
    linear-gradient(to bottom, rgba(255,255,255,0.35), rgba(255,255,255,0)),
    #fbf4e2;
  border: 1px solid rgba(184, 156, 110, 0.45);
  border-radius: 4px;
  padding: 28px 28px 20px;
  box-shadow: var(--shadow);
  position: relative;
  flex: 0 1 340px;
  max-width: 420px;
}
.shop-card::before,
.shop-card::after {
  content: "";
  position: absolute;
  inset: 6px;
  border: 1px solid rgba(184, 156, 110, 0.35);
  border-radius: 2px;
  pointer-events: none;
}
.shop-card::after {
  inset: 10px;
  border-color: rgba(184, 156, 110, 0.18);
}

.shop-head {
  text-align: center;
  margin-bottom: 16px;
}
.shop-head h2 {
  font-family: "Playfair Display", "Cormorant Garamond", Georgia, serif;
  font-size: 1.7rem;
  margin: 0 0 6px;
  color: var(--ink);
  font-weight: 700;
  letter-spacing: 0.01em;
}
.shop-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--rule);
  font-size: 0.7rem;
  margin-top: 4px;
}
.shop-divider::before,
.shop-divider::after {
  content: "";
  flex: 1;
  max-width: 60px;
  height: 1px;
  background: var(--rule);
}
.shop-divider span { margin: 0 10px; }

.dishes {
  list-style: none;
  padding: 0;
  margin: 12px 0 18px;
}
.dishes li {
  display: flex;
  align-items: baseline;
  gap: 6px;
  padding: 10px 2px;
  border-bottom: 1px dashed rgba(184, 156, 110, 0.35);
  font-size: 1.02rem;
  line-height: 1.35;
}
.dishes li:last-child { border-bottom: none; }
.dish-name {
  flex: 0 1 auto;
  color: var(--ink);
}
.dish-note {
  display: inline-block;
  font-style: italic;
  color: var(--accent);
  font-size: 0.85rem;
  margin-right: 6px;
  letter-spacing: 0.03em;
}
.dots {
  flex: 1;
  border-bottom: 1px dotted var(--rule);
  margin: 0 8px;
  transform: translateY(-4px);
  min-width: 20px;
}
.dish-price {
  color: var(--accent-dark);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.05rem;
}
.dish-empty {
  justify-content: center;
  color: var(--ink-muted);
  font-style: italic;
}

.shop-order {
  margin: 10px 0 2px;
  padding: 10px 12px;
  background: rgba(138, 36, 38, 0.06);
  border: 1px solid rgba(138, 36, 38, 0.18);
  border-radius: 4px;
  text-align: center;
  font-size: 0.95rem;
  color: var(--accent-dark);
}
.shop-order .tel {
  color: var(--accent-dark);
  text-decoration: none;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  border-bottom: 1px dotted var(--accent);
}
.shop-order .tel:hover { color: var(--accent); }

.shop-foot {
  margin-top: 12px;
  padding-top: 8px;
  border-top: 1px solid rgba(184, 156, 110, 0.3);
  text-align: center;
  font-size: 0.82rem;
  color: var(--ink-muted);
  font-style: italic;
  letter-spacing: 0.02em;
}
.shop-foot .src {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px dotted var(--accent);
}
.shop-foot .src:hover { color: var(--accent-dark); }

/* ── Footer ─────────────────────── */

.foot {
  text-align: center;
  padding: 40px 20px 24px;
  color: var(--ink-muted);
  font-size: 0.85rem;
  font-style: italic;
}
.foot-inner {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  align-items: center;
  max-width: 900px;
}
.foot .sep { opacity: 0.5; }
.foot a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px dotted var(--accent);
}
.foot a:hover { color: var(--accent-dark); }

/* ── Legal pages ─────────────────────── */

.legal {
  max-width: 780px;
  margin: 0 auto;
  background: #fbf4e2;
  border: 1px solid rgba(184, 156, 110, 0.45);
  border-radius: 4px;
  padding: 40px 44px;
  box-shadow: var(--shadow);
  font-family: "Georgia", "Cormorant Garamond", serif;
  color: var(--ink);
  line-height: 1.65;
}
.legal h1 {
  font-family: "Playfair Display", "Cormorant Garamond", Georgia, serif;
  font-size: 2rem;
  margin: 0 0 8px;
  text-align: center;
}
.legal h2 {
  font-family: "Playfair Display", "Cormorant Garamond", Georgia, serif;
  font-size: 1.3rem;
  margin: 32px 0 10px;
  color: var(--accent-dark);
}
.legal h3 {
  font-size: 1.05rem;
  margin: 22px 0 6px;
  color: var(--ink);
}
.legal p, .legal ul { margin: 8px 0; }
.legal ul { padding-left: 22px; }
.legal .back {
  display: inline-block;
  margin-top: 28px;
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px dotted var(--accent);
}
.legal .back:hover { color: var(--accent-dark); }
.legal .subtitle {
  text-align: center;
  color: var(--ink-soft);
  font-style: italic;
  margin: 0 0 18px;
}
.legal address { font-style: normal; margin: 4px 0; }

/* ── Mobile / Tablet ─────────────────────── */

@media (max-width: 760px) {
  .paper { padding: 28px 20px 16px; }
  .menu-grid { gap: 20px; margin-top: 4px; }
  .shop-card { max-width: none; flex: 1 1 100%; }
  .masthead { padding: 10px 0 18px; }
  .masthead .tagline { font-size: 1.02rem; }
  .masthead .clock { font-size: 1.2rem; }
  .daynav {
    margin: 4px -20px 22px;
    padding: 0 20px;
    overflow-x: auto;
    flex-wrap: nowrap;
    scroll-snap-type: x mandatory;
    justify-content: flex-start;
    scrollbar-width: none;
  }
  .daynav::-webkit-scrollbar { display: none; }
  .daynav a { flex: 0 0 auto; scroll-snap-align: start; font-size: 0.95rem; padding: 7px 14px; }
}

@media (max-width: 520px) {
  .paper {
    padding: 22px 16px 12px;
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
  }
  .masthead .tagline { font-size: 0.95rem; }
  .masthead .dateline { font-size: 0.85rem; letter-spacing: 0.05em; }
  .masthead .clock { font-size: 1.1rem; }
  .rule { max-width: 320px; }
  .shop-card { padding: 22px 18px 14px; border-radius: 3px; }
  .shop-card::before { inset: 5px; }
  .shop-card::after { inset: 8px; }
  .shop-head h2 { font-size: 1.38rem; }
  .shop-divider::before, .shop-divider::after { max-width: 40px; }
  .dishes { margin: 10px 0 14px; }
  .dishes li {
    font-size: 0.98rem;
    padding: 9px 0;
    flex-wrap: wrap;
    row-gap: 2px;
    align-items: baseline;
  }
  .dots { min-width: 14px; margin: 0 6px; }
  .dish-name { flex: 1 1 100%; }
  .dish-price {
    flex: 0 0 auto;
    margin-left: auto;
    font-size: 1rem;
  }
  .dishes li .dots { display: none; }
  .dishes li .dish-price::before {
    content: "";
    display: inline-block;
    vertical-align: middle;
    border-bottom: 1px dotted var(--rule);
    width: 24px;
    margin-right: 8px;
    transform: translateY(-3px);
  }
  .shop-foot { font-size: 0.78rem; }
  .foot { padding: 28px 12px 20px; font-size: 0.8rem; }
  .foot-inner { gap: 6px; }
  .foot .sep { font-size: 0.7rem; }
  .legal { padding: 26px 20px; border-radius: 3px; }
  .legal h1 { font-size: 1.65rem; }
  .legal h2 { font-size: 1.15rem; margin-top: 26px; }
  .legal h3 { font-size: 1rem; }
  .legal p, .legal ul, .legal address { font-size: 0.98rem; }
  .legal .back { font-size: 0.98rem; }
}

@media (max-width: 360px) {
  .daynav a { padding: 6px 12px; font-size: 0.9rem; }
  .shop-card { padding: 18px 14px 12px; }
  .shop-head h2 { font-size: 1.25rem; }
  .dishes li { font-size: 0.94rem; }
}

@media (hover: hover) {
  .shop-card:hover {
    transform: translateY(-2px);
    transition: transform 0.2s ease;
  }
}
