/* Each sheet has its own palette so flipbook clones and full-size pages match. */
[data-theme="atelier"] {
  --paper: #f9f5ea; --print: #292522; --rule: #b8a897;
  --accent: #862d32; --cover: #58262e; --foil: #f4dbc6;
  --display: Georgia, "Times New Roman", serif;
}
[data-theme="garden"] {
  --paper: #edf1df; --print: #23382b; --rule: #9fac90;
  --accent: #3f5b3a; --cover: #294334; --foil: #e5efbc;
  --display: Georgia, "Times New Roman", serif;
}
[data-theme="ember"] {
  --paper: #282422; --print: #fff2db; --rule: #776252;
  --accent: #ffad75; --cover: #39251f; --foil: #ffbb8a;
  --display: "Arial Narrow", "Avenir Next Condensed", Impact, sans-serif;
}
[data-theme="coast"] {
  --paper: #edf4f7; --print: #153b53; --rule: #9bb8c5;
  --accent: #075b88; --cover: #184662; --foil: #d9f2ff;
  --display: "Avenir Next", Avenir, system-ui, sans-serif;
}

.menu-sheet {
  container: menu-paper / inline-size;
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 5% 6%;
  border: 0;
  border-radius: 0;
  overflow: hidden;
  color: var(--print);
  background: var(--paper);
  text-align: start;
  font-family: "Avenir Next", Avenir, system-ui, sans-serif;
}
.menu-sheet h2, .menu-sheet h3, .menu-sheet p { margin: 0; color: inherit; }
.menu-sheet .sheet-brand {
  position: relative;
  display: flex;
  flex: none;
  gap: 2.3cqw;
  align-items: center;
  min-height: 7.5cqw;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 2cqw;
}
.menu-sheet .sheet-brand img {
  flex: none;
  display: block;
  width: 7cqw;
  height: 7cqw;
  object-fit: contain;
}
.menu-sheet .sheet-restaurant {
  font-size: 3.15cqw;
  font-weight: 750;
  line-height: 1.15;
  overflow-wrap: anywhere;
}
.sheet-heading {
  flex: none;
  margin: 4cqw 0 2cqw;
  overflow-wrap: anywhere;
}
.menu-sheet .sheet-heading small {
  display: block;
  margin-bottom: 1cqw;
  font: 700 2.65cqw/1.25 system-ui, sans-serif;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
}
.menu-sheet .sheet-heading h2 {
  color: var(--accent);
  font: 500 9.4cqw/.99 var(--display);
  letter-spacing: -.045em;
  text-wrap: balance;
}
.sheet-items {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--rule) transparent;
}
.menu-sheet .sheet-item {
  padding: 2.3cqw 0;
  border-bottom: 1px solid var(--rule);
  break-inside: avoid;
}
.menu-sheet .sheet-item:last-child { border-bottom: 0; }
.menu-sheet .sheet-item h3 {
  font: 650 4.9cqw/1.1 var(--display);
  letter-spacing: -.025em;
  overflow-wrap: anywhere;
}
.menu-sheet .sheet-item p {
  margin-top: .85cqw;
  font-size: 3.3cqw;
  line-height: 1.2;
  overflow-wrap: anywhere;
}
.sheet-portions {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: .7cqw 2.5cqw;
  margin-top: 1.05cqw;
  font-size: 3.1cqw;
  line-height: 1.25;
  font-variant-numeric: tabular-nums;
}
.sheet-portions > span { max-width: 100%; overflow-wrap: anywhere; }
.sheet-portions b { font-weight: 750; color: var(--accent); }
.menu-sheet .sheet-footer {
  flex: none;
  display: flex;
  gap: 1.8cqw;
  align-items: end;
  justify-content: space-between;
  margin-top: 1.5cqw;
  padding-top: 1.6cqw;
  border-top: 1px solid var(--rule);
  font-size: 2.85cqw;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.sheet-footer > :last-child:not(:only-child) { flex: none; }

/* A centered double-rule masthead for the classic dining room. */
.menu-sheet[data-theme="atelier"] .sheet-brand { justify-content: center; border-bottom: 3px double var(--accent); }
.menu-sheet[data-theme="atelier"] .sheet-heading { text-align: center; }
.menu-sheet[data-theme="atelier"] .sheet-heading h2 { font-style: italic; }
.menu-sheet[data-theme="atelier"] .sheet-footer { border-top: 3px double var(--accent); }

/* An offset botanical border and soft rounds for the garden menu. */
.menu-sheet[data-theme="garden"] { border-inline-start: .5rem solid var(--accent); }
.menu-sheet[data-theme="garden"] .sheet-brand { border: 0; padding-inline-end: 12cqw; }
.menu-sheet[data-theme="garden"] .sheet-brand::after {
  content: "";
  position: absolute;
  inset-inline-end: 1cqw;
  top: 0;
  width: 9cqw;
  height: 6cqw;
  border-radius: 100% 0 100% 10%;
  border: 1.5px solid var(--accent);
  background: linear-gradient(148deg, transparent 48%, var(--accent) 49% 50%, transparent 51%);
  transform: rotate(-13deg);
}
.menu-sheet[data-theme="garden"] .sheet-heading { border-bottom: 1px solid var(--rule); padding-bottom: 2.4cqw; }
.menu-sheet[data-theme="garden"] .sheet-item h3 { font-style: italic; }

/* A dark grill card with a cut-line header and condensed typesetting. */
.menu-sheet[data-theme="ember"] .sheet-brand { text-transform: uppercase; border-bottom: 0; }
.menu-sheet[data-theme="ember"] .sheet-heading {
  border-block: 2px solid var(--accent);
  padding-block: 2cqw;
}
.menu-sheet[data-theme="ember"] .sheet-heading h2 { font-weight: 850; text-transform: uppercase; letter-spacing: -.055em; }
.menu-sheet[data-theme="ember"] .sheet-item { border-bottom-style: dashed; }
.menu-sheet[data-theme="ember"] .sheet-footer { border-color: var(--accent); }

/* Blue registration stripes and a waterfront timetable rhythm. */
.menu-sheet[data-theme="coast"] { background: linear-gradient(90deg, #d5e8ee 1%, transparent 1%) var(--paper); }
.menu-sheet[data-theme="coast"] .sheet-brand {
  border: 0;
  border-top: 4px solid var(--accent);
  padding-top: 1.8cqw;
}
.menu-sheet[data-theme="coast"] .sheet-heading h2 { font-weight: 750; }
.menu-sheet[data-theme="coast"] .sheet-item { border-top: 1px solid var(--rule); border-bottom: 0; }
.menu-sheet[data-theme="coast"] .sheet-footer { border-top: 3px double var(--accent); }

.viewer[data-theme] .stf__parent .menu-cover, .stf__parent .menu-cover[data-theme] {
  background: linear-gradient(90deg, #0004, transparent 3%, #0003 4%, transparent 8%), var(--cover);
  color: var(--foil);
}
.viewer[data-theme] .cover-frame, .menu-cover[data-theme] .cover-frame { border-color: var(--foil); }
.viewer[data-theme] .cover-frame span, .menu-cover[data-theme] .cover-frame span { color: var(--foil); }
.viewer[data-theme] .cover-frame strong, .menu-cover[data-theme] .cover-frame strong { font-family: var(--display); }

#book:not(.stf__parent) .sheet:has(.menu-sheet), #book:not(.stf__parent) > .menu-sheet {
  width: 100%; aspect-ratio: 450 / 625; height: auto; max-width: 510px; margin-inline: auto;
}
.sheet-footer > div > span { display: block; }
.reading-page {
  width: min(100%, 38rem);
  margin: 1rem auto;
  box-shadow: 0 .6rem 2.4rem #233d2a1a;
}
.reading-page .menu-sheet {
  height: auto;
  min-height: min(130vw, 48rem);
  overflow: visible;
}
.reading-page .sheet-items { overflow: visible; }
.reading-page .sheet-item p, .reading-page .sheet-portions { font-size: max(1rem, 3.3cqw); }
.reading-page .sheet-footer { font-size: max(.82rem,2.85cqw); }
