/* Maison ARE — design system. Every selector is m- prefixed so this file is inert until a page opts in. */

:root {
  --m-onyx: #0b0a09;
  --m-smoke: #15120f;
  --m-ember: #1f1a15;
  --m-ember-2: #28211a;
  --m-ivory: #f4ede1;
  --m-ivory-2: #e6dbc7;
  --m-taupe: #a89b86;
  --m-taupe-2: #7d725f;
  --m-gold: #cfae6b;
  --m-gold-2: #e2c98f;
  --m-gold-ink: #1a1408;
  --m-oxblood: #7a2e24;
  --m-oxblood-text: #d98a7d;
  --m-sage: #7e9a7a;
  --m-sage-text: #a9c3a4;

  --m-line: rgba(207, 174, 107, 0.18);
  --m-line-strong: rgba(207, 174, 107, 0.34);
  --m-line-soft: rgba(244, 237, 225, 0.08);

  --m-display: "Cormorant Garamond", "Amiri", serif;
  --m-ui: "Manrope", "IBM Plex Sans Arabic", sans-serif;

  --m-r-1: 2px;
  --m-r-2: 4px;

  --m-s-1: 4px;
  --m-s-2: 8px;
  --m-s-3: 12px;
  --m-s-4: 16px;
  --m-s-5: 24px;
  --m-s-6: 32px;
  --m-s-7: 48px;
  --m-s-8: 72px;
  --m-s-9: 112px;

  --m-max: 1320px;
  --m-gutter: 24px;

  --m-ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --m-dur: 240ms;
}

html[dir="rtl"] {
  --m-display: "Amiri", "Cormorant Garamond", serif;
  --m-ui: "IBM Plex Sans Arabic", "Manrope", sans-serif;
}

/* ---------- Base ---------- */

.m-root {
  background: var(--m-onyx);
  color: var(--m-ivory);
  font-family: var(--m-ui);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.m-root *,
.m-root *::before,
.m-root *::after {
  box-sizing: border-box;
}

.m-container {
  width: min(var(--m-max), calc(100% - (var(--m-gutter) * 2)));
  margin-inline: auto;
}

.m-num {
  font-variant-numeric: tabular-nums lining-nums;
}

.m-rule {
  height: 1px;
  border: 0;
  margin: 0;
  background: var(--m-line);
}

/* ---------- Typography ---------- */

.m-kicker {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  color: var(--m-gold);
  font-family: var(--m-ui);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.32em;
  text-transform: uppercase;
}

.m-kicker::before {
  content: "";
  width: 32px;
  height: 1px;
  background: var(--m-gold);
}

html[dir="rtl"] .m-kicker {
  letter-spacing: 0.04em;
  font-size: 13px;
}

.m-display,
.m-chapter,
.m-section {
  margin: 0;
  font-family: var(--m-display);
  font-weight: 500;
  color: var(--m-ivory);
  text-wrap: balance;
}

.m-display {
  font-size: clamp(44px, 6.4vw, 80px);
  line-height: 1.04;
  letter-spacing: -0.02em;
}

.m-chapter {
  font-size: clamp(32px, 3.6vw, 44px);
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.m-section {
  font-size: clamp(22px, 2.2vw, 28px);
  line-height: 1.2;
}

html[dir="rtl"] .m-display,
html[dir="rtl"] .m-chapter,
html[dir="rtl"] .m-section {
  letter-spacing: 0;
  line-height: 1.45;
}

.m-lead {
  margin: 0;
  max-width: 60ch;
  color: var(--m-taupe);
  font-size: 18px;
  line-height: 1.7;
}

.m-body {
  margin: 0;
  color: var(--m-ivory);
  font-size: 15px;
  line-height: 1.65;
}

.m-caption {
  margin: 0;
  color: var(--m-taupe);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

html[dir="rtl"] .m-caption {
  letter-spacing: 0;
  font-size: 13px;
}

.m-chapter-num {
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-size: 22px;
  color: var(--m-gold);
  font-variant-numeric: lining-nums;
}

.m-head {
  display: grid;
  gap: var(--m-s-3);
  margin-block-end: var(--m-s-6);
}

.m-head--split {
  grid-template-columns: auto 1fr auto;
  align-items: end;
  gap: var(--m-s-5);
}

@media (max-width: 767px) {
  .m-head--split {
    grid-template-columns: 1fr;
    gap: var(--m-s-3);
  }
}

/* ---------- Buttons ---------- */

.m-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 44px;
  padding: 0 22px;
  border: 1px solid var(--m-line-strong);
  border-radius: var(--m-r-1);
  background: transparent;
  color: var(--m-ivory);
  font-family: var(--m-ui);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: color var(--m-dur) var(--m-ease), background var(--m-dur) var(--m-ease),
    border-color var(--m-dur) var(--m-ease);
}

html[dir="rtl"] .m-btn {
  letter-spacing: 0;
  font-size: 14px;
}

.m-btn:hover {
  border-color: var(--m-gold);
  color: var(--m-gold);
}

.m-btn--primary {
  background: var(--m-gold);
  border-color: var(--m-gold);
  color: var(--m-gold-ink);
}

.m-btn--primary:hover {
  background: var(--m-gold-2);
  border-color: var(--m-gold-2);
  color: var(--m-gold-ink);
}

.m-btn--quiet {
  border-color: transparent;
  padding-inline: 4px;
  color: var(--m-taupe);
}

.m-btn--quiet:hover {
  border-color: transparent;
  color: var(--m-ivory);
  text-decoration: underline;
  text-underline-offset: 6px;
}

.m-btn--danger {
  border-color: rgba(217, 138, 125, 0.4);
  color: var(--m-oxblood-text);
}

.m-btn--danger:hover {
  background: var(--m-oxblood);
  border-color: var(--m-oxblood);
  color: var(--m-ivory);
}

.m-btn--sm {
  height: 34px;
  padding: 0 14px;
  font-size: 11px;
}

.m-btn--block {
  width: 100%;
}

.m-btn:disabled,
.m-btn[aria-disabled="true"] {
  opacity: 0.4;
  pointer-events: none;
}

.m-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--m-line);
  border-radius: var(--m-r-1);
  background: transparent;
  color: var(--m-ivory);
  cursor: pointer;
  transition: border-color var(--m-dur) var(--m-ease), color var(--m-dur) var(--m-ease);
}

