:root {
  --ivory: #FAF6EE;
  --paper: #FFFDF8;
  --ink: #2B2D27;
  --muted: #64655B;
  --line: #E6DFD0;
  --line-strong: #CFC6B3;
  --placeholder: #EDE6D7;
  --accent: #6B2737;
  --on-accent: #FFFFFF;
  --accent-ink: #6B2737;
  --accent-soft: #E3D5D1;
  --accent-line: rgba(107, 39, 55, 0.55);
  --detail: #A8864A;
  --detail-line: rgba(168, 134, 74, 0.6);
  --viewer-bg: #1B1D19;
  --viewer-text: #F5F1E8;
  --serif: "Cormorant Garamond", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --dock-h: 176px;
  --shadow-soft: 0 1px 2px rgba(43, 45, 39, 0.06), 0 8px 24px -12px rgba(43, 45, 39, 0.22);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

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

[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--ivory);
}

html.is-locked,
html.is-locked body {
  overflow: hidden;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--ivory);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

button,
input {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

:focus-visible {
  outline: 3px solid var(--accent-ink);
  outline-offset: 2px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.page {
  padding-right: env(safe-area-inset-right);
  padding-bottom: calc(var(--dock-h) + 8px);
  padding-left: env(safe-area-inset-left);
}

.masthead {
  padding: calc(env(safe-area-inset-top) + 48px) 24px 32px;
  text-align: center;
}

.monogram {
  width: 132px;
  aspect-ratio: var(--logo-ratio, 1.2);
  margin: 0 auto 24px;
  background-color: var(--detail);
  -webkit-mask: var(--logo) center / contain no-repeat;
  mask: var(--logo) center / contain no-repeat;
}

.names {
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.9rem, 13.5vw, 4.75rem);
  line-height: 0.98;
  letter-spacing: -0.01em;
  overflow-wrap: break-word;
}

.names .name,
.names .amp {
  display: block;
}

.names .amp {
  margin: 0.04em 0 0.02em;
  font-style: italic;
  font-size: 0.72em;
  line-height: 1;
  color: var(--detail);
}

.masthead.has-logo .names {
  font-size: clamp(2.1rem, 9.6vw, 3.6rem);
  line-height: 1.08;
  text-wrap: balance;
}

.masthead.has-logo .names .name,
.masthead.has-logo .names .amp {
  display: inline;
}

.masthead.has-logo .names .amp {
  margin: 0 0.02em;
  font-size: 0.82em;
}

.date {
  margin: 18px 0 0;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: 1.35rem;
  line-height: 1.3;
  color: var(--muted);
}

.date:empty {
  display: none;
}

.tagline {
  max-width: 27ch;
  margin: 14px auto 0;
  font-size: 1.0625rem;
  color: var(--muted);
  text-wrap: balance;
}

.tagline::before {
  content: "";
  display: block;
  width: 36px;
  height: 1px;
  margin: 0 auto 14px;
  background: var(--detail-line);
}

.tagline:empty {
  display: none;
}

.menu-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
}

.menu-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 20px 0 16px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--accent-ink);
  box-shadow: inset 0 0 0 1px var(--accent-line);
  font-size: 1rem;
  font-weight: 500;
  touch-action: manipulation;
}

.menu-link svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.gallery {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 4px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
}

.grid:empty {
  display: none;
}

.cell {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  padding: 0;
  border: 0;
  border-radius: 4px;
  overflow: hidden;
  background: var(--placeholder);
}

.cell:focus-visible {
  outline-offset: -3px;
}

.cell img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.35s ease;
}

.cell.is-loaded img {
  opacity: 1;
}

.cell.is-new.is-loaded img {
  animation: develop 1.8s var(--ease-out) both;
}

@keyframes develop {
  0% {
    opacity: 0;
    filter: sepia(0.7) brightness(1.35) contrast(0.8) blur(6px);
    transform: scale(1.06);
  }
  35% {
    opacity: 1;
  }
  100% {
    opacity: 1;
    filter: none;
    transform: none;
  }
}

.cell.is-broken::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 28px;
  height: 28px;
  border: 1.5px solid var(--line-strong);
  border-radius: 6px;
}

