* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  background: #0e141c;
  color: #f5f2ff;
  color-scheme: dark;
  font: 15px/1.4 "Segoe UI", Arial, sans-serif;
}
.mc-shell {
  --mx-fg: #f5f2ff;
  position: relative;
  width: min(398px,calc(100vw - 32px));
  max-width: calc(100vw - 32px);
  height: min(625px,calc(100dvh - 40px));
  isolation: isolate;
}
.mc-shell .mp-frame {
  display: flex;
  flex-direction: column;
  height: calc(100% - 44px);
  min-height: 0;
  overflow: hidden;
  background: #080b19;
}
.mc-art-slot { flex: none; height: clamp(74px,22dvh,152px); }
.mc-shell .mc-content { min-height: 0; flex: 1; display: flex; flex-direction: column; }
.mc-shell .mp-page-head h1 { font-family: MercuryPixel, monospace; font-weight: 400; }
.mc-shell .mp-page-scroll { min-height: 0; overflow: auto; scrollbar-width: thin; scrollbar-color: #615d76 transparent; }
.mc-total-label, #price, .items, #references, #status { margin-inline: 4px; }
.mc-total-label, .items div { display: flex; justify-content: space-between; align-items: baseline; gap: .65rem; }
.mc-total-label { color: #d3cfe1; font-size: 13px; }
.mc-total-label small { color: #c8c6d3; font-size: 12px; }
.mc-total-label:has(+ #price[hidden]) span { visibility: hidden; }
#price { display: flex; align-items: baseline; gap: .5rem; margin-block: 0 11px; }
#total { color: #f7f4ff; font: 400 clamp(24px,7.8vw,34px)/1.2 MercuryPixel,monospace; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
#currency { color: #d1cce4; font-size: 13px; font-weight: 600; }
.items { margin-block: 0; padding: 1px 12px; color: #f6f2ff; border: 1px solid #817d9c99; background: #151a31db; }
.items div { padding-block: 8px; border-bottom: 1px solid #817d9c44; }
.items div:last-child { border: 0; }
.items dt, #references dt { color: #c9c5d7; font-size: 13px; }
.items dd { margin: 0; font-size: 14px; font-weight: 600; overflow-wrap: anywhere; text-align: right; }
#references { font-size: 13px; }
#references summary { cursor: pointer; padding-block: 11px; color: #e5dff5; }
#references dl { margin: 0; }
#references dd { margin: 2px 0 7px; font: 12px/1.45 ui-monospace,monospace; overflow-wrap: anywhere; }
.payer { margin: 8px 4px; }
.payer label { display: block; color: #dfdaef; font-size: 13px; }
.payer input { width: 100%; margin-top: 4px; padding: 9px 11px; border: 1px solid #817d9c; color: #f6f2ff; background: #151a31; font: inherit; }
.payer input + label { margin-top: 8px; }
#payer-details { width: min(394px,calc(100% - 32px)); max-height: calc(100dvh - 32px); padding: 22px; color: #f6f2ff; background: #14182a; border: 1px solid #777a9d; border-radius: 14px; }
#payer-details::backdrop { background: #050811cc; }
#payer-details form { margin: 0; display: grid; gap: 14px; }
#payer-details h2, #payer-details p { margin: 0; }
#payer-details h2 { font-size: 22px; }
#payer-details p { color: #d8d6e4; font-size: 14px; }
#payer-details input { border-radius: 6px; font-size: 16px; }
#payer-details button { min-height: 44px; border: 1px solid #918aa9; border-radius: 6px; font: inherit; font-weight: 600; cursor: pointer; }
#pay-with-details { background: #e4defa; color: #15162a; }
#cancel-details { background: transparent; color: #ede9f7; }
#payer-details #profile-error { color: #ffb6bc; }
#profile-error:empty { display: none; }
#checkout-loading { color: #d8d6e4; font-size: 15px; }
#status { margin-block: 8px; color: #dfdaef; font-size: 13px; }
#status:empty { display: none; }
#status[data-tone="warn"] { color: #f5d798; }
#status[data-tone="error"] { color: #ffb6bc; }
#status[data-tone="success"] { color: #a7e4cc; }
#confirm-row:has(#confirm[hidden]), .mc-secondary:not(:has(button:not([hidden]))) { display: none; }
#cashier #wallet { flex: none; text-align: center; padding: 5px 20px; }
.mc-secondary { display: flex; justify-content: center; align-items: center; gap: 12px; }
.mc-secondary button { min-height: 44px; padding: 4px; border: 0; background: transparent; color: #e0daee; text-decoration: underline; text-underline-offset: 3px; font: 500 13px/1.3 "Segoe UI",Arial,sans-serif; cursor: pointer; }
.mc-secondary button:disabled { opacity: .55; }
.mc-shell .mc-content { padding-bottom: 10px; }
#cashier :focus-visible:not(#wallet *) { outline: 2px solid #bcd7ff; outline-offset: 2px; }
body:has(dialog.mp-modal[open]) .mc-shell { visibility: hidden; }
@media (max-height: 500px) {
  .mc-shell .mc-content { padding-bottom: 3px; }
}
