/* Last Batch On The Left
   Crumbl-style layout: sticky bar, rounded hero, flavor tiles.
   Palette is teal, white, and black. */

:root {
  --teal: #0e8a86;
  --teal-deep: #0a6562;
  --black: #111111;
  --white: #ffffff;
  --muted: #3a3a3a;
  --line: #e6e6e6;
  --wash: #e7f6f5;
  --font: "Outfit", "Avenir Next", "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--white);
  color: var(--black);
  font-family: var(--font);
  font-size: 1.05rem;
  line-height: 1.45;
}

button,
input,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

h1,
h2,
h3,
p {
  margin: 0;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: absolute;
  left: 12px;
  top: -48px;
  z-index: 40;
  background: var(--black);
  color: var(--white);
  padding: 8px 12px;
  border-radius: 999px;
}

.skip:focus {
  top: 76px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  min-height: 72px;
  padding: 12px 18px;
  background: var(--teal);
  color: var(--white);
}

.menu-btn {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  background: transparent;
  color: var(--white);
  font-weight: 700;
  font-size: 1rem;
  padding: 8px 4px;
}

.burger,
.burger::before,
.burger::after {
  display: block;
  width: 16px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  content: "";
}

.burger {
  position: relative;
}

.burger::before,
.burger::after {
  position: absolute;
  left: 0;
}

.burger::before {
  top: -5px;
}

.burger::after {
  top: 5px;
}

.logo {
  justify-self: center;
  color: var(--black);
  font-weight: 800;
  font-size: clamp(1.35rem, 2.4vw, 1.85rem);
  letter-spacing: -0.04em;
  text-decoration: none;
  line-height: 1;
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 8px 18px;
  border: 0;
  border-radius: 999px;
  background: var(--black);
  color: var(--white);
  font-weight: 700;
  text-decoration: none;
}

.topbar > .pill {
  justify-self: end;
}

.pill:hover,
.menu-btn:hover {
  background: var(--teal-deep);
  color: var(--white);
}

.topbar > .pill:hover {
  background: #000;
}

.nav-panel {
  position: sticky;
  top: 72px;
  z-index: 25;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  padding: 14px 18px;
  background: var(--white);
  border-bottom: 1px solid var(--line);
}

.nav-panel[hidden] {
  display: none;
}

.nav-panel a {
  font-weight: 700;
  text-decoration: none;
}

.nav-panel a:hover {
  color: var(--teal-deep);
}

.page {
  padding: 16px 16px 48px;
}

.sheet[hidden] {
  display: none !important;
}

.hero {
  position: relative;
  max-width: 1180px;
  margin: 8px auto 0;
}

.hero-track {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  border-radius: 28px;
}

.hero-track::-webkit-scrollbar {
  display: none;
}

.hero-slide {
  position: relative;
  flex: 0 0 86%;
  scroll-snap-align: center;
  min-height: 280px;
  border-radius: 28px;
  display: grid;
  place-items: center;
}

.hero-slide svg,
.hero-slide img {
  width: min(340px, 78%);
  height: auto;
}

.hero-slide-chip {
  background: #fff;
}

.hero-slide-roll {
  background: #fff;
}

.hero-slide-brownie {
  background: #fff;
}

.hero-order {
  position: absolute;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
}

.hero-controls {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
}

.hero-controls button {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid #d0d0d0;
  background: var(--white);
  color: var(--black);
  font-size: 1.5rem;
  line-height: 1;
}

.hero-controls button:hover {
  border-color: var(--teal);
  color: var(--teal-deep);
}

.intro {
  max-width: 760px;
  margin: 28px auto 8px;
  text-align: center;
}

.week-pill {
  display: inline-block;
  margin-bottom: 14px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--wash);
  color: var(--black);
  font-size: 0.92rem;
  font-weight: 600;
}

h1,
.section-title,
.greeting,
.brand-name {
  font-weight: 800;
  letter-spacing: -0.03em;
}

h1 {
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  line-height: 1.05;
}

.lede,
.status,
.help,
.thanks-sub,
.pay-handle,
.price-note,
.desc {
  color: var(--muted);
}

.lede {
  margin: 10px auto 0;
  max-width: 36rem;
}

