:root {
  --gx-ink: #1A2332;
  --gx-muted: #6B7785;
  --gx-line: #E8E4DE;
  --gx-bg: #F7F4EF;
  --gx-card: #FFFFFF;
  --gx-brand: #0B3A5B;
  --gx-brand-2: #134E75;
  --gx-accent: #E8572A;
  --gx-accent-soft: #FFE8E0;
  --gx-ok: #1F8A5B;
  --gx-ok-soft: #E4F6EE;
  --gx-warn: #C47A12;
  --gx-radius: 18px;
  --gx-shadow: 0 10px 40px rgba(26, 35, 50, .08);
  --gx-font: "DM Sans", system-ui, sans-serif;
  --gx-display: "Fraunces", Georgia, serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--gx-font);
  color: var(--gx-ink);
  background: var(--gx-bg);
  -webkit-font-smoothing: antialiased;
}

.btn-mp-primary {
  background: var(--gx-accent);
  border-color: var(--gx-accent);
  color: #fff;
  border-radius: 999px;
  font-weight: 600;
}
.btn-mp-primary:hover { background: #d14a22; border-color: #d14a22; color: #fff; }

/* ===== Guest shell ===== */
.mp-guest-body, .gx-main { min-height: 100%; }
.mp-guest-body {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(1200px 500px at 10% -10%, #FFE8E0 0%, transparent 55%),
    radial-gradient(900px 400px at 100% 0%, #D6E8F5 0%, transparent 50%),
    var(--gx-bg);
}
body.gx-lock {
  overflow: hidden;
  height: 100dvh;
}
body.gx-lock .mp-guest-body {
  height: 100dvh;
  min-height: 100dvh;
  overflow: hidden;
}
body.gx-lock .gx-header {
  flex-shrink: 0;
  padding: 10px 14px 4px;
}
body.gx-lock .gx-header__logo { height: 36px; }
body.gx-lock .gx-header__title { font-size: 1.15rem; }
body.gx-lock .gx-main {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 2px 12px 8px;
  overflow: hidden;
}
body.gx-lock .gx-footer {
  flex-shrink: 0;
  padding: 4px 12px calc(6px + env(safe-area-inset-bottom));
  font-size: 11px;
}
body.gx-lock .gx {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 12px 12px 10px;
}
body.gx-lock .gx-steps { flex-shrink: 0; margin-bottom: 10px; }
body.gx-lock .gx-stage {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
body.gx-lock .gx-bar {
  flex-shrink: 0;
  margin-top: 8px;
  position: static;
  background: transparent;
  padding-top: 0;
}
body.gx-lock .gx-error { flex-shrink: 0; margin-top: 6px; }
.gx-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 16px 8px;
  max-width: 760px;
  margin: 0 auto;
  width: 100%;
}
.gx-header__logo { height: 44px; width: auto; object-fit: contain; }
.gx-header__eyebrow {
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--gx-muted);
  font-weight: 600;
}
.gx-header__title {
  font-family: var(--gx-display);
  font-size: 1.35rem;
  color: var(--gx-brand);
  line-height: 1.15;
}
.gx-main {
  flex: 1;
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 4px 14px 28px;
}
.gx-footer {
  text-align: center;
  font-size: 12px;
  color: var(--gx-muted);
  padding: 8px 12px calc(10px + env(safe-area-inset-bottom));
}

/* ===== Wizard ===== */
.gx {
  background: var(--gx-card);
  border-radius: 24px;
  box-shadow: var(--gx-shadow);
  border: 1px solid rgba(255,255,255,.7);
  padding: 18px 16px 14px;
  overflow: hidden;
}
.gx-intro {
  background: linear-gradient(135deg, #FFF8F5, #F3F8FC);
  border: 1px solid var(--gx-line);
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 14px;
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--gx-muted);
}
.gx-intro p { margin: 0; }

.gx-steps {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
}
.gx-steps span {
  flex: 1;
  height: 4px;
  border-radius: 99px;
  background: #ECE8E2;
  transition: background .25s ease, transform .2s;
}
.gx-steps span.is-done { background: var(--gx-brand); }
.gx-steps span.is-now {
  background: var(--gx-accent);
  transform: scaleY(1.4);
}

.gx-stage { position: relative; min-height: 280px; }
.gx-panel {
  display: none;
  animation: gxIn .28s ease;
}
.gx-panel.is-active { display: block; }
@keyframes gxIn {
  from { opacity: 0; transform: translateX(18px); }
  to { opacity: 1; transform: none; }
}
.gx-panel__badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--gx-accent-soft);
  color: var(--gx-accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  margin-bottom: 8px;
}
.gx-panel__title {
  font-family: var(--gx-display);
  font-size: 1.55rem;
  color: var(--gx-brand);
  margin: 0 0 4px;
  line-height: 1.2;
}
.gx-panel__sub {
  color: var(--gx-muted);
  font-size: .92rem;
  margin: 0 0 16px;
}

.gx-input {
  width: 100%;
  min-height: 52px;
  border: 1.5px solid var(--gx-line);
  border-radius: 14px;
  padding: 12px 16px;
  font-size: 16px;
  background: #FFFCFA;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.gx-input:focus {
  border-color: var(--gx-accent);
  box-shadow: 0 0 0 4px rgba(232,87,42,.12);
}

.gx-counter {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  padding: 18px 0 8px;
}
.gx-counter__btn {
  width: 52px; height: 52px;
  border-radius: 50%;
  border: none;
  background: var(--gx-brand);
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(11,58,91,.25);
}
.gx-counter__val {
  font-family: var(--gx-display);
  font-size: 3rem;
  color: var(--gx-brand);
  min-width: 70px;
  text-align: center;
}

.gx-cal-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
  flex-shrink: 0;
}
.gx-cal-nav__label { font-weight: 700; color: var(--gx-brand); font-size: 14px; }
.gx-icon-btn {
  width: 32px; height: 32px;
  border-radius: 10px;
  border: 1px solid var(--gx-line);
  background: #fff;
  cursor: pointer;
  font-size: 16px;
  flex-shrink: 0;
}
.gx-panel[data-step="4"],
.gx-panel--cal {
  display: none;
  flex-direction: column;
  min-height: 0;
}
.gx-panel[data-step="4"].is-active,
.gx-panel--cal.is-active {
  display: flex;
  flex: 1;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}
