/* MOGAMBO — bottom bar, sheets (login / register, contact), scanner, stamps, confetti.
   Owned by the account part. Prefix: mg-*. Uses the tokens from css/tokens.css. */

:root {
  --mg-spring: cubic-bezier(0.22, 1.2, 0.36, 1);
  --mg-pop: cubic-bezier(0.34, 1.56, 0.64, 1);
  --mg-ink: #b5212c;
}
@supports (transition-timing-function: linear(0, 1)) {
  :root {
    /* damped springs (simulated, see scratch spring.js) */
    --mg-spring: linear(0, 0.063, 0.185, 0.331, 0.465, 0.597, 0.709, 0.799, 0.869, 0.92, 0.957, 0.98, 0.996, 1.005, 1.01, 1.012, 1.012, 1.011, 1.009, 1.007, 1.006, 1.004, 1.003, 1.002, 1.001, 1.001, 1);
    --mg-pop: linear(0, 0.081, 0.249, 0.456, 0.678, 0.856, 0.994, 1.088, 1.14, 1.157, 1.15, 1.126, 1.092, 1.059, 1.029, 1.006, 0.989, 0.98, 0.975, 0.976, 0.979, 0.984, 0.989, 0.994, 0.998, 1.001, 1.003, 1.004, 1.003, 1.002, 1);
  }
}

/* pages with the bar keep room for it under their content */
body[data-dock] { padding-bottom: var(--dock-space); }
/* the bar covers the bottom of the screen: when the browser scrolls a focused control (Tab) or a
   scrollIntoView target into view, it stops above the bar, not behind it (WCAG 2.4.11) */
html:has(> body[data-dock]:not(.is-preview)) { scroll-padding-bottom: calc(var(--dock-space) + 16px); }
body.is-preview[data-dock] { padding-bottom: 0; }
body.is-preview .mg-dock { display: none !important; }

html.mg-locked { overflow: hidden; }
html.mg-locked body { padding-right: var(--mg-sbw, 0px); }

.mg-ico { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ================= bottom bar ================= */

.mg-dock {
  position: fixed; z-index: var(--z-dock);
  left: 50%; bottom: calc(12px + var(--safe-b));
  width: min(460px, calc(100% - 24px - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px)));
  transform: translateX(-50%);
  pointer-events: none; /* only the pill catches clicks */
}
html.mg-locked .mg-dock { margin-left: calc(var(--mg-sbw, 0px) / -2); }
.mg-dock.is-entering { animation: mg-dock-in 0.9s var(--mg-spring) both; }
@keyframes mg-dock-in { from { transform: translate(-50%, calc(100% + 40px)); opacity: 0; } to { transform: translateX(-50%); opacity: 1; } }

.mg-dock-pill {
  pointer-events: auto;
  position: relative;
  display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 6px;
  min-height: 66px; padding: 6px;
  border-radius: var(--r-pill);
  background:
    linear-gradient(180deg, rgba(255, 244, 222, 0.07), rgba(255, 244, 222, 0) 55%),
    rgba(19, 17, 15, 0.74);
  border: 1px solid var(--line-2);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  backdrop-filter: blur(18px) saturate(150%);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.55), 0 2px 6px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 240, 210, 0.08);
}
.mg-dock[data-cols="3"] .mg-dock-pill { grid-template-columns: 1fr 92px 1fr; }

.mg-dock-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  min-width: 0; height: 54px; padding: 0 14px;
  border: 0; border-radius: var(--r-pill);
  background: transparent; color: var(--text);
  font-size: 15px; font-weight: 700; letter-spacing: 0.01em; line-height: 1.1;
  text-decoration: none; white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 0.2s var(--ease), transform 0.25s var(--mg-pop), color 0.2s;
}
.mg-dock-btn .mg-ico { width: 22px; height: 22px; }
.mg-dock-label { overflow: hidden; text-overflow: ellipsis; }
.mg-dock-btn:active { transform: scale(0.95); }
.mg-dock-btn:focus-visible, .mg-dock-scan:focus-visible { outline: 2px solid var(--brass-2); outline-offset: 2px; }
.mg-dock-btn--brass {
  background: var(--brass-grad); color: var(--on-brass);
  box-shadow: 0 8px 22px rgba(200, 160, 97, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.45);
}
.mg-dock-btn--stack { flex-direction: column; gap: 4px; padding: 0 6px; font-size: 12.5px; font-weight: 700; letter-spacing: 0.02em; }
.mg-dock-btn--stack .mg-ico { width: 23px; height: 23px; }
.mg-dock-btn[aria-current="page"] { color: var(--brass-2); }
.mg-dock-btn[aria-current="page"]::after {
  content: ''; position: absolute; bottom: 9px; width: 4px; height: 4px; border-radius: 50%; background: var(--brass-2);
}
.mg-dock-btn--stack[aria-current="page"] { position: relative; }
.mg-dock-btn--stack[aria-current="page"]::after { display: none; }
@media (hover: hover) {
  .mg-dock-btn:not(.mg-dock-btn--brass):hover { background: rgba(239, 226, 204, 0.07); }
  .mg-dock-btn--brass:hover { box-shadow: 0 10px 30px rgba(200, 160, 97, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.5); }
}