.skel {
  aspect-ratio: 1 / 1;
  border-radius: 4px;
  background: linear-gradient(100deg, var(--placeholder) 30%, #F4EFE4 50%, var(--placeholder) 70%) 0 0 / 300% 100%;
  animation: shimmer 1.6s ease-in-out infinite;
}

@keyframes shimmer {
  from {
    background-position: 100% 0;
  }
  to {
    background-position: 0 0;
  }
}

.empty {
  padding: 24px 32px 40px;
  text-align: center;
}

.empty-art {
  width: 132px;
  height: auto;
}

.art-back,
.art-front {
  fill: var(--paper);
  stroke-width: 1.5;
}

.art-back {
  stroke: var(--line-strong);
}

.art-front {
  stroke: var(--detail);
}

.art-line {
  fill: none;
  stroke: var(--detail);
  stroke-width: 1.5;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.empty-text {
  max-width: 22ch;
  margin: 14px auto 0;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.6rem;
  line-height: 1.2;
}

.notice {
  margin: 20px 24px;
  text-align: center;
  font-size: 0.94rem;
  color: var(--muted);
}

.sentinel {
  height: 1px;
}

.footer {
  padding: 28px 24px 8px;
  text-align: center;
  font-size: 0.94rem;
  color: var(--muted);
}

.footer p {
  margin: 0;
}

.link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 4px;
  border: 0;
  background: none;
  color: var(--accent-ink);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.gate {
  padding: 8px 28px 64px;
  text-align: center;
}

.gate-art {
  width: 64px;
  height: 64px;
  color: var(--accent-ink);
}

.gate-title {
  margin: 20px 0 0;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.9rem;
  line-height: 1.15;
}

.gate-text {
  max-width: 30ch;
  margin: 12px auto 0;
  color: var(--muted);
}

.dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  padding: 12px max(16px, env(safe-area-inset-right)) calc(12px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  background: rgba(250, 246, 238, 0.9);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  backdrop-filter: blur(14px) saturate(1.2);
  border-top: 1px solid var(--line);
}

.actions {
  display: grid;
  gap: 10px;
  max-width: 560px;
  margin: 0 auto;
}

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 58px;
  padding: 0 20px;
  border: 0;
  border-radius: 16px;
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.2;
  transition: transform 0.12s ease, background-color 0.2s ease, box-shadow 0.2s ease;
  touch-action: manipulation;
}

.btn:active {
  transform: scale(0.98);
}

.btn svg {
  flex: none;
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.btn-primary {
  background: var(--accent);
  color: var(--on-accent);
  box-shadow: 0 10px 22px -14px var(--accent), inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.btn-secondary {
  background: var(--paper);
  color: var(--accent-ink);
  box-shadow: inset 0 0 0 1.5px var(--accent-line);
}

.btn-quiet {
  min-height: 52px;
  background: transparent;
  color: var(--muted);
  font-weight: 500;
}

.notices {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 0 16px 12px;
  pointer-events: none;
}

.notices > * {
  pointer-events: auto;
}

.queue {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  max-width: 100%;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 6px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  box-shadow: var(--shadow-soft);
  font-size: 0.94rem;
  font-weight: 500;
}

.queue .link {
  min-height: 44px;
  margin: -6px 0 -6px -2px;
}

.queue-icon {
  flex: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
}

.queue[data-state="sending"] .queue-icon,
.queue[data-state="preparing"] .queue-icon {
  border: 2px solid var(--accent-soft);
  border-top-color: var(--accent-ink);
  animation: spin 0.9s linear infinite;
}

.queue[data-state="waiting"] .queue-icon {
  width: 10px;
  height: 10px;
  background: #B7893C;
  box-shadow: 0 0 0 4px rgba(183, 137, 60, 0.18);
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.toast {
  max-width: 100%;
  padding: 12px 20px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--ivory);
  font-size: 1rem;
  font-weight: 500;
  box-shadow: var(--shadow-soft);
  opacity: 0;
  transform: translateY(8px) scale(0.98);
  transition: opacity 0.25s ease, transform 0.35s var(--ease-out);
  pointer-events: none;
}

.toast:empty {
  display: none;
}

.toast.is-visible {
  opacity: 1;
  transform: none;
}

.hint {
  width: 100%;
  max-width: 520px;
  padding: 14px 16px 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--paper);
  box-shadow: var(--shadow-soft);
  animation: rise 0.4s var(--ease-out) both;
}

.hint-text {
  margin: 0;
  font-size: 0.97rem;
  line-height: 1.45;
}

.hint-text svg {
  width: 18px;
  height: 18px;
  margin: 0 2px -3px;
  fill: none;
  stroke: var(--accent-ink);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hint-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 8px;
}

.btn-small {
  min-height: 44px;
  padding: 0 16px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  font-size: 1rem;
  font-weight: 600;
}

.btn-small-primary {
  background: var(--accent);
  color: var(--on-accent);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.sheet {
  width: min(92vw, 420px);
  max-width: none;
  margin: auto;
  padding: 28px 22px 16px;
  border: 0;
  border-radius: 24px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 24px 60px -24px rgba(43, 45, 39, 0.45);
}

.sheet[open] {
  animation: rise 0.3s var(--ease-out) both;
}

.sheet::backdrop {
  background: rgba(43, 45, 39, 0.42);
}

.sheet form {
  margin: 0;
}

.sheet-title {
  margin: 0;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.9rem;
  line-height: 1.15;
  text-align: center;
}

.sheet-text {
  margin: 8px 0 18px;
  color: var(--muted);
  text-align: center;
}

.field {
  display: block;
  width: 100%;
  height: 56px;
  padding: 0 16px;
  border: 1.5px solid var(--line-strong);
  border-radius: 14px;
  background: var(--ivory);
  font-size: 1.125rem;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field:focus {
  border-color: var(--accent-ink);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.sheet-actions {
  display: grid;
  gap: 4px;
  margin-top: 16px;
}

.menu-sheet {
  width: min(92vw, 440px);
  max-height: 88vh;
  max-height: 88dvh;
  padding: 0;
  overflow: hidden;
  text-align: center;
}

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

.menu-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 32px 24px 8px;
}

.sheet-actions.menu-footer {
  flex: none;
  margin: 0;
  padding: 12px 24px 16px;
  border-top: 1px solid var(--line);
}

.menu-monogram {
  width: 76px;
  margin-bottom: 14px;
}

.menu-list {
  margin: 14px 0 6px;
  padding: 0;
  list-style: none;
}

.menu-list li {
  padding: 12px 0;
}

.menu-list li + li::before {
  content: "";
  display: block;
  width: 28px;
  height: 1px;
  margin: 0 auto 14px;
  background: var(--detail-line);
}

.dish {
  display: block;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.4rem;
  line-height: 1.2;
  text-wrap: balance;
}

.dish-detail {
  display: block;
  margin-top: 4px;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: 1.1rem;
  line-height: 1.3;
  color: var(--muted);
}

.viewer {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: var(--viewer-bg);
  color: var(--viewer-text);
  animation: fade 0.2s ease both;
}

@keyframes fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.viewer-track {
  display: flex;
  height: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  overscroll-behavior: contain;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.viewer-track::-webkit-scrollbar {
  display: none;
}

.slide {
  position: relative;
  flex: 0 0 100%;
  height: 100%;
  scroll-snap-align: center;
  scroll-snap-stop: always;
}

.slide img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  -webkit-user-select: none;
  user-select: none;
}

.slide .full {
  opacity: 0;
  transition: opacity 0.3s ease;
}

.slide .full.is-loaded {
  opacity: 1;
}

.viewer-top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: calc(env(safe-area-inset-top) + 10px) max(10px, env(safe-area-inset-right)) 28px max(20px, env(safe-area-inset-left));
  background: linear-gradient(rgba(15, 16, 14, 0.62), rgba(15, 16, 14, 0));
  pointer-events: none;
}

.viewer-top > * {
  pointer-events: auto;
}

.viewer-caption {
  margin: 0;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.viewer-caption .time {
  display: block;
  font-size: 0.875rem;
  font-weight: 400;
  opacity: 0.78;
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: #FFFFFF;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.icon-btn svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-btn:focus-visible {
  outline-color: #FFFFFF;
}

.viewer-nav {
  position: absolute;
  top: 50%;
  margin-top: -24px;
  display: none;
}

.viewer-prev {
  left: 16px;
}

.viewer-next {
  right: 16px;
}

.viewer-nav:disabled {
  opacity: 0.3;
  cursor: default;
}

.noscript {
  padding: 24px;
  text-align: center;
}

@media (hover: hover) and (pointer: fine) {
  .viewer-nav {
    display: inline-grid;
  }

  .btn-primary:hover {
    box-shadow: 0 14px 26px -14px var(--accent), inset 0 1px 0 rgba(255, 255, 255, 0.14);
  }

  .btn-secondary:hover,
  .menu-link:hover {
    background: var(--accent-soft);
  }

  .cell:hover img {
    filter: brightness(1.04);
  }
}

@media (min-width: 560px) {
  .actions {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 600px) {
  .gallery {
    padding: 0 16px;
  }

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

  .cell,
  .skel {
    border-radius: 8px;
  }
}

@media (min-width: 760px) {
  .masthead {
    padding-top: 72px;
    padding-bottom: 44px;
  }

  .names .name,
  .names .amp {
    display: inline;
  }

  .names .amp {
    margin: 0 0.04em;
    font-size: 0.8em;
  }

  .monogram:not(.menu-monogram) {
    width: 156px;
  }
}

@media (min-width: 960px) {
  .gallery {
    padding: 0 28px;
  }

  .grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
  }
}

@media (min-width: 1240px) {
  .grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

@media (max-height: 500px) {
  .masthead {
    padding-top: calc(env(safe-area-inset-top) + 24px);
    padding-bottom: 22px;
  }

  .masthead .monogram {
    width: 96px;
    margin-bottom: 14px;
  }

  .menu-sheet .menu-monogram {
    display: none;
  }

  .menu-body {
    padding-top: 22px;
  }

  .dock {
    padding-top: 8px;
    padding-bottom: calc(8px + env(safe-area-inset-bottom));
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .skel {
    animation: none;
  }
}
