:root {
  --bg: #fff8ef;
  --bg-elevated: rgba(232, 232, 232, 0.95);
  --bg-soft: rgba(51, 138, 66, 0.12);
  --surface: rgba(235, 235, 235, 0.84);
  --surface-strong: rgba(242, 242, 242, 0.94);
  --text: #2f2419;
  --text-muted: rgba(47, 36, 25, 0.78);
  --text-soft: rgba(47, 36, 25, 0.56);
  --line: rgba(188, 41, 35, 0.16);
  --line-strong: rgba(188, 41, 35, 0.28);
  --accent: #c62828;
  --accent-strong: #8d1818;
  --accent-soft: #f2c94c;
  --success: #2f8a42;
  --danger: #d14b31;
  --card-dark-bg: linear-gradient(135deg, rgba(26, 26, 26, 0.96), rgba(78, 78, 78, 0.92));
  --shadow-lg: 0 24px 60px rgba(122, 43, 25, 0.14);
  --shadow-md: 0 14px 32px rgba(122, 43, 25, 0.12);
  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-md: 18px;
  --radius-sm: 14px;
  --max-width: 1280px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Manrope", "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(242, 201, 76, 0.18), transparent 28%),
    radial-gradient(circle at right 18%, rgba(47, 138, 66, 0.12), transparent 24%),
    radial-gradient(circle at bottom right, rgba(198, 40, 40, 0.16), transparent 26%),
    linear-gradient(180deg, #9f1f1f 0%, #861919 44%, #6f1414 100%);
  color: var(--text);
}

img {
  display: block;
  max-width: 100%;
  outline: 1px solid rgba(255, 255, 255, 0.08);
  outline-offset: -1px;
}

[hidden] {
  display: none !important;
}

button,
input,
textarea {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  cursor: pointer;
}

.page-glow {
  position: fixed;
  inset: auto;
  width: 22rem;
  height: 22rem;
  border-radius: 999px;
  filter: blur(110px);
  opacity: 0.44;
  pointer-events: none;
  z-index: 0;
}

.page-glow-left {
  top: 6rem;
  left: -6rem;
  background: rgba(198, 40, 40, 0.2);
}

.page-glow-right {
  bottom: 5rem;
  right: -4rem;
  background: rgba(47, 138, 66, 0.16);
}

.site-shell {
  position: relative;
  z-index: 1;
  width: min(calc(100% - 2rem), var(--max-width));
  margin: 0 auto;
  padding: 1.1rem 0 3rem;
}

.topbar {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0.9rem;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, rgba(8, 8, 8, 0.96), rgba(64, 64, 64, 0.94));
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(18px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.24);
  color: #fff8ef;
  z-index: 20;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  min-width: 0;
}

.brand-avatar-wrap,
.owner-avatar-wrap {
  position: relative;
  flex-shrink: 0;
}

.brand-avatar,
.brand-avatar-fallback {
  width: 3.2rem;
  height: 3.2rem;
  border-radius: 1rem;
}

.brand-avatar {
  object-fit: cover;
  box-shadow: var(--shadow-md);
}

