:root {
  color-scheme: light;
  --ink: #23201d;
  --muted: #645d55;
  --paper: #fffaf2;
  --panel: #ffffff;
  --line: #ddd2c2;
  --accent: #a94438;
  --accent-dark: #7d2e27;
  --sage: #607b65;
  --gold: #d29a38;
  --shadow: 0 16px 40px rgb(66 48 30 / 12%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  display: flex;
  flex-direction: column;
}

body > main {
  flex: 1;
  display: flex;
  flex-direction: column;
}

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

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 12px clamp(18px, 4vw, 56px);
  background: rgb(255 250 242 / 94%);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
  text-align: center;
}

.site-header h1 {
  margin: 0.75rem 0 0;
  font-size: clamp(1.6rem, 4vw, 3rem);
}

.brand-stack {
  display: grid;
  gap: 1px;
  padding: 0.5rem;
}

.header-tagline {
  margin: 0;
  color: var(--accent);
  font-size: clamp(0.7rem, 1.5vw, 1rem);
  font-weight: 900;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
}

.header-menu-action,
.header-cart-action {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-menu-action {
  left: clamp(14px, 3vw, 38px);
}

.header-cart-action {
  right: clamp(14px, 3vw, 38px);
}

.header-order-button {
  min-height: 38px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgb(169 68 56 / 62%);
  border-radius: 999px;
  padding: 8px 14px;
  background: var(--accent);
  color: white;
  font-size: 0.82rem;
  font-weight: 900;
  text-decoration: none;
}

.header-order-button:hover {
  background: var(--accent-dark);
}

.order-flow-active .header-order-button {
  display: none;
}

.header-icon-link {
  position: relative;
  display: inline-grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: white;
  color: var(--ink);
  cursor: pointer;
  text-decoration: none;
}

.header-icon-link:hover {
  border-color: var(--accent);
  color: var(--accent-dark);
}

.header-icon-link[aria-disabled="true"] {
  opacity: 0.55;
}

.header-icon-link svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.cart-count {
  position: absolute;
  top: -5px;
  right: -5px;
  display: inline-grid;
  min-width: 18px;
  height: 18px;
  place-items: center;
  border: 2px solid #fffaf2;
  border-radius: 999px;
  background: var(--accent);
  color: white;
  font-size: 0.68rem;
  font-weight: 900;
  line-height: 1;
}

.site-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  z-index: 20;
  display: grid;
  min-width: 230px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
  box-shadow: var(--shadow);
  text-align: left;
}

.site-menu a {
  padding: 13px 16px;
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
}

.site-menu-signin {
  border-bottom: 1px solid var(--line);
  color: var(--accent-dark) !important;
}

.site-menu a:hover {
  background: #fff6ed;
  color: var(--accent-dark);
}

.brand-link {
  text-decoration: none;
}

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

.site-header > div .eyebrow {
  font-size: 0.82rem;
}

.progress-nav {
  justify-self: center;
  align-items: start;
  display: none;
  gap: 0;
  color: var(--muted);
  font-weight: 700;
  overflow-x: auto;
  padding: 3px 0 2px;
}

.order-started .progress-nav {
  display: flex;
}

.progress-step {
  position: relative;
  display: inline-grid;
  justify-items: center;
  align-items: center;
  gap: 4px;
  min-width: 102px;
  padding: 2px 4px;
  text-decoration: none;
  text-align: center;
}

.progress-step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 19.5px;
  left: calc(50% + 23px);
  right: calc(-50% + 23px);
  width: auto;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, #c8b9a6, #e5d9c9);
}

