:root {
  color-scheme: dark;
  --bg: #07080a;
  --surface: #121316;
  --surface-2: #191a1f;
  --surface-3: #24262e;
  --text: #ffffff;
  --muted: #8e93a6;
  --soft: #d1d5db;
  --line: rgba(255, 255, 255, 0.05);
  --line-strong: rgba(255, 255, 255, 0.1);
  --accent: linear-gradient(135deg, #f2c94c 0%, #d5853b 100%);
  --accent-solid: #f2c94c;
  --accent-purple: #d5853b;
  --accent-cyan: #e2c08d;
  --accent-ink: #07080a;
  --danger: #e06c75;
  --shadow: 0 16px 36px rgba(0, 0, 0, 0.65);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  touch-action: manipulation;
  -webkit-text-size-adjust: 100%;
  height: 100%;
  overflow: hidden;
}

body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  letter-spacing: -0.015em;
  touch-action: manipulation;
  overscroll-behavior: none;
  overflow: hidden;
}

button,
input,
textarea,
select,
a {
  font: inherit;
  touch-action: manipulation;
}

button {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
}

button:active {
  transform: scale(0.97);
}

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

.app-shell {
  width: min(100vw, 480px);
  max-width: 480px;
  height: 100vh;
  height: 100dvh;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  margin: 0 auto;
  padding: 12px 12px calc(112px + env(safe-area-inset-bottom));
  position: relative;
}

.topbar {
  position: static;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  margin-bottom: 12px;
  border-radius: 20px;
  background: rgba(18, 19, 22, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow);
}

.brand-lockup {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: auto;
  height: 36px;
  flex: 0 0 auto;
  display: block;
  object-fit: contain;
}

.brand-copy {
  min-width: 0;
}

.eyebrow {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

h1 {
  margin-top: 1px;
  font-size: 20px;
  line-height: 1.1;
  font-weight: 800;
  color: #ffffff;
}

h2 {
  font-size: 19px;
  line-height: 1.15;
  font-weight: 800;
}

.cart-pill {
  min-width: 90px;
  min-height: 42px;
  display: grid;
  grid-template-columns: 18px auto 1fr;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
  padding: 6px 12px;
  color: var(--text);
}

.cart-pill.has-items {
  border-color: var(--accent-solid);
}

.cart-glyph {
  width: 16px;
  height: 16px;
  position: relative;
  display: inline-block;
  border: 2px solid var(--text);
  border-top: 0;
  border-radius: 2px 2px 4px 4px;
}

.cart-glyph::before {
  content: "";
  position: absolute;
  left: 2px;
  right: 2px;
  top: -5px;
  height: 7px;
  border: 2px solid var(--text);
  border-bottom: 0;
  border-radius: 6px 6px 0 0;
}

#cartBadge {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--accent-solid);
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
}

#cartTotal {
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  color: var(--text);
}

.welcome-band {
  min-height: 110px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 110px;
  gap: 12px;
  align-items: center;
  margin: 4px 0 16px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
  position: relative;
}

.welcome-copy {
  min-width: 0;
  position: relative;
  z-index: 1;
}

.welcome-band h2 {
  font-size: 19px;
  font-weight: 800;
  color: #ffffff;
}

.welcome-band p {
  max-width: 28ch;
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
  font-weight: 500;
}

.welcome-logo {
  width: 120px;
  max-width: 100%;
  justify-self: end;
  display: block;
  opacity: 0.9;
}

#cartTotal {
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
  color: var(--soft);
}

.welcome-band {
  min-height: 126px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px;
  gap: 12px;
  align-items: center;
  margin: 4px 0 16px;
  padding: 20px;
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  background:
    radial-gradient(circle at 100% 0%, rgba(242, 201, 76, 0.15), transparent 70%),
    radial-gradient(circle at 0% 100%, rgba(213, 133, 59, 0.18), transparent 70%),
    rgba(17, 18, 22, 0.95);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
  overflow: hidden;
  position: relative;
}