/* the raised round scan button */
.mg-dock-scan {
  position: relative; align-self: stretch;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 3px;
  padding: 0 0 5px; margin: 0; border: 0; border-radius: 22px;
  background: transparent; color: var(--brass-2); text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.mg-dock-orb {
  position: absolute; left: 50%; top: -30px; transform: translateX(-50%);
  display: grid; place-items: center;
  width: 66px; height: 66px; border-radius: 50%;
  background:
    radial-gradient(120% 90% at 30% 18%, rgba(255, 248, 228, 0.85), rgba(255, 248, 228, 0) 42%),
    linear-gradient(150deg, #f6e2b3 0%, #d6ae6c 36%, #a87d3f 70%, #7d5a26 100%);
  color: var(--on-brass);
  border: 4px solid #15120f;
  box-shadow:
    0 12px 26px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(230, 200, 143, 0.55),
    0 0 26px rgba(214, 174, 108, 0.35),
    inset 0 -3px 6px rgba(80, 52, 14, 0.45),
    inset 0 2px 2px rgba(255, 255, 255, 0.55);
  transition: transform 0.35s var(--mg-pop), box-shadow 0.3s var(--ease);
}
.mg-dock-orb .mg-ico { width: 30px; height: 30px; stroke-width: 2; position: relative; z-index: 1; }
.mg-dock-orb-ring {
  position: absolute; inset: -4px; border-radius: 50%;
  border: 2px solid rgba(230, 200, 143, 0.7);
  animation: mg-orb-ping 2.8s var(--ease-out) infinite;
  pointer-events: none;
}
@keyframes mg-orb-ping {
  0% { transform: scale(1); opacity: 0.85; }
  70%, 100% { transform: scale(1.55); opacity: 0; }
}
.mg-dock-scan-label { font-size: 12.5px; font-weight: 800; letter-spacing: 0.04em; line-height: 1.1; white-space: nowrap; }
.mg-dock-scan:active .mg-dock-orb { transform: translateX(-50%) scale(0.92); }
@media (hover: hover) {
  .mg-dock-scan:hover .mg-dock-orb { transform: translateX(-50%) translateY(-2px) scale(1.04); box-shadow: 0 16px 30px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(230, 200, 143, 0.7), 0 0 36px rgba(214, 174, 108, 0.55), inset 0 -3px 6px rgba(80, 52, 14, 0.45), inset 0 2px 2px rgba(255, 255, 255, 0.55); }
}
.mg-dock-scan:focus-visible { outline-offset: 4px; border-radius: 18px; }

@media (max-width: 359.98px) {
  .mg-dock-btn { padding: 0 10px; font-size: 14px; gap: 7px; }
  .mg-dock[data-cols="3"] .mg-dock-pill { grid-template-columns: 1fr 80px 1fr; }
  .mg-dock-btn--stack { font-size: 11.5px; }
}

/* ================= layers (sheets, dialogs, fullscreen) ================= */

.mg-layer {
  position: fixed; inset: 0; z-index: var(--z-sheet);
  display: flex; align-items: flex-end; justify-content: center;
}
.mg-backdrop {
  position: absolute; inset: 0;
  background: radial-gradient(120% 80% at 50% 100%, rgba(10, 8, 6, 0.55), rgba(6, 5, 4, 0.78));
  -webkit-backdrop-filter: blur(6px) saturate(120%);
  backdrop-filter: blur(6px) saturate(120%);
  opacity: 0; transition: opacity 0.35s var(--ease);
}
.mg-layer.is-open .mg-backdrop { opacity: 1; }
.mg-layer.is-closing .mg-backdrop { opacity: 0; transition-duration: 0.25s; }

.mg-sheet {
  position: relative;
  width: 100%;
  max-height: calc(100dvh - 20px - env(safe-area-inset-top, 0px));
  overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
  padding: 0 20px calc(24px + var(--safe-b));
  border-radius: 28px 28px 0 0;
  background:
    radial-gradient(140% 50% at 50% -8%, rgba(200, 160, 97, 0.14), rgba(200, 160, 97, 0) 60%),
    linear-gradient(180deg, #191613 0%, #12100e 100%);
  border: 1px solid var(--line-2); border-bottom: 0;
  box-shadow: 0 -24px 60px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 240, 210, 0.07);
  color: var(--text);
  transform: translateY(105%);
  transition: transform 0.6s var(--mg-spring);
  scrollbar-width: thin; scrollbar-color: var(--line-3) transparent;
}
.mg-sheet:focus { outline: none; }
.mg-layer.is-open .mg-sheet { transform: none; }
.mg-layer.is-closing .mg-sheet { transform: translateY(105%); transition: transform 0.32s cubic-bezier(0.4, 0, 1, 1); }
.mg-sheet.is-dragging { transition: none !important; }

.mg-sheet-grip {
  position: sticky; top: 0; z-index: 2;
  display: flex; justify-content: center; align-items: center;
  height: 28px; margin: 0 -20px; touch-action: none; cursor: grab;
}
.mg-sheet-grip span { width: 44px; height: 5px; border-radius: 3px; background: var(--line-3); }
.mg-sheet-close {
  position: absolute; z-index: 3; top: 14px; right: 14px;
  display: grid; place-items: center; width: 44px; height: 44px;
  border-radius: 50%; border: 1px solid var(--line-2);
  background: rgba(239, 226, 204, 0.06); color: var(--text-2);
  transition: background-color 0.2s, color 0.2s, transform 0.3s var(--mg-pop);
}
.mg-sheet-close .mg-ico { width: 20px; height: 20px; }
.mg-sheet-close:hover { background: rgba(239, 226, 204, 0.12); color: var(--text); }
.mg-sheet-close:active { transform: scale(0.92); }
.mg-sheet-body { position: relative; padding-top: 6px; }

@media (min-width: 720px) {
  .mg-layer { align-items: center; padding: 24px; }
  .mg-sheet {
    width: min(var(--mg-sheet-w, 520px), 100%);
    max-height: calc(100dvh - 48px);
    padding: 34px 36px 34px;
    border-radius: var(--r-xl); border-bottom: 1px solid var(--line-2);
    box-shadow: var(--shadow-2), inset 0 1px 0 rgba(255, 240, 210, 0.07);
    transform: translateY(26px) scale(0.955); opacity: 0;
    transition: transform 0.55s var(--mg-spring), opacity 0.25s var(--ease);
  }
  .mg-layer.is-open .mg-sheet { transform: none; opacity: 1; }
  .mg-layer.is-closing .mg-sheet { transform: translateY(14px) scale(0.97); opacity: 0; transition: transform 0.25s var(--ease), opacity 0.2s var(--ease); }
  .mg-sheet-grip { display: none; }
  .mg-sheet-close { top: 18px; right: 18px; }
  .mg-sheet-body { padding-top: 0; }
}

/* ================= shared text + buttons ================= */

.mg-kicker {
  display: inline-flex; align-items: center; gap: 8px; max-width: 100%; min-width: 0; overflow-wrap: anywhere;
  font-size: 12px; font-weight: 800; letter-spacing: 0.22em; text-transform: uppercase; color: var(--brass);
}
.mg-kicker .mg-ico { width: 16px; height: 16px; }
.mg-kicker > span { min-width: 0; }
.mg-sheet-head { padding-right: 52px; margin-bottom: 20px; }
.mg-sheet-title, .mg-auth-title {
  margin-top: 10px;
  font-family: var(--font-display); font-weight: 400; text-transform: uppercase;
  font-size: clamp(32px, 7.4vw, 44px); line-height: 1.25; /* Anton: room for the comma of Ș/Ț above the next line */ letter-spacing: 0.01em; color: var(--text);
}
.mg-sheet-lead, .mg-auth-lead { margin-top: 10px; color: var(--text-2); font-size: 15px; line-height: 1.55; }

.mg-btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  /* a long label from the panel wraps inside the button instead of widening the page */
  min-height: 50px; max-width: 100%; min-width: 0; padding: 6px 22px;
  border-radius: var(--r-pill); border: 1px solid var(--line-2);
  background: rgba(239, 226, 204, 0.06); color: var(--text);
  font-size: 15px; font-weight: 700; letter-spacing: 0.01em; line-height: 1.3; text-align: center; text-decoration: none; overflow-wrap: anywhere;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.25s var(--mg-pop), background-color 0.2s, border-color 0.2s, box-shadow 0.25s, opacity 0.2s;
}
.mg-btn:active { transform: scale(0.97); }
.mg-btn .mg-ico { width: 20px; height: 20px; }
.mg-btn--brass {
  border-color: transparent; background: var(--brass-grad); color: var(--on-brass);
  box-shadow: 0 10px 26px rgba(200, 160, 97, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.45);
}
.mg-btn--danger { border-color: color-mix(in srgb, var(--danger) 60%, transparent); background: color-mix(in srgb, var(--danger) 16%, transparent); color: #ffd9d4; }
.mg-btn--block { display: flex; width: 100%; }
.mg-btn--lg { min-height: 56px; font-size: 16px; }
.mg-btn-label { min-width: 0; }
.mg-btn[disabled] { cursor: default; opacity: 0.75; }
@media (hover: hover) {
  .mg-btn:not(.mg-btn--brass):not([disabled]):hover { background: rgba(239, 226, 204, 0.11); border-color: var(--line-3); }
  .mg-btn--brass:not([disabled]):hover { box-shadow: 0 14px 34px rgba(200, 160, 97, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.5); }
}

.mg-spin {
  display: none; width: 20px; height: 20px; border-radius: 50%;
  border: 2.5px solid currentColor; border-right-color: transparent;
  animation: mg-spin 0.7s linear infinite;
}
.is-busy .mg-spin { display: inline-block; }
.is-busy .mg-btn-label { opacity: 0.55; }
@keyframes mg-spin { to { transform: rotate(360deg); } }

/* ================= forms ================= */

.mg-form { display: grid; gap: 16px; }
.mg-form-fields { display: grid; gap: 14px; }
.mg-field { display: grid; gap: 7px; min-width: 0; }
.mg-label { min-width: 0; font-size: 13.5px; font-weight: 700; color: var(--text-2); letter-spacing: 0.01em; overflow-wrap: anywhere; }
.mg-field input:not([type="checkbox"]), .mg-field textarea {
  width: 100%; height: 52px; padding: 0 16px;
  border-radius: var(--r); border: 1px solid var(--line-2);
  background: rgba(10, 9, 8, 0.55); color: var(--text);
  font-size: 16px; /* 16px keeps iOS from zooming */
  transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
}
.mg-field textarea { height: auto; min-height: 76px; padding: 13px 16px; resize: vertical; font: inherit; font-size: 16px; line-height: 1.45; }
.mg-field input::placeholder, .mg-field textarea::placeholder { color: var(--text-3); }
.mg-field input:hover, .mg-field textarea:hover { border-color: var(--line-3); }
.mg-field input:focus, .mg-field textarea:focus { outline: none; border-color: var(--brass); box-shadow: 0 0 0 3px rgba(200, 160, 97, 0.22); background: rgba(10, 9, 8, 0.75); }
.mg-field.is-invalid input:not([type="checkbox"]) { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(227, 100, 90, 0.16); }
.mg-field-hint { font-size: 13px; color: var(--text-3); }
.mg-field-error, .mg-form-error {
  display: flex; align-items: flex-start; gap: 7px;
  font-size: 13.5px; line-height: 1.4; color: #f2a39b; font-weight: 600;
}
.mg-field-error .mg-ico, .mg-form-error .mg-ico { width: 17px; height: 17px; margin-top: 1px; color: var(--danger); }
.mg-form-error {
  padding: 12px 14px; border-radius: var(--r);
  background: rgba(227, 100, 90, 0.1); border: 1px solid rgba(227, 100, 90, 0.35);
}
.mg-field-error[hidden], .mg-form-error[hidden] { display: none; }

.mg-pass { position: relative; }
.mg-pass input { padding-right: 56px !important; }
.mg-pass-toggle {
  position: absolute; right: 4px; top: 4px;
  display: grid; place-items: center; width: 44px; height: 44px;
  border: 0; border-radius: 10px; background: transparent; color: var(--text-3);
}
.mg-pass-toggle:hover { color: var(--text); }
.mg-pass-toggle[aria-pressed="true"] { color: var(--brass-2); }

.mg-field--check { position: relative; }
.mg-check-input { position: absolute; opacity: 0; width: 24px; height: 24px; margin: 2px 0 0; left: 0; top: 0; }
.mg-check { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; font-size: 14px; line-height: 1.5; color: var(--text-2); }
.mg-check-box {
  flex: none; display: grid; place-items: center; width: 24px; height: 24px; margin-top: 1px;
  border-radius: 7px; border: 1.5px solid var(--line-3); background: rgba(10, 9, 8, 0.55);
  color: transparent; transition: background-color 0.2s, border-color 0.2s, color 0.2s, transform 0.3s var(--mg-pop);
}
.mg-check-box .mg-ico { width: 16px; height: 16px; stroke-width: 2.6; }
.mg-check-input:checked + .mg-check .mg-check-box { background: var(--brass); border-color: var(--brass); color: var(--on-brass); transform: scale(1.06); }
.mg-check-input:focus-visible + .mg-check .mg-check-box { outline: 2px solid var(--brass-2); outline-offset: 3px; }
.mg-field--check.is-invalid .mg-check-box { border-color: var(--danger); }
.mg-check a { color: var(--brass-2); text-underline-offset: 3px; }

/* ================= login / register ================= */

.mg-auth-head { padding-right: 52px; margin-bottom: 22px; }
.mg-auth--inline .mg-auth-head { padding-right: 0; }
.mg-auth-reason {
  display: flex; gap: 10px; align-items: flex-start;
  margin-top: 16px; padding: 12px 14px;
  border-radius: var(--r); border: 1px solid rgba(200, 160, 97, 0.45);
  background: linear-gradient(135deg, rgba(200, 160, 97, 0.16), rgba(200, 160, 97, 0.05));
  color: var(--text); font-size: 14.5px; font-weight: 600; line-height: 1.45;
}
.mg-auth-reason .mg-ico { width: 20px; height: 20px; color: var(--brass-2); margin-top: 1px; }
.mg-auth-reason[hidden], .mg-auth .mg-kicker[hidden], .mg-auth-lead[hidden] { display: none; }
.mg-auth-foot { display: grid; gap: 14px; margin-top: 18px; }
.mg-auth-forgot {
  justify-self: center; display: inline-flex; gap: 8px; align-items: center; min-height: 44px; padding: 8px 14px;
  border: 0; border-radius: var(--r-pill); background: transparent;
  font-size: 14.5px; font-weight: 700; color: var(--text-2); line-height: 1.4;
}
.mg-auth-forgot .mg-ico { width: 18px; height: 18px; color: var(--brass-2); }
.mg-auth-forgot:hover { color: var(--text); }
/* forgotten password: WhatsApp / SMS choice */
.mg-choice { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mg-choice-btn {
  display: grid; justify-items: center; gap: 4px; min-height: 64px; padding: 12px 10px;
  border: 1px solid var(--line-2, var(--line)); border-radius: var(--r); background: var(--bg-2);
  color: var(--text-2); font-size: 15px; font-weight: 700; text-align: center;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}
.mg-choice-btn .mg-ico { width: 22px; height: 22px; }
.mg-choice-btn small { font-size: 12px; font-weight: 500; color: var(--text-3); line-height: 1.35; }
.mg-choice-btn[aria-checked="true"] {
  border-color: var(--brass); color: var(--text);
  background: linear-gradient(135deg, rgba(200, 160, 97, 0.18), rgba(200, 160, 97, 0.06));
  box-shadow: inset 0 0 0 1px var(--brass);
}
.mg-choice-btn[aria-checked="true"] .mg-ico { color: var(--brass-2); }
.mg-choice-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.mg-field.is-invalid .mg-choice-btn { border-color: var(--danger); }
.mg-auth-sent {
  display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px;
  border-radius: var(--r); border: 1px solid rgba(120, 190, 140, 0.4); background: rgba(120, 190, 140, 0.08);
  color: var(--text); font-size: 15px; line-height: 1.5;
}
.mg-auth-sent .mg-ico { flex: none; width: 22px; height: 22px; color: var(--ok); margin-top: 1px; }
.mg-auth-sent p { margin: 0; }
.mg-auth-forgot[hidden] { display: none; }
.mg-auth-switch {
  justify-self: center; min-height: 44px; padding: 8px 14px;
  border: 0; border-radius: var(--r-pill); background: transparent;
  color: var(--text-2); font-size: 15px;
}
.mg-auth-switch strong { color: var(--brass-2); font-weight: 800; text-decoration: underline; text-decoration-color: rgba(230, 200, 143, 0.4); text-underline-offset: 4px; }
.mg-auth-switch:hover strong { text-decoration-color: currentColor; }
.mg-auth.is-switching .mg-form, .mg-auth.is-switching .mg-auth-title, .mg-auth.is-switching .mg-auth-lead { animation: mg-swap 0.45s var(--mg-spring) both; }
@keyframes mg-swap { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ================= contact sheet ================= */

.mg-contact-msg {
  margin: -4px 0 18px; padding: 12px 14px; border-radius: var(--r);
  border: 1px dashed rgba(108, 192, 139, 0.45); background: rgba(108, 192, 139, 0.07);
}
.mg-contact-msg-label { display: flex; gap: 8px; align-items: center; font-size: 12.5px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ok); }
.mg-contact-msg-label .mg-ico { width: 18px; height: 18px; }
.mg-contact-msg-text { margin-top: 6px; font-family: var(--font-serif); font-style: italic; font-size: 16px; color: var(--text); overflow-wrap: anywhere; }

.mg-locs { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.mg-loc {
  position: relative; padding: 18px 18px 16px;
  border-radius: var(--r-lg); border: 1px solid var(--line-2);
  background: linear-gradient(180deg, rgba(239, 226, 204, 0.05), rgba(239, 226, 204, 0.02));
}
.mg-loc-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; margin-bottom: 10px; }
.mg-loc-name { font-family: var(--font-display); font-weight: 400; text-transform: uppercase; font-size: 22px; letter-spacing: 0.02em; line-height: 1.25; }
.mg-loc-status { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 700; color: var(--text-2); }
.mg-loc-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--text-3); }
.mg-loc-status.is-open { color: #a6e3bb; }
.mg-loc-status.is-open .mg-loc-dot { background: var(--ok); box-shadow: 0 0 0 4px rgba(108, 192, 139, 0.18); animation: mg-live 2s ease-in-out infinite; }
.mg-loc-status.is-closed .mg-loc-dot { background: var(--danger); }
@keyframes mg-live { 50% { box-shadow: 0 0 0 7px rgba(108, 192, 139, 0.05); } }
.mg-loc-line { display: flex; align-items: flex-start; gap: 10px; margin-top: 6px; font-size: 15px; color: var(--text-2); line-height: 1.45; }
.mg-loc-line .mg-ico { width: 18px; height: 18px; margin-top: 2px; color: var(--brass); }
.mg-loc-today { color: var(--text-3); font-weight: 600; }
.mg-loc-phone { color: var(--text); font-weight: 700; text-decoration: none; }
.mg-loc-phone:hover { text-decoration: underline; text-underline-offset: 3px; }
.mg-loc-note { margin-top: 8px; font-size: 14px; color: var(--brass-2); }
.mg-loc-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.mg-act {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  min-height: 64px; padding: 8px 6px; border-radius: 16px;
  border: 1px solid var(--line-2); background: rgba(239, 226, 204, 0.05);
  color: var(--text); font-size: 13.5px; font-weight: 700; text-decoration: none; text-align: center;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.25s var(--mg-pop), background-color 0.2s, border-color 0.2s;
}
.mg-act .mg-ico { width: 22px; height: 22px; }
.mg-act:active { transform: scale(0.96); }
.mg-act--brass { border-color: transparent; background: var(--brass-grad); color: var(--on-brass); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45); }
@media (hover: hover) { .mg-act:not(.mg-act--brass):hover { background: rgba(239, 226, 204, 0.1); border-color: var(--line-3); } }
@media (min-width: 720px) { .mg-act { flex-direction: row; min-height: 52px; gap: 8px; font-size: 14.5px; } }

.mg-loc-week { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 4px; }
.mg-loc-week summary {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  min-height: 40px; cursor: pointer; list-style: none;
  font-size: 13.5px; font-weight: 700; color: var(--text-2);
}
.mg-loc-week summary::-webkit-details-marker { display: none; }
.mg-loc-week summary .mg-ico { width: 18px; height: 18px; transition: transform 0.3s var(--mg-pop); }
.mg-loc-week[open] summary .mg-ico { transform: rotate(90deg); }
.mg-loc-week-list { display: grid; gap: 2px; margin: 4px 0 2px; }
.mg-loc-week-list > div { display: flex; justify-content: space-between; gap: 12px; padding: 5px 10px; border-radius: 8px; font-size: 14px; color: var(--text-2); }
.mg-loc-week-list > div.is-today { background: rgba(200, 160, 97, 0.12); color: var(--text); font-weight: 700; }
.mg-loc-week-list dt, .mg-loc-week-list dd { margin: 0; }

.mg-social { margin-top: 22px; }
.mg-social-title { font-size: 12px; font-weight: 800; letter-spacing: 0.2em; text-transform: uppercase; color: var(--text-3); }
.mg-social-list { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.mg-social-link {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px 0 12px;
  border-radius: var(--r-pill); border: 1px solid var(--line-2); background: rgba(239, 226, 204, 0.04);
  color: var(--text-2); font-size: 14px; font-weight: 700; text-decoration: none;
  transition: color 0.2s, border-color 0.2s, background-color 0.2s;
}
.mg-social-link .mg-ico { width: 20px; height: 20px; color: var(--brass); }
.mg-social-link:hover { color: var(--text); border-color: var(--line-3); background: rgba(239, 226, 204, 0.09); }

/* ================= stamps + confetti ================= */

.mg-stamp { display: block; width: 100%; height: 100%; color: var(--mg-ink); overflow: visible; }
.mg-confetti { position: fixed; inset: 0; z-index: calc(var(--z-toast) - 1); pointer-events: none; overflow: hidden; }
.mg-confetti i { position: absolute; display: block; border-radius: 2px; will-change: transform, opacity; }

/* ================= scanner (js/scanner.js) ================= */

.mg-layer--full .mg-backdrop { background: #000; -webkit-backdrop-filter: none; backdrop-filter: none; }
.mg-layer--full .mg-sheet {
  width: 100%; height: 100%; max-height: none;
  padding: 0; border: 0; border-radius: 0; box-shadow: none;
  background: #050505; overflow: hidden;
  transform: none; opacity: 0;
  transition: opacity 0.3s var(--ease);
}
.mg-layer--full.is-open .mg-sheet { opacity: 1; transform: none; }
.mg-layer--full.is-closing .mg-sheet { opacity: 0; transform: none; transition: opacity 0.22s var(--ease); }
.mg-layer--full .mg-sheet-body { height: 100%; padding: 0; }

.mg-scan { position: relative; height: 100%; overflow: hidden; color: #fff; isolation: isolate; }
.mg-scan-video {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  background: #050505; opacity: 0; transition: opacity 0.5s var(--ease);
}
.mg-scan[data-state="live"] .mg-scan-video, .mg-scan[data-state="busy"] .mg-scan-video { opacity: 1; }
.mg-scan-canvas { display: none; }

/* the frame: dark veil with a square window in the middle */
.mg-scan-view {
  position: absolute; inset: 0; z-index: 1;
  display: grid; place-items: center;
  padding-bottom: var(--mg-scan-panel, 210px);
  pointer-events: none;
}
.mg-scan-frame {
  position: relative;
  width: min(72vw, 46vh, 330px); aspect-ratio: 1;
  border-radius: 28px;
  box-shadow: 0 0 0 200vmax rgba(5, 5, 5, 0.62);
  transition: transform 0.5s var(--mg-spring), box-shadow 0.4s;
}
.mg-scan[data-state="nocam"] .mg-scan-frame, .mg-scan[data-state="starting"] .mg-scan-frame { box-shadow: 0 0 0 200vmax rgba(5, 5, 5, 0.86); }
.mg-scan-corner { position: absolute; width: 46px; height: 46px; border: 4px solid var(--brass-2); filter: drop-shadow(0 0 10px rgba(230, 200, 143, 0.55)); }
.mg-scan-corner:nth-child(1) { top: -2px; left: -2px; border-right: 0; border-bottom: 0; border-radius: 28px 0 0 0; }
.mg-scan-corner:nth-child(2) { top: -2px; right: -2px; border-left: 0; border-bottom: 0; border-radius: 0 28px 0 0; }
.mg-scan-corner:nth-child(3) { bottom: -2px; left: -2px; border-right: 0; border-top: 0; border-radius: 0 0 0 28px; }
.mg-scan-corner:nth-child(4) { bottom: -2px; right: -2px; border-left: 0; border-top: 0; border-radius: 0 0 28px 0; }
.mg-scan-line {
  position: absolute; left: 7%; right: 7%; top: 8%; height: 3px; border-radius: 3px;
  background: linear-gradient(90deg, transparent, var(--brass-2) 18%, #fff6df 50%, var(--brass-2) 82%, transparent);
  box-shadow: 0 0 18px 4px rgba(230, 200, 143, 0.55);
  opacity: 0;
}
.mg-scan[data-state="live"] .mg-scan-line { opacity: 1; animation: mg-scanline 2.3s ease-in-out infinite alternate; }
@keyframes mg-scanline { from { top: 8%; } to { top: 91%; } }
.mg-scan[data-state="busy"] .mg-scan-frame { transform: scale(0.94); }
.mg-scan[data-state="busy"] .mg-scan-corner { border-color: var(--ok); filter: drop-shadow(0 0 12px rgba(108, 192, 139, 0.7)); }
.mg-scan-frame-msg {
  position: absolute; inset: 0; display: grid; place-items: center; align-content: center; gap: 12px;
  padding: 22px; text-align: center; font-size: 15px; line-height: 1.45; color: var(--text-2);
}
.mg-scan-frame-msg .mg-ico { width: 40px; height: 40px; color: var(--brass); }
.mg-scan-frame-msg[hidden] { display: none; }

.mg-scan-top {
  position: absolute; z-index: 3; left: 0; right: 0; top: 0;
  display: flex; align-items: center; gap: 10px;
  padding: calc(14px + env(safe-area-inset-top, 0px)) 16px 14px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0));
}
.mg-scan-title { flex: 1; min-width: 0; font-family: var(--font-display); font-weight: 400; text-transform: uppercase; font-size: 26px; letter-spacing: 0.02em; line-height: 1.25; }
.mg-scan-iconbtn {
  display: grid; place-items: center; flex: none; width: 48px; height: 48px;
  border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(20, 18, 16, 0.55); color: #fff;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  transition: background-color 0.2s, color 0.2s, transform 0.3s var(--mg-pop);
}
.mg-scan-iconbtn:active { transform: scale(0.92); }
.mg-scan-iconbtn[aria-pressed="true"] { background: var(--brass-2); color: var(--on-brass); border-color: transparent; }
.mg-scan-iconbtn[hidden] { display: none; }

.mg-scan-hint {
  position: absolute; z-index: 2; left: 16px; right: 16px;
  bottom: calc(var(--mg-scan-panel, 210px) + 14px);
  text-align: center; font-size: 15px; font-weight: 600; color: rgba(255, 255, 255, 0.88);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.8);
}
.mg-scan-flash {
  position: absolute; z-index: 4; left: 50%; top: calc(76px + env(safe-area-inset-top, 0px));
  transform: translate(-50%, -8px); opacity: 0;
  display: flex; align-items: center; gap: 8px;
  width: max-content; max-width: calc(100% - 32px); padding: 10px 16px;
  border-radius: var(--r-pill); background: rgba(20, 18, 16, 0.86); border: 1px solid rgba(227, 100, 90, 0.5);
  font-size: 14px; font-weight: 600; color: #fff; pointer-events: none;
  transition: opacity 0.25s, transform 0.35s var(--mg-spring);
}
.mg-scan-flash .mg-ico { width: 18px; height: 18px; color: var(--danger); }
.mg-scan-flash.is-on { opacity: 1; transform: translate(-50%, 0); }

.mg-scan-panel {
  position: absolute; z-index: 3; left: 0; right: 0; bottom: 0;
  padding: 18px 16px calc(18px + var(--safe-b));
  background: linear-gradient(180deg, rgba(22, 19, 16, 0.92), rgba(14, 12, 10, 0.98));
  border-top: 1px solid var(--line-2); border-radius: 26px 26px 0 0;
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
}
.mg-scan-panel-in { width: min(460px, 100%); margin: 0 auto; }
.mg-scan-code-label { display: block; margin-bottom: 8px; font-size: 14px; font-weight: 700; color: var(--text-2); }
.mg-scan-code-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.mg-scan-code {
  width: 100%; height: 56px; padding: 0 14px;
  border-radius: var(--r); border: 1px solid var(--line-2); background: rgba(0, 0, 0, 0.45); color: var(--text);
  font-family: var(--font-display); font-size: 28px; letter-spacing: 0.32em; text-align: center;
  font-variant-numeric: tabular-nums;
}
.mg-scan-code::placeholder { color: rgba(239, 226, 204, 0.22); letter-spacing: 0.32em; }
.mg-scan-code:focus { outline: none; border-color: var(--brass); box-shadow: 0 0 0 3px rgba(200, 160, 97, 0.22); }
.mg-scan-code[aria-invalid="true"] { border-color: var(--danger); }
.mg-scan-panel .mg-btn { min-height: 56px; }
.mg-scan-panel .mg-field-error { margin-top: 8px; }
.mg-scan-tip { margin-top: 10px; font-size: 13px; line-height: 1.45; color: var(--text-3); text-align: center; }

/* result view (success / error) */
.mg-scan-result {
  position: absolute; inset: 0; z-index: 5;
  display: grid; place-items: center; overflow-y: auto;
  padding: calc(76px + env(safe-area-inset-top, 0px)) 20px calc(28px + var(--safe-b));
  background:
    radial-gradient(90% 60% at 50% 22%, rgba(200, 160, 97, 0.22), rgba(200, 160, 97, 0) 60%),
    rgba(10, 9, 8, 0.96);
  opacity: 0; visibility: hidden; transition: opacity 0.35s var(--ease), visibility 0s linear 0.35s;
}
.mg-scan-result.is-on { opacity: 1; visibility: visible; transition: opacity 0.35s var(--ease); }
.mg-scan-result-in { width: min(440px, 100%); display: grid; justify-items: center; text-align: center; gap: 14px; }
.mg-scan-paper {
  position: relative; width: 196px; height: 196px; border-radius: 50%;
  display: grid; place-items: center;
  background:
    radial-gradient(circle at 34% 28%, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0) 46%),
    radial-gradient(circle, #f3e9d6 0%, #eadcc0 62%, #d9c49d 100%);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6), inset 0 -6px 18px rgba(120, 90, 40, 0.25), 0 0 0 6px rgba(230, 200, 143, 0.14);
}
.mg-scan-paper .mg-stamp { width: 82%; height: 82%; mix-blend-mode: multiply; }
.mg-scan-result.is-error .mg-scan-paper, .mg-scan-result.is-info .mg-scan-paper { background: radial-gradient(circle, #2a2420 0%, #1c1916 100%); box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6), 0 0 0 6px rgba(227, 100, 90, 0.16); }
.mg-scan-result.is-error .mg-scan-paper .mg-ico, .mg-scan-result.is-info .mg-scan-paper .mg-ico { width: 72px; height: 72px; color: var(--danger); stroke-width: 1.6; }
/* "already today" is news, not a failure: brass instead of red */
.mg-scan-result.is-info .mg-scan-paper { box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6), 0 0 0 6px rgba(200, 160, 97, 0.16), inset 0 0 0 1px rgba(200, 160, 97, 0.4); }
.mg-scan-result.is-info .mg-scan-paper .mg-ico { color: var(--brass-2); }
.mg-scan-result-title:focus, .mg-scan-result-title:focus-visible { outline: none; } /* focused by script so readers start here */
/* the code panel has no use under a result; hide it so it cannot show through */
.mg-scan[data-state="done"] .mg-scan-panel { visibility: hidden; opacity: 0; transition: opacity 0.2s var(--ease), visibility 0s linear 0.2s; }
.mg-scan-result-title { font-family: var(--font-display); font-weight: 400; text-transform: uppercase; font-size: clamp(30px, 8vw, 44px); line-height: 1.25; letter-spacing: 0.01em; margin-top: 8px; }
.mg-scan-result-text { font-size: 16px; line-height: 1.5; color: var(--text-2); }
.mg-scan-result-meta { font-size: 13.5px; color: var(--text-3); }
.mg-scan-dots { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 4px 0; }
.mg-scan-dot { width: 26px; height: 26px; border-radius: 50%; border: 1.5px dashed rgba(239, 226, 204, 0.3); display: grid; place-items: center; }
.mg-scan-dot.is-on { border: 0; background: radial-gradient(circle at 35% 30%, #e1505a, var(--mg-ink) 60%, #7e1018); box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4); }
.mg-scan-dot.is-new { animation: mg-dot-pop 0.7s var(--mg-pop) 0.55s both; }
.mg-scan-dot.is-reward { border-color: rgba(230, 200, 143, 0.6); border-style: solid; color: var(--brass-2); }
.mg-scan-dot.is-reward.is-on { background: var(--brass-grad); color: var(--on-brass); }
.mg-scan-dot .mg-ico { width: 15px; height: 15px; }
@keyframes mg-dot-pop { from { transform: scale(2.2); opacity: 0; } to { transform: none; opacity: 1; } }
.mg-scan-actions { display: grid; gap: 10px; width: 100%; margin-top: 8px; }

.mg-stamp-slam { animation: mg-slam 0.62s var(--mg-pop) 0.12s both; }
@keyframes mg-slam {
  0% { transform: scale(2.3) rotate(-24deg); opacity: 0; }
  55% { opacity: 1; }
  100% { transform: scale(1) rotate(-9deg); opacity: 1; }
}
.mg-paper-thud { animation: mg-thud 0.5s var(--ease-out) 0.44s both; }
@keyframes mg-thud { 0% { transform: none; } 30% { transform: scale(0.96) translateY(3px); } 100% { transform: none; } }

@media (min-width: 720px) {
  .mg-scan-title { font-size: 30px; }
  .mg-scan-top { padding-left: 28px; padding-right: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  .mg-dock.is-entering, .mg-dock-orb-ring, .mg-scan-line, .mg-stamp-slam, .mg-paper-thud, .mg-scan-dot.is-new, .mg-loc-status.is-open .mg-loc-dot { animation: none !important; }
  .mg-dock-orb-ring { display: none; }
  .mg-stamp-slam { transform: rotate(-9deg); }
}

/* long words from the panel wrap instead of widening the sheet (ACC-NEW-1) */
.mg-auth-forgot, .mg-auth-forgot > *, .mg-auth-switch, .mg-auth-switch strong { min-width: 0; max-width: 100%; overflow-wrap: anywhere; }

/* ================= online booking sheet (js/booking.js) ================= */
.mg-bk-head { padding-right: 52px; margin-bottom: 18px; }
.mg-bk-head .mg-sheet-title:focus { outline: none; }
.mg-bk-progress { height: 4px; margin-top: 14px; border-radius: 2px; background: var(--line); overflow: hidden; }
.mg-bk-progress[hidden] { display: none; }
.mg-bk-progress span { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--brass-grad); transition: width 0.5s var(--mg-spring); }
.mg-bk-main { display: grid; gap: 14px; min-height: 120px; }
.mg-bk-loading { display: flex; gap: 10px; align-items: center; justify-content: center; padding: 28px 0; color: var(--text-3); font-size: 14.5px; }
.mg-bk-loading .mg-spin { position: static; opacity: 1; }
.mg-bk-hint { display: flex; gap: 8px; align-items: flex-start; margin: 0; color: var(--text-2); font-size: 14.5px; line-height: 1.5; }
.mg-bk-hint .mg-ico { flex: none; width: 18px; height: 18px; margin-top: 2px; color: var(--brass-2); }
.mg-bk-hint strong { color: var(--text); }
.mg-bk-group { display: grid; gap: 8px; }
.mg-bk-group-title { margin: 6px 0 0; font-size: 12.5px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-3); }
.mg-bk-list { display: grid; gap: 8px; }

.mg-bk-opt {
  display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center;
  width: 100%; min-height: 64px; padding: 12px 14px; text-align: left;
  border: 1px solid var(--line-2); border-radius: var(--r); background: rgba(239, 226, 204, 0.03);
  color: var(--text); transition: border-color 0.2s, background 0.2s, transform 0.2s var(--mg-spring);
}
.mg-bk-opt:hover { border-color: rgba(200, 160, 97, 0.5); background: rgba(200, 160, 97, 0.06); }
.mg-bk-opt:active { transform: scale(0.985); }
.mg-bk-opt[aria-checked="true"] {
  border-color: var(--brass); background: linear-gradient(135deg, rgba(200, 160, 97, 0.18), rgba(200, 160, 97, 0.05));
  box-shadow: inset 0 0 0 1px var(--brass);
}
.mg-bk-opt-ico, .mg-bk-avatar {
  display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%;
  background: rgba(200, 160, 97, 0.12); color: var(--brass-2); font-weight: 800; font-size: 15px; overflow: hidden;
}
.mg-bk-opt-ico .mg-ico { width: 20px; height: 20px; }
.mg-bk-avatar img { width: 100%; height: 100%; object-fit: cover; }
.mg-bk-opt-main { display: grid; gap: 2px; min-width: 0; }
.mg-bk-opt-main strong { font-size: 15.5px; font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; }
.mg-bk-opt-text { font-size: 13.5px; color: var(--text-2); line-height: 1.4; }
.mg-bk-opt-meta { font-size: 13.5px; color: var(--brass-2); font-weight: 700; font-variant-numeric: tabular-nums; }
.mg-bk-opt-mark {
  display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
  border: 1.5px solid var(--line-3); color: transparent; transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.mg-bk-opt-mark .mg-ico { width: 15px; height: 15px; }
.mg-bk-opt[role="radio"] .mg-bk-opt-mark { border-color: transparent; color: var(--text-3); }
.mg-bk-opt[aria-checked="true"] .mg-bk-opt-mark { background: var(--brass-grad); border-color: transparent; color: var(--on-brass); }

.mg-bk-total {
  position: sticky; bottom: 84px; z-index: 1;
  display: flex; justify-content: space-between; gap: 12px; align-items: center; margin: 0;
  padding: 10px 16px; border-radius: var(--r-pill); border: 1px solid rgba(200, 160, 97, 0.4);
  background: rgba(24, 20, 16, 0.95); font-size: 14px; color: var(--text-2);
}
.mg-bk-total[hidden] { display: none; }
.mg-bk-total strong { color: var(--text); font-variant-numeric: tabular-nums; }

.mg-bk-days {
  display: flex; gap: 8px; overflow-x: auto; margin: 0 -20px; padding: 2px 20px 6px;
  scroll-snap-type: x proximity; scrollbar-width: none;
}
.mg-bk-days::-webkit-scrollbar { display: none; }
.mg-bk-day {
  flex: none; display: grid; justify-items: center; gap: 1px; width: 62px; padding: 10px 0 9px; scroll-snap-align: center;
  border: 1px solid var(--line-2); border-radius: var(--r); background: rgba(239, 226, 204, 0.03); color: var(--text-2);
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}
.mg-bk-day strong { font-size: 21px; line-height: 1.15; color: var(--text); font-variant-numeric: tabular-nums; }
.mg-bk-day-wd, .mg-bk-day-mo { font-size: 11.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.mg-bk-day:disabled { opacity: 0.35; cursor: not-allowed; }
.mg-bk-day:disabled strong { text-decoration: line-through; text-decoration-color: var(--text-3); }
.mg-bk-day[aria-checked="true"] { border-color: transparent; background: var(--brass-grad); color: var(--on-brass); }
.mg-bk-day[aria-checked="true"] strong { color: var(--on-brass); }
.mg-bk-times-wrap { display: grid; gap: 10px; }
.mg-bk-times-wrap .mg-bk-group-title { text-transform: none; letter-spacing: 0; font-size: 15px; color: var(--text); }
.mg-bk-times { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 8px; }
.mg-bk-time {
  min-height: 46px; border: 1px solid var(--line-2); border-radius: var(--r-pill); background: rgba(239, 226, 204, 0.03);
  color: var(--text); font-size: 15.5px; font-weight: 700; font-variant-numeric: tabular-nums;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}
.mg-bk-time:hover { border-color: rgba(200, 160, 97, 0.55); }
.mg-bk-time[aria-checked="true"] { border-color: transparent; background: var(--brass-grad); color: var(--on-brass); }

.mg-bk-summary {
  display: grid; gap: 8px; padding: 16px; border-radius: var(--r-lg);
  border: 1px solid rgba(200, 160, 97, 0.38);
  background: linear-gradient(135deg, rgba(200, 160, 97, 0.14), rgba(200, 160, 97, 0.03));
}
.mg-bk-when, .mg-bk-line { display: flex; gap: 10px; align-items: center; margin: 0; }
.mg-bk-when { font-size: 17px; }
.mg-bk-line { font-size: 14.5px; color: var(--text-2); }
.mg-bk-when .mg-ico, .mg-bk-line .mg-ico { flex: none; width: 19px; height: 19px; color: var(--brass-2); }
.mg-bk-items { list-style: none; margin: 6px 0 0; padding: 10px 0 0; border-top: 1px dashed var(--line-2); display: grid; gap: 6px; }
.mg-bk-items li { display: flex; justify-content: space-between; gap: 12px; font-size: 14.5px; }
.mg-bk-item-meta { flex: none; color: var(--text-3); font-variant-numeric: tabular-nums; }
.mg-bk-sum { display: flex; justify-content: space-between; gap: 12px; margin: 4px 0 0; padding-top: 10px; border-top: 1px solid var(--line-2); font-size: 15px; }
.mg-bk-sum strong { color: var(--brass-2); font-variant-numeric: tabular-nums; }

.mg-bk-code { font-size: 28px !important; letter-spacing: 0.5em; text-align: center; font-variant-numeric: tabular-nums; font-weight: 800; }

.mg-bk-done-mark {
  display: grid; place-items: center; width: 76px; height: 76px; margin: 6px auto 0; border-radius: 50%;
  background: var(--brass-grad); color: var(--on-brass); box-shadow: 0 12px 40px rgba(200, 160, 97, 0.35);
  animation: mg-bk-pop 0.7s var(--mg-spring) both;
}
.mg-bk-done-mark .mg-ico { width: 38px; height: 38px; stroke-width: 2.4; }
.mg-bk-done-text { text-align: center; color: var(--text) !important; font-size: 16.5px !important; }
.is-done .mg-bk-hint { justify-content: center; text-align: center; }
@keyframes mg-bk-pop { from { transform: scale(0.4); opacity: 0; } to { transform: none; opacity: 1; } }

/* the sheet's own bottom padding moves into the sticky bar, so the bar sits flush with the sheet's edge */
.mg-layer--booking .mg-sheet { padding-bottom: 0; }
.mg-layer--booking .mg-sheet-body { padding-bottom: 0; }
.mg-bk-foot {
  position: sticky; bottom: 0; z-index: 2;
  display: flex; gap: 10px; margin: 18px -20px 0; padding: 18px 20px calc(20px + var(--safe-b));
  background: linear-gradient(180deg, rgba(18, 16, 14, 0) 0%, rgba(18, 16, 14, 0.97) 24%, #12100e 100%);
}
.mg-layer--booking .mg-sheet-body:has(> .mg-bk-foot[hidden])::after { content: ''; display: block; height: calc(24px + var(--safe-b)); }
.mg-bk-foot[hidden], .mg-bk-back[hidden], .mg-bk-next[hidden] { display: none; }
.mg-bk-back { flex: none; }
.mg-bk-next { flex: 1; }
.mg-bk-next .mg-ico { width: 18px; height: 18px; }
.mg-bk-next { white-space: nowrap; }
/* narrow phones: "Înapoi" becomes an arrow (its text stays for screen readers) so "Confirmă programarea" fits on one line */
@media (max-width: 420px) {
  .mg-bk-back { width: 52px; padding-inline: 0; justify-content: center; }
  .mg-bk-back span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
.mg-bk-title--sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; margin: 0 !important; }
.mg-bk-live { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mg-layer--booking .mg-form-error { margin: 12px 0 0; }
@media (prefers-reduced-motion: reduce) {
  .mg-bk-done-mark { animation: none; }
  .mg-bk-progress span { transition: none; }
}
