:root {
  --bg: #0b0b0d;
  --panel: #151519;
  --panel-2: #1d1d23;
  --text: #f6f4f0;
  --muted: #c6c0b6;
  --line: #2d2d36;
  --gold: #f4bf60;
  --danger: #d24a4a;
  --page-bg: #09090b;
  --page-bg-art: radial-gradient(circle at 10% 10%, #1a1712, #09090b 45%);
  --code-bg: #0f0f14;
  --code-border: #2b2b34;
  --topbar-border: rgba(255, 255, 255, 0.08);
  --topbar-bg: rgba(9, 9, 11, 0.88);
  --topbar-shadow: none;
  --link-btn-border: #3a342b;
  --link-btn-bg: #17140f;
  --link-btn-text: #f9d79a;
  --link-btn-bg-hover: #1d1810;
  --panel-bg: linear-gradient(180deg, rgba(28, 24, 19, 0.92), rgba(16, 16, 20, 0.92));
  --panel-border: rgba(255, 255, 255, 0.12);
  --panel-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
  --product-bg: rgba(11, 11, 14, 0.6);
  --input-bg: #111116;
  --input-border: #3a3a45;
  --btn-border: #4f4637;
  --btn-bg: #1d160c;
  --btn-text: #f5dfb1;
  --slot-picker-bg: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
  --slot-picker-border: rgba(255, 255, 255, 0.14);
  --slot-title: #f3ece0;
  --slot-tab-bg: rgba(255, 255, 255, 0.04);
  --slot-tab-border: rgba(255, 255, 255, 0.16);
  --slot-tab-text: #dfd3be;
  --slot-service-bg: rgba(8, 10, 16, 0.44);
  --slot-service-border: rgba(255, 255, 255, 0.14);
  --slot-head-strong: #fff3de;
  --slot-head-span: #d8c7aa;
  --slot-chip-bg: rgba(255, 255, 255, 0.06);
  --slot-chip-border: rgba(244, 191, 96, 0.56);
  --slot-chip-text: #ffbe63;
  --slot-chip-shadow: 0 6px 14px rgba(244, 191, 96, 0.16);
  --slot-chip-active-shadow: 0 8px 14px rgba(245, 104, 47, 0.34);
  --slot-place-text: #d8c7aa;
  --slot-place-visible: #ffe8b8;
  --cart-line-bg: rgba(0, 0, 0, 0.22);
  --qty-btn-bg: #17130d;
  --qty-btn-border: #4f4637;
  --qty-btn-text: #f5dfb1;
  --modal-bg: linear-gradient(180deg, #1b1712, #0f1014);
  --option-row-bg: rgba(255, 255, 255, 0.03);
  --option-row-border: rgba(255, 255, 255, 0.12);
  --sticky-bg: linear-gradient(180deg, rgba(28, 24, 19, 0.98), rgba(16, 16, 20, 0.95));
  --sticky-border: rgba(255, 255, 255, 0.1);
}

html[data-site-theme="light"] {
  --bg: #f5f3ee;
  --panel: #ffffff;
  --panel-2: #f4f1ea;
  --text: #232730;
  --muted: #666d78;
  --line: #d8dee7;
  --gold: #bf7f1e;
  --danger: #c94747;
  --page-bg: #f7f6f2;
  --page-bg-art: linear-gradient(180deg, #faf9f6, #f2efe8 100%);
  --code-bg: #f3f5f8;
  --code-border: #d8dde6;
  --topbar-border: rgba(111, 122, 140, 0.14);
  --topbar-bg: rgba(255, 255, 255, 0.92);
  --topbar-shadow: 0 10px 30px rgba(36, 44, 58, 0.08);
  --link-btn-border: #d8dde6;
  --link-btn-bg: #ffffff;
  --link-btn-text: #344054;
  --link-btn-bg-hover: #f6f8fb;
  --panel-bg: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 244, 238, 0.96));
  --panel-border: rgba(111, 122, 140, 0.14);
  --panel-shadow: 0 18px 38px rgba(36, 44, 58, 0.08);
  --product-bg: rgba(255, 255, 255, 0.92);
  --input-bg: #ffffff;
  --input-border: #d8dde6;
  --btn-border: #d8dde6;
  --btn-bg: #ffffff;
  --btn-text: #2e3644;
  --slot-picker-bg: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 245, 240, 0.96));
  --slot-picker-border: rgba(111, 122, 140, 0.14);
  --slot-title: #3a4656;
  --slot-tab-bg: rgba(255, 255, 255, 0.96);
  --slot-tab-border: rgba(111, 122, 140, 0.16);
  --slot-tab-text: #556172;
  --slot-service-bg: rgba(255, 255, 255, 0.92);
  --slot-service-border: rgba(111, 122, 140, 0.14);
  --slot-head-strong: #26303e;
  --slot-head-span: #697586;
  --slot-chip-bg: rgba(255, 255, 255, 0.98);
  --slot-chip-border: rgba(191, 127, 30, 0.42);
  --slot-chip-text: #bf7f1e;
  --slot-chip-shadow: 0 8px 16px rgba(191, 127, 30, 0.10);
  --slot-chip-active-shadow: 0 10px 18px rgba(245, 104, 47, 0.18);
  --slot-place-text: #697586;
  --slot-place-visible: #384657;
  --cart-line-bg: rgba(250, 251, 253, 0.94);
  --qty-btn-bg: #ffffff;
  --qty-btn-border: #d8dde6;
  --qty-btn-text: #2e3644;
  --modal-bg: linear-gradient(180deg, #ffffff, #f7f4ee);
  --option-row-bg: rgba(250, 251, 253, 0.92);
  --option-row-border: rgba(111, 122, 140, 0.14);
  --sticky-bg: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(246, 244, 239, 0.96));
  --sticky-border: rgba(111, 122, 140, 0.12);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--page-bg);
  background-image: var(--page-bg-art);
  color: var(--text);
  font-family: Manrope, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  min-height: 100%;
  -webkit-text-size-adjust: 100%;
}

