/* 3C Cafe · customer screens (mobile-first) */

.screen { min-height: 100dvh; }
.screen--center { display: grid; place-items: center; padding: 32px 16px; }
.wrap { width: 100%; max-width: 760px; margin: 0 auto; padding: 0 16px 128px; }

/* ---------------- Loader ---------------- */
#loader { transition: opacity .45s var(--ease); }
#loader.is-leaving { opacity: 0; }
.brew { display: grid; justify-items: center; gap: 18px; }
.brew__cup { width: 148px; height: 148px; overflow: visible; }
.brew__line { fill: none; stroke: var(--color-10); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 220; stroke-dashoffset: 220; animation: draw 1s var(--ease) forwards; }
.brew__coffee { fill: var(--color-9); transform: translateY(48px); animation: fill 1.4s .55s var(--ease) forwards; }
.brew__crema { fill: var(--color-8); transform: translateY(48px); animation: fill-crema 1.4s .55s var(--ease) forwards; }
.brew__steam path { fill: none; stroke: var(--color-8); stroke-width: 1.6; stroke-linecap: round;
  stroke-dasharray: 22; stroke-dashoffset: 22; opacity: 0; animation: steam 1.6s 1.5s ease-in-out infinite; }
.brew__steam path:nth-child(2) { animation-delay: 1.75s; }
.brew__steam path:nth-child(3) { animation-delay: 2s; }
.brew__logo { width: 120px; padding: 8px 12px; opacity: 0; transform: translateY(6px); animation: rise .7s 1.4s var(--ease) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fill { to { transform: translateY(14px); } }
@keyframes fill-crema { to { transform: translateY(14px); } }
@keyframes steam {
  0% { stroke-dashoffset: 22; opacity: 0; transform: translateY(4px); }
  40% { opacity: .9; }
  100% { stroke-dashoffset: -22; opacity: 0; transform: translateY(-6px); }
}
@keyframes rise { to { opacity: 1; transform: none; } }

/* ---------------- Check-in ---------------- */
.checkin { width: min(400px, 100%); display: grid; gap: 14px; animation: enter .6s var(--ease) both; }
@keyframes enter { from { opacity: 0; transform: translateY(12px); } }
.checkin__brand { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.checkin__logo { width: 112px; padding: 8px 12px; }
.checkin__title { margin: 0; font-size: clamp(44px, 12vw, 56px); line-height: 1; }
.checkin__title em { color: var(--color-8); }
.checkin__lead { margin: 0 0 14px; max-width: 34ch; }
.checkin__form { display: grid; gap: 16px; }
.checkin__form .btn { margin-top: 4px; }

/* ---------------- Top bar + category bar (one sticky header) ---------------- */
.menu-top {
  position: sticky; top: 0; z-index: 20;
  background: rgba(13, 8, 2, .86); backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid var(--line-soft);
}
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px 8px; max-width: 760px; margin: 0 auto; }
.topbar__logo { width: 76px; padding: 5px 8px; border-radius: 10px; }
.topbar__right { display: flex; align-items: center; gap: 10px; min-width: 0; }
.topbar__who { display: grid; justify-items: end; gap: 0; padding: 0; border: 0; background: none; cursor: pointer; font-size: 14px; font-weight: 500; line-height: 1.25; text-align: right; }
.topbar__who .muted { font-size: 12px; font-weight: 400; }

.cats {
  display: flex; gap: 6px; max-width: 760px; margin: 0 auto; padding: 4px 16px 10px;
  overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain; scroll-padding-inline: 16px;
}
.cats::-webkit-scrollbar { display: none; }
.cat {
  flex: none; height: 34px; padding: 0 14px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line); background: transparent; color: var(--text-2);
  font-size: 14px; font-weight: 500; white-space: nowrap;
  transition: background-color .2s, color .2s, border-color .2s;
}
.cat:hover { color: var(--text); border-color: var(--color-3); }
.cat[aria-current="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }

/* ---------------- Marquee ---------------- */
.marquee { overflow: hidden; border-bottom: 1px solid var(--line-soft); background: var(--surface);
  -webkit-mask: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
          mask: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee__track { display: flex; width: max-content; animation: slide var(--dur, 30s) linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__item { display: flex; align-items: center; gap: 10px; padding: 11px 22px; white-space: nowrap; font-size: 14px; color: var(--text); }
.marquee__item .eyebrow { color: var(--color-8); font-size: 10px; }
.marquee__item i { width: 4px; height: 4px; margin-left: 22px; border-radius: 50%; background: var(--color-3); }
@keyframes slide { to { transform: translateX(-50%); } }

/* ---------------- Welcome ---------------- */
.hello { padding: 36px 0 8px; animation: enter .6s var(--ease) both; }
.hello .eyebrow { margin: 0 0 8px; }
.hello__title { margin: 0; font-size: clamp(40px, 10vw, 56px); line-height: 1; }
.hello__sub { margin: 12px 0 0; }

/* ---------------- Menu sections ---------------- */
.cat-sec { scroll-margin-top: calc(var(--head-h, 112px) + 8px); }
.cat-sec__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 40px 0 14px; }
.cat-sec__head h2 { margin: 0; font-size: 30px; }
.cat-sec__head .muted { font-size: 13px; }
.cat-sec__note { margin: -6px 0 14px; font-size: 14px; }

/* best sellers: photo cards, 2 across */
.feature { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.fcard { display: grid; grid-template-rows: auto 1fr; overflow: hidden; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line-soft); }
.fcard .photo { aspect-ratio: 4 / 3; }
.fcard__body { display: grid; gap: 10px; align-content: space-between; padding: 12px 14px 14px; }
.fcard__name { margin: 0; font-family: var(--font-serif); font-weight: 400; font-size: 21px; line-height: 1.1; }
.fcard__desc { margin: 4px 0 0; font-size: 13px; color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
@media (min-width: 640px) { .feature { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* everything else: compact rows, photo on the right */
.rows { list-style: none; margin: 0; padding: 0; display: grid; }
.row { display: grid; grid-template-columns: minmax(0, 1fr) 104px; gap: 14px; align-items: center; padding: 14px 0; border-top: 1px solid var(--line-soft); }
.row:first-child { border-top: 0; padding-top: 0; }
.row__name { margin: 0; font-family: var(--font-serif); font-weight: 400; font-size: 22px; line-height: 1.15; }
.row__desc { margin: 3px 0 10px; font-size: 14px; color: var(--text-2); }
.row .photo { width: 104px; aspect-ratio: 1; border-radius: var(--r-md); }
.row .photo::before { font-size: 30px; }
.row--plain { grid-template-columns: minmax(0, 1fr) auto; }
.row--plain .row__desc { margin-bottom: 0; }
.price { font-size: 16px; font-weight: 600; }
.foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.add { position: relative; }
.add__n {
  position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
  display: grid; place-items: center; background: var(--color-8); color: var(--color-6); font-size: 11px; font-weight: 700;
}
.empty { padding: 32px; text-align: center; border: 1px dashed var(--line); border-radius: var(--r-lg); margin-top: 32px; }

/* ---------------- Add-on picker ---------------- */
.pick-head { display: grid; grid-template-columns: 72px minmax(0, 1fr) auto; gap: 14px; align-items: start; margin-bottom: 8px; }
.pick-head__photo .photo { width: 72px; aspect-ratio: 1; border-radius: var(--r-md); }
.pick-head h2 { margin: 0; font-size: 28px; line-height: 1.05; }
.pick-head p { margin: 4px 0 0; font-size: 14px; }
.addon-group { margin: 16px 0 0; padding: 0; border: 0; }
.addon-group legend { padding: 0; margin-bottom: 8px; font-size: 13px; font-weight: 500; color: var(--text-2); }
.addon-group legend small { font-weight: 400; color: var(--text-3); }
.opts { display: flex; flex-wrap: wrap; gap: 8px; }
.opt { position: relative; }
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.opt span {
  display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 14px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line); color: var(--text); font-size: 14px; transition: background-color .15s, border-color .15s;
}
.opt span em { font-style: normal; color: var(--text-2); font-size: 13px; }
.opt input:checked + span { background: rgba(173, 112, 54, .2); border-color: var(--color-8); }
.opt input:checked + span::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--color-10); }
.opt input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.pick-foot { display: flex; align-items: center; gap: 12px; margin-top: 22px; }
.pick-foot .stepper { height: 54px; padding: 6px; }
.pick-foot .stepper button { width: 40px; height: 40px; }
.pick-foot__go { flex: 1; }
.line__add { display: block; font-size: 12px; color: var(--text-2); }

/* ---------------- Floating cart ---------------- */
.cartbar {
  position: fixed; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 30;
  transform: translateX(-50%);
  width: min(440px, calc(100% - 32px));
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px;
  height: 58px; padding: 0 8px 0 8px;
  border: 0; border-radius: 999px; cursor: pointer; text-align: left;
  background: var(--color-10); color: var(--color-6);
  box-shadow: 0 18px 40px -12px rgba(0, 0, 0, .8);
  animation: cart-in .4s var(--ease);
  transition: transform .15s var(--ease);
}
.cartbar:active { transform: translateX(-50%) scale(.98); }
@keyframes cart-in { from { transform: translate(-50%, 20px); opacity: 0; } }
.cartbar__count { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: var(--color-6); color: var(--color-10); font-weight: 600; }
.cartbar__label { font-weight: 500; }
.cartbar__total { padding-right: 14px; font-weight: 600; }
.cartbar.bump .cartbar__count { animation: bump .35s var(--ease); }
@keyframes bump { 50% { transform: scale(1.15); } }

/* ---------------- Sheets ---------------- */
.sheet__who { margin: 0 0 6px; font-size: 13px; }
.sheet__note { margin-top: 10px; }
.bill-state { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; margin: 6px 0 14px; border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--line); font-size: 14px; }
.bill-state .ic { margin-top: 2px; color: var(--color-8); }
.bill-state strong { display: block; font-weight: 600; }
.bill-orders { margin: 0 0 4px; font-size: 13px; }
.bill-empty { padding: 24px 0 8px; text-align: center; }
.bill-empty .serif { margin: 0 0 6px; font-size: 26px; }

/* ---------------- Order placed ---------------- */
.placed { width: min(440px, 100%); display: grid; gap: 10px; justify-items: start; animation: enter .6s var(--ease) both; }
.placed__mark { display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: 10px; border-radius: 50%; background: var(--color-10); color: var(--color-6); }
.placed__mark .ic { width: 26px; height: 26px; }
.placed .eyebrow { margin: 0; }
.placed__title { margin: 0; font-size: clamp(44px, 12vw, 56px); line-height: 1; }
.placed__msg { margin: 0; }
.placed__card { width: 100%; padding: 6px 18px 12px; margin-top: 8px; border-radius: var(--r-md); }
.placed__actions { width: 100%; display: grid; gap: 10px; margin-top: 8px; }

.progress { list-style: none; width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 18px 0 4px; padding: 0; }
.progress li { display: grid; gap: 8px; font-size: 13px; color: var(--text-3); }
.progress li span { height: 4px; border-radius: 4px; background: var(--surface-2); overflow: hidden; position: relative; }
.progress li.done { color: var(--text); }
.progress li.done span { background: var(--color-8); }
.progress li.now { color: var(--text); }
.progress li.now span::after { content: ''; position: absolute; inset: 0; width: 40%; border-radius: 4px; background: var(--color-8); animation: working 1.4s ease-in-out infinite; }
@keyframes working { from { transform: translateX(-100%); } to { transform: translateX(250%); } }