.brand-avatar-fallback,
.owner-avatar-fallback {
  display: grid;
  place-items: center;
  background:
    linear-gradient(135deg, rgba(242, 201, 76, 0.98), rgba(198, 40, 40, 0.98));
  color: #fff8ef;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.brand-title,
.brand-subtitle {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-title {
  font-weight: 800;
  font-size: 1rem;
}

.brand-subtitle {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.84rem;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.topbar-wallet-row,
.topbar-icon-row {
  display: flex;
  align-items: center;
}

.topbar-wallet-row {
  gap: 0.7rem;
  justify-content: flex-end;
}

.topbar-icon-row {
  gap: 0.7rem;
  justify-content: flex-end;
}

.action-button,
.icon-button,
.primary-cta,
.secondary-cta,
.modal-tab {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 999px;
  transition-property: transform, background-color, border-color, box-shadow, color, opacity;
  transition-duration: 180ms;
  transition-timing-function: ease-out;
}

.action-button:hover,
.icon-button:hover,
.primary-cta:hover,
.secondary-cta:hover,
.modal-tab:hover {
  transform: translateY(-1px);
  border-color: var(--line-strong);
}

.action-button:active,
.icon-button:active,
.primary-cta:active,
.secondary-cta:active,
.modal-tab:active {
  transform: scale(0.97);
}

.action-button,
.primary-cta {
  padding: 0.85rem 1.25rem;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #fff8ef;
  font-weight: 800;
  box-shadow: 0 10px 24px rgba(141, 24, 24, 0.18);
}

.connect-button {
  min-width: 11rem;
}

.icon-button,
.secondary-cta,
.modal-tab {
  padding: 0.82rem 1rem;
  background: rgba(224, 224, 224, 0.9);
  color: var(--text);
}

.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  font-weight: 700;
}

.topbar-icon-button {
  width: 3.2rem;
  min-width: 3.2rem;
  height: 3.2rem;
  padding: 0;
  border-radius: 5px;
  flex-shrink: 0;
}

.icon-button-menu {
  flex-direction: column;
}

.icon-button-menu span {
  width: 20px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.hero-card,
.section-block,
.cart-panel,
.order-panel,
.status-panel,
.message-thread-card,
.message-form,
.modal-card {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: var(--card-dark-bg);
  box-shadow: var(--shadow-lg);
  color: #fff8ef;
}

.hero-card,
.section-block,
.modal-card {
  border-radius: var(--radius-xl);
}

.hero-card {
  overflow: hidden;
  margin-bottom: 0.65rem;
  background: var(--card-dark-bg);
  border-color: rgba(255, 255, 255, 0.12);
}

.hero-banner {
  position: relative;
  min-height: auto;
  background:
    linear-gradient(135deg, rgba(242, 201, 76, 0.08), rgba(198, 40, 40, 0.05)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='900' height='600' viewBox='0 0 900 600'%3E%3Cg fill='none' stroke='rgba(255,255,255,0.08)' stroke-width='1'%3E%3Cpath d='M40 120C220 20 440 20 640 100s280 260 220 360'/%3E%3Cpath d='M0 280C140 120 360 80 560 160s280 220 340 340'/%3E%3Cpath d='M120 560C220 380 420 260 640 280s260 140 220 280'/%3E%3C/g%3E%3C/svg%3E"),
    linear-gradient(180deg, rgba(22, 22, 22, 0.2), rgba(22, 22, 22, 0.42));
  background-size: cover;
  background-position: center;
}

.hero-banner-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(20, 20, 20, 0.78) 0%, rgba(44, 44, 44, 0.62) 55%, rgba(70, 70, 70, 0.52) 100%);
}

.hero-layout {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
  padding: 1.35rem 1.5rem;
  align-items: end;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.9rem;
  min-width: 0;
}

.hero-identity-row {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.hero-identity-copy h2 {
  margin: 0.15rem 0 0;
  font-size: clamp(1.45rem, 3vw, 2rem);
}

.eyebrow-row,
.hero-meta,
.hero-cta-row,
.panel-header,
.summary-row,
.order-action-row,
.message-actions,
.modal-action-row {
  display: flex;
  align-items: center;
}

.eyebrow-row,
.hero-cta-row,
.order-action-row,
.message-actions,
.modal-action-row {
  gap: 0.8rem;
  flex-wrap: wrap;
}

.eyebrow,
.section-kicker,
.owner-label,
.meta-label {
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.76rem;
  color: var(--accent-soft);
}

.wallet-pill,
.status-pill,
.cart-count-badge {
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(242, 201, 76, 0.16);
  color: var(--text-muted);
  font-size: 0.88rem;
  font-variant-numeric: tabular-nums;
}

.hero-copy h1,
.section-heading h2,
.panel-header h2,
.payload-preview h3,
.modal-header h2 {
  margin: 0;
  text-wrap: balance;
}

.hero-copy h1 {
  font-family: "Bebas Neue", "Trebuchet MS", sans-serif;
  font-size: clamp(3.6rem, 10vw, 7rem);
  line-height: 0.92;
  letter-spacing: 0.02em;
  max-width: 12ch;
}

.hero-bio,
.section-heading p,
.menu-stage-copy p,
.thread-note p,
.empty-state p,
.payload-preview pre {
  color: var(--text-muted);
  text-wrap: pretty;
}

.hero-bio {
  max-width: 58ch;
  margin: 0;
  font-size: 0.98rem;
  color: rgba(255, 248, 239, 0.86);
}

.hero-meta {
  gap: 0.7rem;
  flex-wrap: wrap;
}

.meta-chip {
  min-width: 10.5rem;
  padding: 0.72rem 0.9rem;
  border-radius: 1.1rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.08);
  color: #fff8ef;
}

.meta-chip span,
.meta-chip a {
  display: block;
  margin-top: 0.25rem;
}

.hero-social-links {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  flex-wrap: wrap;
}

.social-link-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.8rem;
  min-height: 2.8rem;
  padding: 0.7rem 0.9rem;
  border-radius: 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.08);
  color: #fff8ef;
  font-weight: 800;
  text-decoration: none;
}