.welcome-band::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 20px;
  padding: 1px;
  background: linear-gradient(135deg, rgba(213, 133, 59, 0.45), rgba(242, 201, 76, 0.2), transparent);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.welcome-copy {
  min-width: 0;
  position: relative;
  z-index: 1;
}

.welcome-band h2 {
  font-size: 20px;
  font-weight: 900;
  background: linear-gradient(135deg, #ffffff 40%, #f2c94c 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.welcome-band p {
  max-width: 28ch;
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  font-weight: 500;
}

.welcome-logo {
  width: 140px;
  max-width: 100%;
  justify-self: end;
  display: block;
  opacity: 0.95;
  filter: drop-shadow(0 0 15px rgba(242, 201, 76, 0.25));
}

.customer-mode-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 0 0 14px;
}

.customer-mode-tabs button {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(20, 21, 26, 0.6);
  color: var(--soft);
  font-size: 14px;
  font-weight: 800;
  backdrop-filter: blur(10px);
}

.customer-mode-tabs button.active {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: transparent;
  box-shadow: 0 4px 20px rgba(242, 201, 76, 0.35);
}

.search-field,
.field {
  display: grid;
  gap: 8px;
  color: var(--soft);
  font-size: 12px;
  font-weight: 800;
}

.search-field input,
.field input,
.field textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  background: rgba(18, 19, 22, 0.75);
  backdrop-filter: blur(12px);
  color: var(--text);
  outline: 0;
  padding: 13px 16px;
  font-size: 14px;
  transition: all 0.2s ease;
}

.field textarea {
  resize: vertical;
}

.search-field input::placeholder,
.field input::placeholder,
.field textarea::placeholder {
  color: var(--muted);
  opacity: 0.7;
}

.search-field input:focus,
.field input:focus,
.field textarea:focus {
  border-color: var(--accent-solid);
  box-shadow: 0 0 18px rgba(242, 201, 76, 0.2);
}

.category-tabs-shell {
  position: relative;
}

.category-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 12px 0 14px;
  scrollbar-width: none;
  scroll-behavior: smooth;
  scroll-padding-inline: 40px;
  transition: padding 160ms ease;
}

.category-tabs-shell.has-overflow .category-tabs {
  padding-inline: 40px;
}

.category-tabs::-webkit-scrollbar {
  display: none;
}

.category-scroll-button {
  position: absolute;
  top: 50%;
  z-index: 2;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(18, 19, 22, 0.95);
  backdrop-filter: blur(12px);
  color: var(--text);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-50%) scale(0.96);
  transition: all 160ms ease;
}

.category-tabs-shell.has-overflow .category-scroll-button {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(-50%) scale(1);
}

.category-scroll-button--prev {
  left: 0;
}

.category-scroll-button--next {
  right: 0;
}

.category-scroll-button span {
  width: 9px;
  height: 9px;
  display: block;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
}

.category-scroll-button--prev span {
  margin-left: 3px;
  transform: rotate(-135deg);
}

.category-scroll-button--next span {
  margin-right: 3px;
  transform: rotate(45deg);
}

.category-scroll-button:hover {
  border-color: var(--accent-solid);
  background: var(--accent);
  color: var(--accent-ink);
}

.tab-button {
  flex: 0 0 auto;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(18, 19, 22, 0.6);
  backdrop-filter: blur(10px);
  color: var(--soft);
  padding: 0 16px;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.tab-button.active {
  border-color: transparent;
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 4px 18px rgba(242, 201, 76, 0.35);
}

.view-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 2px 0 12px;
}

.view-head > div {
  min-width: 0;
}