body.gx-lock .gx-panel--cal .gx-panel__badge { margin-bottom: 4px; }
body.gx-lock .gx-panel--cal .gx-panel__title {
  font-size: clamp(1.15rem, 4.2vw, 1.45rem);
  margin-bottom: 2px;
}
body.gx-lock .gx-panel--cal .gx-panel__sub {
  margin-bottom: 8px;
  font-size: .85rem;
}
.gx-cal-wrap {
  flex: 1;
  min-height: 0;
  width: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.gx-calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  grid-auto-rows: minmax(0, 1fr);
  gap: clamp(2px, 0.8vw, 6px);
  width: 100%;
  flex: 1;
  min-height: 0;
  height: 100%;
}
.gx-cal-head {
  text-align: center;
  font-size: clamp(9px, 2.4vw, 11px);
  color: var(--gx-muted);
  font-weight: 600;
  padding: 0;
  align-self: center;
}
.gx-cal-pad { min-height: 0; }
.gx-cal-day {
  border: 1px solid var(--gx-line);
  border-radius: clamp(8px, 1.8vw, 12px);
  background: #fff;
  min-height: 0;
  width: 100%;
  height: 100%;
  font-size: clamp(11px, 2.8vw, 15px);
  font-weight: 600;
  cursor: pointer;
  color: var(--gx-ink);
  padding: 0;
  display: grid;
  place-items: center;
}
.gx-cal-day:disabled {
  opacity: .3;
  cursor: not-allowed;
  background: #F1EEE9;
}
.gx-cal-day.is-selected {
  background: var(--gx-accent);
  border-color: var(--gx-accent);
  color: #fff;
  box-shadow: 0 4px 12px rgba(232,87,42,.28);
}
.gx-cal-note {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--gx-muted);
  margin: 6px 0 0;
  flex-shrink: 0;
}
.gx-dot {
  width: 8px; height: 8px; border-radius: 50%; display: inline-block;
}
.gx-pick-hint {
  background: linear-gradient(135deg, #FFF4EF, #FFF8F5);
  border: 1.5px solid rgba(232,87,42,.35);
  border-radius: 14px;
  padding: 12px 14px;
  margin: 0 0 12px;
  font-size: 14px;
  line-height: 1.4;
  color: var(--gx-brand);
  font-weight: 500;
}
.gx-pick-hint strong { color: var(--gx-accent); font-weight: 700; }
.gx-pick-hint.is-done {
  background: var(--gx-ok-soft);
  border-color: rgba(31,138,91,.35);
  color: var(--gx-ok);
}
.gx-pick-hint.is-done strong { color: var(--gx-ok); }
.gx-dot--closed { background: #94A3B8; }

/* Food cards – compact grid */
.gx-person-bar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 8px;
}
.gx-person-dots {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  justify-content: flex-end;
  max-width: 46%;
}
.gx-person-dots i {
  width: 26px; height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-style: normal;
  font-size: 11px;
  font-weight: 700;
  background: #F0EBE4;
  color: var(--gx-muted);
  border: 2px solid transparent;
}
.gx-person-dots i.is-done { background: var(--gx-ok-soft); color: var(--gx-ok); }
.gx-person-dots i.is-now {
  background: var(--gx-accent);
  color: #fff;
  border-color: #fff;
  box-shadow: 0 0 0 2px var(--gx-accent);
  transform: scale(1.08);
}

.gx-chip {
  border: 1px solid var(--gx-line);
  background: #fff;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--gx-brand);
  margin-bottom: 10px;
  cursor: pointer;
}
.gx-sec-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--gx-muted);
  margin: 10px 0 8px;
}
.gx-sec-label span {
  text-transform: none;
  letter-spacing: 0;
  font-weight: 500;
  color: var(--gx-accent);
  margin-left: 4px;
}
.gx-food-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.gx-food-grid--3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 520px) {
  .gx-food-grid--3 { grid-template-columns: repeat(2, 1fr); }
}
.gx-food {
  position: relative;
  text-align: left;
  border: 1.5px solid var(--gx-line);
  border-radius: 14px;
  background: #FFFCFA;
  padding: 10px 10px 10px 12px;
  cursor: pointer;
  min-height: auto;
  transition: border-color .15s, background .15s, transform .12s, box-shadow .15s;
}
.gx-food--none {
  min-height: 48px;
  border-style: dashed;
  background: #F7F4EF;
  grid-column: 1 / -1;
  margin-top: 4px;
}
.gx-food--none .gx-food__name { color: var(--gx-muted); }
.gx-food:active { transform: scale(.98); }
.gx-food.is-selected {
  border-color: var(--gx-accent);
  background: var(--gx-accent-soft);
  box-shadow: 0 0 0 1px var(--gx-accent);
}
.gx-food--none.is-selected {
  border-style: solid;
  background: #F0EBE4;
  border-color: var(--gx-brand);
  box-shadow: 0 0 0 1px var(--gx-brand);
}
.gx-food--none.is-selected .gx-food__check { background: var(--gx-brand); }
.gx-food--none.is-selected .gx-food__name { color: var(--gx-brand); }
.gx-food__check {
  position: absolute;
  top: 8px; right: 8px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--gx-accent);
  color: #fff;
  font-size: 11px;
  display: none;
  place-items: center;
}
.gx-food.is-selected .gx-food__check { display: grid; }
.gx-food__name {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--gx-brand);
  line-height: 1.25;
  padding-right: 16px;
  margin-bottom: 4px;
}
.gx-food__ing {
  display: block;
  font-size: 11.5px;
  color: var(--gx-muted);
  line-height: 1.35;
  white-space: normal;
  overflow: visible;
}