.hero-owner-card,
.product-card,
.menu-stage-copy,
.cart-panel,
.order-panel,
.status-panel,
.message-thread-card,
.message-form,
.payload-preview,
.thread-note,
.menu-builder-card {
  border-radius: var(--radius-lg);
  background: var(--card-dark-bg);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff8ef;
}

.hero-owner-card {
  align-self: end;
  padding: 1rem 1.1rem;
  backdrop-filter: blur(8px);
  background: var(--card-dark-bg);
  border-color: rgba(255, 255, 255, 0.12);
}

.owner-card-top {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.owner-avatar,
.owner-avatar-fallback {
  width: 4.2rem;
  height: 4.2rem;
  border-radius: 1.1rem;
}

.owner-avatar {
  object-fit: cover;
}

.owner-avatar-logo-fallback {
  background: transparent;
  padding: 0.2rem;
}

.owner-avatar-logo-fallback img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: inherit;
  outline: none;
}

.owner-details {
  margin: 0;
  display: grid;
  gap: 0.75rem;
}

.owner-details dt {
  color: rgba(255, 248, 239, 0.62);
  font-size: 0.86rem;
}

.owner-details dd {
  margin: 0.25rem 0 0;
  font-size: 0.95rem;
  word-break: break-word;
  color: #fff8ef;
}

.section-block {
  padding: 1.6rem;
  margin-bottom: 1.25rem;
}

.menu-showcase {
  padding-top: 1rem;
}

.section-heading,
.menu-stage,
.commerce-layout,
.message-layout {
  display: grid;
}

.section-heading {
  grid-template-columns: minmax(0, 1fr);
  gap: 0.7rem;
  align-items: start;
  margin-bottom: 1rem;
}

.section-heading-menu {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 0.9rem;
  margin-bottom: 0.7rem;
}

.section-heading p {
  margin: 0;
  max-width: 44rem;
}

.menu-tab-list {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1.3rem;
}

.menu-page-picker {
  width: min(100%, 13rem);
  margin-bottom: 0;
}

.menu-page-select {
  width: 100%;
  min-height: 44px;
  padding: 0.75rem 0.95rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 1rem;
  background: var(--card-dark-bg);
  color: #fff8ef;
  font-weight: 700;
}

.menu-page-select option {
  background: #242424;
  color: #fff8ef;
}

.menu-page-select:disabled {
  opacity: 0.7;
}

.menu-tab {
  border: 1px solid var(--line);
  background: rgba(224, 224, 224, 0.9);
  color: var(--text);
  padding: 0.78rem 1rem;
  border-radius: 999px;
  font-weight: 700;
}

.menu-tab.active,
.modal-tab.active {
  background: linear-gradient(135deg, rgba(198, 40, 40, 0.98), rgba(141, 24, 24, 0.98));
  border-color: transparent;
  color: #fff8ef;
}

.menu-stage {
  grid-template-columns: 1fr;
  gap: 1rem;
  align-items: stretch;
}

