/* Book page styles — recreated from "MANA Menu Book v2" (A4 @ 96dpi = 794 × 1123 px) */
.pg {
  position: relative;
  width: 794px;
  height: 1123px;
  overflow: hidden;
  font-family: 'Noto Serif Thai', serif;
  color: #1d2a25;
  box-sizing: border-box;
}
.pg *, .pg *::before, .pg *::after { box-sizing: border-box; }
.pg h1, .pg h2, .pg h3, .pg p { margin: 0; }

.pg--green { background: #17352e; }
.pg--cream { background: #ece2cf; }
.pg--dark  { background: #1c1b17; }

.pg-frame {
  position: absolute;
  inset: 18px;
  border: 1px solid rgba(212, 180, 124, .55);
  pointer-events: none;
}
.pg-body {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  padding: 56px 64px;
}

/* Running header (section name + folio) */
.pg-run {
  display: flex;
  justify-content: space-between;
  font-family: 'Courier Prime', monospace;
  font-size: 14px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #5b5547;
  font-variant-numeric: lining-nums;
}
.pg--green .pg-run, .pg--dark .pg-run { color: #d4b47c; }

/* Paper grain overlay */
.pg-grain {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .22;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .2 0 0 0 0 .15 0 0 0 0 .1 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Image slot (replaces the prototype's <image-slot>) */
.slot {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #d9d1c5;
}
.slot::after {
  content: attr(data-ph);
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  text-align: center;
  font-family: 'Noto Serif Thai', serif;
  font-size: 15px;
  color: #7a7066;
}
.slot img {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Polaroid photo card */
.polaroid {
  position: relative;
  flex-shrink: 0;
  max-width: 100%;
  background: #f8f2e4;
  padding: 12px 12px 30px;
  box-shadow: 0 1px 0 rgba(0, 0, 0, .06), 0 14px 28px -14px rgba(30, 20, 10, .5);
}
.polaroid-photo {
  aspect-ratio: 1;
  filter: sepia(.16) saturate(.92) contrast(1.03);
}
.polaroid-cap {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 8px;
  display: flex;
  justify-content: space-between;
  font-family: 'Courier Prime', monospace;
  font-size: 12px;
  letter-spacing: .14em;
  color: #c9772f;
}

/* "PRICE · see list" stamp */
.price-stamp {
  position: relative;
  flex-shrink: 0;
  width: 128px;
  height: 128px;
  border-radius: 50%;
  border: 1.5px solid #17352e;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.price-stamp::before {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  border: 1px dashed rgba(23, 53, 46, .4);
}
.price-stamp .t1 { font-family: 'Courier Prime', monospace; font-size: 11px; letter-spacing: .24em; padding-left: .24em; color: #5b5547; }
.price-stamp .t2 { font-family: 'Zilla Slab', serif; font-weight: 700; font-size: 24px; line-height: 1; color: #17352e; }
.price-stamp .t3 { font-family: 'Courier Prime', monospace; font-size: 10px; letter-spacing: .12em; color: #5b5547; }

/* Dish code label */
.dish-code { font-family: 'Courier Prime', monospace; font-size: 15px; letter-spacing: .14em; color: #a8522a; }

/* Signature story footer table */
.meta-row { display: grid; grid-template-columns: 170px 1fr; gap: 16px; align-items: baseline; }
.meta-row .k { font-family: 'Noto Serif Thai', serif; font-size: 16px; color: #5b5547; }

/* Table-of-contents rows on dark pages */
.toc-row {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  align-items: baseline;
  color: #f2ead9;
  break-inside: avoid;
}
.mono-gold { font-family: 'Courier Prime', monospace; color: #d4b47c; font-variant-numeric: lining-nums; }
.zh { font-family: 'Noto Serif SC', serif; }
.slab { font-family: 'Zilla Slab', serif; }

/* Temporarily unavailable (sheet Status "งดขายชั่วคราว") — still shown, clearly marked */
.polaroid--off .polaroid-photo { filter: grayscale(.75) brightness(.85) sepia(.16) contrast(1.03); }
.off-ribbon {
  position: absolute;
  z-index: 2;
  top: 24px;
  right: 0;
  padding: 6px 14px;
  background: #8f2f22;
  color: #f8f2e4;
  font-family: 'Noto Serif Thai', serif;
  font-size: 15px;
  letter-spacing: .04em;
  box-shadow: 0 4px 10px -4px rgba(0, 0, 0, .45);
}
.off-badge {
  display: inline-flex;
  align-self: flex-start;
  align-items: baseline;
  gap: 8px;
  padding: 3px 10px;
  border: 1px solid #8f2f22;
  border-radius: 999px;
  background: rgba(143, 47, 34, .1);
  color: #8f2f22;
  font-family: 'Noto Serif Thai', serif;
  font-size: 15px;
  line-height: 1.3;
  white-space: nowrap;
}
.off-badge em { font-style: normal; font-family: 'Courier Prime', monospace; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.off-badge--sm { padding: 1px 7px; font-size: 11px; gap: 4px; vertical-align: middle; }
.off-badge--sm em { display: none; }
.off-badge--dark, .pg--dark .off-badge--sm { background: #8f2f22; border-color: #8f2f22; color: #f8f2e4; }