a {
  color: var(--gold);
}

code {
  background: var(--code-bg);
  border: 1px solid var(--code-border);
  border-radius: 6px;
  padding: 2px 6px;
}

.wrap {
  width: min(1260px, 100% - 24px);
  margin: 0 auto;
}

.topbar {
  border-bottom: 1px solid var(--topbar-border);
  background: var(--topbar-bg);
  backdrop-filter: blur(7px);
  position: sticky;
  top: 0;
  z-index: 20;
  box-shadow: var(--topbar-shadow);
}

.topbar .wrap {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.brand {
  color: var(--text);
  text-decoration: none;
  font-weight: 800;
}

.nav-right {
  display: flex;
  gap: 8px;
  align-items: center;
}

.hello {
  font-size: 13px;
  color: var(--muted);
}

.link-btn {
  text-decoration: none;
  border: 1px solid var(--link-btn-border);
  background: var(--link-btn-bg);
  color: var(--link-btn-text);
  padding: 8px 11px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
}

.link-btn:hover {
  text-decoration: none;
  background: var(--link-btn-bg-hover);
}

.theme-toggle {
  cursor: pointer;
}

main.wrap {
  padding: 18px 0 28px;
}

.intro h1 {
  margin: 0 0 8px;
  font-size: clamp(1.45rem, 1.2rem + 1vw, 2.05rem);
}

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

.small {
  font-size: 13px;
}

.center {
  text-align: center;
}

.panel,
.auth-card {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: 14px;
  padding: 14px;
  box-shadow: var(--panel-shadow);
}

.alert {
  padding: 10px 12px;
  border-radius: 10px;
  margin: 10px 0;
}

.alert.error {
  border: 1px solid rgba(210, 74, 74, 0.45);
  background: rgba(210, 74, 74, 0.12);
  color: #ffd9d9;
}

.alert.info {
  border: 1px solid rgba(78, 196, 170, 0.45);
  background: rgba(78, 196, 170, 0.12);
  color: #cff9ef;
}

.grid-main {
  margin-top: 14px;
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 14px;
  align-items: start;
}

.builder-mobile-steps {
  display: none;
}

.builder-step-panel {
  display: block;
}

.builder-form-step {
  display: grid;
  gap: 10px;
}

.builder-step-actions-mobile {
  display: none;
}

.builder-mobile-footer {
  display: none;
}

.builder-step-meta {
  display: grid;
  gap: 2px;
}

.builder-step-meta strong {
  font-size: 0.96rem;
}

.builder-step-meta span {
  color: var(--muted);
  font-size: 0.9rem;
}

.checkout-summary {
  display: grid;
  gap: 8px;
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  background: var(--cart-line-bg);
  padding: 10px 12px;
}

.checkout-summary-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
}

