:root {
  font: 16px/1.55 -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #1d1d1f;
  background: #f5f5f7;
  --ink: #1d1d1f;
  --muted: #63656e;
  --line: #e6e7ec;
  --action: #146b57;
  --action-hover: #105a49;
  --action-pressed: #0b4c3d;
  --page: #f5f5f7;
  --surface: #fff;
  --soft: #fafafb;
  --raised: #e9e9ee;
  --field-line: #d8dae3;
  --focus: #e5e5e9;
  --positive: #146b57;
  --negative: #a5272d;
  --warning: #795013;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled, fieldset:disabled .primary { cursor: not-allowed; opacity: .68; }
form[aria-busy="true"] button:disabled { cursor: progress; }
button:focus-visible, a:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
[hidden] { display: none !important; }
.top { background: var(--surface); border-bottom: 1px solid var(--line); }
.top-inner { max-width: 1144px; margin: auto; padding: 15px 30px; }
.brand { display: flex; gap: 10px; align-items: center; font-weight: 680; }
.mark { display: grid; place-items: center; background: var(--ink); color: #fff; width: 32px; height: 32px; border-radius: 10px; font-size: 19px; font-weight: 750; }
main { max-width: 720px; margin: auto; padding: 62px 24px 44px; }
.intro { text-align: center; margin-bottom: 34px; }
h1 { margin: 0 0 10px; font-size: clamp(34px, 6vw, 52px); letter-spacing: -.05em; line-height: 1.16; }
.intro p, .description { margin: 0; color: var(--muted); }
.segment { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; background: var(--raised); padding: 4px; border-radius: 13px; }
.main-segment { max-width: 350px; margin: 24px auto 0; }
.small-segment { max-width: 260px; margin-top: 16px; }
.segment button { border: 0; border-radius: 10px; background: none; padding: 8px; min-height: 44px; color: var(--muted); font-size: 15px; font-weight: 590; }
.segment [aria-selected="true"], .segment [aria-pressed="true"] { color: var(--ink); background: var(--surface); box-shadow: 0 1px 4px #181b2923; }
.card { padding: 30px; background: var(--surface); border: 1px solid var(--line); border-radius: 24px; box-shadow: 0 2px 8px #181b2906; }
h2 { margin: 0 0 8px; font-size: 26px; line-height: 1.25; letter-spacing: -.025em; }
h3 { margin: 0; font-size: 18px; }
.primary { display: flex; justify-content: center; align-items: center; min-height: 48px; width: 100%; background: var(--action); color: #fff; border: 0; border-radius: 12px; text-decoration: none; font-weight: 650; padding: 10px 18px; margin-top: 20px; }
.primary:not(:disabled):hover { background: var(--action-hover); }
.primary:not(:disabled):active { background: var(--action-pressed); }
.notice { margin: 12px 0 0; color: var(--muted); font-size: 14px; }
form { margin-top: 17px; }
fieldset { min-width: 0; padding: 0; margin: 0; border: 0; }
form label { display: block; margin-bottom: 8px; font-size: 14px; font-weight: 630; }
input, textarea { width: 100%; border: 1px solid var(--field-line); border-radius: 12px; padding: 12px 14px; min-height: 49px; color: inherit; background: var(--soft); }
textarea { min-height: 104px; resize: vertical; }
input::placeholder, textarea::placeholder { color: var(--muted); }
input:focus, textarea:focus { border-color: var(--ink); outline: 3px solid var(--focus); background: var(--surface); }
.error { color: var(--negative); margin: 8px 0 0; font-size: 14px; }
.error:empty { display: none; }
.results { margin-top: 20px; }
.results ul { margin: 7px 0 0; padding: 0; list-style: none; }
.results li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.code { overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.status { padding: 2px 8px; border-radius: 999px; color: var(--muted); background: var(--raised); white-space: nowrap; font-size: 14px; }
.status.unused, .status.valid, .status.success { color: #14533f; background: #eaf6ef; }
.status.processing { color: var(--warning); background: #fbefd6; }
.status.invalid, .status.failed { color: var(--negative); background: #fceef0; }
@media (max-width: 560px) {
  .top-inner { padding: 13px 16px; }
  main { padding: 38px 16px 30px; }
  .intro { margin-bottom: 24px; }
  .card { padding: 21px; }
}

#recharge-panel { margin-top: 24px; border-top: 1px solid var(--line); padding-top: 20px; }
.consent { display: flex; align-items: flex-start; gap: 10px; margin-top: 16px; }
.consent input { width: 20px; min-height: 20px; flex-shrink: 0; margin: 2px 0 0; }
/* MAX visual system for the complete customer workflow. */
.site-notice { text-align: center; color: var(--muted); margin: 12px 24px; }
.card > section > label, #max-single > label, #max-batch > label { display: block; font-size: 14px; font-weight: 630; margin: 22px 0 8px; }
.flow-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.flow-steps button { background: var(--raised); border: 0; border-radius: 10px; padding: 9px 4px; color: var(--muted); }
.flow-steps .is-active { background: var(--ink); color: #fff; }
.flow-steps .is-complete { color: var(--action); }
.flow-track { background: var(--line); height: 3px; border-radius: 2px; margin: 12px 0 25px; overflow: hidden; }
#flow-progress-fill { display: block; height: 100%; width: 0; background: var(--action); }
.secondary-btn, .flow-back-btn, .customer-result-action, .verification-dismiss { display: inline-flex; justify-content: center; align-items: center; border: 1px solid var(--line); border-radius: 11px; background: var(--page); color: var(--ink); padding: 10px 16px; min-height: 44px; text-decoration: none; font-weight: 600; margin-top: 12px; }
.primary-btn, .submit-success-modal__btn { display: block; background: var(--action); color: #fff; border: 0; border-radius: 12px; width: 100%; padding: 12px 18px; margin-top: 16px; font-weight: 650; }
.actions, .session-links { display: flex; align-items: stretch; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.actions > .primary, .actions > .primary-btn { flex: 1; width: auto; margin-top: 12px; }
.actions > button { min-width: 100px; }
.session-links { margin-bottom: 16px; }
.session-links a { flex: 1; }
#session-import-btn { margin-bottom: 8px; }
.queue-preview { background: var(--page); padding: 18px; border-radius: 14px; margin: 20px 0; }
.queue-preview p { margin: 8px 0 0; }
.customer-result-card, .customer-verification-card { padding: 20px; border: 1px solid var(--line); border-radius: 16px; margin-top: 20px; background: var(--soft); }
.customer-result-card header { display: flex; gap: 12px; }
.customer-result-marker { background: var(--raised); border-radius: 50%; width: 30px; height: 30px; flex-shrink: 0; display: grid; place-items: center; font-weight: 700; }
.customer-result-card[data-state="success"] .customer-result-marker { background: #eaf6ef; color: var(--action); }
.customer-result-card[data-state="error"] .customer-result-marker { background: #fceef0; color: var(--negative); }
.customer-result-card small { color: var(--muted); }
.customer-result-card h3 { margin: 3px 0 10px; }
.customer-result-card p { white-space: pre-line; overflow-wrap: anywhere; }
.customer-result-details { margin: 18px 0 0; font-size: 15px; }
.customer-result-details > div { display: grid; grid-template-columns: 90px minmax(0,1fr); gap: 14px; border-bottom: 1px solid var(--line); padding: 12px 0; }
.customer-result-details dt { color: var(--muted); }
.customer-result-details dd { margin: 0; overflow-wrap: anywhere; white-space: pre-line; }
.paid-session-recovery-links { display: flex; gap: 16px; margin: 12px 0; }
a { color: var(--ink); }
.paid-session-recovery-form { padding-top: 16px; border-top: 1px solid var(--line); }
.flow-timeline { list-style: none; padding: 0; margin: 24px 0; }
.flow-timeline li { display: flex; gap: 14px; padding: 12px 0; color: var(--muted); }
.flow-timeline small { display: block; margin-top: 5px; }
.timeline-dot { width: 24px; height: 24px; border-radius: 50%; background: var(--line); flex-shrink: 0; display: grid; place-items: center; }
.is-done .timeline-dot, .is-active .timeline-dot { color: white; background: var(--action); }
.flow-timeline .is-active strong { color: var(--ink); }
.is-error .timeline-dot { background: #a5272d; color: #fff; }
.batch-query-result { overflow: auto; margin-top: 20px; }
.batch-query-table { border-collapse: collapse; width: 100%; font-size: 14px; }
.batch-query-table th, .batch-query-table td { text-align: left; padding: 12px; border-bottom: 1px solid var(--line); min-width: 110px; vertical-align: top; white-space: pre-line; overflow-wrap: anywhere; }
.batch-query-table th { background: var(--page); color: var(--muted); }
.batch-query-table td:first-child { min-width: 200px; }
.batch-query-table td:last-child { min-width: 240px; }
.batch-state { padding: 3px 7px; border-radius: 8px; background: var(--raised); display: inline-block; }
[data-state="error"] { color: var(--negative); }
[data-state="success"] { color: var(--positive); }
[data-state="warning"], .verification-countdown { color: var(--warning); }
.customer-result-card { color: var(--ink); }
.verification-footnote { font-size: 13px; color: var(--muted); }
dialog { border: 1px solid var(--line); border-radius: 20px; padding: 26px; max-width: min(520px, calc(100vw - 32px)); color: var(--ink); }
dialog::backdrop { background: #0005; }
.submit-success-modal { position: fixed; inset: 0; display: grid; place-items: center; background: #0005; z-index: 100; padding: 20px; }
.submit-success-modal__box { max-width: 440px; width: 100%; background: var(--surface); padding: 28px; border-radius: 22px; overflow-wrap: anywhere; }
.submit-success-modal__icon { color: var(--action); font-size: 30px; }
@media (max-width: 560px) {
  .customer-result-card { padding: 16px; }
  .customer-result-details > div { grid-template-columns: 76px minmax(0,1fr); gap: 10px; }
  .flow-steps button { font-size: 13px; }
  .session-links { display: grid; grid-template-columns: 1fr; }
}

/* Appearance preferences: independent from the recharge state. */
:root { color: var(--ink); background: var(--page); color-scheme: light; }
:root[data-theme="dark"] {
  color-scheme: dark;
  --page: #101113; --surface: #1b1d20; --soft: #22252a; --raised: #2c3036;
  --ink: #f2f3f5; --muted: #b1b5be; --line: #383c44;
  --field-line: #4b515c; --focus: #3c464a;
  --action: #237e68; --action-hover: #298d75; --action-pressed: #1c6c59;
  --positive: #86d9ba; --negative: #ffabb0; --warning: #edc77e;
}
.top-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.preferences { display: flex; gap: 8px; flex-shrink: 0; }
.preferences button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 40px; min-width: 44px; padding: 7px 12px; border: 1px solid var(--line); border-radius: 11px; background: var(--soft); color: var(--ink); font-size: 14px; font-weight: 600; }
.preferences button:hover { background: var(--raised); }
#max-theme-icon { font-size: 18px; line-height: 1; }
.mark, .flow-steps .is-active { background: var(--ink); color: var(--surface); }
dialog { background: var(--surface); }
:root[data-theme="dark"] .status.unused, :root[data-theme="dark"] .status.valid, :root[data-theme="dark"] .status.success,
:root[data-theme="dark"] .customer-result-card[data-state="success"] .customer-result-marker { color: var(--positive); background: #203e33; }
:root[data-theme="dark"] .status.failed, :root[data-theme="dark"] .status.invalid,
:root[data-theme="dark"] .customer-result-card[data-state="error"] .customer-result-marker { color: var(--negative); background: #492b31; }
:root[data-theme="dark"] .status.processing { color: var(--warning); background: #443822; }
:root[data-theme="dark"] [data-state="error"] { color: var(--negative); }
:root[data-theme="dark"] [data-state="success"] { color: var(--positive); }
:root[data-theme="dark"] .customer-result-card { color: var(--ink); }
html[lang="en"] .customer-result-details > div { grid-template-columns: 120px minmax(0, 1fr); }
@media (max-width: 560px) {
  .top-inner { gap: 8px; }
  .brand { font-size: 14px; gap: 7px; }
  .preferences { gap: 5px; }
  .preferences button { padding: 7px 9px; }
  html[lang="en"] .brand { max-width: 180px; }
  html[lang="en"] .customer-result-details > div { grid-template-columns: 94px minmax(0, 1fr); }
}

:root[data-theme="dark"] [style*="color: rgb(29, 29, 31)"] { color: var(--ink) !important; }
:root[data-theme="dark"] [style*="color: rgb(20, 107, 87)"] { color: var(--positive) !important; }
:root[data-theme="dark"] [style*="color: rgb(165, 39, 45)"] { color: var(--negative) !important; }
:root[data-theme="dark"] [style*="color: rgb(154, 90, 0)"] { color: var(--warning) !important; }


/* MAX_THEME_POLISH_V1 */
#max-theme-label { display: none !important; }
.preferences #max-theme {
  width: 40px; min-width: 40px; height: 40px;
  padding: 0; gap: 0;
}
#max-theme-icon {
  display: inline-flex; align-items: center;
  justify-content: center; font-size: 22px; line-height: 1;
}
:root[data-theme="dark"] {
  --ink: #ffffff;
  --muted: #ffffff;
}
:root[data-theme="dark"] input::placeholder,
:root[data-theme="dark"] textarea::placeholder {
  color: #ffffff; opacity: 1;
}
/* END_MAX_THEME_POLISH_V1 */


/* MAX_IOS_MINIMAL_V1 */
:root {
  --page: #f5f5f7; --surface: #fff; --soft: #f5f5f7;
  --raised: #e9e9ed; --selected: #fff; --line: #e8e8ed;
}
:root[data-theme="dark"] {
  --page: #0e0f11; --surface: #1b1c20; --soft: #25262b;
  --raised: #25262b; --selected: #3a3b40; --line: #33343a;
  --ink: #fff; --muted: #fff;
}
.top { background: transparent; border: 0; }
.top-inner { max-width: 1024px; padding: 20px 28px; }
.brand { font-size: 14px; font-weight: 650; letter-spacing: -.02em; }
.brand .mark { display: none; }
.preferences { gap: 6px; }
.preferences button {
  border: 0; background: transparent; border-radius: 50%;
  min-width: 40px; height: 40px; padding: 0 8px; font-size: 12px;
}
.preferences #max-theme {
  width: 40px; min-width: 40px; padding: 0; gap: 0;
}
#max-theme-label { display: none !important; }
#max-theme-icon { font-size: 22px; line-height: 1; }
main { max-width: 656px; padding: 52px 24px 64px; }
.intro { margin-bottom: 28px; }
h1 {
  font-size: clamp(30px, 5vw, 38px); font-weight: 650;
  letter-spacing: -.045em; line-height: 1.2; margin-bottom: 12px;
}
.intro p { font-size: 14px; line-height: 1.7; }
.main-segment { max-width: 300px; margin-top: 26px; }
.segment { padding: 3px; gap: 2px; border-radius: 13px; }
.segment button {
  font-size: 14px; font-weight: 550;
  border-radius: 10px; min-height: 42px;
}
.segment [aria-selected="true"], .segment [aria-pressed="true"] {
  background: var(--selected);
  box-shadow: 0 1px 3px #0000000d; font-weight: 650;
}
.card {
  border: 0; border-radius: 22px;
  padding: 28px; box-shadow: none;
}
h2 {
  font-size: 22px; font-weight: 650;
  letter-spacing: -.03em; margin-bottom: 8px;
}
h3 { font-size: 16px; font-weight: 600; }
.description { font-size: 14px; line-height: 1.7; }
.small-segment { max-width: 240px; margin-top: 22px; }
input, textarea {
  border: 1px solid transparent; background: var(--soft);
  border-radius: 12px; font-size: 16px; padding: 13px 15px;
}
input:focus, textarea:focus {
  background: var(--soft); border-color: var(--ink);
  outline: 2px solid var(--focus); outline-offset: 2px;
}
:root[data-theme="dark"] input::placeholder,
:root[data-theme="dark"] textarea::placeholder {
  color: #fff; opacity: 1;
}
.primary, .primary-btn {
  border-radius: 12px; font-size: 15px;
  font-weight: 600; min-height: 48px;
}
.secondary-btn, .flow-back-btn,
.customer-result-action, .verification-dismiss {
  border: 0; background: var(--soft);
  font-size: 14px; font-weight: 550;
}
.flow-steps {
  padding: 3px; gap: 2px;
  background: var(--soft); border-radius: 12px;
}
.flow-steps button {
  min-height: 40px; background: transparent;
  font-size: 13px; border-radius: 9px;
}
.flow-steps .is-active {
  background: var(--selected); color: var(--ink);
  box-shadow: 0 1px 3px #0000000d;
}
.flow-track { height: 2px; margin-bottom: 24px; }
.customer-result-card, .customer-verification-card {
  border: 0; padding: 18px; border-radius: 16px;
}
.customer-result-details > div:last-child { border-bottom: 0; }
.queue-preview { background: var(--soft); }
@media (max-width: 560px) {
  .top-inner { padding: 12px 20px; }
  main { padding: 36px 16px 40px; }
  .card { padding: 22px; border-radius: 20px; }
  .intro { margin-bottom: 24px; }
  h2 { font-size: 21px; }
}
/* END_MAX_IOS_MINIMAL_V1 */