.menu-image-frame {
  position: relative;
  min-height: clamp(18rem, 58vw, 34rem);
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px dashed rgba(242, 201, 76, 0.6);
  background:
    linear-gradient(135deg, rgba(242, 201, 76, 0.14), rgba(47, 138, 66, 0.08)),
    rgba(226, 226, 226, 0.95);
}

.menu-image-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: rgba(229, 229, 229, 0.94);
}

.section-block .section-heading p,
.section-block .menu-stage-copy p,
.section-block .thread-note p,
.section-block .empty-state p,
.section-block .product-description,
.section-block .workflow-card p,
.section-block .workflow-status-item p,
.section-block .cart-item p,
.section-block .cart-item small,
.section-block .summary-box span,
.section-block .price-note,
.section-block .thread-bubble-header,
.modal-card .settings-access-notice,
.modal-card .owner-details dt {
  color: rgba(255, 248, 239, 0.72);
}

.menu-image-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 0.5rem;
  text-align: center;
  padding: 2rem;
}

.placeholder-label {
  display: inline-flex;
  justify-content: center;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-soft);
  font-size: 0.72rem;
}

.menu-image-placeholder strong {
  font-family: "Bebas Neue", "Trebuchet MS", sans-serif;
  font-size: 2.6rem;
  letter-spacing: 0.05em;
}

.menu-stage-copy {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
}

.menu-stage-copy h3,
.product-copy h3 {
  margin: 0;
  font-size: 1.35rem;
}

.menu-stage-note {
  padding: 1rem;
  border-radius: 1rem;
  background: rgba(116, 23, 29, 0.52);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.menu-stage-note span {
  display: block;
  font-size: 0.82rem;
  color: var(--text-soft);
  margin-bottom: 0.25rem;
}

.workflow-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1rem;
}

.workflow-card {
  padding: 1.15rem;
  border-radius: var(--radius-lg);
  background: var(--card-dark-bg);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff8ef;
}

.workflow-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  margin-bottom: 0.8rem;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(242, 201, 76, 1), rgba(198, 40, 40, 1));
  color: #fff8ef;
  font-weight: 800;
}

.workflow-card h3 {
  margin: 0 0 0.55rem;
  font-size: 1.08rem;
}

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

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

.product-card {
  overflow: hidden;
}

.product-media {
  position: relative;
  min-height: 12rem;
  background:
    radial-gradient(circle at top left, rgba(242, 201, 76, 0.48), transparent 35%),
    linear-gradient(135deg, rgba(198, 40, 40, 0.22), rgba(47, 138, 66, 0.12)),
    #fff7eb;
}

.product-media::after {
  content: attr(data-badge);
  position: absolute;
  top: 1rem;
  right: 1rem;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  background: rgba(232, 232, 232, 0.95);
  border: 1px solid var(--line);
  color: var(--accent-strong);
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.product-copy {
  padding: 1.2rem;
}

.product-description {
  min-height: 3.6rem;
  margin: 0.6rem 0 1rem;
  color: var(--text-muted);
}

.product-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
}

.price-block {
  display: flex;
  flex-direction: column;
}

.price-main {
  font-size: 1.08rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.price-note {
  font-size: 0.82rem;
  color: var(--text-soft);
}

.add-cart-button {
  padding: 0.8rem 1rem;
  border-radius: 999px;
  border: 1px solid transparent;
  background: linear-gradient(135deg, rgba(198, 40, 40, 1), rgba(141, 24, 24, 1));
  color: #fff8ef;
  font-weight: 800;
}

.commerce-layout {
  grid-template-columns: minmax(0, 1.05fr) minmax(310px, 0.95fr);
  gap: 1rem;
}

.cart-panel,
.order-panel,
.status-panel,
.message-thread-card,
.message-form,
.payload-preview {
  padding: 1.25rem;
}

.panel-header {
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.panel-header-compact {
  margin-bottom: 0.8rem;
}

.order-form-main,
.inline-message-form {
  margin-bottom: 1rem;
}

.order-submit-row,
.payment-action-bar {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.order-thread-card {
  margin-bottom: 1rem;
}

.payment-action-bar {
  margin-top: 0.2rem;
}

.details-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.details-form-grid label {
  display: grid;
  gap: 0.5rem;
}

.details-span-2 {
  grid-column: span 2;
}

.status-panel-divider {
  height: 1px;
  margin: 0 0 1rem;
  background: var(--line);
}

.status-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
  margin-bottom: 1rem;
}

.summary-box {
  padding: 0.95rem 1rem;
  border-radius: 1rem;
  background: var(--card-dark-bg);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff8ef;
}

.summary-box span {
  display: block;
  color: var(--text-soft);
  font-size: 0.82rem;
  margin-bottom: 0.28rem;
}

.summary-box strong {
  display: block;
  font-weight: 800;
  word-break: break-word;
}

.estimate-inputs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
  margin-bottom: 1rem;
}

.estimate-inputs label {
  display: grid;
  gap: 0.5rem;
}

.workflow-status-list {
  display: grid;
  gap: 0.7rem;
}

.workflow-status-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.85rem;
  align-items: start;
  padding: 0.95rem 1rem;
  border-radius: 1rem;
  background: var(--card-dark-bg);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff8ef;
}