.m-icon-btn:hover {
  border-color: var(--m-gold);
  color: var(--m-gold);
}

.m-btn:focus-visible,
.m-icon-btn:focus-visible,
.m-input:focus-visible,
.m-select:focus-visible,
.m-textarea:focus-visible,
.m-seg__btn:focus-visible,
.m-tab:focus-visible,
.m-chip:focus-visible,
.m-rail__item:focus-visible,
.m-dock__item:focus-visible {
  outline: 1px solid var(--m-gold);
  outline-offset: 3px;
}

/* ---------- Fields ---------- */

.m-field {
  display: grid;
  gap: 8px;
}

.m-label {
  color: var(--m-taupe);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

html[dir="rtl"] .m-label {
  letter-spacing: 0;
  font-size: 13px;
}

.m-input,
.m-select,
.m-textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--m-line-soft);
  border-bottom-color: var(--m-line-strong);
  border-radius: var(--m-r-1);
  background: var(--m-ember);
  color: var(--m-ivory);
  font-family: var(--m-ui);
  font-size: 15px;
  transition: border-color var(--m-dur) var(--m-ease), background var(--m-dur) var(--m-ease);
}

.m-input::placeholder,
.m-textarea::placeholder {
  color: var(--m-taupe-2);
}

.m-input:focus,
.m-select:focus,
.m-textarea:focus {
  outline: none;
  border-color: var(--m-gold);
  background: var(--m-ember-2);
}

.m-textarea {
  min-height: 120px;
  resize: vertical;
  line-height: 1.6;
}

.m-select {
  appearance: none;
  padding-inline-end: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23CFAE6B' stroke-width='1.4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}

html[dir="rtl"] .m-select {
  background-position: left 14px center;
}

.m-hint {
  color: var(--m-taupe-2);
  font-size: 13px;
}

