body.home-view:has(.cm-page, .missing-page) { display: flex; flex-direction: column; min-height: 100dvh; }
body.home-view:has(.cm-page, .missing-page) main { flex: 1 0 auto; }
.cm-page {
  --cm-muted: #595c52;
  --cm-panel: #f4f4ef;
  --cm-gap: clamp(24px, 4vw, 68px);
  padding-top: 12px;
}
.cm-crumb, .cm-buttons, .cm-form-heading, .cm-text-link { display: flex; align-items: center; }
.cm-crumb { flex-wrap: wrap; gap: 7px; color: var(--cm-muted); font-size: 13px; }
.cm-crumb a:hover { text-decoration: underline; }
.cm-heading { margin-block: var(--heading-gap); }
.cm-page h1, .cm-page h2 { font-family: Onest, Arial, sans-serif; font-weight: 530; }
.cm-title { font-size: clamp(43px, 4.7vw, 78px); line-height: 1.02; letter-spacing: -.06em; text-wrap: balance; }
.cm-title[tabindex="-1"]:focus { outline: none; }
.cm-page h2 { font-size: clamp(25px, 2.2vw, 38px); line-height: 1.13; letter-spacing: -.048em; }
.cm-page .button {
  background: var(--yellow); color: var(--ink); border: 0; border-radius: 99px;
  min-height: 47px; padding: 11px 22px; gap: 12px;
}
.cm-page .button:active { transform: scale(.98); }
.cm-page .button:disabled { opacity: .58; }
.cm-buttons { flex-wrap: wrap; gap: 12px 20px; }
.cm-text-link {
  width: fit-content; gap: 7px; padding: 4px 0 2px; border-bottom: 1px solid currentColor;
  font: 520 14px/1.45 Onest, sans-serif;
}
.cm-wide { width: 100%; }
.cm-layout {
  display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(280px, 1fr);
  align-items: start; gap: 24px var(--cm-gap);
}
.cm-item {
  display: grid; grid-template-columns: clamp(70px,6.1vw,98px) minmax(0,1fr) auto auto 36px;
  align-items: center; gap: clamp(8px,1.15vw,19px);
  border-top: 1px solid var(--line); padding: 17px 0;
}
.cm-item:last-child { border-bottom: 1px solid var(--line); }
.cm-cover { display: grid; place-items: center; border-radius: 13px; background: #eae5da; aspect-ratio: 4/5; padding: 10px 12px; }
.cm-cover img { width: 100%; height: auto; box-shadow: 1px 3px 6px rgb(52 42 23 / 18%); }
.cm-item-name { display: grid; gap: 4px; min-width: 0; line-height: 1.33; }
.cm-item-name small, .cm-unit, .cm-note, .cm-local-note, .cm-order small { font-size: 13px; color: var(--cm-muted); }
.cm-item-name a { width: fit-content; font-weight: 555; font-size: clamp(16px,1.35vw,22px); letter-spacing: -.035em; overflow-wrap: anywhere; }
.cm-unit, .cm-line-price, .cm-summary dd, .cm-receipt-lines dd { font-variant-numeric: tabular-nums; }
.cm-unit del { margin-inline: 2px; }
.cm-line-price { font-size: clamp(15px,1.2vw,19px); font-weight: 560; text-align: right; line-height: 1.22; }
.cm-remove { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; color: var(--cm-muted); }
.cm-stepper { width: fit-content; }
.cm-stepper button { width: 33px; height: 33px; }
.cm-stepper input { width: 42px; }
.cm-page .cm-stepper input:focus-visible { background: #fff3bd; border-radius: 6px; outline: 0; box-shadow: inset 0 -2px #8c7615; }
.cm-back { margin-top: 21px; }
.cm-summary { padding: clamp(20px,2.4vw,38px); border-radius: var(--home-radius); background: var(--cm-panel); }
.cm-summary:not(.cm-profile) { position: sticky; top: 16px; }
.cm-summary dl, .cm-receipt-lines { margin: 18px 0; }
.cm-summary dl > div, .cm-receipt-lines > div { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding-block: 5px; }
.cm-summary dt, .cm-receipt-lines dt { color: var(--cm-muted); }
.cm-summary dd, .cm-receipt-lines dd { margin: 0; text-align: right; }
.cm-saving dd { font-weight: 560; }
.cm-summary dl .cm-total { padding-top: 17px; margin-top: 15px; border-top: 1px solid #d5d6cb; }
.cm-total dt { color: var(--ink); }
.cm-total dd { font-size: clamp(24px,2.25vw,37px); font-weight: 550; letter-spacing: -.05em; line-height: 1.12; }
.cm-note { margin: 12px 0; }
.cm-summary > :last-child { margin-bottom: 0; }
.cm-empty-basket, .cm-receipt {
  display: grid; align-items: center; grid-template-columns: minmax(0,1fr) minmax(0,.84fr);
  gap: var(--cm-gap); padding: clamp(24px,4vw,64px); border-radius: var(--home-radius); background: #efeeea;
}
.cm-empty-basket h2 { font-size: clamp(30px,3.7vw,60px); }
.cm-empty-basket p, .cm-receipt-copy p, .cm-access-intro { max-width: 43ch; margin-top: 13px; color: var(--cm-muted); line-height: 1.55; }
.cm-empty-basket .button, .cm-receipt .cm-buttons { margin-top: 22px; }
.cm-empty-basket .guide-covers a { max-width: 144px; }
.cm-empty, .cm-account-empty { padding: 24px; background: var(--cm-panel); border-radius: 18px; }
.cm-empty > button, .cm-account-empty a { margin-top: 14px; }
.cm-loading { color: var(--cm-muted); min-height: 140px; }
.cm-checkout .cm-summary { grid-column: 2; grid-row: 1 / span 2; }
.cm-submit-order { grid-column: 1; }
.cm-form { min-width: 0; }
.cm-form-heading, .cm-form-section { margin: 0 0 18px; }
.cm-form-heading { flex-wrap: wrap; justify-content: space-between; gap: 10px; }
.cm-form-section { border-top: 1px solid var(--line); padding-top: 22px; margin-top: 24px; }
.cm-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.cm-fields > :first-child { grid-column: 1/-1; }
.cm-field { display: grid; gap: 6px; min-width: 0; margin-bottom: 15px; }
.cm-field > span, .cm-delivery legend { font-size: 14px; font-weight: 550; }
.cm-field small { font-size: 12px; font-weight: 430; color: var(--cm-muted); }
.cm-field :is(input,textarea) {
  width: 100%; min-width: 0; min-height: 48px; padding: 11px 14px;
  background: #fafaf7; border: 1px solid #cecec5; border-radius: 12px;
  font: inherit; outline: 0; transition: background-color 140ms ease, border-color 140ms ease;
}
.cm-field textarea { resize: vertical; }
.cm-delivery { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; padding: 0; margin: 0 0 20px; border: 0; }
.cm-delivery legend { padding: 0; margin-bottom: 7px; }
.cm-delivery label { position: relative; cursor: pointer; }
.cm-delivery input { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); }
.cm-delivery span, .cm-switch button {
  display: block; min-height: 40px; padding: 9px 14px; border-radius: 99px; font-size: 14px; font-weight: 500;
  background: #f0f0eb; transition: background-color 140ms ease, transform 100ms ease;
}
.cm-delivery input:checked + span, .cm-switch button[aria-pressed=true] { background: var(--yellow); }
.cm-delivery input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 3px; }
.cm-delivery label:active span, .cm-switch button:active, .cm-remove:active { transform: scale(.96); }
.cm-submit-order .cm-local-note { margin: 0 0 12px; }
.cm-feedback { min-height: 1.4em; color: #983b2d; font-size: 14px; margin: 5px 0; }
.cm-feedback:empty { min-height: 0; margin: 0; }
.cm-receipt-mark { display: grid; place-items: center; width: 50px; height: 50px; border-radius: 50%; background: var(--yellow); margin-bottom: 19px; }
.cm-receipt-copy h2 { overflow-wrap: anywhere; }
.cm-receipt-lines { margin: 0; padding: clamp(20px,2.2vw,34px); border-radius: 20px; background: white; }
.cm-receipt-lines > div { padding: 10px 0; }
.cm-receipt-lines > div + div { border-top: 1px solid var(--line); }
.cm-receipt-lines dd { font-weight: 550; }
.cm-access-page { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,.83fr); align-items: start; column-gap: var(--cm-gap); }
.cm-access-page .cm-crumb { grid-column: 1/-1; margin-bottom: var(--heading-gap); }
.cm-access-page .cm-heading { margin: 0; }
.cm-access-intro { margin-top: 19px; font-size: clamp(16px,1.3vw,20px); }
.cm-auth { padding: clamp(19px,2.8vw,44px); border-radius: var(--home-radius); background: var(--cm-panel); }
.cm-auth .cm-field input { background: white; }
.cm-switch { display: inline-flex; gap: 3px; padding: 3px; margin-bottom: 22px; border-radius: 99px; background: white; }
.cm-switch button { background: transparent; padding-inline: 17px; }
.cm-auth-help { font-size: 14px; color: var(--cm-muted); margin: 9px 0 19px; }
.cm-auth .cm-wide { margin-top: 6px; }
.cm-account-empty, .cm-orders { margin-top: 18px; }
.cm-account-empty p, .cm-profile p { color: var(--cm-muted); }
.cm-profile { overflow-wrap: anywhere; }
.cm-profile .cm-text-link { margin-top: 18px; }
.cm-order { border: 0; border-top: 1px solid var(--line); }
.cm-order:last-child { border-bottom: 1px solid var(--line); }
.cm-order summary { display: flex; align-items: center; gap: 12px; padding: 15px 2px; cursor: pointer; font: inherit; }
.cm-order summary::after, .cm-order summary::-webkit-details-marker { display: none; }
.cm-order summary span:first-child { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.cm-order summary span:nth-child(2) { white-space: nowrap; }
.cm-order summary small { display: block; }
.cm-order[open] summary > svg { transform: rotate(180deg); }
.cm-order ul { list-style: none; margin: 0 0 14px; padding: 6px 15px; border-radius: 14px; background: var(--cm-panel); }
.cm-order li, .cm-order li a { display: flex; align-items: center; gap: 9px; }
.cm-order li { justify-content: space-between; padding: 8px 0; font-size: 14px; }
.cm-order li + li { border-top: 1px solid var(--line); }
.cm-order li a { overflow-wrap: anywhere; }
.cm-order li img { flex: none; object-fit: contain; }
.cm-order li span { white-space: nowrap; color: var(--cm-muted); }
@media (hover: hover) and (pointer: fine) {
  .cm-page .button:hover { background: #eabe00; }
  .cm-field :is(input,textarea):not(:focus):hover { border-color: #9c9e92; }
  .cm-remove:hover, .cm-switch button[aria-pressed=false]:hover, .cm-delivery label:hover input:not(:checked) + span { background: #e7e8df; }
  .cm-item-name a:hover, .cm-order li a:hover { text-decoration: underline; text-underline-offset: .15em; }
}
@media (max-width: 1080px) {
  .cm-layout { grid-template-columns: minmax(0,1.45fr) minmax(255px,1fr); gap: 24px; }
  .cm-item { grid-template-columns: 64px minmax(0,1fr) auto 34px; gap: 5px 12px; }
  .cm-cover { grid-row: 1/3; }
  .cm-item-name { grid-column: 2/4; }
  .cm-stepper { grid-column: 2; grid-row: 2; }
  .cm-line-price { grid-column: 3; grid-row: 2; }
  .cm-remove { grid-column: 4; grid-row: 1/3; }
}
@media (max-width: 760px) {
  .cm-page { padding-top: 8px; }
  .cm-layout, .cm-access-page { display: grid; grid-template-columns: minmax(0,1fr); gap: var(--heading-gap); }
  .cm-checkout .cm-summary, .cm-submit-order { grid-column: auto; grid-row: auto; }
  .cm-summary:not(.cm-profile) { position: static; }
  .cm-access-page .cm-crumb { margin-bottom: 0; }
  .cm-title { font-size: clamp(36px,7vw,48px); }
  .cm-empty-basket, .cm-receipt { grid-template-columns: minmax(0,1fr); gap: 26px; }
  .cm-empty-basket .guide-covers a { max-width: 105px; }
}
@media (max-width: 480px) {
  .cm-fields { grid-template-columns: minmax(0,1fr); }
  .cm-item { grid-template-columns: 56px minmax(0,1fr) auto; gap: 5px 10px; }
  .cm-cover { align-self: start; grid-row: 1/3; }
  .cm-item-name { grid-column: 2; }
  .cm-remove { grid-column: 3; grid-row: 1; justify-self: end; }
  .cm-stepper { grid-column: 2; }
  .cm-stepper button { width: 29px; height: 32px; }
  .cm-stepper input { width: 36px; }
  .cm-unit { font-size: 12px; }
  .cm-summary, .cm-auth, .cm-empty-basket, .cm-receipt { padding: 20px; }
}
@media (forced-colors: active) {
  .cm-field :is(input,textarea):focus, .cm-page .cm-stepper input:focus-visible, .cm-delivery input:checked + span, .cm-switch button[aria-pressed=true] { outline: 2px solid Highlight; }
}
@media (prefers-reduced-motion: reduce) {
  .cm-page *, .cm-page *::before { transition-duration: 0s; }
}