.view-head h2 {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.back-button,
.icon-button {
  flex: 0 0 auto;
  min-width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-weight: 900;
}

.back-button {
  padding: 0 12px;
}

.icon-button.ghost {
  background: transparent;
}

.hidden {
  display: none !important;
}

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

.product-card,
.variant-card,
.empty-state {
  min-width: 0;
  border: 1px solid var(--line-strong);
  border-radius: 22px;
  background: var(--surface);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-card:hover {
  border-color: rgba(242, 201, 76, 0.35);
  transform: translateY(-4px);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.6), 0 0 20px rgba(242, 201, 76, 0.08);
}

.product-card {
  display: flex;
  flex-direction: column;
}

.opened-product-card {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(132px, 0.9fr) minmax(0, 1fr);
  gap: 12px;
  align-items: stretch;
  min-width: 0;
  border: 1px solid var(--line-strong);
  border-radius: 22px;
  background: var(--surface-2);
  overflow: hidden;
}

.opened-product-card .product-title {
  margin-top: 4px;
  font-size: 17px;
}

.opened-product-media {
  aspect-ratio: 1 / 1;
  border-bottom: 0;
  border-right: 1px solid var(--line);
  display: grid;
  place-items: center;
  padding: 8px;
  background: var(--surface-2);
}

.opened-product-media img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.opened-product-body {
  min-width: 0;
  display: grid;
  align-content: center;
  gap: 10px;
  padding: 14px;
}

.edit-order-banner,
.cart-edit-hint {
  display: grid;
  gap: 10px;
  border: 1px solid var(--accent-solid);
  border-radius: 14px;
  background: var(--surface-2);
  padding: 14px;
}

.edit-order-banner {
  grid-column: 1 / -1;
}

.edit-order-banner h3,
.cart-edit-hint h3 {
  margin: 0;
  color: var(--text);
  font-size: 15px;
  line-height: 1.25;
}

.edit-order-banner p:not(.eyebrow),
.cart-edit-hint p:not(.eyebrow) {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.product-media {
  width: 100%;
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
  position: relative;
  overflow: hidden;
  padding: 8px;
}

.product-media img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: transform 0.25s ease;
}

.product-card:hover .product-media img {
  transform: scale(1.05);
}

.product-media img.uploaded-photo {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  padding: 4px;
}

.product-body {
  min-height: 130px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 8px;
  padding: 12px;
}

.product-title {
  min-width: 0;
  color: var(--text);
  font-size: 14px;
  line-height: 1.25;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.product-desc {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.product-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  align-self: end;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.price {
  color: #ffffff;
  font-size: 15px;
  font-weight: 800;
  white-space: nowrap;
  letter-spacing: -0.02em;
}

.stock {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-weight: 500;
}

.add-button,
.primary-button,
.choice-button,
.secondary-button,
.danger-button {
  width: 100%;
  min-height: 44px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.01em;
}

.add-button,
.primary-button,
.choice-button {
  border: 0;
  background: var(--accent);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.3);
}

.add-button:hover,
.primary-button:hover,
.choice-button:hover {
  opacity: 0.95;
  box-shadow: 0 6px 18px rgba(99, 102, 241, 0.45);
}

.secondary-button {
  border: 1px solid var(--line-strong);
  background: var(--surface-2);
  color: var(--text);
}

.danger-button {
  border: 1px solid rgba(248, 113, 113, 0.3);
  background: rgba(248, 113, 113, 0.15);
  color: var(--danger);
}
  font-weight: 900;
  white-space: nowrap;
  letter-spacing: -0.02em;
}

.stock {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-weight: 600;
}

.add-button,
.primary-button,
.choice-button,
.secondary-button,
.danger-button {
  width: 100%;
  min-height: 46px;
  border-radius: 12px;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0.01em;
}

.add-button,
.primary-button,
.choice-button {
  border: 0;
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 4px 18px rgba(168, 85, 247, 0.35);
}

.add-button:hover,
.primary-button:hover,
.choice-button:hover {
  box-shadow: 0 6px 24px rgba(168, 85, 247, 0.5);
}

.secondary-button {
  border: 1px solid var(--line-strong);
  background: rgba(28, 31, 46, 0.6);
  color: var(--text);
  backdrop-filter: blur(10px);
}

.danger-button {
  border: 1px solid rgba(239, 68, 68, 0.3);
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
  backdrop-filter: blur(10px);
}

.active-orders-view {
  display: grid;
  gap: 10px;
}

.active-order-card {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  background: var(--surface-2);
  padding: 14px;
  box-shadow: var(--shadow);
}

.active-order-head,
.active-order-meta,
.active-order-items div,
.active-order-actions {
  display: grid;
  gap: 8px;
}

.active-order-head {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
}

.active-order-head strong {
  font-size: 17px;
  font-weight: 900;
}

.active-order-meta {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  color: var(--muted);
  font-size: 12px;
}

.order-note {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.order-locked-note {
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--surface-3);
  color: var(--soft);
  font-size: 13px;
  line-height: 1.35;
}

.active-order-items {
  display: grid;
  gap: 6px;
}

.active-order-items div {
  grid-template-columns: minmax(0, 1fr) auto;
  color: var(--soft);
  font-size: 13px;
}

.active-order-items strong {
  color: var(--text);
}

.active-order-actions {
  grid-template-columns: 1fr 1fr;
}

.add-button {
  border: 1px solid var(--accent);
}

.add-button:active,
.primary-button:active,
.choice-button:active,
.tab-button:active {
  transform: translateY(1px);
}

.variant-card {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 50px;
  gap: 12px;
  align-items: center;
  padding: 12px;
  padding-bottom: calc(12px + env(safe-area-inset-bottom));
}

.variant-card .product-title {
  margin-top: 4px;
  font-size: 17px;
}

.variant-card .product-desc {
  margin-top: 6px;
}

.variant-card .product-meta {
  justify-content: flex-start;
  margin-top: 10px;
}

.qty-stack {
  width: 44px;
  display: grid;
  grid-template-rows: 38px 28px 38px;
  gap: 5px;
  justify-items: center;
  align-items: center;
  font-weight: 900;
}

.qty-stack button {
  width: 38px;
  height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--text);
  font-size: 20px;
  font-weight: 900;
}