.m-error {
  color: var(--m-oxblood-text);
  font-size: 13px;
}

.m-field.is-invalid .m-input,
.m-field.is-invalid .m-select,
.m-field.is-invalid .m-textarea {
  border-color: var(--m-oxblood-text);
}

.m-otp {
  width: 100%;
  max-width: 340px;
  height: 64px;
  padding: 0 0 0 18px;
  border: 0;
  border-radius: var(--m-r-1);
  background:
    repeating-linear-gradient(
      90deg,
      var(--m-ember) 0 44px,
      transparent 44px 56px
    );
  color: var(--m-ivory);
  direction: ltr;
  font-family: "Manrope", sans-serif;
  font-size: 26px;
  font-weight: 600;
  letter-spacing: 35px;
  font-variant-numeric: tabular-nums;
}

.m-otp:focus {
  outline: 1px solid var(--m-gold);
  outline-offset: 4px;
}

.m-check {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 15px;
}

.m-check input {
  appearance: none;
  width: 18px;
  height: 18px;
  margin: 0;
  border: 1px solid var(--m-line-strong);
  border-radius: var(--m-r-1);
  background: var(--m-ember);
  display: grid;
  place-content: center;
  cursor: pointer;
}

.m-check input:checked {
  background: var(--m-gold);
  border-color: var(--m-gold);
}

.m-check input:checked::after {
  content: "";
  width: 9px;
  height: 5px;
  border-left: 2px solid var(--m-gold-ink);
  border-bottom: 2px solid var(--m-gold-ink);
  transform: rotate(-45deg) translate(1px, -1px);
}

.m-switch {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.m-switch input {
  appearance: none;
  position: relative;
  width: 40px;
  height: 22px;
  margin: 0;
  border: 1px solid var(--m-line-strong);
  border-radius: 999px;
  background: var(--m-ember);
  cursor: pointer;
  transition: background var(--m-dur) var(--m-ease);
}

.m-switch input::after {
  content: "";
  position: absolute;
  top: 3px;
  inset-inline-start: 3px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--m-taupe);
  transition: inset-inline-start var(--m-dur) var(--m-ease), background var(--m-dur) var(--m-ease);
}

.m-switch input:checked {
  background: rgba(207, 174, 107, 0.2);
  border-color: var(--m-gold);
}

.m-switch input:checked::after {
  inset-inline-start: 21px;
  background: var(--m-gold);
}

/* ---------- Segmented control, tabs, chips ---------- */

.m-seg {
  display: inline-flex;
  justify-self: start;
  width: max-content;
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid var(--m-line);
  border-radius: var(--m-r-1);
  padding: 3px;
  gap: 3px;
  background: var(--m-smoke);
}

.m-seg__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 16px;
  border: 0;
  border-radius: var(--m-r-1);
  background: transparent;
  color: var(--m-taupe);
  font-family: var(--m-ui);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: color var(--m-dur) var(--m-ease), background var(--m-dur) var(--m-ease);
}

.m-seg__btn:hover {
  color: var(--m-ivory);
}

.m-seg__btn.is-active {
  background: var(--m-gold);
  color: var(--m-gold-ink);
}

.m-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--m-ember-2);
  color: var(--m-ivory);
  font-size: 11px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.m-seg__btn.is-active .m-count {
  background: rgba(26, 20, 8, 0.16);
  color: var(--m-gold-ink);
}

.m-count--alert {
  background: var(--m-oxblood);
  color: var(--m-ivory);
}

.m-tabs {
  display: flex;
  gap: 28px;
  border-bottom: 1px solid var(--m-line);
  overflow-x: auto;
  scrollbar-width: none;
}

.m-tab {
  position: relative;
  padding: 14px 0;
  border: 0;
  background: none;
  color: var(--m-taupe);
  font-family: var(--m-ui);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: color var(--m-dur) var(--m-ease);
}

.m-tab:hover {
  color: var(--m-ivory);
}

.m-tab.is-active {
  color: var(--m-ivory);
}

.m-tab.is-active::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: -1px;
  height: 1px;
  background: var(--m-gold);
}

