/* Compacta: a text-first menu with a separate masthead, index and price ledger. */
html[data-menu-template="compact"] body { background: var(--paper) !important; background-image: none !important; }
html[data-menu-template="compact"] #customerMain { max-width: 76rem; padding: 0 1rem max(7rem, var(--customer-dock-clearance, 0px)); box-shadow: none; }
html[data-menu-template="compact"] #customerMain > header {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto auto;
  gap: .2rem .8rem; margin: 0 -1rem .35rem; padding: .65rem 1rem .5rem !important;
  border: 0 !important; border-bottom: .25rem solid rgb(var(--kaishi-terracotta)) !important;
  background: var(--kaishi-primary); color: #fff;
}
html[data-menu-template="compact"] #customerMain > header::after {
  content: ''; position: absolute; top: 0; right: -2rem; bottom: -.25rem;
  width: 2rem; border-bottom: .25rem solid rgb(var(--kaishi-terracotta));
  background: var(--kaishi-primary); pointer-events: none;
}
html[data-menu-template="compact"] .header-identity { grid-column: 1; grid-row: 1; }
html[data-menu-template="compact"] .header-identity > #restaurantName {
  color: #fff !important; font-family: Georgia, 'Times New Roman', serif !important;
  font-size: clamp(1.2rem, 4vw, 1.7rem) !important; font-weight: 700 !important;
  letter-spacing: -.025em !important; line-height: 1.15;
}
html[data-menu-template="compact"] .header-identity > #restaurantName::before { content: none; }
html[data-menu-template="compact"] #restaurantLogoPublic,
html[data-menu-template="compact"] #restaurantLogoPublic.logo--square,
html[data-menu-template="compact"] #restaurantLogoPublic.logo--portrait,
html[data-menu-template="compact"] #restaurantLogoPublic.logo--wide {
  grid-column: 2; grid-row: 1 / span 2; width: auto; max-width: min(37vw, 9rem);
  height: 3.35rem; max-height: 3.35rem; object-fit: contain; object-position: right center;
}
html[data-menu-template="compact"] #inicio {
  grid-column: 1; grid-row: 2; min-width: 0; margin: 0; padding: 0 !important;
  background: transparent; animation: none;
}
html[data-menu-template="compact"] #inicio p { display: none; }
html[data-menu-template="compact"] #inicio h1 {
  max-width: none !important; color: #fff !important; font-family: system-ui, sans-serif !important;
  font-size: .77rem !important; font-weight: 500 !important; letter-spacing: 0 !important;
  line-height: 1.3 !important; opacity: .85;
}
html[data-menu-template="compact"] #inicio h1::after { content: none; }
html[data-menu-template="compact"] .header-controls {
  grid-column: 1 / -1 !important; grid-row: 3; gap: .4rem; margin-top: .25rem;
  position: relative; z-index: 1; padding-top: .4rem;
}
html[data-menu-template="compact"] .header-controls::before {
  content: ''; position: absolute; top: 0; left: -1rem; right: -3rem;
  height: 1px; background: #ffffff4d; pointer-events: none;
}
html[data-menu-template="compact"] header #historyButton,
html[data-menu-template="compact"] header #contentLanguageButton,
html[data-menu-template="compact"] header #staffOrderExit {
  min-height: 2.25rem; height: 2.25rem; border: 1px solid #ffffff70 !important;
  border-radius: .2rem; background: transparent; color: #fff !important;
  padding: .25rem .6rem;
}
html[data-menu-template="compact"] #contentLanguageMenu { color: var(--night); }
html[data-menu-template="compact"] #tableStatus {
  margin: .1rem 0 .35rem; padding: .2rem .5rem; border-radius: .15rem;
  background: rgb(var(--kaishi-sage) / .75); font-size: .7rem;
}
html[data-menu-template="compact"] #compactCatalogLayout { display: flex; flex-direction: column; min-width: 0; }
html[data-menu-template="compact"] #compactCatalogLayout > .sticky {
  top: 0; z-index: 11; margin: 0 -1rem; padding: .35rem 1rem !important;
  background: var(--paper) !important; backdrop-filter: none;
}
html[data-menu-template="compact"] #compactCatalogLayout > .sticky > div {
  min-height: 2.55rem; padding: .4rem .65rem; border: 1px solid var(--kaishi-primary) !important;
  border-radius: .15rem !important; background: #fff !important; box-shadow: none !important;
}
html[data-menu-template="compact"] #categoryNav {
  display: block; margin: 0 -1rem .55rem; padding: .2rem 1rem .45rem;
  border-bottom: 1px solid rgb(var(--kaishi-ink) / .22);
}
html[data-menu-template="compact"] .compact-category-picker { display: block; position: relative; }
html[data-menu-template="compact"] .compact-category-picker::after {
  content: '⌄'; position: absolute; right: .8rem; top: 50%; transform: translateY(-58%);
  font-size: 1.2rem; pointer-events: none;
}
html[data-menu-template="compact"] .compact-category-picker select {
  display: block; width: 100%; min-height: 2.75rem; appearance: none;
  padding: .35rem 2rem .35rem .65rem; border: 1px solid var(--kaishi-primary);
  border-radius: .15rem; background: #fff; color: var(--night);
  font: 700 .82rem system-ui, sans-serif;
}
html[data-menu-template="compact"] .compact-category-links { display: none; }
html[data-menu-template="compact"] #menu { animation: none; }
html[data-menu-template="compact"] #menu .compact-section { margin: 0 0 1.1rem; min-width: 0; }
html[data-menu-template="compact"] .compact-section__heading {
  display: flex; align-items: baseline; justify-content: space-between; gap: .5rem;
  margin-bottom: .15rem; padding: .4rem 0 .3rem;
  border-bottom: 2px solid var(--kaishi-primary);
}
html[data-menu-template="compact"] #menu .compact-section__heading h2 {
  margin: 0; font-family: Georgia, 'Times New Roman', serif !important;
  font-size: 1.25rem !important; font-weight: 700 !important; letter-spacing: -.02em !important;
  line-height: 1.15;
}
html[data-menu-template="compact"] .compact-section__heading span {
  min-width: 0; color: var(--kaishi-category-muted); font-size: .67rem; text-align: right;
}
html[data-menu-template="compact"] .compact-featured .compact-section__heading {
  border-color: rgb(var(--kaishi-terracotta)); color: rgb(var(--kaishi-terracotta));
}
html[data-menu-template="compact"] .compact-list { background: #fff; }
html[data-menu-template="compact"] #menu .compact-row {
  display: grid; position: relative; grid-template-columns: minmax(0, 1fr) 5.7rem 3.15rem;
  align-items: center; gap: .3rem .55rem; min-width: 0; min-height: 3.3rem;
  padding: .38rem .15rem; border: 0 !important;
  border-bottom: 1px solid rgb(var(--kaishi-ink) / .17) !important;
  border-radius: 0; background: #fff; box-shadow: none !important; transform: none;
}
html[data-menu-template="compact"] #menu .compact-row--featured { border-left: .2rem solid rgb(var(--kaishi-terracotta)) !important; padding-left: .4rem; }
html[data-menu-template="compact"] #menu .compact-row--offer { background: rgb(var(--kaishi-sage) / .26); }
html[data-menu-template="compact"] #menu .compact-row:hover { background: rgb(var(--kaishi-sage) / .16); }
html[data-menu-template="compact"] .compact-row__main { display: flex; align-items: center; gap: .5rem; min-width: 0; }
html[data-menu-template="compact"] .compact-row__copy { min-width: 0; }
html[data-menu-template="compact"] .compact-row__copy h3 {
  margin: 0; font-size: .85rem; font-weight: 700; letter-spacing: -.01em; line-height: 1.2;
  overflow-wrap: anywhere;
}
html[data-menu-template="compact"] .compact-row__kind {
  display: block; margin-bottom: .08rem; color: rgb(var(--kaishi-terracotta));
  font-size: .58rem; font-weight: 800; text-transform: uppercase; letter-spacing: .045em;
}
html[data-menu-template="compact"] .compact-row__summary {
  display: -webkit-box; max-width: 40rem; margin: .1rem 0 0; overflow: hidden;
  color: var(--kaishi-intro-muted); font-size: .7rem; line-height: 1.25;
  -webkit-box-orient: vertical; -webkit-line-clamp: 1;
}
html[data-menu-template="compact"] .compact-row__meta { display: flex; align-items: center; flex-wrap: wrap; gap: .15rem .35rem; }
html[data-menu-template="compact"] .compact-row .product-allergens { margin: .12rem 0 0; gap: .05rem; }
html[data-menu-template="compact"] .compact-row .allergen-icon-button { width: 24px; height: 24px; }
html[data-menu-template="compact"] .compact-row .allergen-mark { width: 19px; height: 19px; }
html[data-menu-template="compact"] .compact-row .allergen-mark svg { width: 12px; height: 12px; }
html[data-menu-template="compact"] .compact-row__detail {
  padding: .12rem 0; color: rgb(var(--kaishi-terracotta));
  font-size: .64rem; font-weight: 700; text-decoration: underline; text-underline-offset: 2px;
}
html[data-menu-template="compact"] .compact-row__price {
  min-width: 0; font-size: .8rem; font-variant-numeric: tabular-nums;
  text-align: right; white-space: nowrap;
}
html[data-menu-template="compact"] .compact-row > div:last-child { align-items: center; gap: .15rem; }
html[data-menu-template="compact"] .compact-row:not(.compact-row--offer) > div:last-child { justify-content: flex-end; }
html[data-menu-template="compact"] #menu .compact-row:has(.menu-quantity:not(.hidden)):not(.compact-row--offer) {
  grid-template-columns: minmax(0, 1fr) 5.7rem 4.25rem;
}
html[data-menu-template="compact"] .compact-row .menu-actions { margin: 0 !important; gap: .12rem; }
html[data-menu-template="compact"] .compact-row .add-button,
html[data-menu-template="compact"] .compact-row .offer-button {
  display: grid; place-items: center; min-width: 2.65rem; min-height: 2.65rem;
  margin: 0; padding: .25rem !important; border: 0 !important;
  border-radius: .15rem !important; background: var(--kaishi-primary);
  color: #fff; font-size: 1.3rem; font-weight: 700; line-height: 1;
}
html[data-menu-template="compact"] .compact-row .offer-button { min-width: 5.3rem; font-size: .68rem; }
html[data-menu-template="compact"] .compact-row .add-button:hover,
html[data-menu-template="compact"] .compact-row .offer-button:hover { background: rgb(var(--kaishi-terracotta)); }
html[data-menu-template="compact"] .compact-row .menu-quantity { min-width: 1.2rem; padding: .15rem .3rem; }
html[data-menu-template="compact"] #menu .compact-row--offer { grid-template-columns: minmax(0, 1fr) 5.7rem 5.5rem; }
html[data-menu-template="compact"] .compact-row .table-count:not(.hidden) {
  display: flex !important; position: absolute; top: .05rem; right: .05rem;
  min-width: 1rem; margin: 0; padding: .1rem .2rem;
  border-radius: .15rem; color: #fff;
}
html[data-menu-template="compact"] .compact-row .table-count > span { min-height: 0; }
html[data-menu-template="compact"] .compact-row .table-count span span { font-size: 0; }
html[data-menu-template="compact"] .compact-row .table-count-number { font-size: .72rem; }
html[data-menu-template="compact"] .compact-row__unavailable { color: rgb(var(--kaishi-terracotta)); font-size: .65rem; font-weight: 700; }
html[data-menu-template="compact"] .compact-empty { padding: 1.5rem .5rem; text-align: center; }
html[data-menu-template="compact"] #cartDock { border-radius: .2rem; }
@media (max-width: 540px) {
  html[data-menu-template="compact"] #menu .compact-row--offer { grid-template-columns: minmax(0, 1fr) auto; }
  html[data-menu-template="compact"] .compact-row--offer .compact-row__main { grid-row: 1 / span 2; }
  html[data-menu-template="compact"] .compact-row--offer .compact-row__price { grid-column: 2; }
  html[data-menu-template="compact"] .compact-row--offer > div:last-child { grid-column: 2; }
}
@media (max-width: 355px) {
  html[data-menu-template="compact"] #menu .compact-row { gap: .2rem; }
  html[data-menu-template="compact"] .compact-row__price { font-size: .73rem; }
}
@media (min-width: 780px) {
  html[data-menu-template="compact"] #customerMain { padding-right: 1.5rem; padding-left: 1.5rem; }
  html[data-menu-template="compact"] #customerMain > header { margin-right: -1.5rem; margin-left: -1.5rem; padding-right: 1.5rem !important; padding-left: 1.5rem !important; }
  html[data-menu-template="compact"] #customerMain > header::after { right: -3rem; width: 3rem; }
  html[data-menu-template="compact"] .header-controls::before { left: -1.5rem; right: -4.5rem; }
  html[data-menu-template="compact"] #compactCatalogLayout {
    display: grid; grid-template-columns: 11.5rem minmax(0, 1fr); grid-template-rows: auto 1fr;
    align-items: start; gap: 0 1.5rem;
  }
  html[data-menu-template="compact"] #compactCatalogLayout > .sticky { grid-column: 2; grid-row: 1; margin: 0; padding: .35rem 0 .6rem !important; }
  html[data-menu-template="compact"] #categoryNav {
    grid-column: 1; grid-row: 1 / span 2; position: sticky; top: .5rem;
    /* Reserve the main's bottom space so the index stays inside the viewport at the end of a category. */
    max-height: calc(100dvh - 8rem); overflow-y: auto; margin: 0;
    padding: .35rem .65rem .5rem 0; border-bottom: 0; border-right: 1px solid rgb(var(--kaishi-ink) / .2);
  }
  html[data-menu-template="compact"] .compact-category-picker { display: none; }
  html[data-menu-template="compact"] .compact-category-links { display: flex; flex-direction: column; gap: .1rem; }
  html[data-menu-template="compact"] .category-chip {
    display: block; width: 100%; min-height: 2.75rem; padding: .4rem .5rem;
    border: 0; border-left: .2rem solid transparent; border-radius: 0;
    background: transparent; color: var(--night); font-size: .77rem; text-align: left; white-space: normal;
  }
  html[data-menu-template="compact"] .category-chip:hover { transform: none; background: rgb(var(--kaishi-sage) / .3); }
  html[data-menu-template="compact"] .category-chip.is-active {
    border-color: rgb(var(--kaishi-terracotta)); background: rgb(var(--kaishi-sage) / .35);
    color: var(--night);
  }
  html[data-menu-template="compact"] #menu,
  html[data-menu-template="compact"] #emptyMessage { grid-column: 2; grid-row: 2; }
}
@media (min-width: 1220px) {
  html[data-menu-template="compact"] #menu {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start; gap: 0 1.5rem;
  }
}