.qty-stack button:first-child {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}

.qty-stack span {
  min-width: 30px;
  text-align: center;
  font-size: 15px;
}

button:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.empty-state {
  grid-column: 1 / -1;
  min-height: 130px;
  display: grid;
  place-items: center;
  padding: 18px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
  text-align: center;
  gap: 8px;
  position: relative;
}

.empty-state::before {
  content: "";
  width: 72px;
  height: 72px;
  display: block;
  margin-bottom: 6px;
  background: url("/assets/puffbox-logo.svg?v=puff2") center / contain no-repeat;
  opacity: 0.35;
  filter: drop-shadow(0 0 12px rgba(0, 242, 254, 0.3));
}

.empty-state.compact {
  min-height: 104px;
}

.checkout-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 8;
  width: min(100vw, 480px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(145px, 1fr);
  gap: 12px;
  align-items: center;
  padding: 14px 16px calc(14px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line-strong);
  border-radius: 20px 20px 0 0;
  background: rgba(18, 19, 22, 0.95);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.6);
}

.checkout-bar span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
  font-weight: 600;
}

.checkout-bar strong {
  display: block;
  margin-top: 2px;
  font-size: 20px;
  line-height: 1.1;
  color: var(--accent-solid);
  font-weight: 900;
}

.checkout-flow {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: end center;
  background: rgba(9, 10, 15, 0.82);
  backdrop-filter: blur(8px);
}

.cart-drawer {
  position: fixed;
  inset: 0;
  z-index: 18;
  display: grid;
  place-items: end center;
  background: rgba(9, 10, 15, 0.8);
  backdrop-filter: blur(8px);
}

.cart-sheet {
  width: min(100vw, 480px);
  max-height: 86vh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  gap: 14px;
  overflow: hidden;
  padding: 18px;
  border: 1px solid var(--line-strong);
  border-radius: 24px 24px 0 0;
  background: rgba(18, 19, 22, 0.96);
  backdrop-filter: blur(24px);
  box-shadow: 0 -20px 50px rgba(0, 0, 0, 0.7);
}

.cart-head,
.cart-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.cart-body {
  display: grid;
  gap: 9px;
  overflow: auto;
  padding-right: 2px;
}

.cart-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: var(--surface-2);
}

.cart-line-main {
  min-width: 0;
}