.m-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.m-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--m-line);
  border-radius: var(--m-r-1);
  background: transparent;
  color: var(--m-taupe);
  font-family: var(--m-ui);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--m-dur) var(--m-ease);
}

.m-chip:hover {
  border-color: var(--m-line-strong);
  color: var(--m-ivory);
}

.m-chip.is-active {
  border-color: var(--m-gold);
  color: var(--m-gold);
  background: rgba(207, 174, 107, 0.08);
}

.m-chip__remove {
  display: inline-flex;
  width: 16px;
  height: 16px;
  align-items: center;
  justify-content: center;
  border: 0;
  background: none;
  color: inherit;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  opacity: 0.7;
}

.m-chip__remove:hover {
  opacity: 1;
}

/* ---------- Status and journey ---------- */

.m-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid var(--m-line-soft);
  color: var(--m-taupe);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.m-status::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.m-status--progress {
  color: var(--m-gold);
  border-color: rgba(207, 174, 107, 0.3);
}

.m-status--success {
  color: var(--m-sage-text);
  border-color: rgba(126, 154, 122, 0.35);
}

.m-status--danger {
  color: var(--m-oxblood-text);
  border-color: rgba(217, 138, 125, 0.35);
}

.m-status--info {
  color: var(--m-ivory);
  border-color: var(--m-line-strong);
}

.m-journey {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  margin: 0;
  padding: 0;
  list-style: none;
}

.m-journey__step {
  position: relative;
  display: grid;
  gap: 10px;
  padding-top: 18px;
  color: var(--m-taupe-2);
  font-size: 12px;
  font-weight: 600;
}

.m-journey__step::before {
  content: "";
  position: absolute;
  top: 4px;
  inset-inline: 0;
  height: 1px;
  background: var(--m-line-soft);
}

.m-journey__step::after {
  content: "";
  position: absolute;
  top: 0;
  inset-inline-start: 0;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 1px solid var(--m-taupe-2);
  background: var(--m-onyx);
}

.m-journey__step.is-done {
  color: var(--m-taupe);
}

.m-journey__step.is-done::before {
  background: var(--m-gold);
}

.m-journey__step.is-done::after {
  background: var(--m-gold);
  border-color: var(--m-gold);
}

.m-journey__step.is-current {
  color: var(--m-ivory);
}

.m-journey__step.is-current::after {
  border-color: var(--m-gold);
  box-shadow: 0 0 0 4px rgba(207, 174, 107, 0.18);
}

/* ---------- Surfaces ---------- */

.m-surface {
  border: 1px solid var(--m-line-soft);
  border-radius: var(--m-r-2);
  background: var(--m-smoke);
}

.m-surface--pad {
  padding: var(--m-s-5);
}

.m-stat {
  display: grid;
  gap: 6px;
  padding: var(--m-s-5) 0;
  border-top: 1px solid var(--m-line);
}

.m-stat__value {
  font-family: var(--m-display);
  font-size: 40px;
  line-height: 1;
  color: var(--m-ivory);
  font-variant-numeric: tabular-nums lining-nums;
}

.m-stat__unit {
  margin-inline-start: 6px;
  font-family: var(--m-ui);
  font-size: 13px;
  color: var(--m-taupe);
}

.m-stat__delta {
  font-size: 13px;
  color: var(--m-sage-text);
}

/* ---------- Ledger (tables, DataTables skin) ---------- */

.m-ledger {
  width: 100%;
  overflow-x: auto;
}

.m-ledger table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.m-ledger thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 12px 16px;
  border-bottom: 1px solid var(--m-line-strong);
  background: var(--m-smoke);
  color: var(--m-taupe);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-align: start;
  white-space: nowrap;
}

html[dir="rtl"] .m-ledger thead th {
  letter-spacing: 0;
  font-size: 12px;
}

.m-ledger tbody td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--m-line-soft);
  color: var(--m-ivory);
  vertical-align: middle;
}

.m-ledger tbody tr {
  transition: background var(--m-dur) var(--m-ease);
}

.m-ledger tbody tr:hover {
  background: var(--m-ember);
  cursor: pointer;
}

.m-ledger .is-num {
  text-align: end;
  font-variant-numeric: tabular-nums;
}