.workflow-status-item strong {
  display: block;
  margin-bottom: 0.18rem;
}

.workflow-status-item p {
  margin: 0;
  color: var(--text-muted);
}

.workflow-status-dot {
  width: 0.9rem;
  height: 0.9rem;
  margin-top: 0.25rem;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: rgba(230, 230, 230, 0.96);
}

.workflow-status-item.is-active {
  border-color: rgba(240, 195, 77, 0.36);
  background: rgba(240, 195, 77, 0.12);
}

.workflow-status-item.is-done .workflow-status-dot {
  border-color: rgba(79, 210, 143, 0.55);
  background: var(--success);
  box-shadow: 0 0 0 6px rgba(79, 210, 143, 0.12);
}

.workflow-status-item.is-active .workflow-status-dot {
  border-color: rgba(240, 195, 77, 0.6);
  background: var(--accent-soft);
  box-shadow: 0 0 0 6px rgba(240, 195, 77, 0.14);
}

.cart-items {
  display: grid;
  gap: 0.8rem;
  min-height: 17rem;
}

.empty-state,
.thread-note {
  padding: 1.2rem;
}

.empty-state strong,
.thread-note strong {
  display: block;
  margin-bottom: 0.35rem;
}

.cart-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.8rem;
  align-items: center;
  padding: 0.95rem;
  border-radius: 1rem;
  background: var(--card-dark-bg);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff8ef;
}

.cart-item h3 {
  margin: 0 0 0.2rem;
  font-size: 1rem;
}

.cart-item p,
.cart-item small {
  margin: 0;
  color: var(--text-muted);
}

.cart-item-controls {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.qty-button,
.remove-button {
  min-height: 40px;
  min-width: 40px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(228, 228, 228, 0.96);
  color: var(--text);
}

.remove-button {
  min-width: auto;
  padding: 0 0.85rem;
}

.cart-summary {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.summary-row {
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.25rem 0;
}

.summary-row-total {
  margin-top: 0.35rem;
  padding-top: 0.7rem;
  border-top: 1px solid var(--line);
  font-size: 1.04rem;
}

.order-form,
.settings-form {
  display: grid;
  gap: 1rem;
}

.order-form label,
.settings-form label {
  display: grid;
  gap: 0.5rem;
}

.order-form span,
.settings-form span {
  font-weight: 700;
}

input,
textarea {
  width: 100%;
  padding: 0.95rem 1rem;
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: var(--card-dark-bg);
  color: #fff8ef;
  resize: vertical;
}

input::placeholder,
textarea::placeholder {
  color: rgba(255, 248, 239, 0.42);
}

input:focus,
textarea:focus {
  outline: none;
  border-color: rgba(242, 201, 76, 0.9);
  box-shadow: 0 0 0 4px rgba(47, 138, 66, 0.14);
}

.payload-preview pre {
  margin: 0;
  max-height: 20rem;
  overflow: auto;
  padding: 1rem;
  border-radius: 1rem;
  background: rgba(255, 247, 230, 0.96);
  border: 1px solid var(--line);
  font-size: 0.82rem;
}

.message-layout {
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.7fr);
  gap: 1rem;
}

.message-thread {
  display: grid;
  gap: 0.8rem;
  min-height: 20rem;
}

.thread-bubble {
  max-width: min(85%, 34rem);
  padding: 0.95rem 1rem;
  border-radius: 1.1rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: var(--card-dark-bg);
  color: #fff8ef;
}

.thread-bubble.thread-bubble-self {
  justify-self: end;
  background: rgba(198, 40, 40, 0.1);
  border-color: rgba(242, 201, 76, 0.42);
}

.thread-bubble-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  margin-bottom: 0.4rem;
  font-size: 0.78rem;
  color: var(--text-soft);
}