.cart-line h3 {
  margin: 0;
  color: var(--text);
  font-size: 15px;
  line-height: 1.2;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.cart-line p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.25;
}

.cart-line strong {
  display: block;
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.1;
}

.cart-line-controls {
  display: grid;
  grid-template-rows: 34px 24px 34px;
  gap: 4px;
  justify-items: center;
  align-items: center;
}

.cart-line-controls button {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--text);
  font-size: 18px;
  font-weight: 900;
}

.cart-line-controls button:first-child {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}

.cart-line-controls span {
  font-weight: 900;
}

.remove-line {
  grid-column: 1 / -1;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.cart-actions {
  padding-top: 2px;
}

.cart-actions > div {
  min-width: 86px;
}

.cart-actions span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
}

.cart-actions strong {
  display: block;
  margin-top: 2px;
  font-size: 20px;
  line-height: 1.1;
}

.flow-card {
  width: min(100vw, 480px);
  max-height: 92vh;
  overflow: auto;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px 8px 0 0;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.flow-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

#flowBody {
  display: grid;
  gap: 12px;
}

.choice-grid {
  display: grid;
  gap: 10px;
}

.choice-button {
  min-height: 54px;
}

.day-closed-alert {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: rgba(53, 53, 53, 0.95);
  color: var(--text);
  font-size: 13px;
  line-height: 1.35;
}

.day-closed-alert strong {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 18px;
  font-weight: 900;
}

.tomorrow-time-field {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: var(--surface-2);
  overflow: hidden;
}

.tomorrow-time-field span {
  padding: 0 12px;
  color: var(--text);
  font-weight: 900;
}

.tomorrow-time-field input {
  border: 0;
  border-left: 1px solid var(--line-strong);
  border-radius: 0;
  background: transparent;
}

.tomorrow-time-field input:focus {
  box-shadow: none;
}

.cart-review {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: var(--surface-2);
}