.m-ledger .is-muted {
  color: var(--m-taupe);
}

.m-ledger tfoot td {
  padding: 14px 16px;
  border-top: 1px solid var(--m-line-strong);
  font-weight: 700;
}

.m-ledger .dataTables_filter input,
.m-ledger .dataTables_length select {
  min-height: 38px;
  padding: 6px 12px;
  border: 1px solid var(--m-line-soft);
  border-radius: var(--m-r-1);
  background: var(--m-ember);
  color: var(--m-ivory);
}

.m-ledger .dataTables_info,
.m-ledger .dataTables_length label,
.m-ledger .dataTables_filter label {
  color: var(--m-taupe);
  font-size: 13px;
}

.m-ledger .dataTables_paginate .paginate_button {
  min-width: 34px;
  border: 1px solid transparent !important;
  border-radius: var(--m-r-1) !important;
  background: transparent !important;
  color: var(--m-taupe) !important;
}

.m-ledger .dataTables_paginate .paginate_button.current {
  border-color: var(--m-gold) !important;
  color: var(--m-gold) !important;
}

/* ---------- Product plate and world plate ---------- */

.m-plate {
  display: grid;
  gap: 14px;
  margin: 0;
  color: inherit;
  text-decoration: none;
}

.m-plate__frame {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: var(--m-r-1);
  background: var(--m-ivory);
}

.m-plate__frame img {
  width: 100%;
  height: 100%;
  padding: 10%;
  object-fit: contain;
  mix-blend-mode: multiply;
  transition: transform 700ms var(--m-ease);
}

.m-plate:hover .m-plate__frame img {
  transform: scale(1.04);
}

.m-plate__fav {
  position: absolute;
  top: 12px;
  inset-inline-end: 12px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: rgba(11, 10, 9, 0.06);
  color: var(--m-gold-ink);
  cursor: pointer;
}

.m-plate__name {
  margin: 0;
  font-family: var(--m-display);
  font-size: 20px;
  line-height: 1.25;
  color: var(--m-ivory);
}

.m-plate__price {
  color: var(--m-gold);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  font-variant-numeric: tabular-nums;
}

.m-world {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  aspect-ratio: 3 / 4;
  padding: 20px;
  overflow: hidden;
  border: 1px solid var(--m-line);
  border-radius: var(--m-r-1);
  background: var(--m-smoke);
  color: inherit;
  text-decoration: none;
  transition: border-color var(--m-dur) var(--m-ease);
}

.m-world:hover {
  border-color: var(--m-gold);
}

.m-world__num {
  position: relative;
  z-index: 2;
}

.m-world__name {
  position: relative;
  z-index: 2;
  margin: 0;
  font-family: var(--m-display);
  font-size: clamp(22px, 2vw, 30px);
  line-height: 1.1;
  color: var(--m-ivory);
}

.m-world__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 900ms var(--m-ease);
}

.m-world:hover .m-world__img {
  transform: scale(1.05);
}

.m-world--photo::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(11, 10, 9, 0.35) 0%, transparent 35%, rgba(11, 10, 9, 0.85) 100%);
}

.m-world--icon .m-world__img {
  inset: 14% 10% 24%;
  width: 80%;
  height: 62%;
  object-fit: contain;
  transform: scale(1.9);
  filter: saturate(0.72) contrast(0.96);
  opacity: 0.92;
}

.m-world--icon:hover .m-world__img {
  transform: scale(2);
}

/* ---------- Ticket (order / product in chat) and receipt slip ---------- */

.m-ticket {
  --notch: 10px;
  position: relative;
  display: grid;
  gap: 14px;
  padding: 18px 20px;
  border: 1px solid var(--m-line);
  border-radius: var(--m-r-2);
  background: var(--m-ember);
}

.m-ticket__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.m-ticket__tear {
  position: relative;
  height: 0;
  margin-inline: -20px;
  border-top: 1px dashed var(--m-line-strong);
}

