:root {
  --ink: #382a1e;
  --cream: #f7f3eb;
  font-family: system-ui, sans-serif;
  color: var(--ink);
}

* { box-sizing: border-box; }
body { margin: 0; }
a { color: inherit; }
button { font: inherit; }

.skip-link {
  position: fixed;
  left: 12px;
  top: 12px;
  z-index: 2;
  padding: 12px;
  background: var(--cream);
  transform: translateY(-180%);
}

.skip-link:focus { transform: none; }

.nav {
  position: sticky;
  top: 0;
  z-index: 1;
  align-items: center;
  padding-inline: max(14px, calc((100% - 860px) / 2));
  border-bottom: 1px solid;
}

.nav-icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
}

.nav-menu a {
  display: inline-grid;
  min-height: 44px;
  place-items: center;
  border-bottom: 2px solid;
  font-weight: 600;
  text-decoration: none;
}

.restaurant-menu-page {
  background: #f7f3eb;
}

.restaurant-menu-page .nav {
  display: flex;
  height: 64px;
  background: #f7f3eb;
  border-color: #ded4c4;
}

.restaurant-menu-page .nav-menu {
  margin: 0 10px 0 auto;
}

.restaurant-menu {
  width: min(100%, 860px);
  margin-inline: auto;
  padding: clamp(22px, 5vw, 54px) 14px 56px;
  scroll-margin-top: 76px;
}

.restaurant-menu h1 {
  text-align: center;
  font-size: clamp(36px, 7vw, 58px);
  line-height: 1.05;
  margin: 0 0 20px;
}

.menu-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.menu-switch > input {
  position: absolute;
  width: 1px;
  height: 1px;
  clip-path: inset(50%);
}

.menu-switch > label {
  display: grid;
  gap: 2px;
  padding: 10px 6px;
  border: 1px solid #ddcfbe;
  border-radius: 12px;
  background: #fffaf1;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
}

.menu-switch > label span {
  font-size: 0.8125rem;
  font-weight: 400;
  font-variant-numeric: tabular-nums;
}

.menu-switch > input:checked + label {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--cream);
}

.menu-switch > input:focus-visible + label {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.menu-panel {
  display: none;
  grid-column: 1 / -1;
  min-width: 0;
}

#meal-lunch:checked ~ #lunch-menu,
#meal-dinner:checked ~ #dinner-menu {
  display: grid;
  gap: 12px;
}

.menu-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0 8px;
  padding: 0 2px;
  font-size: 0.8125rem;
}

.original-menu {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.menu-zoom-hint {
  margin: 0;
  color: #665447;
}

.menu-sheet {
  display: block;
  overflow: hidden;
  border: 1px solid #e6dacb;
  border-radius: 10px;
  background: #fffaf1;
  box-shadow: 0 3px 9px rgb(57 41 29 / 7%);
  cursor: zoom-in;
}

.menu-sheet img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1500 / 1061;
}

.menu-viewer {
  position: fixed;
  inset: 0;
  width: min(100%, 1100px);
  max-width: none;
  max-height: 100%;
  max-height: 100dvh;
  margin: auto;
  padding: 0;
  border: 0;
  background: #f7f3eb;
  color: var(--ink);
}

.menu-viewer[open] {
  display: flex;
  flex-direction: column;
}

.menu-viewer::backdrop {
  background: rgb(32 23 16 / 72%);
}

.menu-viewer-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 14px 0;
}

.menu-viewer-bar h2 {
  margin: 0;
  font-size: 1rem;
}

.menu-viewer-bar button {
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--ink);
  border-radius: 8px;
  background: var(--ink);
  color: var(--cream);
  cursor: pointer;
}

.menu-viewer-controls {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
}

.menu-viewer-controls p {
  margin: 0;
  font-size: 0.8125rem;
  text-align: center;
}

.menu-viewer-controls button {
  min-height: 44px;
  border: 1px solid var(--ink);
  border-radius: 8px;
  background: var(--ink);
  color: var(--cream);
  font-size: 1.375rem;
  cursor: pointer;
}

.menu-viewer-controls button[aria-disabled="true"] {
  opacity: 0.4;
  cursor: default;
}

.menu-viewer-scroll {
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  padding-bottom: env(safe-area-inset-bottom);
}

.menu-viewer-scroll img {
  display: block;
  width: max(1080px, 100%);
  max-width: none;
  height: auto;
  aspect-ratio: 1500 / 1061;
}

@media (max-width: 600px) {
  .menu-viewer {
    height: 100%;
    height: 100dvh;
  }
}