.progress-step span {
  position: relative;
  z-index: 0;
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 2px solid #c8b9a6;
  border-radius: 999px;
  background:
    radial-gradient(circle at 35% 28%, rgb(255 255 255 / 90%), transparent 28%),
    radial-gradient(circle at 50% 58%, #fffaf2 0 45%, #efe2cf 46% 100%);
  color: var(--muted);
  box-shadow:
    inset 0 -4px 7px rgb(66 48 30 / 12%),
    0 2px 0 rgb(66 48 30 / 8%);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1;
  text-transform: uppercase;
}

.progress-step span::before {
  content: "";
  position: absolute;
  top: -6px;
  left: 50%;
  width: 0;
  height: 0;
  border-right: 4px solid transparent;
  border-top: 0;
  border-bottom: 6px solid #c8b9a6;
  border-left: 4px solid transparent;
  background: transparent;
  transform: translateX(-50%) rotate(0deg);
  transform-origin: 50% 23px;
  opacity: 0.9;
  z-index: -2;
}

.progress-step span::after {
  content: "";
  position: absolute;
  inset: 6px;
  border: 1px solid rgb(100 93 85 / 18%);
  border-radius: 999px;
  pointer-events: none;
  z-index: 1;
}

.progress-step strong {
  max-width: none;
  font-size: 0.72rem;
  line-height: 1.1;
  white-space: nowrap;
}

.progress-step.is-active {
  color: var(--accent-dark);
}

.progress-step.is-active span {
  border-color: var(--accent);
  background:
    radial-gradient(circle at 35% 28%, rgb(255 255 255 / 78%), transparent 28%),
    radial-gradient(circle at 50% 58%, #fff6ed 0 45%, #e7b69a 46% 100%);
  color: var(--accent-dark);
}

.progress-step.is-active span::before {
  border-bottom-color: var(--accent);
}

.progress-step.is-complete span {
  border-color: var(--sage);
  background:
    radial-gradient(circle at 35% 28%, rgb(255 255 255 / 78%), transparent 28%),
    radial-gradient(circle at 50% 58%, #edf3ed 0 45%, #abc0ad 46% 100%);
  color: var(--sage);
}

.progress-step.is-complete span::before {
  border-bottom-color: var(--sage);
}

.progress-step.is-complete:not(:last-child)::after {
  background: rgb(96 123 101 / 36%);
}

.progress-step.is-complete span::before {
  transform: translateX(calc(-50% - 2px)) rotate(90deg);
}

.progress-step[aria-disabled="true"] {
  opacity: 0.38;
}

.progress-step[aria-disabled="true"]:hover {
  color: var(--muted);
}

.text-button {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-weight: 700;
}

.hero {
  min-height: 66vh;
  display: grid;
  align-items: end;
  padding: clamp(30px, 7vw, 86px) clamp(18px, 4vw, 56px);
  background:
    linear-gradient(90deg, rgb(35 32 29 / 78%), rgb(35 32 29 / 24%)),
    url("https://images.unsplash.com/photo-1509440159596-0249088772ff?auto=format&fit=crop&w=1800&q=82") center / cover;
  color: white;
}

.hero-copy {
  max-width: 760px;
}

.hero h2 {
  margin: 8px 0 16px;
  font-size: clamp(2.4rem, 7vw, 5.6rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.hero p {
  max-width: 610px;
  color: rgb(255 255 255 / 88%);
  font-size: 1.1rem;
}

.hero-cta {
  min-height: 54px;
  margin-top: 8px;
  padding: 14px 24px;
  border-color: #fffaf2;
  box-shadow: 0 14px 28px rgb(25 16 10 / 28%);
  font-size: 1.05rem;
}

.hero-cta:hover {
  transform: translateY(-1px);
}

.order-flow-active .hero {
  display: none;
}

.order-flow-active .home-products {
  display: none;
}

.home-products {
  padding: clamp(38px, 6vw, 72px) clamp(18px, 4vw, 56px);
}

.home-products-head {
  width: min(100%, 1080px);
  margin: 0 auto 22px;
}

.home-products-head h2 {
  max-width: 680px;
}

.home-products-head p {
  max-width: 680px;
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.home-product-grid {
  width: min(100%, 1080px);
  margin: 0 auto;
  display: grid;
  gap: clamp(34px, 7vw, 76px);
}

.home-product-card {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(22px, 5vw, 64px);
}

.home-product-card > img,
.product-flip {
  width: 100%;
  height: 100%;
  min-height: 300px;
  aspect-ratio: 1 / 1;
  border-radius: 8px;
}

.home-product-card > img {
  object-fit: cover;
}

.product-flip {
  perspective: 1200px;
}

.product-flip-inner {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 300px;
  transition: transform 1.05s ease;
  transform-style: preserve-3d;
}

.product-flip:hover .product-flip-inner,
.product-flip:focus-within .product-flip-inner {
  transform: rotateY(180deg);
}

.product-flip-front,
.product-flip-back {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 8px;
  backface-visibility: hidden;
}

.product-flip-front {
  object-fit: cover;
}

.product-flip-back {
  display: grid;
  align-content: center;
  gap: 12px;
  padding: clamp(20px, 4vw, 34px);
  border: 1px solid var(--line);
  background:
    linear-gradient(rgb(255 255 255 / 86%), rgb(255 255 255 / 86%)),
    var(--product-photo) center / cover;
  color: var(--ink);
  transform: rotateY(180deg);
}

.product-flip-back p {
  margin: 0;
}

.home-product-card > div {
  display: grid;
  align-content: center;
  gap: 14px;
  padding: 0;
}

.home-product-card h3 {
  margin: 0;
  font-size: clamp(1.7rem, 4vw, 3rem);
  line-height: 1;
}

.home-product-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.home-product-card .button {
  width: fit-content;
  margin-top: 8px;
}

.home-product-card:nth-child(even) {
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.9fr);
}

.home-product-card:nth-child(even) > img,
.home-product-card:nth-child(even) .product-flip {
  order: 2;
}

.section {
  padding: clamp(34px, 5vw, 56px) clamp(18px, 4vw, 56px);
}

.order-flow-active .section {
  padding-block: clamp(22px, 4vw, 42px);
}

.step-panel {
  min-height: auto;
}

.step-panel:not([hidden]) {
  display: grid;
  align-content: start;
  justify-items: center;
}

.step-panel > * {
  width: min(100%, 640px);
}

.step-anchor {
  display: block;
  height: 0;
}

.step-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 0;
}

.step-actions .action-status {
  flex-basis: 100%;
  margin: 0;
}

.step-actions .button {
  min-width: 150px;
}

.step-actions-top {
  margin: 0 0 14px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 12px;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h2 {
  margin: 0 0 16px;
  font-size: clamp(1.45rem, 3vw, 2.35rem);
  letter-spacing: 0;
}

.checkout-grid {
  display: grid;
  grid-template-columns: 1fr;
}

.order-grid {
  display: grid;
}

.order-grid > .order-products {
  width: min(100%, 1080px);
}

.checkout-grid > .checkout-form-column {
  width: min(100%, 640px);
}

.order-products > .eyebrow,
.cart-column > .eyebrow,
.checkout-form-column > .eyebrow {
  margin-bottom: 16px;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}

.product-selection-panel {
  display: grid;
  gap: 16px;
}

.product-selection-panel > h2 {
  margin-bottom: 1rem;
}

.product-card,
.panel,
.calendar-shell,
dialog {
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.panel,
.calendar-shell,
dialog {
  background: var(--panel);
}

.product-card {
  background: var(--panel);
}

.product-card {
  display: grid;
  gap: 12px;
  position: relative;
  overflow: visible;
}

.product-card:hover,
.product-card:focus-within {
  z-index: 8;
}

.product-card > div:not(.product-image) {
  padding: 0 18px;
}

.product-card > div:not(.product-image):last-child {
  padding-bottom: 18px;
}

.product-image {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 8px 8px 0 0;
  background: white;
}

.product-image img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.product-card h3 {
  margin: 0;
  font-size: 1.15rem;
}

.product-card p {
  margin: 0;
  color: var(--muted);
}

.product-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.date-card {
  display: grid;
  gap: 16px;
  width: min(100%, 520px);
}

.fulfillment-panel {
  display: grid;
  gap: 16px;
  width: min(100%, 780px);
}

.fulfillment-panel h2 {
  margin-bottom: 1rem;
}

.date-card h2,
.cart-panel h2,
.checkout-form-column > .panel h2 {
  margin-bottom: 1rem;
}

.fulfillment-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.fulfillment-card {
  min-height: 132px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: white;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}

.fulfillment-card strong {
  display: block;
  margin-bottom: 8px;
  font-size: 1.15rem;
}

.fulfillment-card span {
  color: var(--muted);
  line-height: 1.45;
}

.fulfillment-card:hover,
.fulfillment-card.selected {
  border-color: var(--accent);
  background: #fff6ed;
}

.fulfillment-card.selected {
  outline: 3px solid rgb(169 68 56 / 16%);
}

.delivery-zip-row {
  display: grid;
  gap: 8px;
}

.date-note {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.panel {
  padding: clamp(18px, 3vw, 24px);
}

.cart-column {
  width: min(100%, 560px);
}

.cart-panel {
  position: static;
}

.checkout-grid > aside {
  margin-top: 28px;
}

.admin-shell {
  padding: clamp(34px, 5vw, 56px) clamp(18px, 4vw, 56px);
}

.auth-page {
  min-height: 100vh;
}

.auth-shell {
  min-height: calc(100vh - 82px);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: clamp(34px, 6vw, 70px) clamp(18px, 4vw, 56px);
}

.auth-card {
  margin: auto 0;
}

.orders-shell {
  padding: clamp(34px, 5vw, 56px) clamp(18px, 4vw, 56px);
}

.orders-page {
  max-width: 900px;
}

.site-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin-top: auto;
  padding: 28px clamp(18px, 4vw, 56px) 36px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 800;
  text-align: center;
}

.site-footer p {
  margin: 0;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.site-footer a {
  color: var(--muted);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--accent-dark);
}

.legal-page {
  display: grid;
  gap: 14px;
}

.legal-page h3 {
  margin-top: 10px;
  font-size: 1rem;
}

.legal-page p {
  max-width: 760px;
}

.contact-form {
  width: min(100%, 640px);
}

.auth-card {
  width: min(100%, 460px);
}

.auth-card h2 {
  margin-bottom: 8px;
}

.auth-legal {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.admin-login {
  max-width: 440px;
}

.admin-orders {
  display: grid;
  gap: 18px;
}

.admin-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
}

.admin-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  border-bottom: 1px solid var(--line);
}

.admin-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  padding: 8px 14px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  font-weight: 900;
}

.admin-tab:hover,
.admin-tab:focus-visible {
  border-color: var(--accent);
  background: #fff6ed;
  outline: none;
}

.admin-tab.is-active {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

.admin-tab-count {
  display: inline-grid;
  min-width: 22px;
  min-height: 22px;
  place-items: center;
  border-radius: 999px;
  padding: 0 7px;
  background: var(--accent-dark);
  color: #fff;
  font-size: 0.76rem;
  line-height: 1;
}

.admin-tab.is-active .admin-tab-count {
  background: #fff;
  color: var(--ink);
}

.admin-tab-panel {
  display: grid;
  gap: 18px;
}

.admin-tab-panel > h2 {
  margin: 0;
}

.admin-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.admin-summary .panel {
  display: grid;
  gap: 6px;
}

.admin-summary span {
  color: var(--muted);
  font-weight: 700;
}

.admin-summary strong {
  font-size: 1.55rem;
}

.admin-availability-panel {
  display: grid;
  gap: 16px;
}

.admin-availability-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.admin-availability-head h3 {
  margin: 0 0 6px;
}

.admin-availability-head .status {
  max-width: 280px;
  text-align: right;
}

.admin-availability-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(280px, 1fr);
  gap: 18px;
  align-items: start;
}

.admin-calendar-frame {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.admin-calendar-frame .weekday-row span {
  padding: 8px 6px;
}

.admin-calendar-day {
  min-height: 74px;
  padding: 8px;
  cursor: pointer;
}

.admin-calendar-day.has-unavailable {
  background: #fff6ed;
}

.admin-calendar-day.is-full-unavailable .day-number {
  color: var(--accent-dark);
}

.admin-day-note {
  display: inline-block;
  margin-top: 9px;
  color: var(--accent-dark);
  font-size: 0.7rem;
  font-weight: 900;
  line-height: 1.15;
}

.admin-unavailable-times {
  display: grid;
  gap: 12px;
}

.admin-unavailable-times h4 {
  margin: 0;
}

.admin-unavailable-time-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.admin-time-toggle {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 8px 10px;
  border: 1.5px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  text-align: center;
  cursor: pointer;
}

.admin-time-toggle span {
  font-size: 0.86rem;
  font-weight: 900;
  justify-self: center;
  line-height: 1.15;
}

.admin-time-toggle small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  justify-self: end;
  line-height: 1.1;
  text-align: right;
}

.admin-time-toggle:hover,
.admin-time-toggle:focus-visible {
  border-color: var(--accent);
  background: #fff6ed;
  outline: none;
}

.admin-time-toggle.is-unavailable {
  border-color: var(--accent-dark);
  background: #fff6ed;
}

.admin-time-toggle.is-unavailable small {
  color: var(--accent-dark);
}

.admin-unavailable-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.admin-messages-panel {
  display: grid;
  gap: 14px;
}

.admin-messages-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.admin-messages-head h2 {
  margin: 0 0 6px;
}

.admin-messages-head .status {
  max-width: 280px;
  text-align: right;
}

.admin-message-filters {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.admin-message-type-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-message-filter {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  background: #fff;
  color: var(--muted);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.admin-message-filter:hover,
.admin-message-filter:focus-visible,
.admin-message-filter.is-active {
  border-color: var(--accent);
  color: var(--accent-dark);
}

.admin-message-status-filter {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.admin-message-status-filter select {
  min-width: 132px;
}

.admin-messages-list {
  display: grid;
  gap: 10px;
}

.admin-message-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.admin-message-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.admin-message-card-head div {
  display: grid;
  gap: 3px;
}

.admin-message-card-head span,
.admin-message-card-head time,
.admin-message-meta {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.admin-message-card-head strong {
  font-size: 1rem;
}

.admin-message-card-head time {
  flex: 0 0 auto;
  text-align: right;
}

.admin-message-card p {
  margin: 0;
  line-height: 1.45;
}

.admin-message-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
}

.admin-message-card .button {
  justify-self: start;
}

.admin-message-summary-card,
.admin-contact-summary-card {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px 16px;
}

.admin-message-summary-button {
  display: grid;
  gap: 3px;
  width: 100%;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.admin-message-summary-button span,
.admin-message-contact-summary span,
.admin-contact-summary-card time,
.admin-message-summary-button small,
.admin-message-count-label {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.admin-message-summary-button strong,
.admin-message-contact-summary strong {
  font-size: 1rem;
}

.admin-message-order-summary {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-message-summary-button:hover strong,
.admin-message-summary-button:focus-visible strong {
  color: var(--accent-dark);
}

.admin-message-summary-button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.admin-message-count-label {
  justify-self: end;
  border-radius: 999px;
  padding: 7px 10px;
  background: #fff6ed;
  color: var(--accent-dark);
  white-space: nowrap;
}

.admin-message-contact-summary {
  display: grid;
  gap: 3px;
}

.admin-message-contact-summary p {
  margin: 5px 0 0;
  color: var(--muted);
}

.admin-contact-summary-card time {
  justify-self: end;
  text-align: right;
}

.admin-table-wrap {
  overflow-x: auto;
}

.admin-table-controls {
  display: grid;
  grid-template-columns: minmax(180px, 280px);
  gap: 12px;
  margin-bottom: 18px;
}

.admin-table-controls .form-row {
  gap: 6px;
}

.admin-bulk-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: flex-end;
  margin-bottom: 12px;
}

.admin-bulk-actions span {
  color: var(--muted);
  font-weight: 800;
}

.admin-notify-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
}

.admin-notify-toggle input {
  accent-color: var(--accent);
  width: 18px;
  height: 18px;
}

.admin-table {
  width: 100%;
  min-width: 920px;
  border-collapse: collapse;
}

.admin-table th,
.admin-table td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.admin-table th {
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.admin-sort-button {
  appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
}

.admin-sort-button:hover,
.admin-sort-button.active {
  color: var(--text);
}

.sort-indicator {
  display: inline-flex;
  min-width: 0.65rem;
  color: var(--accent);
  font-size: 0.7rem;
  line-height: 1;
}

.admin-table td span {
  display: block;
  color: var(--muted);
}

.admin-table td.admin-cell-changed,
.admin-table td.admin-cell-changed span,
.admin-table td.admin-cell-changed strong {
  color: #b3261e;
}

.admin-table td.admin-cell-changed .status-pill {
  color: #b3261e;
  border-color: rgb(179 38 30 / 30%);
  background: rgb(179 38 30 / 8%);
}

.admin-select-column {
  width: 42px;
  text-align: center;
}

.admin-select-column input {
  accent-color: var(--accent);
  width: 18px;
  height: 18px;
}

.admin-flag-column {
  width: 54px;
  text-align: center;
}

.admin-review-flag {
  appearance: none;
  border: 0;
  background: transparent;
  color: #b3261e;
  cursor: pointer;
  font-size: 1.35rem;
  font-weight: 900;
  line-height: 1;
}

.admin-review-flag:hover,
.admin-review-flag:focus-visible {
  color: #7f1d1d;
  outline: 2px solid rgb(179 38 30 / 22%);
  outline-offset: 3px;
}

.admin-review-clear {
  color: var(--muted);
}

.admin-message-button {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 0;
  background: transparent;
  color: var(--accent-dark);
  cursor: pointer;
}

.admin-message-button:hover,
.admin-message-button:focus-visible {
  color: var(--ink);
  outline: 2px solid rgb(96 123 101 / 20%);
  outline-offset: 2px;
}

.admin-message-button svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.admin-message-button.has-customer-message {
  color: var(--accent-dark);
}

.admin-message-cell {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.admin-message-inline-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 4px;
  background: #fff6ed;
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 20px;
  text-align: center;
}

.admin-message-button.has-customer-message + .admin-message-inline-count {
  background: #b3261e;
  color: #fff;
}

.admin-message-inline-count.has-unread-message {
  background: #b3261e;
  color: #fff;
}

.message-recipient-box {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff6ed;
}

.message-recipient-box span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

.message-recipient-box strong {
  overflow-wrap: anywhere;
}

.message-thread {
  display: grid;
  flex: 1 1 auto;
  gap: 10px;
  min-height: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.message-thread h3 {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 900;
  text-transform: uppercase;
  color: var(--muted);
}

.message-thread-list {
  display: grid;
  align-content: start;
  max-height: none;
  min-height: 0;
  gap: 10px;
  overflow-y: auto;
  padding-right: 2px;
}

.message-thread-empty {
  margin: 0;
  color: var(--muted);
}

.message-thread-item {
  display: grid;
  gap: 6px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffaf3;
}

.message-thread-item.from-baker {
  background: #f8fbf7;
}

.message-thread-item.from-system {
  background: #eef6ff;
  border-color: #bdd7ee;
  gap: 10px;
}

.message-thread-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 0.82rem;
}

.message-thread-meta strong {
  color: var(--ink);
}

.message-thread-item.from-system .message-thread-meta strong {
  color: #265f85;
}

.message-thread-item p {
  margin: 0;
  overflow-wrap: anywhere;
}

.contact-message-details {
  display: grid;
  gap: 8px;
}

.contact-message-details strong {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.system-message-body {
  display: grid;
  gap: 8px;
  color: #284353;
  line-height: 1.45;
}

.system-message-body p {
  margin: 0;
}

.system-message-body .system-message-title {
  color: #265f85;
  font-weight: 700;
}

.system-message-body ul {
  margin: 0;
  padding: 8px 10px 8px 1.35rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.58);
}

.system-message-body li + li {
  margin-top: 4px;
}

.message-composer {
  display: grid;
  flex: 0 0 auto;
  gap: 12px;
  position: relative;
  margin-top: 10px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.message-composer summary {
  display: inline-grid;
  position: absolute;
  top: 0;
  left: 50%;
  z-index: 1;
  width: 34px;
  min-height: 34px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  padding: 0;
  background: var(--panel);
  color: var(--accent-dark);
  cursor: pointer;
  list-style: none;
  transform: translate(-50%, -50%);
}

.message-composer summary span {
  width: 10px;
  height: 10px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translate(-1px, -1px);
  transition: transform 160ms ease;
}

.message-composer summary::-webkit-details-marker {
  display: none;
}

.message-composer summary:hover,
.message-composer summary:focus-visible {
  background: #fff6ed;
  outline: 2px solid rgb(169 68 56 / 18%);
  outline-offset: 2px;
}

.message-composer[open] summary span {
  transform: rotate(225deg) translate(-1px, -1px);
}

.message-composer[open] summary {
  margin-bottom: 0;
}

.admin-action-select {
  min-width: 140px;
  width: auto;
}

.status-pill {
  display: inline-flex;
  width: fit-content;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.status-pill.good {
  background: rgb(96 123 101 / 14%);
  color: var(--sage);
}

.status-pill.pending {
  background: rgb(210 154 56 / 16%);
  color: #7a5520;
}

.status-pill.muted {
  background: rgb(100 93 85 / 13%);
  color: var(--muted);
}

.cart-items {
  display: grid;
  gap: 10px;
  min-height: 70px;
}

.cart-line {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  column-gap: 12px;
  row-gap: 8px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}

.cart-line > strong:last-of-type {
  margin-right: -8px;
}

.cart-remove-button svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}


.cart-quantity-controls strong {
  min-width: 1.5ch;
  text-align: center;
}

.quantity-controls {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  position: relative;
}

.quantity-button-wrap {
  position: relative;
  display: inline-flex;
}

.locked-controls {
  cursor: help;
}

.control-tooltip {
  position: absolute;
  right: 0;
  bottom: calc(100% + 12px);
  z-index: 6;
  display: none;
  grid-template-columns: auto 1fr;
  gap: 10px;
  width: min(320px, calc(100vw - 48px));
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  box-shadow: 6px 6px 0 rgb(35 32 29 / 16%);
  line-height: 1.35;
  text-align: left;
}

.control-tooltip::after {
  content: "";
  position: absolute;
  right: 28px;
  bottom: -9px;
  width: 16px;
  height: 16px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: white;
  transform: rotate(45deg);
}

.locked-controls:hover .control-tooltip,
.locked-controls:focus-within .control-tooltip,
.quantity-limit-wrap:hover .control-tooltip,
.quantity-limit-wrap:focus-within .control-tooltip {
  display: grid;
}

.tooltip-icon {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 2px solid var(--accent);
  border-radius: 50%;
  color: var(--accent-dark);
  font-weight: 900;
  line-height: 1;
}

.tooltip-copy strong {
  display: block;
  margin-bottom: 4px;
  color: var(--ink);
  font-size: 1.15rem;
  font-weight: 700;
}

.tooltip-copy {
  color: var(--muted);
  font-size: 1rem;
  font-weight: 400;
}

.cart-total {
  display: flex;
  justify-content: space-between;
  margin: 18px 0;
  font-size: 1.2rem;
}

.summary-line {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.45;
}

.order-summary-meta {
  display: grid;
  gap: 6px;
  margin: 1.5rem 0 1rem;
}

.order-summary-meta .summary-line {
  color: var(--sage);
  font-weight: 700;
}

label,
legend {
  display: block;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 800;
  margin-bottom: 7px;
}

input,
textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 12px;
  color: var(--ink);
  background: white;
}

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

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  outline: 3px solid rgb(169 68 56 / 16%);
}

#delivery-date,
.schedule-select-button {
  display: block;
  width: min(100%, 250px);
  max-width: 250px;
  min-height: 48px;
  margin: 0 auto;
  border: 1px solid var(--accent);
  border-radius: 6px;
  padding: 10px 12px;
  background: #fff6ed;
  color: var(--accent-dark);
  cursor: pointer;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
}

#delivery-date:hover,
.schedule-select-button:hover {
  background: #faece1;
  border-color: var(--accent);
}

#delivery-date.locked,
.schedule-select-button:disabled {
  border-color: var(--line);
  background: #f7f1e8;
  color: var(--muted);
  cursor: not-allowed;
}

.selected-schedule-display {
  width: min(100%, 250px);
  max-width: 250px;
  margin: 0 auto;
  border: 1px solid rgb(169 68 56 / 22%);
  border-radius: 6px;
  padding: 10px 12px;
  background: rgb(255 246 237 / 72%);
  color: var(--accent-dark);
  font-weight: 700;
  line-height: 1.45;
  text-align: center;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 75%);
}

.selected-schedule-display span {
  display: block;
}

.selected-schedule-date {
  font-weight: 800;
}

.selected-schedule-divider {
  color: #8e493f;
  font-size: 0.92rem;
}

.selected-schedule-time {
  font-weight: 700;
}

#date-status {
  margin: 0;
}

.button,
.icon-button {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 14px;
  background: white;
  color: var(--ink);
  cursor: pointer;
  font-weight: 800;
  text-decoration: none;
  text-align: center;
}

.button:hover,
.icon-button:hover {
  border-color: var(--accent);
}

.button:disabled,
.icon-button:disabled,
.button[aria-disabled="true"] {
  opacity: 0.45;
  cursor: not-allowed;
}

.button:disabled:hover,
.icon-button:disabled:hover,
.button[aria-disabled="true"]:hover {
  border-color: var(--line);
}

.button.primary {
  border-color: var(--accent);
  background: var(--accent);
  color: white;
}

.button.primary:hover {
  background: var(--accent-dark);
}

.button.full {
  display: block;
  width: 100%;
}

.icon-button {
  width: 42px;
  padding: 0;
  font-size: 1.5rem;
  line-height: 1;
}

.cart-remove-button,
.cart-remove-button:hover,
.cart-remove-button:focus,
.cart-remove-button:focus-visible {
  width: 34px;
  height: 34px;
  border: 0;
  background: transparent;
  color: var(--accent-dark);
  box-shadow: none;
  outline: 0;
}

.status {
  min-height: 22px;
  color: var(--muted);
  font-weight: 700;
}

.payment-note {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

#checkout-account-note {
  margin-bottom: 12px;
}

.checkout-choice {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 16px 0;
}

.checkout-choice-back {
  grid-column: 1 / -1;
}

.checkout-auth-panel {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.checkout-auth-panel h3 {
  margin: 0;
  font-size: 1.35rem;
}

.account-panel {
  display: grid;
  gap: 14px;
}

.account-copy h3 {
  margin: 0 0 6px;
  font-size: 1.15rem;
}

.account-copy p:not(.eyebrow) {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.account-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.order-history {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.order-history h4 {
  margin: 0;
  font-size: 1rem;
}

.order-history-list {
  display: grid;
  gap: 14px;
}

.order-history-item {
  display: grid;
  gap: 12px;
}

.order-history-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.order-history-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}

.order-history-message-button {
  min-width: auto;
  min-height: 36px;
  padding: 7px 10px;
  white-space: nowrap;
}

.order-history-head div {
  display: grid;
  gap: 4px;
}

.order-history-head .order-history-status {
  display: inline-flex;
}

.order-history-head span,
.order-history-head em,
.order-history-details span,
.order-fulfillment-details,
.order-notes {
  color: var(--muted);
}

.order-history-head em {
  width: fit-content;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgb(96 123 101 / 14%);
  color: var(--sage);
  font-style: normal;
  font-weight: 800;
  text-transform: capitalize;
}

.order-history-item ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.order-history-item li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.order-history-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbf6ed;
}

.order-fulfillment-details {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.order-history-details span,
.order-notes {
  display: grid;
  gap: 2px;
}

.order-history-details strong,
.order-fulfillment-details strong,
.order-notes strong {
  color: var(--ink);
}

.order-notes {
  margin: 0;
}

.order-history-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.order-history-actions .button {
  min-width: 132px;
}

.message-list {
  display: grid;
  gap: 14px;
}

.messages-dialog {
  width: min(420px, 92vw);
  max-width: 92vw;
  height: 100dvh;
  max-height: 100dvh;
  margin: 0 0 0 auto;
  padding: 0;
  border: 1px solid var(--line);
  border-right: 0;
  border-radius: 14px 0 0 14px;
  background: #fff;
  color: var(--ink);
}

.messages-dialog::backdrop {
  background: rgb(48 37 28 / 32%);
}

.messages-dialog-head {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.messages-dialog-head h2 {
  margin: 0;
  font-size: 1.3rem;
}

.messages-dialog .message-list {
  max-height: calc(100dvh - 75px);
  overflow-y: auto;
  padding: 16px 18px 18px;
  background: #fff;
}

.customer-message {
  display: grid;
  gap: 10px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.customer-message:last-child {
  border-bottom: 0;
}

.customer-message-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.customer-message-head span,
.customer-message-meta {
  color: var(--muted);
  font-size: 0.9rem;
}

.customer-message p {
  margin: 0;
}

.customer-message-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
}

.order-history-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.customer-edit-items {
  display: grid;
  gap: 10px;
}

.customer-edit-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.customer-edit-item-info {
  display: grid;
  gap: 2px;
}

.customer-edit-item small {
  color: var(--muted);
  font-weight: 800;
}

.customer-edit-item-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.customer-edit-line-total {
  min-width: 74px;
  text-align: right;
}

.customer-edit-quantity-controls strong {
  min-width: 1.5ch;
  text-align: center;
}

.customer-edit-overall-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 4px;
  font-size: 1.1rem;
}

.customer-edit-overall-total span {
  color: var(--muted);
  font-weight: 800;
}

.status:empty {
  display: none;
}

.status.good {
  color: var(--sage);
}

.status.bad {
  color: var(--accent-dark);
}

.calendar-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.calendar-shell {
  overflow: hidden;
}

.weekday-row,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
}

.weekday-row span {
  padding: 12px;
  background: #f4eadb;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 900;
  text-align: center;
}

.calendar-day {
  min-height: 112px;
  padding: 12px;
  border: 0;
  background: white;
  text-align: left;
}

.calendar-day.muted {
  color: #a19486;
  background: #fbf6ed;
}

.calendar-day.future-order-date {
  background: white;
}

.calendar-day.future-order-date:not(.sold-out):not(.closed) .day-number {
  color: var(--ink);
}

.calendar-day.past-date {
  background: #fff6ed;
  color: var(--ink);
}

.calendar-day.past-date .day-number {
  color: var(--ink);
}

.day-number {
  font-weight: 900;
}

.day-capacity {
  display: inline-block;
  margin-top: 14px;
  padding: 5px 8px;
  border-radius: 999px;
  background: #edf3ed;
  color: var(--sage);
  font-size: 0.78rem;
  font-weight: 900;
}

.calendar-day.sold-out .day-capacity,
.calendar-day.too-soon .day-capacity,
.calendar-day.closed .day-capacity {
  background: #fae7e3;
  color: var(--accent-dark);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.calendar-day.sold-out,
.calendar-day.too-soon,
.calendar-day.closed {
  background: #fff6ed;
}

.calendar-day.sold-out .day-number {
  color: var(--accent-dark);
}

.calendar-day.selected {
  position: relative;
  background: lightyellow;
  outline: 0;
}

.calendar-day.sold-out.selected,
.calendar-day.too-soon.selected,
.calendar-day.closed.selected {
  background: #fff6ed;
}

.calendar-day:disabled,
.calendar-day[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.62;
}

.calendar-day.too-soon,
.calendar-day.closed,
.calendar-day.sold-out,
.calendar-day.past-date,
.calendar-day.too-soon:disabled,
.calendar-day.too-soon[aria-disabled="true"],
.calendar-day.closed:disabled,
.calendar-day.closed[aria-disabled="true"],
.calendar-day.sold-out:disabled,
.calendar-day.sold-out[aria-disabled="true"],
.calendar-day.past-date:disabled,
.calendar-day.past-date[aria-disabled="true"] {
  cursor: default;
  opacity: 1;
}

.calendar-day.too-soon .day-number,
.calendar-day.closed .day-number,
.calendar-day.past-date .day-number {
  color: #a19486;
}

.calendar-info-tooltip {
  position: absolute;
  right: auto;
  bottom: auto;
  z-index: 8;
  display: grid;
}

.calendar-info-tooltip::after {
  right: auto;
  left: var(--calendar-tooltip-arrow-left, 50%);
  transform: translateX(-50%) rotate(45deg);
}

.calendar-info-tooltip[hidden] {
  display: none;
}

.calendar-info-tooltip.below::after {
  top: -9px;
  bottom: auto;
  transform: translateX(-50%) rotate(225deg);
}

.segmented {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  border: 0;
  padding: 0;
  margin: 0 0 16px;
}

.segmented legend {
  width: 100%;
}

.segmented label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  margin: 0;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: white;
  color: var(--ink);
}

.segmented input {
  width: auto;
  min-height: auto;
}

.checkout-form,
.mailing-form {
  display: grid;
  gap: 14px;
}

.checkout-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.checkout-actions .button {
  min-width: 150px;
}

.form-row.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.inline-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.dialog-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 18px;
}

.confetti-burst {
  position: fixed;
  inset: 0;
  z-index: 1000;
  pointer-events: none;
  overflow: hidden;
}

.confetti-burst span {
  position: absolute;
  bottom: -18px;
  left: var(--x);
  width: 9px;
  height: 14px;
  border-radius: 2px;
  background: var(--color);
  animation: confetti-pop 1.45s cubic-bezier(0.14, 0.72, 0.36, 1) var(--delay) forwards;
}

.confetti-burst span:nth-child(3n) {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.confetti-burst span:nth-child(4n) {
  width: 12px;
  height: 6px;
}

@keyframes confetti-pop {
  0% {
    opacity: 0;
    transform: translate3d(0, 0, 0) scale(0.7) rotate(0deg);
  }

  12% {
    opacity: 1;
  }

  58% {
    opacity: 1;
    transform: translate3d(var(--burst-x), calc(-1 * var(--burst-y)), 0) scale(1) rotate(var(--spin));
  }

  100% {
    opacity: 0;
    transform: translate3d(var(--burst-x), calc(-1 * var(--burst-y) + var(--settle)), 0) scale(0.9) rotate(var(--spin));
  }
}

dialog {
  max-width: 460px;
  width: calc(100% - 36px);
  padding: 24px;
}

#message-order-dialog,
#customer-message-baker-dialog {
  width: calc(100% - 36px);
  max-width: min(771px, calc(100vw - 36px));
  height: calc(100vh - 24px);
  max-height: calc(100vh - 24px);
  overflow: auto;
}

#message-order-dialog[open],
#customer-message-baker-dialog[open] {
  display: flex;
  flex-direction: column;
}

#message-order-dialog h2,
#customer-message-baker-dialog h2 {
  flex: 0 0 auto;
  padding-right: 44px;
}

#message-order-form,
#customer-message-baker-form {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
}

#message-order-thread,
#customer-message-thread {
  margin: 0.5rem;
}

.dialog-close-button {
  position: absolute;
  top: 14px;
  right: 14px;
  display: inline-grid;
  width: 42px;
  min-height: 42px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0;
  background: white;
  color: var(--ink);
  cursor: pointer;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1;
}

.dialog-close-button:hover,
.dialog-close-button:focus-visible {
  border-color: var(--accent);
  outline: none;
}

.calendar-modal {
  max-width: min(940px, calc(100vw - 28px));
  max-height: calc(100vh - 28px);
  padding: clamp(14px, 2vw, 20px);
  overflow: auto;
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}

.calendar-modal h2 {
  margin-bottom: 0;
}

.calendar-modal .calendar-controls {
  margin-bottom: 10px;
}

.calendar-modal .weekday-row span {
  padding: 8px;
}

.calendar-modal .calendar-day {
  min-height: clamp(70px, 9vh, 92px);
  padding: 8px;
}

.calendar-modal .day-capacity {
  margin-top: 8px;
}

.calendar-time-panel {
  margin-top: 8px;
}

.calendar-time-actions {
  margin-top: 0.75rem;
}

.time-slot-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.time-slot {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 50px;
  padding: 9px 10px;
  border: 1.5px solid var(--ink);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  text-align: center;
  cursor: pointer;
}

.time-slot span {
  font-size: 0.92rem;
  font-weight: 800;
  justify-self: center;
  line-height: 1.15;
}

.time-slot small {
  color: var(--muted);
  font-size: 0.75rem;
  justify-self: end;
  line-height: 1.1;
  text-align: right;
}

.time-slot:hover,
.time-slot:focus-visible {
  background: #fff6ed;
  outline: none;
}

.time-slot.is-selected {
  border-color: #8a6f1f;
  background: lightyellow;
  box-shadow: 0 0 0 2px rgb(138 111 31 / 14%);
}

.time-slot.is-disabled {
  border-color: var(--line);
  background: #fff6ed;
  color: #a19486;
  cursor: not-allowed;
}

.time-slot.is-disabled small {
  color: #a19486;
}

dialog::backdrop {
  background: rgb(35 32 29 / 45%);
}

@media (max-width: 820px) {
  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .progress-nav {
    justify-self: center;
    width: 100%;
  }

  .progress-step {
    min-width: 86px;
  }

  .progress-step strong {
    max-width: 76px;
    white-space: normal;
  }

  .order-grid,
  .checkout-grid {
    grid-template-columns: 1fr;
  }

  .checkout-grid > aside {
    margin-top: 0;
  }

  .fulfillment-options {
    grid-template-columns: 1fr;
  }

  .admin-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .admin-summary {
    grid-template-columns: 1fr;
  }

  .admin-availability-layout {
    grid-template-columns: 1fr;
  }

  .calendar-day {
    min-height: 86px;
    padding: 8px;
  }

  .calendar-modal .calendar-day {
    min-height: 68px;
    padding: 6px;
  }

  .home-product-card {
    grid-template-columns: 1fr;
  }

  .home-product-card:nth-child(even) > img,
  .home-product-card:nth-child(even) .product-flip {
    order: 0;
  }

  .home-product-card > img,
  .product-flip,
  .product-flip-inner {
    min-height: 240px;
    aspect-ratio: 4 / 3;
  }
}

@media (max-width: 560px) {
  .site-header {
    gap: 8px;
    padding-top: 10px;
  }

  .header-menu-action,
  .header-cart-action {
    top: 10px;
    transform: none;
  }

  .site-header h1 {
    font-size: 1.3rem;
  }

  .header-tagline {
    font-size: 0.58rem;
  }

  .header-order-button {
    width: 38px;
    overflow: hidden;
    padding: 0;
    color: transparent;
    font-size: 0;
  }

  .header-order-button::before {
    content: "+";
    color: white;
    font-size: 1.4rem;
    line-height: 1;
  }

  .progress-nav {
    width: 100%;
    display: none;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    justify-content: stretch;
    overflow: visible;
    margin-top: 4px;
    padding-top: 8px;
  }

  .order-started .progress-nav {
    display: grid;
  }

  .progress-step {
    min-width: 0;
    width: 100%;
    gap: 4px;
    padding: 6px 0;
  }

  .progress-step:not(:last-child)::after {
    top: 19.5px;
    left: calc(50% + 23px);
    right: calc(-50% + 23px);
    width: auto;
  }

  .progress-step span {
    width: 30px;
    height: 30px;
  }

  .progress-step span::before {
    top: -6px;
    border-right-width: 4px;
    border-top-width: 0;
    border-bottom-width: 6px;
    border-left-width: 4px;
    transform-origin: 50% 21px;
  }

  .progress-step span::after {
    inset: 6px;
  }

  .progress-step strong {
    max-width: none;
    font-size: 0;
    line-height: 1;
    white-space: nowrap;
  }

  .progress-step strong::after {
    font-size: 0.65rem;
  }

  .progress-step[data-progress-step="fulfillment"] strong::after {
    content: "Start";
  }

  .progress-step[data-progress-step="date"] strong::after {
    content: "Date";
  }

  .progress-step[data-progress-step="items"] strong::after {
    content: "Items";
  }

  .progress-step[data-progress-step="review"] strong::after {
    content: "Review";
  }

  .progress-step[data-progress-step="checkout"] strong::after {
    content: "Checkout";
  }

  .hero {
    min-height: 60vh;
  }

  .weekday-row span {
    padding: 8px 4px;
    font-size: 0.7rem;
  }

  .day-capacity {
    font-size: 0.68rem;
    padding: 4px 5px;
  }

  .calendar-modal {
    width: calc(100% - 16px);
    max-height: calc(100vh - 16px);
    padding: 12px;
  }

  .calendar-modal .calendar-day {
    min-height: 58px;
    padding: 5px;
  }

  .calendar-modal .day-capacity {
    margin-top: 5px;
  }

  .time-slot-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .time-slot {
    grid-template-columns: 1fr;
    gap: 2px;
    min-height: 44px;
    padding: 8px;
  }

  .time-slot span {
    font-size: 0.76rem;
  }

  .time-slot small {
    justify-self: center;
    font-size: 0.68rem;
    text-align: center;
  }

  .admin-availability-head {
    flex-direction: column;
  }

  .admin-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 1px;
  }

  .admin-tab {
    flex: 0 0 auto;
  }

  .admin-availability-head .status,
  .admin-messages-head .status {
    max-width: none;
    text-align: left;
  }

  .admin-messages-head,
  .admin-message-card-head {
    flex-direction: column;
  }

  .admin-message-filters,
  .admin-message-status-filter {
    align-items: flex-start;
    flex-direction: column;
  }

  .admin-message-summary-card,
  .admin-contact-summary-card {
    grid-template-columns: 1fr;
  }

  .admin-message-count-label,
  .admin-contact-summary-card time {
    justify-self: start;
    text-align: left;
  }

  .admin-message-card-head time {
    text-align: left;
  }

  .admin-unavailable-time-grid {
    grid-template-columns: 1fr;
  }

  .admin-time-toggle {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .admin-time-toggle small {
    justify-self: center;
    text-align: center;
  }

  .form-row.split,
  .form-grid,
  .admin-table-controls,
  .admin-bulk-actions,
  .inline-form,
  .checkout-choice,
  .checkout-actions {
    grid-template-columns: 1fr;
  }

  .step-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .step-actions .button {
    width: 100%;
  }

  .account-row,
  .order-history-item {
    align-items: flex-start;
    grid-template-columns: 1fr;
  }

  .customer-edit-item {
    grid-template-columns: 1fr;
  }

  .customer-edit-item-actions {
    justify-content: space-between;
  }

  .customer-edit-line-total {
    text-align: left;
  }

  .account-row {
    flex-direction: column;
  }

}

@media (max-width: 360px) {
  .time-slot-grid {
    grid-template-columns: 1fr;
  }
}