.m-ticket__tear::before,
.m-ticket__tear::after {
  content: "";
  position: absolute;
  top: calc(var(--notch) * -1);
  width: calc(var(--notch) * 2);
  height: calc(var(--notch) * 2);
  border-radius: 50%;
  background: var(--m-onyx);
  border: 1px solid var(--m-line);
}

.m-ticket__tear::before {
  inset-inline-start: calc(var(--notch) * -1);
}

.m-ticket__tear::after {
  inset-inline-end: calc(var(--notch) * -1);
}

.m-ticket__row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
}

.m-ticket__total {
  font-family: var(--m-display);
  font-size: 26px;
  color: var(--m-gold);
  font-variant-numeric: tabular-nums;
}

.m-slip {
  display: grid;
  gap: 12px;
  padding: 28px;
  border-radius: var(--m-r-1);
  background: var(--m-ivory);
  color: var(--m-gold-ink);
}

.m-slip .m-caption {
  color: #6b5e48;
}

.m-slip__amount {
  font-family: var(--m-display);
  font-size: 44px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

/* ---------- Sheets, dialogs, toasts ---------- */

.m-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1990;
  background: rgba(11, 10, 9, 0.72);
  backdrop-filter: blur(2px);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--m-dur) var(--m-ease);
}

.m-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.m-sheet {
  position: fixed;
  z-index: 2000;
  inset-block: 0;
  inset-inline-end: 0;
  display: flex;
  flex-direction: column;
  width: min(560px, 100%);
  border-inline-start: 1px solid var(--m-line);
  background: var(--m-smoke);
  color: var(--m-ivory);
  transform: translateX(100%);
  transition: transform 420ms var(--m-ease);
}

html[dir="rtl"] .m-sheet {
  transform: translateX(-100%);
}

.m-sheet.is-open,
html[dir="rtl"] .m-sheet.is-open {
  transform: none;
}

.m-sheet__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 28px 28px 20px;
  border-bottom: 1px solid var(--m-line-soft);
}

.m-sheet__body {
  flex: 1;
  overflow-y: auto;
  padding: 24px 28px;
}

.m-sheet__foot {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  padding: 18px 28px;
  border-top: 1px solid var(--m-line-soft);
  background: var(--m-smoke);
}

.m-sheet__section + .m-sheet__section {
  margin-top: 28px;
  padding-top: 28px;
  border-top: 1px solid var(--m-line-soft);
}

@media (max-width: 767px) {
  .m-sheet,
  html[dir="rtl"] .m-sheet {
    inset: auto 0 0 0;
    width: 100%;
    max-height: 92vh;
    border-inline-start: 0;
    border-top: 1px solid var(--m-line);
    border-radius: var(--m-r-2) var(--m-r-2) 0 0;
    transform: translateY(100%);
  }

  .m-sheet.is-open,
  html[dir="rtl"] .m-sheet.is-open {
    transform: none;
  }

  .m-sheet::before {
    content: "";
    align-self: center;
    width: 40px;
    height: 3px;
    margin-top: 10px;
    border-radius: 2px;
    background: var(--m-line-strong);
  }

  .m-sheet__head,
  .m-sheet__body,
  .m-sheet__foot {
    padding-inline: 20px;
  }
}

.m-dialog {
  position: fixed;
  z-index: 2000;
  top: 50%;
  left: 50%;
  width: min(440px, calc(100% - 32px));
  padding: 32px;
  border: 1px solid var(--m-line);
  border-radius: var(--m-r-2);
  background: var(--m-smoke);
  color: var(--m-ivory);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, calc(-50% + 12px));
  transition: opacity var(--m-dur) var(--m-ease), transform var(--m-dur) var(--m-ease);
}

.m-dialog.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%);
}

.m-dialog__actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 28px;
}

.m-toast-stack {
  position: fixed;
  z-index: 2100;
  bottom: 24px;
  inset-inline-end: 24px;
  display: grid;
  gap: 10px;
  width: min(380px, calc(100% - 32px));
}

.m-toast {
  display: grid;
  grid-template-columns: 2px 1fr auto;
  gap: 14px;
  align-items: start;
  padding: 14px 16px;
  border: 1px solid var(--m-line);
  border-radius: var(--m-r-1);
  background: var(--m-ember);
  color: var(--m-ivory);
  animation: m-toast-in 320ms var(--m-ease);
}