.checkout-summary-line span {
  color: var(--muted);
  font-size: 0.92rem;
}

.checkout-summary-line strong {
  text-align: right;
}

@keyframes builderStepFade {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.panel-products {
  position: relative;
}

.panel-products-sticky {
  position: relative;
  padding-bottom: 10px;
  margin-bottom: 8px;
}

.panel-products-sticky h2 {
  margin: 0 0 10px;
}

.cats {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.category-picker-open {
  display: none;
  width: 100%;
  border: 1px solid rgba(245, 136, 64, 0.28);
  background: linear-gradient(180deg, #ff9956, #f06a32);
  color: #fff;
  border-radius: 14px;
  padding: 11px 13px;
  font: inherit;
  cursor: pointer;
  text-align: left;
  box-shadow: 0 12px 26px rgba(240, 106, 50, 0.18);
}

.category-picker-open span {
  display: block;
  font-size: 0.7rem;
  color: rgba(255, 247, 238, 0.88);
  margin-bottom: 3px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 800;
}

.category-picker-open strong {
  display: block;
  font-size: 1rem;
  color: #fff;
  line-height: 1.15;
}

.cat-btn {
  border: 1px solid var(--btn-border);
  background: var(--btn-bg);
  color: var(--btn-text);
  border-radius: 999px;
  padding: 7px 12px;
  font-weight: 700;
  cursor: pointer;
}

.cat-btn.active {
  background: linear-gradient(180deg, #f7ca79, #e79e3f);
  color: #221306;
  border-color: transparent;
}

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

.product-card {
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  background: var(--product-bg);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

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

.product-info-btn {
  align-self: flex-start;
  border: 0;
  background: transparent;
  color: var(--muted);
  border-radius: 0;
  padding: 0;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.product-bottom {
  margin-top: auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.price {
  font-weight: 800;
  color: #ffdb9d;
  min-width: 0;
}

.product-cart-btn {
  border: 1px solid rgba(244, 191, 96, 0.42);
  background: rgba(244, 191, 96, 0.08);
  color: #d58a1b;
  border-radius: 999px;
  width: 42px;
  min-width: 42px;
  max-width: 42px;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
  font: inherit;
  font-size: 1rem;
  line-height: 1;
  justify-self: end;
  flex: none;
}

.product-cart-btn svg {
  width: 18px;
  height: 18px;
  display: inline-flex;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  vector-effect: non-scaling-stroke;
}

.customer-meta {
  margin-bottom: 10px;
  display: grid;
  gap: 2px;
}

.stack {
  display: grid;
  gap: 10px;
}

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

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--input-border);
  background: var(--input-bg);
  color: var(--text);
  border-radius: 10px;
  padding: 10px;
  font: inherit;
}

textarea {
  resize: vertical;
}

.btn {
  border: 1px solid var(--btn-border);
  background: var(--btn-bg);
  color: var(--btn-text);
  border-radius: 10px;
  padding: 9px 12px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.btn.primary {
  border-color: transparent;
  background: linear-gradient(180deg, #f8cf84, #e8a145);
  color: #2b1704;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

#slot_hint {
  margin-top: 6px;
}

.slot-status {
  margin-top: 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  padding: 7px 10px;
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.25;
}

.slot-status.is-open {
  border-color: rgba(94, 220, 141, 0.45);
  background: rgba(36, 120, 66, 0.22);
  color: #a2efbf;
}

.slot-status.is-closed {
  border-color: rgba(255, 127, 127, 0.45);
  background: rgba(133, 40, 40, 0.24);
  color: #ffc7c7;
}

.slot-debug {
  margin-top: 8px;
  border: 1px dashed rgba(255, 255, 255, 0.18);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  padding: 7px 8px;
  max-height: 120px;
  overflow: auto;
}

.slot-debug-title {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #e0d8c8;
  margin-bottom: 4px;
}

.slot-debug-list {
  display: grid;
  gap: 4px;
}

.slot-debug-row {
  font-size: 11px;
  line-height: 1.3;
  color: #bdb6a8;
}

.slot-picker-card {
  margin-top: 6px;
  border: 1px solid var(--slot-picker-border);
  border-radius: 18px;
  padding: 10px;
  max-width: 430px;
  background: var(--slot-picker-bg);
}

.slot-picker-title {
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 800;
  font-size: 0.78rem;
  line-height: 1.2;
  text-align: center;
  margin-bottom: 8px;
  color: var(--slot-title);
}

.slot-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.slot-service-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: thin;
}

.slot-service-tab {
  border: 1px solid var(--slot-tab-border);
  background: var(--slot-tab-bg);
  color: var(--slot-tab-text);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.1;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.14s ease, color 0.14s ease, border-color 0.14s ease;
}

.slot-service-tab.is-active {
  border-color: transparent;
  background: linear-gradient(180deg, #ff9552, #f5682f);
  color: #fff;
}

.slot-service-content {
  border: 1px solid var(--slot-service-border);
  border-radius: 14px;
  background: var(--slot-service-bg);
  padding: 8px;
  animation: slotFade 0.18s ease;
}

@keyframes slotFade {
  from { opacity: 0; transform: translateY(2px); }
  to { opacity: 1; transform: translateY(0); }
}

.slot-service-headline {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 8px;
}

.slot-service-headline strong {
  font-size: 0.84rem;
  letter-spacing: 0.02em;
  color: var(--slot-head-strong);
}

.slot-service-headline span {
  font-size: 0.72rem;
  color: var(--slot-head-span);
  text-align: right;
}

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

.slot-chip {
  border: 1px solid var(--slot-chip-border);
  background: var(--slot-chip-bg);
  color: var(--slot-chip-text);
  border-radius: 12px;
  min-width: 82px;
  min-height: 42px;
  padding: 6px 10px;
  font-size: 0.84rem;
  font-weight: 800;
  line-height: 1.1;
  text-align: center;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.14s ease, background 0.14s ease, color 0.14s ease, border-color 0.14s ease;
}

.slot-chip:hover {
  transform: translateY(-1px);
  box-shadow: var(--slot-chip-shadow);
}

.slot-chip.is-active {
  border-color: transparent;
  background: linear-gradient(180deg, #ff9552, #f5682f);
  color: #fff;
  box-shadow: var(--slot-chip-active-shadow);
}

.slot-place {
  margin-top: 8px;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--slot-place-text);
  min-height: 1.2em;
}

.slot-place.is-visible {
  color: var(--slot-place-visible);
}

.slot-empty {
  width: 100%;
  padding: 8px 4px 2px;
}

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

.cart-lines {
  display: grid;
  gap: 8px;
}

.cart-line {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  border: 1px solid var(--panel-border);
  border-radius: 10px;
  background: var(--cart-line-bg);
  padding: 8px;
}

.cart-line-title {
  font-weight: 700;
  margin-bottom: 3px;
}

.cart-line-removed,
.cart-line-price {
  font-size: 13px;
  color: var(--muted);
}

.cart-line-actions {
  display: flex;
  gap: 5px;
  align-items: center;
}

.qty-btn {
  border: 1px solid var(--qty-btn-border);
  background: var(--qty-btn-bg);
  color: var(--qty-btn-text);
  border-radius: 8px;
  padding: 6px 8px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

.qty-btn.danger {
  border-color: rgba(210, 74, 74, 0.5);
  color: #ffd6d6;
}

.cart-total {
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding-top: 10px;
  font-size: 1.05rem;
}

.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
  padding: 10px;
  z-index: 50;
}

.modal.is-open {
  display: flex;
}

.modal-card {
  width: min(520px, 100%);
  background: var(--modal-bg);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  padding: 12px;
}

.modal-card h3 {
  margin: 0 0 8px;
}

.modal-description {
  margin: 0 0 8px;
  line-height: 1.4;
}

.modal-card-category {
  width: min(440px, 100%);
}

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

.modal-card-cart-editor .cart-lines {
  max-height: min(52vh, 420px);
  overflow: auto;
  padding-right: 2px;
}

.category-picker-list {
  display: grid;
  gap: 8px;
}

.category-picker-option {
  width: 100%;
  border: 1px solid var(--btn-border);
  background: var(--btn-bg);
  color: var(--btn-text);
  border-radius: 12px;
  padding: 11px 12px;
  text-align: left;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.category-picker-option.is-active {
  border-color: transparent;
  background: linear-gradient(180deg, #ff9552, #f5682f);
  color: #fff;
}

.modal-options {
  display: grid;
  gap: 6px;
  max-height: 280px;
  overflow: auto;
  padding-right: 2px;
}

.modal-formula {
  display: grid;
  gap: 8px;
}

.modal-formula-row {
  display: grid;
  gap: 5px;
}

.modal-formula-row label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.option-row {
  display: flex;
  gap: 8px;
  align-items: center;
  border: 1px solid var(--option-row-border);
  background: var(--option-row-bg);
  border-radius: 8px;
  padding: 8px;
}

.option-row input {
  width: 18px;
  height: 18px;
}

.modal-actions,
.preview-actions {
  margin-top: 10px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.preview-meta p {
  margin: 0 0 4px;
}

.preview-lines {
  margin-top: 10px;
  display: grid;
  gap: 8px;
}

.preview-line {
  border: 1px solid var(--panel-border);
  border-radius: 10px;
  padding: 8px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.preview-total {
  margin-top: 10px;
  font-size: 1.05rem;
}

.auth-card {
  margin: 36px auto;
  width: min(560px, 100%);
}

.auth-card h1 {
  margin-top: 0;
}

@media (max-width: 1050px) {
  .grid-main {
    grid-template-columns: 1fr;
  }

  .products-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  body {
    padding-bottom: calc(92px + env(safe-area-inset-bottom, 0px));
  }

  main.wrap {
    padding: 12px 0 20px;
  }

  .intro {
    margin-bottom: 8px;
  }

  .intro h1 {
    margin-bottom: 4px;
    font-size: 1.32rem;
    line-height: 1.1;
  }

  .intro .muted {
    font-size: 0.88rem;
    line-height: 1.35;
  }

  .panel,
  .auth-card {
    padding: 10px;
    border-radius: 12px;
  }

  html[data-builder-step="1"] .builder-order-panel {
    display: none;
  }

  html[data-builder-step="2"] .panel-products,
  html[data-builder-step="3"] .panel-products {
    display: none;
  }

  html[data-builder-step="2"] .builder-order-panel [data-step-panel="3"],
  html[data-builder-step="3"] .builder-order-panel [data-step-panel="2"] {
    display: none;
  }

  html[data-builder-step="1"] .panel-products,
  html[data-builder-step="2"] .builder-order-panel [data-step-panel="2"],
  html[data-builder-step="3"] .builder-order-panel [data-step-panel="3"] {
    animation: builderStepFade 0.22s ease;
  }

  .builder-mobile-steps {
    margin-top: 10px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .builder-step-tab {
    border: 1px solid var(--btn-border);
    background: var(--btn-bg);
    color: var(--btn-text);
    border-radius: 12px;
    padding: 8px 7px;
    display: grid;
    gap: 4px;
    justify-items: center;
    text-align: center;
    font: inherit;
    font-size: 0.72rem;
    font-weight: 700;
    cursor: pointer;
    line-height: 1.15;
  }

  .builder-step-tab.is-active {
    border-color: transparent;
    background: linear-gradient(180deg, #ff9552, #f5682f);
    color: #fff;
  }

  .builder-step-index {
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    font-size: 0.72rem;
    font-weight: 800;
  }

  .builder-step-tab.is-active .builder-step-index {
    background: rgba(255, 255, 255, 0.24);
  }

  .panel-products-sticky {
    position: sticky;
    top: calc(env(safe-area-inset-top, 0px) + 52px);
    z-index: 8;
    padding-bottom: 6px;
    margin-bottom: 8px;
    background: var(--sticky-bg);
    border-bottom: 1px solid var(--sticky-border);
  }

  .panel-products-sticky h2,
  .builder-order-panel h2 {
    margin: 0 0 8px;
    font-size: 1.16rem;
  }

  .panel-products .cats {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 3px;
    margin-bottom: 0;
  }

  .panel-products .cats::-webkit-scrollbar {
    display: none;
  }

  .panel-products .cat-btn {
    white-space: nowrap;
    flex: 0 0 auto;
  }

  .panel-products .products-grid {
    max-height: calc(100vh - 220px);
    overflow-y: auto;
    padding-right: 2px;
    align-content: start;
    -webkit-overflow-scrolling: touch;
  }

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

  .product-card {
    padding: 10px;
    gap: 6px;
    border-radius: 10px;
  }

  .product-card h3 {
    font-size: 0.9rem;
    line-height: 1.15;
  }

  .product-card .muted.small {
    font-size: 0.74rem;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .product-bottom {
    gap: 6px;
    align-items: flex-end;
  }

  .product-bottom .btn {
    padding: 7px 10px;
    font-size: 0.8rem;
  }

  .price {
    font-size: 0.9rem;
  }

  .customer-meta {
    margin-bottom: 8px;
    gap: 1px;
  }

  .customer-meta strong {
    font-size: 0.96rem;
  }

  .customer-meta span {
    font-size: 0.82rem;
  }

  .split-2 {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  label {
    font-size: 0.86rem;
  }

  input,
  select,
  textarea {
    padding: 9px 10px;
    font-size: 0.94rem;
  }

  .slot-picker-card {
    max-width: none;
    border-radius: 14px;
    padding: 8px;
  }

  .slot-grid {
    grid-template-columns: 1fr;
  }

  .slot-picker-title {
    margin-bottom: 6px;
    font-size: 0.7rem;
    letter-spacing: 0.05em;
  }

  .slot-service-content {
    border-radius: 12px;
    padding: 6px;
  }

  .slot-service-headline {
    margin-bottom: 6px;
  }

  .slot-service-headline strong {
    font-size: 0.78rem;
  }

  .slot-service-headline span {
    font-size: 0.68rem;
  }

  .slot-service-grid {
    gap: 6px;
  }

  .builder-step-actions-mobile {
    display: none;
  }

  .builder-mobile-footer {
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: calc(8px + env(safe-area-inset-bottom, 0px));
    z-index: 30;
    display: grid;
    gap: 8px;
    border: 1px solid var(--panel-border);
    border-radius: 16px;
    padding: 10px;
    background: var(--sticky-bg);
    backdrop-filter: blur(10px);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.24);
  }

  .builder-mobile-footer-meta {
    display: grid;
    gap: 4px;
  }

  .builder-mobile-footer-meta strong {
    font-size: 0.9rem;
    color: var(--text);
  }

  .builder-mobile-footer-meta span {
    color: var(--muted);
    font-size: 0.78rem;
    line-height: 1.25;
  }

  .builder-mobile-footer-actions {
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    gap: 8px;
  }

  .builder-mobile-footer-actions .btn {
    min-height: 42px;
    padding: 8px 10px;
    font-size: 0.9rem;
  }

  .slot-chip {
    width: 100%;
    min-width: 0;
    min-height: 40px;
    padding: 7px 8px;
    font-size: 0.84rem;
    border-radius: 12px;
  }

  .cart-lines {
    gap: 6px;
  }

  .cart-line {
    padding: 7px;
    border-radius: 9px;
  }

  .cart-line-title {
    font-size: 0.9rem;
  }

  .cart-line-removed,
  .cart-line-price {
    font-size: 0.78rem;
    line-height: 1.25;
  }

  .cart-total {
    padding-top: 8px;
    font-size: 0.98rem;
  }

  .checkout-summary {
    gap: 6px;
    padding: 8px 10px;
    border-radius: 10px;
  }

  .checkout-summary-line span,
  .checkout-summary-line strong {
    font-size: 0.84rem;
  }

  .modal-card {
    border-radius: 12px;
    padding: 10px;
  }
}

html[data-site-theme="light"] .alert.error {
  border-color: rgba(201, 71, 71, 0.24);
  background: rgba(201, 71, 71, 0.08);
  color: #8c2c2c;
}

html[data-site-theme="light"] .alert.info {
  border-color: rgba(39, 134, 118, 0.24);
  background: rgba(39, 134, 118, 0.08);
  color: #1b6e5f;
}

html[data-site-theme="light"] .price {
  color: #a56a15;
}

html[data-site-theme="light"] .product-card h3,
html[data-site-theme="light"] .intro h1,
html[data-site-theme="light"] .panel h2,
html[data-site-theme="light"] .auth-card h1,
html[data-site-theme="light"] label,
html[data-site-theme="light"] .customer-meta strong {
  color: #253041;
}

html[data-site-theme="light"] .slot-status {
  border-color: rgba(111, 122, 140, 0.14);
  background: rgba(255, 255, 255, 0.9);
}

html[data-site-theme="light"] .slot-status.is-open {
  border-color: rgba(34, 157, 92, 0.22);
  background: rgba(34, 157, 92, 0.08);
  color: #157247;
}

html[data-site-theme="light"] .slot-status.is-closed {
  border-color: rgba(201, 71, 71, 0.24);
  background: rgba(201, 71, 71, 0.08);
  color: #8c2c2c;
}

html[data-site-theme="light"] .slot-debug {
  border-color: rgba(111, 122, 140, 0.18);
  background: rgba(255, 255, 255, 0.9);
}

html[data-site-theme="light"] .slot-debug-title {
  color: #556172;
}

html[data-site-theme="light"] .slot-debug-row,
html[data-site-theme="light"] .cart-line-removed,
html[data-site-theme="light"] .cart-line-price,
html[data-site-theme="light"] .preview-meta p,
html[data-site-theme="light"] .muted,
html[data-site-theme="light"] .small {
  color: #697586;
}

html[data-site-theme="light"] .slot-service-tab.is-active,
html[data-site-theme="light"] .cat-btn.active,
html[data-site-theme="light"] .btn.primary {
  color: #ffffff;
}

html[data-site-theme="light"] .product-info-btn {
  color: #697586;
}

html[data-site-theme="light"] .product-cart-btn {
  border-color: rgba(191, 127, 30, 0.28);
  background: #fff9ef;
  color: #bf7f1e;
}

html[data-site-theme="light"] .category-picker-open span {
  color: rgba(255, 247, 238, 0.9);
}

html[data-site-theme="light"] .category-picker-open {
  border-color: rgba(245, 136, 64, 0.28);
  background: linear-gradient(180deg, #ff9956, #f06a32);
  color: #fff;
  box-shadow: 0 12px 26px rgba(240, 106, 50, 0.18);
}

html[data-site-theme="light"] .btn.primary {
  border-color: transparent;
}

html[data-site-theme="light"] .qty-btn.danger {
  border-color: rgba(201, 71, 71, 0.24);
  color: #b23a3a;
}

html[data-site-theme="light"] .modal {
  background: rgba(36, 44, 58, 0.28);
}

@media (max-width: 640px) {
  .panel-products {
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    border-radius: 0 !important;
  }

  .topbar .wrap {
    min-height: auto;
    padding: 10px 0;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .brand {
    text-align: left;
  }

  .nav-right {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .nav-right .link-btn {
    text-align: center;
    padding: 9px 10px;
  }

  .builder-mobile-steps {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .builder-step-tab {
    min-height: 50px;
    grid-template-columns: 24px minmax(0, 1fr);
    align-items: center;
    justify-items: start;
    text-align: left;
    gap: 10px;
    font-size: 0.84rem;
  }

  .panel-products .products-grid {
    max-height: calc(100vh - 176px);
  }

  .panel-products-sticky {
    position: relative;
    top: auto;
    padding-bottom: 0;
    margin-bottom: 6px;
    background: transparent;
    border-bottom: 0;
  }

  .panel-products-sticky h2 {
    display: none;
  }

  .category-picker-open {
    display: block;
    margin-bottom: 8px;
    min-height: 58px;
    padding: 12px 14px;
    border-width: 1px;
    border-radius: 14px;
  }

  .intro {
    margin-bottom: 6px;
  }

  .intro .muted {
    margin: 0;
    font-size: 0.82rem;
    line-height: 1.28;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .split-2 {
    grid-template-columns: 1fr;
  }

  .products-grid {
    grid-template-columns: 1fr;
  }

  .product-card {
    padding: 11px 12px;
    gap: 8px;
  }

  .product-card h3 {
    font-size: 0.98rem;
    line-height: 1.2;
  }

  .product-info-btn {
    padding: 0;
    font-size: 0.78rem;
  }

  .product-bottom {
    margin-top: 0;
    align-items: center;
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .price {
    font-size: 1rem;
    line-height: 1;
  }

  .product-bottom .btn {
    min-height: 38px;
    padding: 7px 12px;
    font-size: 0.84rem;
    white-space: nowrap;
  }

  .product-cart-btn {
    width: 38px;
    min-width: 38px;
    max-width: 38px;
    min-height: 38px;
    font-size: 0.94rem;
  }

  .product-cart-btn svg {
    width: 16px;
    height: 16px;
  }

  .topbar .wrap {
    min-height: auto;
  }

  .hello {
    display: none;
  }

  .panel-products .cats {
    display: none;
  }

  .slot-picker-card {
    max-width: none;
  }

  .slot-service-tab {
    padding: 7px 10px;
    font-size: 0.72rem;
  }

  .slot-service-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .slot-chip {
    min-width: 0;
    min-height: 38px;
    padding: 6px 8px;
    font-size: 0.8rem;
  }

  .cart-empty {
    font-size: 0.86rem;
  }

  .cart-line {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px;
  }

  .cart-line-actions {
    gap: 4px;
  }

  .qty-btn {
    min-width: 32px;
    min-height: 32px;
    padding: 5px 7px;
    font-size: 0.74rem;
  }

  .cart-line-removed {
    display: none;
  }

  .builder-step-actions-mobile {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (max-width: 430px) {
  .panel-products {
    padding: 0 !important;
  }

  .builder-step-tab {
    font-size: 0.78rem;
    padding: 8px 8px;
  }

  .builder-step-index {
    width: 20px;
    height: 20px;
  }

  .panel-products .products-grid {
    max-height: calc(100vh - 168px);
  }

  .panel-products-sticky h2 {
    display: none;
  }

  .category-picker-open {
    min-height: 56px;
    margin-bottom: 5px;
    padding: 11px 12px;
  }

  .intro h1 {
    font-size: 1.2rem;
  }

  .intro .muted {
    display: none;
  }

  .category-picker-open strong {
    font-size: 0.96rem;
  }

  .product-card {
    padding: 10px 11px;
    gap: 8px;
  }

  .product-card h3 {
    font-size: 0.94rem;
  }

  .product-info-btn {
    padding: 4px 8px;
    font-size: 0.74rem;
  }

  .price {
    font-size: 0.96rem;
  }

  .product-cart-btn {
    width: 36px;
    min-width: 36px;
    max-width: 36px;
    min-height: 36px;
    font-size: 0.9rem;
  }

  .product-cart-btn svg {
    width: 15px;
    height: 15px;
  }

  .cart-line-title {
    font-size: 0.86rem;
  }

  .cart-line-price {
    font-size: 0.74rem;
  }

  .qty-btn {
    min-width: 30px;
    min-height: 30px;
    padding: 4px 6px;
    font-size: 0.7rem;
  }

  .builder-mobile-footer-actions {
    grid-template-columns: 1fr;
  }

  .nav-right {
    grid-template-columns: 1fr;
  }
}
