/*
 * The menu pages (/menu/ and /menu/<category>/), laid out like the loyalty
 * app's Menu tab: big serif tabs, a Featured shelf, a sideways shelf per
 * category with "View all", and Discover's ranked Popular list. Colors are
 * the app's (apps/mobile/src/constants/theme.ts). Also a few rules for the
 * drink pages the build makes.
 */
:root {
  --m-ink: #1a1512;
  --m-muted: #6b5f55;
  --m-faint: #b8ab9c;
  --m-crimson: #a30c1f;
  --m-field: #e1d6c6;
  --m-line: #ede4d6;
  --m-cream: #faf6ef;
}

.m-wrap { max-width: 1040px; margin: 0 auto; padding: 12px 24px 40px; box-sizing: border-box; color: var(--m-ink); }
.m-wrap [data-hidden] { display: none !important; }

/* Menu / Discover */
.m-tabs { display: flex; align-items: flex-end; gap: 24px; margin-top: 16px; }
.m-tab {
  position: relative; border: 0; background: none; padding: 0 0 8px; margin: 0; cursor: pointer;
  font-family: var(--font-serif); font-size: 34px; line-height: 38px; color: var(--m-faint);
}
.m-tab[aria-selected="true"] { color: var(--m-ink); }
.m-tab[aria-selected="true"]::after { content: ""; position: absolute; left: 0; bottom: 0; width: 28px; height: 3px; border-radius: 2px; background: var(--m-crimson); }
.m-tab:focus-visible { outline: 2px solid var(--m-crimson); outline-offset: 4px; }

.m-store { margin-top: 2px; display: flex; align-items: center; gap: 5px; color: var(--m-muted); font-size: 13px; }
.m-select {
  min-height: 44px; padding: 0 4px; border: 0; background: transparent; cursor: pointer;
  font-family: var(--font-sans); font-size: 13px; color: var(--m-muted);
  text-decoration: underline dotted; text-underline-offset: 3px;
}

/* type */
.m-h2 { margin: 0; font-family: var(--font-serif); font-size: 21px; line-height: 26px; font-weight: 400; color: var(--m-ink); }
.m-blurb { margin: 0; font-family: var(--font-sans); font-size: 13px; line-height: 19px; color: var(--m-muted); }
.m-blurb--lead { margin-top: 4px; }
.m-title { margin: 18px 0 0; font-family: var(--font-serif); font-size: 34px; line-height: 38px; font-weight: 400; }
.m-count { font-size: 12px; color: var(--m-muted); white-space: nowrap; }
.m-empty { margin-top: 32px; font-size: 14px; color: var(--m-muted); }

/* sections */
.m-section { margin-top: 44px; }
#panel-menu > .m-section:first-child { margin-top: 26px; }
.m-head { display: flex; align-items: center; gap: 16px; }
.m-head--end { align-items: flex-end; }
.m-head__text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.m-viewall {
  flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; box-sizing: border-box;
  padding: 0 14px 0 16px; border: 1.5px solid var(--m-crimson); border-radius: 22px;
  font-size: 14px; font-weight: 500; color: var(--m-crimson) !important; text-decoration: none;
}