.menu-frame {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
  max-width: 1100px;
  margin: 28px auto 8px;
}

.item {
  display: flex;
  flex-direction: column;
  min-width: 0;
  text-align: center;
}

.item-art {
  position: relative;
  aspect-ratio: 1;
  border-radius: 28px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: var(--teal);
}

.item-art[data-icon="chip"] {
  background: #fff;
}

.item-art img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.item-art[data-icon="roll"] {
  background: #111111;
}

.item-art[data-icon="brownie"] {
  background: #1c1614;
}

.item-art svg {
  width: 68%;
  height: 68%;
}

.item-copy {
  padding: 14px 8px 0;
}

.item h3 {
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.desc {
  margin-top: 6px;
  font-size: 0.95rem;
}

.price {
  margin-top: 8px;
}

.price-num,
.total-row strong,
.dock-amount {
  font-variant-numeric: tabular-nums;
}

.price-num {
  font-weight: 800;
  font-size: 1.15rem;
}

.price-note {
  display: block;
  font-size: 0.85rem;
}

.forms {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
  align-items: center;
}

.form-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  max-width: 280px;
}

.form-label {
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1.15;
  text-align: left;
}

.stepper {
  display: inline-flex;
  align-items: center;
  margin-top: 12px;
  border: 1px solid #d5d5d5;
  border-radius: 999px;
  overflow: hidden;
  background: var(--white);
}

.form-row .stepper {
  margin-top: 0;
  flex: 0 0 auto;
}

.stepper button {
  width: 40px;
  height: 36px;
  border: 0;
  background: transparent;
  font-size: 1.2rem;
}

.stepper button:hover:not(:disabled) {
  background: var(--wash);
  color: var(--teal-deep);
}

.stepper button:disabled {
  opacity: 0.35;
  cursor: default;
}

.qty {
  min-width: 1.5rem;
  text-align: center;
  font-weight: 700;
}

#order,
#kitchen,
.confirm-sheet {
  max-width: 760px;
  margin: 48px auto 0;
}

.section-title {
  font-size: 2rem;
  margin-bottom: 16px;
  text-align: center;
}

.order-card,
.notice,
.summary {
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 18px;
  background: var(--white);
}

.lines {
  border-bottom: 1px solid var(--line);
  margin-bottom: 8px;
}

.line,
.total-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
}

.line + .line,
.total-row {
  border-top: 1px solid var(--line);
}

.total-row strong,
.dock-amount {
  font-weight: 800;
}

.empty {
  color: var(--muted);
  padding: 8px 0 14px;
}

.field {
  margin-top: 14px;
}

.lbl {
  display: block;
  margin-bottom: 6px;
  font-weight: 700;
}

input[type="text"],
input[type="tel"],
input[type="email"],
input[type="date"],
textarea {
  width: 100%;
  border: 1px solid #d0d0d0;
  border-radius: 12px;
  padding: 12px 14px;
  background: var(--white);
  font-size: 1rem;
}

textarea {
  min-height: 88px;
  resize: vertical;
}

input:focus,
textarea:focus {
  border-color: var(--teal);
  outline: 2px solid var(--teal);
  outline-offset: 1px;
}

[aria-invalid="true"] {
  border-color: #9b1c1c;
}

.help,
.error,
.fine-print {
  margin-top: 8px;
  font-size: 0.95rem;
}

.error {
  color: #9b1c1c;
  font-weight: 600;
}

.error[hidden] {
  display: none;
}

.slots {
  border: 1px solid #d0d0d0;
  border-radius: 12px;
  overflow: hidden;
}

.slot {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}

.slot:last-child {
  border-bottom: 0;
}

.slot:has(input:checked) {
  background: var(--wash);
}

.slot input {
  accent-color: var(--teal);
}

.hp {
  position: absolute;
  left: -9999px;
  height: 0;
  overflow: hidden;
}

.pay-bottom {
  display: grid;
  gap: 16px;
}

.pay-name {
  font-weight: 800;
  font-size: 1.25rem;
}

.qr svg {
  width: min(100%, 180px);
  height: auto;
  display: block;
  margin-top: 8px;
  background: var(--white);
}

.steps {
  margin: 0;
  padding-left: 1.2rem;
}