.thread-bubble p {
  margin: 0;
  color: #fff8ef;
}

button:disabled {
  opacity: 0.48;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none;
}

.modal-shell {
  position: fixed;
  inset: 0;
  z-index: 60;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(79, 36, 18, 0.28);
  backdrop-filter: blur(18px);
}

.modal-card {
  position: relative;
  width: min(calc(100% - 2rem), 1100px);
  max-height: calc(100vh - 2rem);
  margin: 1rem auto;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  overflow: hidden;
}

.modal-header,
.modal-body {
  padding: 1.4rem;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--line);
}

.modal-close-button {
  min-width: auto;
}

.modal-tab-row {
  display: flex;
  gap: 0.8rem;
  padding: 1rem 1.4rem 0;
  flex-wrap: wrap;
}

.settings-access-notice {
  margin: 1rem 1.4rem 0;
  padding: 1rem 1.1rem;
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: var(--card-dark-bg);
  color: rgba(255, 248, 239, 0.72);
}

.modal-tab {
  font-weight: 800;
}

.modal-body {
  overflow: auto;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

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

.settings-span-2 {
  grid-column: span 2;
}

.menu-builder-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.catalog-builder-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 1.1rem 0 0.9rem;
}

.catalog-builder-header h3 {
  margin: 0.15rem 0 0;
}

.catalog-products-stack {
  display: grid;
  gap: 1rem;
}

.catalog-product-card {
  padding: 1rem;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(18, 18, 18, 0.55);
}

.catalog-product-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.9rem;
}

.catalog-product-header h3 {
  margin: 0;
}

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

.catalog-product-grid .settings-span-2 {
  grid-column: span 2;
}

.catalog-checkbox-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  grid-column: span 2;
}

.catalog-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--text-muted);
}

.catalog-checkbox input {
  width: auto;
}

.catalog-preview-panel {
  margin-top: 1rem;
}

.catalog-preview-panel pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
}

.menu-catalog-panel {
  margin-top: 1rem;
  padding: 1.25rem;
  border-radius: var(--radius-lg);
  background: var(--card-dark-bg);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff8ef;
}

.menu-catalog-summary {
  margin: 0 0 1rem;
  color: var(--text-muted);
}

.menu-catalog-panel .product-grid {
  grid-template-columns: 1fr;
}

.menu-cart-panel {
  margin-top: 1rem;
  padding: 1rem;
}

.menu-cart-panel .cart-items {
  min-height: auto;
}

.menu-product-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.7rem;
}

.menu-product-chip {
  padding: 0.35rem 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-soft);
  font-size: 0.82rem;
}

.product-footer-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  margin-top: 0.9rem;
}

.menu-product-row {
  display: grid;
  grid-template-columns: 7rem minmax(0, 1fr) auto;
  gap: 0;
  overflow: hidden;
}

.menu-product-row .product-media {
  min-height: 100%;
  height: 100%;
  border-radius: 0;
}

.menu-product-row .product-copy {
  padding: 0.95rem 1rem;
}

.menu-product-row .product-copy h3 {
  margin: 0 0 0.25rem;
  font-size: 1rem;
}

.menu-product-row .product-description {
  min-height: 0;
  margin: 0.25rem 0 0.7rem;
  font-size: 0.92rem;
}

.menu-product-main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.8rem;
}

.menu-product-price {
  white-space: nowrap;
  font-size: 0.96rem;
  font-weight: 800;
  color: #fff8ef;
}