/* a sideways shelf of drinks that snaps card by card, running to the screen's edges */
.m-shelf {
  display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 24px;
  margin: 16px -24px 0; padding: 0 24px 6px; scrollbar-width: none;
}
.m-shelf::-webkit-scrollbar { display: none; }
.m-tile { flex: none; width: var(--w, auto); display: flex; flex-direction: column; scroll-snap-align: start; color: inherit; text-decoration: none; }
.m-tile:hover .m-tile__img { filter: brightness(0.96); }
.m-tile__img { display: block; width: 100%; height: auto; aspect-ratio: 148 / 184; object-fit: cover; border-radius: 20px; background: #e9ddcb; }
.m-tile--big .m-tile__img { aspect-ratio: 236 / 296; border-radius: 22px; }
.m-tile__img.cup-frame { display: flex; align-items: center; justify-content: center; overflow: hidden; }
.m-tile__img.cup-frame .cup-art { width: 58%; height: auto; }
.m-tile__name {
  margin-top: 10px; padding-bottom: 2px; font-family: var(--font-serif); line-height: 1.3; color: var(--m-ink);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.m-tile__sub { margin-top: 3px; font-size: 12px; color: var(--m-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* "View all" grid */
.m-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 12px; row-gap: 24px; margin-top: 24px; }
.m-grid .m-tile__img { aspect-ratio: 160 / 198; }

/* tea chips on a grouped category */
.m-chips { display: flex; gap: 8px; overflow-x: auto; margin: 20px -24px 0; padding: 0 24px 4px; scrollbar-width: none; }
.m-chips::-webkit-scrollbar { display: none; }
.m-chip {
  flex: none; display: inline-flex; align-items: center; gap: 8px; min-height: 40px; box-sizing: border-box;
  padding: 0 14px 0 10px; border: 1px solid var(--m-field); border-radius: 20px;
  font-size: 13px; color: var(--m-ink) !important; text-decoration: none; white-space: nowrap;
}
.m-chip:hover { background: var(--m-ink); border-color: var(--m-ink); color: var(--m-cream) !important; }
.m-swatch { width: 14px; height: 14px; border-radius: 7px; border: 1.5px solid rgba(255, 255, 255, .5); box-sizing: border-box; }

/* Discover: number 1 as a big card, then a ranked list */
.m-top-head { margin-top: 26px; }
.m-top { position: relative; display: block; margin-top: 14px; height: 232px; border-radius: 24px; overflow: hidden; color: #fff; text-decoration: none; }
.m-top__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.m-top__img.cup-frame { display: flex; align-items: center; justify-content: center; }
.m-top__fade { position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(20, 8, 6, 0) 40%, rgba(20, 8, 6, .7)); }
.m-top__rank {
  position: absolute; left: 14px; top: 14px; width: 30px; height: 30px; border-radius: 15px; background: rgba(250, 246, 239, .94);
  display: flex; align-items: center; justify-content: center; font-family: var(--font-serif); font-size: 16px; color: var(--m-crimson);
}
.m-top__text { position: absolute; left: 18px; right: 18px; bottom: 16px; display: flex; flex-direction: column; gap: 3px; }
.m-top__name { font-family: var(--font-serif); font-size: 24px; line-height: 28px; }
.m-top__sub { font-size: 12px; color: rgba(255, 255, 255, .88); }
.m-rows { list-style: none; margin: 6px 0 0; padding: 0; }
.m-row { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--m-line); color: var(--m-faint); text-decoration: none; }
.m-rank { width: 22px; text-align: center; font-family: var(--font-serif); font-size: 22px; color: var(--m-crimson); }
.m-row__img { width: 56px; height: 56px; flex: none; object-fit: cover; border-radius: 14px; }
.m-row__img.cup-frame { display: flex; align-items: center; justify-content: center; }
.m-row__text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.m-row__name { font-family: var(--font-serif); font-size: 16px; line-height: 20px; color: var(--m-ink); }

@media (min-width: 760px) {
  .m-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: 20px; }
  .m-shelf { margin: 16px 0 0; padding: 0 0 6px; scroll-padding: 0; }
  .m-chips { margin: 20px 0 0; padding: 0 0 4px; }
  #panel-discover { max-width: 680px; }
}

/* ---- drink pages made by the build ---- */
.cms-cup-slide { display: flex; align-items: center; justify-content: center; aspect-ratio: 4 / 5; }
.cms-cup-slide .cup-art { width: 46%; height: auto; }
.cms-back-to-menu { text-align: center; margin: 28px 0 0; font-family: var(--font-serif); font-style: italic; font-size: 17px; }
.cms-back-to-menu a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.cms-find-row, .cms-find-more { color: inherit; text-decoration: none; }
.cms-find-more { display: block; text-decoration: underline; }
.cms-find-cta { display: inline-block; margin-top: 12px; text-decoration: none; }

/* ---- drink pages (canvas O8; the cloud list open is O9) ----
   The photo keeps the site's slideshow; below it a white card overlaps the photo with
   chips, the description, "Make it yours", the tea's stories and a Find Joy button. */
.dk-page { background: #fff; }
.dk-page .text-block-57 { font-family: var(--font-sans, Helveticaneue, Helvetica, Arial, sans-serif); font-weight: 300; font-size: 14px; line-height: 18px; }
.dk-page .div-block-77 { padding-bottom: 44px; }
@media (max-width: 759px) {
  /* The title on the photo, as on canvas O8: italic tea name, then the drink in bold, the image description beside it. */
  .dk-page .div-block-78 { align-items: flex-end; gap: 12px; }
  .dk-page .div-block-79 { width: auto; max-width: 62%; flex: none; }
  .dk-page .text-block-58 { font-size: 19px; line-height: 24px; }
  .dk-page .text-block-59 { font-size: 32px; line-height: 35px; font-weight: 700; }
  .dk-page .div-block-80 { flex: 1; min-width: 0; padding-left: 0; padding-bottom: 6px; }
}
.dk {
  position: relative; z-index: 2; margin-top: -24px; border-radius: 24px 24px 0 0; background: #fff;
  padding: 24px 20px 40px; display: flex; flex-direction: column; gap: 24px;
  color: #333; font-family: var(--font-sans, Helveticaneue, Helvetica, Arial, sans-serif); text-align: left;
}
.dk > * { width: 100%; max-width: 600px; margin-left: auto; margin-right: auto; box-sizing: border-box; }
.dk-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.dk-chip {
  display: inline-flex; align-items: center; gap: 4px; height: 32px; padding: 0 10px; box-sizing: border-box; border-radius: 50px;
  background: #faf6ef; border: 1px solid #ece4d6; font-size: 12.5px; color: #333; white-space: nowrap;
}
.dk .dk-desc { margin: 0 auto; font-weight: 300; font-size: 15px; line-height: 23px; color: #4a463f; }
.dk-make { display: flex; flex-direction: column; gap: 24px; }
.dk .dk-h2 { margin: 4px 0 -8px; font-family: var(--font-serif, Charter, Georgia, serif); font-weight: 400; font-size: 24px; line-height: 30px; color: #333; }
.dk-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.dk .dk-h3 { margin: 0; font-family: var(--font-serif, Charter, Georgia, serif); font-weight: 400; font-size: 18px; line-height: 24px; color: #333; }
.dk-legend, .dk-cal, .dk-note { font-weight: 300; font-size: 13px; line-height: 18px; color: #6b655c; }
.dk-legend { display: inline-flex; align-items: center; gap: 6px; }
.dk-cal strong { font-weight: 700; font-size: 22px; color: #333; text-decoration: none; }
.dk-note { margin: 8px 0 0; display: flex; gap: 6px; align-items: baseline; }
.dk-note .dk-dot { position: relative; top: -2px; }
.dk-note--plain { display: block; }
.dk-dot { display: inline-block; width: 5px; height: 5px; border-radius: 3px; background: #A30B1F; flex: none; }
[hidden] > .dk-dot, .dk-dot[hidden] { display: none; }
.dk-track { margin-top: 10px; padding: 4px; border-radius: 16px; background: #ece4d6; display: flex; gap: 4px; }
.dk-track--col { flex-direction: column; }
.dk-seg {
  flex: 1; min-height: 44px; margin: 0; border: 0; border-radius: 12px; padding: 0 6px; background: transparent; color: #333; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 5px; font: inherit; font-size: 13px;
}
.dk-seg[aria-checked="true"], .dk-cloud-btn { background: #fff; box-shadow: 0 2px 6px rgba(60, 30, 10, .08); }
.dk-seg:disabled { color: #a99d90; text-decoration: line-through; cursor: default; }
a.dk-seg { color: #333; text-decoration: none; }
a.dk-seg[aria-current="page"] { background: #fff; box-shadow: 0 2px 6px rgba(60, 30, 10, .08); font-weight: 700; cursor: default; }
.dk-cloud-btn, .dk-cloud-opt {
  width: 100%; min-height: 44px; margin: 0; border: 0; border-radius: 12px; padding: 0 12px 0 14px; color: #333; cursor: pointer;
  display: flex; align-items: center; gap: 8px; font: inherit; font-size: 13px; text-align: left;
}
.dk-cloud-opt { background: transparent; }
.dk-cloud-opt[aria-selected="true"] { background: rgba(255, 255, 255, .55); font-weight: 700; }
.dk-cloud-list { display: flex; flex-direction: column; gap: 2px; padding: 2px 0; }
.dk-cloud-list[hidden] { display: none; }
.dk-opt-name { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; padding: 6px 0; }
.dk-cloud-btn .dk-opt-line { flex: 1; min-width: 0; }
.dk-opt-line { display: flex; align-items: center; gap: 6px; }
.dk-opt-sub { font-weight: 300; font-size: 12px; color: #6b655c; }
.dk-adds { font-weight: 300; color: #6b655c; white-space: nowrap; }
.dk-chev { flex: none; color: #6b655c; transition: transform .2s ease; }
[aria-expanded="true"] > .dk-chev { transform: rotate(180deg); }
.dk-check { flex: none; visibility: hidden; }
.dk-cloud-opt[aria-selected="true"] .dk-check { visibility: visible; }
.dk-accs { display: flex; flex-direction: column; }
.dk-acc { border-top: 1px solid #ece4d6; }
.dk-acc summary {
  min-height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 12px; cursor: pointer; list-style: none;
  font-family: var(--font-serif, Charter, Georgia, serif); font-size: 19px; color: #333;
}
.dk-acc summary::-webkit-details-marker { display: none; }
.dk-plus { flex: none; transition: transform .2s ease; }
.dk-acc[open] .dk-plus { transform: rotate(45deg); }
.dk-rich { padding: 0 0 20px; font-weight: 300; font-size: 15px; line-height: 23px; color: #4a463f; }
.dk-rich h3 { margin: 16px 0 2px; font-family: var(--font-serif, Charter, Georgia, serif); font-size: 17px; font-weight: 400; color: #333; }
.dk-rich p { margin: 0 0 8px; }
.dk-rich strong { font-size: inherit; font-weight: 700; text-decoration: none; }
.dk .dk-find {
  height: 52px; border-radius: 50px; background: #A30B1F; color: #fff; display: flex; align-items: center; justify-content: center; gap: 10px;
  font-weight: 700; font-size: 16px; text-decoration: none;
}
.dk .dk-more { margin: -8px auto 0; text-align: center; font-family: var(--font-serif, Charter, Georgia, serif); font-style: italic; font-size: 16px; }
.dk .dk-more a { color: #333; text-decoration: underline; text-underline-offset: 3px; }
html:not(.jt-pointer) .dk-seg:focus-visible, html:not(.jt-pointer) a.dk-seg:focus-visible, html:not(.jt-pointer) .dk-cloud-btn:focus-visible, html:not(.jt-pointer) .dk-cloud-opt:focus-visible,
html:not(.jt-pointer) .dk-acc summary:focus-visible, html:not(.jt-pointer) .dk-find:focus-visible { outline: 2px solid #A30B1F; outline-offset: 2px; }
@media (min-width: 760px) {
  .dk { padding-top: 32px; }
}

/* ---- the drink's status bar (canvas O10): slides down from under the nav once the photo has scrolled
   away, and back up when it comes back. 64px: a 48px square of the first photo, the name, the calories. ---- */
.dk-bar {
  position: fixed; left: 0; right: 0; top: 65px; z-index: 40; height: 64px; box-sizing: border-box;
  padding: 8px 20px; display: flex; align-items: center; gap: 12px;
  background: rgba(255, 255, 255, .96); border-top: 1px solid #f1ebe1; border-bottom: 1px solid #ece4d6;
  box-shadow: 0 6px 16px rgba(60, 30, 10, .07);
  color: #333; font-family: var(--font-sans, Helveticaneue, Helvetica, Arial, sans-serif);
  transform: translateY(-100%); visibility: hidden;
  transition: transform .32s cubic-bezier(.22, .8, .3, 1), visibility 0s linear .32s;
}
.dk-bar.is-shown { transform: translateY(0); visibility: visible; transition: transform .32s cubic-bezier(.22, .8, .3, 1), visibility 0s; }
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .dk-bar { background: rgba(255, 255, 255, .88); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
}
.dk-bar__img { width: 48px; height: 48px; flex: none; border-radius: 12px; object-fit: cover; display: flex; align-items: center; justify-content: center; }
.dk-bar__text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.dk-bar__tea, .dk-bar__name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dk-bar__tea { font-family: var(--font-serif, Charter, Georgia, serif); font-style: italic; font-size: 13px; line-height: 16px; color: #6b655c; }
.dk-bar__name { font-weight: 700; font-size: 16px; line-height: 20px; }
.dk-bar__cal { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 1px; }
.dk-bar__cal strong { font-size: 18px; line-height: 20px; font-weight: 700; color: #333; text-decoration: none; }
.dk-bar__cal span { font-weight: 300; font-size: 11px; line-height: 14px; color: #6b655c; }
@media (min-width: 760px) {
  .dk-bar { padding-left: max(20px, calc((100% - 600px) / 2)); padding-right: max(20px, calc((100% - 600px) / 2)); }
}
@media (prefers-reduced-motion: reduce) {
  .dk-bar, .dk-bar.is-shown { transition: none; }
}

/* ---- moving between a tea's styles: drink pages fade into each other, the photo and title morphing
   across, in browsers with cross-page view transitions (others simply load the page). ---- */
@view-transition { navigation: auto; }
.dk-page .div-block-73 { view-transition-name: dk-photo; }
.dk-page .div-block-78 { view-transition-name: dk-title; }
::view-transition-group(*) { animation-duration: .35s; animation-timing-function: cubic-bezier(.22, .8, .3, 1); }
@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}