.steps li {
  margin-bottom: 8px;
}

.steps .num {
  display: none;
}

.pay-link,
.submit,
.confirm-actions .pill,
.confirm-actions .ghost {
  margin-top: 14px;
}

.fine-print {
  color: var(--muted);
}

.notice p + p {
  margin-top: 0.75rem;
}

.statute,
.placeholder-flag {
  color: var(--muted);
}

.placeholder-flag {
  display: block;
  margin-top: 4px;
}

.ig-block {
  margin-top: 16px;
  text-align: center;
}

.ig-block a {
  color: var(--teal-deep);
  font-weight: 700;
}

.thanks {
  margin-top: 36px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  text-align: center;
}

.greeting {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  text-align: center;
  margin-bottom: 8px;
}

.status,
.confirm-meta {
  text-align: center;
}

.summary {
  margin-top: 16px;
  white-space: pre-wrap;
  font-family: var(--font);
  text-align: left;
  overflow-wrap: anywhere;
}

.ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  margin-top: 10px;
  margin-left: 8px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--black);
  background: var(--white);
  color: var(--black);
  font-weight: 700;
}

.ghost:hover {
  background: var(--wash);
  border-color: var(--teal-deep);
  color: var(--teal-deep);
}

.confirm-actions {
  text-align: center;
}

.dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  background: var(--white);
  border-top: 1px solid var(--line);
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
}

.dock[hidden] {
  display: none !important;
}

.dock-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.dock-amount {
  font-size: 1.35rem;
  font-weight: 800;
}

.dock-count {
  display: block;
  color: var(--muted);
  font-size: 0.9rem;
}

body.has-dock .page {
  padding-bottom: 110px;
}

input,
textarea,
.slot,
.pill,
.ghost {
  scroll-margin-bottom: 120px;
  scroll-margin-top: 88px;
}

.noscript ul {
  margin: 8px 0 0;
  padding-left: 1.2rem;
}

@media (max-width: 800px) {
  .hero-slide {
    flex-basis: 100%;
    min-height: 240px;
  }

  .menu-frame {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 8px;
  }

  .item {
    flex: 0 0 78%;
    scroll-snap-align: start;
  }

  .ghost {
    margin-left: 0;
  }
}

@media (min-width: 900px) {
  .hero-slide {
    flex-basis: calc(50% - 7px);
    min-height: 420px;
  }

  .pay-bottom {
    grid-template-columns: 200px 1fr;
    align-items: start;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

@media print {
  .topbar,
  .dock,
  .hero-controls,
  .stepper,
  .pill,
  .ghost {
    display: none !important;
  }
}

/* Keep customer text within narrow phone screens. */
.line > span:first-child, #confirm-meta, .status { min-width: 0; overflow-wrap: anywhere; }
.line > span:last-child { flex-shrink: 0; }
button:disabled { cursor: not-allowed; }

/* Cally calendar: local vendored component, no remote runtime dependency. */
#pickup-calendar { margin: 14px auto; max-width: 100%; --color-accent: var(--teal-deep); --color-text-on-accent: white; }
#pickup-calendar::part(button) { border: 1px solid var(--line); border-radius: 10px; background: white; min-width: 40px; min-height: 40px; font: inherit; }
#pickup-calendar::part(heading) { font-size: 1.05rem; }
calendar-month { max-width: 100%; }
calendar-month::part(button) { width: clamp(30px, 9vw, 42px); height: 42px; border-radius: 8px; font-weight: 700; }
calendar-month::part(disallowed), calendar-month::part(button):disabled { font-weight: 400; }
#pickup-date { min-width: 0; width: 100%; }
#pickup-range { margin-top: 8px; }

/* Cally exposes these real parts from its day buttons (including aria-disabled days). */
calendar-month::part(sold-out) { color: #756e69; opacity: .65; font-weight: 400; text-decoration: line-through; cursor: not-allowed; }
calendar-month::part(selected) { background: var(--teal-deep); color: #fff; opacity: 1; font-weight: 700; text-decoration: none; }
.capacity-recovery { margin-top: 16px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; }
.capacity-recovery .ghost, #capacity-refresh { margin-top: 10px; }