.gx-cart {
  border-radius: 16px;
  background: #FFFCFA;
  border: 1px solid var(--gx-line);
  padding: 12px;
  margin-bottom: 12px;
}
.gx-cart__head {
  font-weight: 700;
  color: var(--gx-brand);
  margin-bottom: 8px;
}
.gx-cart__row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 0;
  border-top: 1px dashed var(--gx-line);
  font-size: 13px;
}
.gx-cart__row strong { color: var(--gx-brand); }
.gx-cart__meta { color: var(--gx-muted); font-size: 12px; }
.gx-auto {
  background: linear-gradient(135deg, #F3F8FC, #FFF8F5);
  border-radius: 14px;
  padding: 10px 12px;
  border: 1px solid var(--gx-line);
}
.gx-auto__title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--gx-muted);
  margin-bottom: 6px;
}
.gx-auto__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.gx-auto__tags span {
  font-size: 11px;
  background: #fff;
  border: 1px solid var(--gx-line);
  border-radius: 999px;
  padding: 3px 8px;
  color: var(--gx-ink);
}

.gx-done { text-align: center; padding: 28px 8px 12px; }
.gx-done__ring {
  width: 72px; height: 72px;
  margin: 0 auto 14px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--gx-ok-soft);
  color: var(--gx-ok);
  font-size: 1.8rem;
  font-weight: 700;
  box-shadow: 0 10px 30px rgba(31,138,91,.2);
}

.gx-bar {
  display: flex;
  gap: 10px;
  margin-top: 16px;
  position: sticky;
  bottom: 0;
  padding-top: 8px;
  background: linear-gradient(180deg, transparent, #fff 28%);
}
.gx-textarea {
  min-height: 110px;
  resize: vertical;
  line-height: 1.45;
}
.gx-btn {
  flex: 1;
  min-height: 48px;
  border-radius: 14px;
  border: none;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}
.gx-btn--ghost {
  background: #F3EFE9;
  color: var(--gx-brand);
}
.gx-btn--primary {
  background: linear-gradient(135deg, var(--gx-accent), #F07545);
  color: #fff;
  box-shadow: 0 10px 24px rgba(232,87,42,.28);
}
.gx-btn:disabled { opacity: .45; cursor: not-allowed; }
.gx-error {
  margin-top: 10px;
  background: #FFE8E8;
  color: #B91C1C;
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 13px;
}

/* Auth shared bits */
.ax-auth {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 20px;
  background:
    radial-gradient(800px 400px at 0% 0%, #FFE8E0, transparent),
    linear-gradient(160deg, #0B3A5B, #134E75 60%, #1B5F87);
}
.ax-auth__card {
  width: 100%;
  max-width: 400px;
  background: #fff;
  border-radius: 24px;
  padding: 28px 24px;
  box-shadow: 0 30px 60px rgba(0,0,0,.28);
}
.ax-auth__logo {
  display: block;
  height: 48px;
  margin: 0 auto 16px;
  object-fit: contain;
}