.menu-product-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.menu-add-button {
  min-width: 2.6rem;
  min-height: 2.6rem;
  padding: 0;
  border-radius: 0.45rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(135deg, rgba(198, 40, 40, 1), rgba(141, 24, 24, 1));
  color: #fff8ef;
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1;
}

.menu-builder-card {
  padding: 1rem;
}

.menu-builder-card h3 {
  margin: 0 0 0.85rem;
}

.menu-builder-card .settings-form {
  gap: 0.7rem;
}

.toast {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 80;
  padding: 0.95rem 1.1rem;
  border-radius: 1rem;
  background: rgba(255, 252, 246, 0.96);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
  max-width: min(28rem, calc(100vw - 2rem));
}

.toast-success {
  border-color: rgba(79, 210, 143, 0.45);
}

.toast-error {
  border-color: rgba(255, 121, 121, 0.4);
}

@keyframes fade-slide-in {
  from {
    opacity: 0;
    transform: translateY(14px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-card,
.section-block {
  animation: fade-slide-in 420ms ease-out both;
}

@media (max-width: 1080px) {
  .hero-layout,
  .menu-stage,
  .commerce-layout,
  .message-layout,
  .section-heading,
  .product-grid,
  .workflow-grid,
  .settings-grid,
  .menu-builder-grid {
    grid-template-columns: 1fr;
  }

  .product-grid {
    gap: 1rem;
  }

  .catalog-product-grid,
  .menu-catalog-panel .product-grid {
    grid-template-columns: 1fr;
  }

  .menu-product-row {
    grid-template-columns: 5.4rem minmax(0, 1fr) auto;
  }

  .status-summary-grid,
  .estimate-inputs,
  .details-form-grid {
    grid-template-columns: 1fr;
  }

  .hero-copy h1 {
    max-width: none;
  }
}

@media (max-width: 720px) {
  .site-shell {
    width: 100%;
    padding: 0.3rem 0 1rem;
  }

  .topbar {
    gap: 0.8rem;
    align-items: stretch;
    flex-direction: column;
    padding: 0.45rem 0.65rem 0.65rem;
    margin-bottom: 0.6rem;
  }

  .topbar-actions {
    display: grid;
    gap: 0.7rem;
  }

  .topbar-wallet-row,
  .topbar-icon-row {
    justify-content: flex-start;
  }

  .topbar-wallet-row {
    width: 100%;
  }

  .topbar-icon-row {
    width: 100%;
  }

  .connect-button {
    width: 100%;
    min-width: 0;
  }

  .hero-layout,
  .modal-header,
  .modal-body {
    padding: 0.8rem 0.35rem;
  }

  .section-block {
    padding: 0.85rem 0;
  }

  .hero-card,
  .section-block {
    border-radius: 0;
  }

  .menu-product-row {
    grid-template-columns: 4.8rem minmax(0, 1fr) auto;
  }

  .menu-product-row .product-copy {
    padding: 0.8rem 0.75rem;
  }

  .hero-banner {
    min-height: auto;
  }

  .brand {
    padding: 0 0.1rem;
  }

  .section-heading {
    padding: 0 0.35rem;
    margin-bottom: 0.85rem;
  }

  .section-heading-menu {
    grid-template-columns: 1fr;
    gap: 0.6rem;
    align-items: start;
  }

  .menu-page-picker {
    width: 100%;
    margin: 0;
  }

  .menu-page-select {
    min-height: 42px;
    padding: 0.7rem 0.8rem;
  }

  .hero-bio {
    font-size: 0.95rem;
  }

  .hero-owner-card,
  .menu-stage-copy,
  .cart-panel,
  .order-panel,
  .status-panel,
  .message-thread-card,
  .message-form,
  .payload-preview {
    border-radius: var(--radius-md);
  }

  .menu-image-frame {
    border-radius: 18px;
  }

  .settings-span-2 {
    grid-column: span 1;
  }

  .details-span-2 {
    grid-column: span 1;
  }

  .modal-card {
    width: calc(100% - 1rem);
    max-height: calc(100vh - 1rem);
    margin: 0.5rem auto;
  }
}