.m-toast::before {
  content: "";
  align-self: stretch;
  background: var(--m-gold);
}

.m-toast--danger::before {
  background: var(--m-oxblood-text);
}

.m-toast--success::before {
  background: var(--m-sage);
}

.m-toast__title {
  margin: 0 0 2px;
  font-size: 13px;
  font-weight: 700;
}

.m-toast__text {
  margin: 0;
  color: var(--m-taupe);
  font-size: 13px;
}

@keyframes m-toast-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ---------- Empty and loading ---------- */

.m-empty {
  display: grid;
  justify-items: center;
  gap: 14px;
  padding: 64px 24px;
  text-align: center;
}

.m-empty__mark {
  width: 56px;
  height: 1px;
  background: var(--m-gold);
}

.m-empty .m-body {
  max-width: 42ch;
  color: var(--m-taupe);
}

.m-skeleton {
  border-radius: var(--m-r-1);
  background: linear-gradient(90deg, var(--m-ember) 0%, var(--m-ember-2) 50%, var(--m-ember) 100%);
  background-size: 200% 100%;
  animation: m-shimmer 1.6s linear infinite;
}

@keyframes m-shimmer {
  from {
    background-position: 200% 0;
  }
  to {
    background-position: -200% 0;
  }
}

/* ---------- Navigation: concierge bar, Atelier rail, mobile dock ---------- */

.m-bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  height: 76px;
  padding-inline: var(--m-gutter);
  border-bottom: 1px solid var(--m-line);
  background: rgba(11, 10, 9, 0.92);
}

.m-bar__links {
  display: flex;
  gap: 28px;
}

.m-bar__links--end {
  justify-content: flex-end;
  align-items: center;
}

.m-bar__link {
  color: var(--m-ivory);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  transition: color var(--m-dur) var(--m-ease);
}

html[dir="rtl"] .m-bar__link {
  letter-spacing: 0;
  font-size: 14px;
}

.m-bar__link:hover,
.m-bar__link.is-active {
  color: var(--m-gold);
}

.m-bar__logo img {
  display: block;
  height: 44px;
}

.m-rail {
  display: grid;
  align-content: start;
  gap: 2px;
  width: 248px;
  padding: 24px 12px;
  border-inline-end: 1px solid var(--m-line-soft);
  background: var(--m-smoke);
}

.m-rail__group {
  margin: 18px 12px 8px;
  color: var(--m-taupe-2);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.m-rail__item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  height: 40px;
  padding: 0 12px;
  border-radius: var(--m-r-1);
  color: var(--m-taupe);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: color var(--m-dur) var(--m-ease), background var(--m-dur) var(--m-ease);
}

.m-rail__item:hover {
  background: var(--m-ember);
  color: var(--m-ivory);
}

.m-rail__item.is-active {
  background: var(--m-ember);
  color: var(--m-ivory);
}

.m-rail__item.is-active::before {
  content: "";
  position: absolute;
  inset-block: 8px;
  inset-inline-start: 0;
  width: 2px;
  background: var(--m-gold);
}

.m-rail__item .m-count {
  margin-inline-start: auto;
}

.m-dock {
  position: fixed;
  z-index: 1500;
  inset-inline: 0;
  bottom: 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  padding: 8px 8px calc(8px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--m-line);
  background: rgba(11, 10, 9, 0.96);
}

.m-dock--static {
  position: static;
}

.m-dock__item {
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 6px 0;
  color: var(--m-taupe);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
}

html[dir="rtl"] .m-dock__item {
  letter-spacing: 0;
  font-size: 11px;
}

.m-dock__item svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  stroke-width: 1.4;
  fill: none;
}

.m-dock__item.is-active {
  color: var(--m-gold);
}

/* ---------- Reveal motion ---------- */

.m-reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 700ms var(--m-ease), transform 700ms var(--m-ease);
}

.m-reveal.is-in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .m-root *,
  .m-root *::before,
  .m-root *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }

  .m-reveal {
    opacity: 1;
    transform: none;
  }
}