.review-line {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.review-line strong {
  color: var(--text);
  white-space: nowrap;
}

.review-line.total {
  color: var(--text);
  font-size: 16px;
  font-weight: 900;
}

.form-message {
  min-height: 20px;
  color: var(--text);
  font-size: 13px;
}

.form-message.error {
  color: var(--danger);
}

.success-view {
  display: grid;
  gap: 10px;
  text-align: center;
  padding: 20px 0;
}

.success-view::before {
  content: "";
  width: 96px;
  height: 96px;
  display: block;
  margin: 0 auto 2px;
  background: url("/assets/puffbox-logo.svg?v=puff2") center / contain no-repeat;
  opacity: 0.9;
  filter: drop-shadow(0 0 20px rgba(0, 242, 254, 0.45));
}

.success-view p {
  color: var(--muted);
}

.blocked-user {
  min-height: 100svh;
  display: grid;
  place-items: center;
}

.blocked-user .app-shell {
  min-height: 100svh;
  display: grid;
  place-items: center;
}

.blocked-screen {
  width: min(100%, 360px);
  display: grid;
  gap: 12px;
  justify-items: center;
  text-align: center;
  padding: 30px 18px;
}

.blocked-screen img {
  width: 88px;
  height: 88px;
  object-fit: cover;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
}

.blocked-screen h1 {
  font-size: 26px;
}

.blocked-screen p:last-child {
  color: var(--muted);
  line-height: 1.45;
}

@media (max-width: 380px) {
  .opened-product-card {
    grid-template-columns: 1fr;
  }

  .opened-product-media {
    aspect-ratio: 1 / 0.72;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .welcome-band {
    grid-template-columns: minmax(0, 1fr) 112px;
    min-height: 118px;
  }

  .welcome-logo {
    width: 120px;
  }
}

@media (max-width: 360px) {
  .app-shell {
    padding-inline: 10px;
  }

  h1 {
    font-size: 21px;
  }

  .brand-mark {
    height: 28px;
  }

  .cart-pill {
    min-width: 96px;
  }

  .product-grid {
    gap: 8px;
  }

  .product-body {
    min-height: 192px;
    padding: 10px;
  }

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

@media (max-width: 430px) {
  .cart-pill {
    min-width: 74px;
    grid-template-columns: 18px 22px;
    justify-content: center;
  }

  #cartTotal {
    display: none;
  }

  .customer-mode-tabs button {
    font-size: 13px;
  }
}

.app-credit {
  margin: 18px 0 4px;
  text-align: center;
  font-size: 12px;
  line-height: 1.4;
  color: var(--muted);
}

.app-credit a {
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid var(--line-strong);
}

.app-credit a:hover {
  color: #ffffff;
}

.catalog-error {
  grid-column: 1 / -1;
  display: grid;
  gap: 12px;
  justify-items: center;
  text-align: center;
  padding: 28px 16px;
  color: var(--muted);
}

.catalog-error .add-button {
  width: auto;
  min-width: 160px;
}

.subscription-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  padding: 24px 20px;
  background: rgba(14, 15, 20, 0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.subscription-card {
  width: min(100%, 360px);
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 24px;
  padding: 32px 24px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.7);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.subscription-logo {
  height: 44px;
  width: auto;
  margin-bottom: 4px;
}

.subscription-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(242, 201, 76, 0.15);
  color: var(--accent-solid);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.subscription-card h2 {
  font-size: 20px;
  font-weight: 800;
  color: #ffffff;
}

.subscription-card p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.subscription-actions {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
}

.sub-button {
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

/* Luxury Upsell Section in Cart */
.cart-upsell-section {
  margin-top: 14px;
  border-top: 1px dashed var(--line-strong);
  padding-top: 14px;
}

.upsell-title {
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 800;
  color: var(--accent-solid);
  letter-spacing: -0.01em;
}

.upsell-row {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 6px;
  scrollbar-width: none;
}

.upsell-row::-webkit-scrollbar {
  display: none;
}

.upsell-card {
  flex: 0 0 148px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: var(--surface-2);
  transition: all 0.2s ease;
}

.upsell-card:hover {
  border-color: rgba(242, 201, 76, 0.25);
  transform: translateY(-2px);
}

.upsell-card-info h4 {
  margin: 0;
  font-size: 12px;
  font-weight: 900;
  color: var(--text);
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.upsell-card-info p {
  margin: 4px 0 0;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.2;
}

.upsell-add-btn {
  width: 100%;
  min-height: 28px;
  border: 1px solid var(--accent-solid);
  border-radius: 10px;
  background: transparent;
  color: var(--accent-solid);
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
  transition: all 0.2s ease;
}

.upsell-add-btn:active {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: transparent;
  transform: translateY(1px);
}

/* Custom Premium Scrollbar for Cart body */
.cart-body::-webkit-scrollbar {
  width: 4px;
}

.cart-body::-webkit-scrollbar-track {
  background: transparent;
}

.cart-body::-webkit-scrollbar-thumb {
  background: var(--line-strong);
  border-radius: 99px;
}

/* Free Shipping Progress Bar */
.free-shipping-info {
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: var(--surface-2);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.free-shipping-info.success {
  background: rgba(242, 201, 76, 0.08);
  border-color: rgba(242, 201, 76, 0.15);
  text-align: center;
  font-weight: 700;
}

.free-shipping-info.success span {
  color: var(--accent-solid);
  font-weight: 900;
}

.free-shipping-info span {
  font-size: 12px;
  color: var(--soft);
}

.progress-bar-bg {
  width: 100%;
  height: 6px;
  border-radius: 99px;
  background: var(--line-strong);
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  border-radius: 99px;
  background: var(--accent);
  transition: width 0.3s ease;
}

.toast {
  position: fixed;
  bottom: 86px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: rgba(15, 23, 42, 0.95);
  color: #fff;
  border: 1px solid rgba(0, 242, 254, 0.4);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 20px rgba(0, 242, 254, 0.25);
  padding: 10px 20px;
  border-radius: 99px;
  font-size: 13px;
  font-weight: 700;
  backdrop-filter: blur(12px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1000;
  text-align: center;
  max-width: 90%;
  white-space: nowrap;
}

.toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}


