:root {
  color-scheme: light;
  --form-width: 430px;
  --lk-bg-start: #eceff3;
  --lk-bg-end: #e4e8ed;
  --lk-surface: rgba(248, 250, 252, 0.9);
  --lk-surface-strong: rgba(252, 253, 255, 0.95);
  --lk-surface-soft: rgba(239, 243, 248, 0.84);
  --lk-border: rgba(74, 86, 102, 0.2);
  --lk-shadow: 0 20px 46px rgba(28, 34, 43, 0.12);
  --lk-title-color: #26303d;
  --lk-muted: #5f6c7b;
  --lk-accent: #4f637a;
  --lk-accent-soft: rgba(79, 99, 122, 0.14);
  --lk-accent-border: rgba(79, 99, 122, 0.34);
  --lk-highlight: rgba(79, 99, 122, 0.11);
  --lk-success-soft: rgba(25, 135, 84, 0.18);
  --lk-danger-soft: rgba(220, 53, 69, 0.16);
  --ambient-drift-x: 0px;
  --ambient-drift-y: 0px;
  --ambient-sway: 0px;
  --ambient-pan-x: 0px;
  --ambient-pan-y: 0px;
}

body {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(1100px 540px at 8% -18%, rgba(255, 255, 255, 0.38), transparent 72%),
    linear-gradient(160deg, var(--lk-bg-start), var(--lk-bg-end));
  color: var(--lk-title-color);
  font-family: "Noto Sans", "Segoe UI", sans-serif;
}

.ambient-backdrop {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
  background:
    radial-gradient(140% 90% at -5% 0%, rgba(255, 255, 255, 0.18), transparent 62%),
    radial-gradient(120% 80% at 110% 90%, rgba(209, 220, 232, 0.2), transparent 66%),
    linear-gradient(165deg, rgba(241, 245, 250, 0.16), rgba(227, 233, 241, 0.06));
}

.ambient-backdrop::before,
.ambient-backdrop::after {
  content: "";
  position: absolute;
  inset: -22%;
  pointer-events: none;
}

body.device-desktop .ambient-backdrop::before {
  background:
    radial-gradient(42% 48% at 15% 24%, rgba(255, 255, 255, 0.32), transparent 72%),
    radial-gradient(35% 40% at 84% 70%, rgba(210, 221, 234, 0.28), transparent 74%),
    radial-gradient(28% 34% at 52% 48%, rgba(219, 228, 238, 0.22), transparent 74%);
  transform: translate3d(calc(var(--ambient-pan-x) * 0.32), calc(var(--ambient-pan-y) * 0.32), 0);
  opacity: 0.98;
}

body.device-desktop .ambient-backdrop::after {
  background-image:
    repeating-linear-gradient(
      135deg,
      rgba(118, 133, 152, 0.035) 0,
      rgba(118, 133, 152, 0.035) 1px,
      transparent 1px,
      transparent 14px
    );
  transform: translate3d(calc(var(--ambient-pan-x) * -0.2), calc(var(--ambient-pan-y) * -0.2), 0);
  opacity: 0.38;
}

body.device-mobile .ambient-backdrop::before {
  background:
    radial-gradient(62% 66% at 50% 2%, rgba(255, 255, 255, 0.26), transparent 80%),
    linear-gradient(180deg, rgba(222, 229, 237, 0.2), transparent 47%);
  opacity: 0.8;
}

body.device-mobile .ambient-backdrop::after {
  background:
    linear-gradient(115deg, rgba(209, 221, 235, 0.14), rgba(233, 239, 247, 0));
  transform: translate3d(calc(var(--ambient-pan-x) * -0.28), var(--ambient-mobile-shift, 0px), 0);
  transition: transform 320ms linear;
}

.ambient-orb {
  position: absolute;
  display: block;
  border-radius: 999px;
  filter: blur(32px);
  opacity: 0.42;
  transform: translate3d(0, 0, 0);
  transition: transform 220ms linear;
}

body.device-mobile .ambient-orb {
  filter: blur(26px);
  opacity: 0.28;
}

body.device-mobile .ambient-backdrop .orb-a {
  width: clamp(180px, 46vw, 280px);
  height: clamp(180px, 46vw, 280px);
  top: -9%;
  right: -16%;
}

body.device-mobile .ambient-backdrop .orb-b {
  width: clamp(140px, 40vw, 240px);
  height: clamp(140px, 40vw, 240px);
  left: -15%;
  bottom: -8%;
}

body.device-mobile .ambient-backdrop .orb-c {
  width: clamp(110px, 34vw, 180px);
  height: clamp(110px, 34vw, 180px);
  left: 60%;
  top: 72%;
}

.ambient-backdrop .orb-a {
  width: clamp(220px, 28vw, 420px);
  height: clamp(220px, 28vw, 420px);
  top: -6%;
  right: -8%;
  background: radial-gradient(circle, rgba(246, 248, 251, 0.82), rgba(246, 248, 251, 0));
  transform: translate3d(var(--ambient-drift-x), calc(var(--ambient-drift-y) * -0.7), 0);
}

.ambient-backdrop .orb-b {
  width: clamp(180px, 24vw, 360px);
  height: clamp(180px, 24vw, 360px);
  left: -9%;
  bottom: -12%;
  background: radial-gradient(circle, rgba(221, 227, 235, 0.78), rgba(221, 227, 235, 0));
  transform: translate3d(calc(var(--ambient-drift-x) * -0.55), var(--ambient-sway), 0);
}

.ambient-backdrop .orb-c {
  width: clamp(140px, 18vw, 260px);
  height: clamp(140px, 18vw, 260px);
  left: 44%;
  top: 62%;
  background: radial-gradient(circle, rgba(235, 240, 246, 0.72), rgba(235, 240, 246, 0));
  transform: translate3d(calc(var(--ambient-sway) * -0.65), calc(var(--ambient-drift-y) * 0.55), 0);
}

.hero-shell {
  min-height: 100vh;
  /* Visible height on phones, without the browser bars. */
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem 1rem;
  position: relative;
  z-index: 2;
}

.pay-card {
  width: 100%;
  max-width: 760px;
  border: 1px solid var(--lk-border);
  border-radius: 1.25rem;
  box-shadow: var(--lk-shadow);
  overflow: hidden;
  background: var(--lk-surface);
  backdrop-filter: blur(4px);
}

.pay-card.page-search {
  max-width: 560px;
}

.pay-card.page-search .pay-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-top: 1.35rem;
}

.pay-head {
  background:
    linear-gradient(135deg, var(--lk-surface-strong), var(--lk-surface-soft)),
    radial-gradient(800px 240px at 100% 0%, var(--lk-accent-soft), transparent 65%);
  border-bottom: 1px solid var(--lk-border);
  color: var(--lk-title-color);
  padding: 1.4rem 1.55rem;
}

.pay-body {
  padding: 1.5rem 1.55rem 1.9rem;
}

/* Steps above the page title: search, payment, confirmation. */
.pay-steps {
  margin: 0 0 1rem;
  padding: 0;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--lk-muted);
}

.pay-step {
  gap: 0.4rem;
}

.pay-step + .pay-step::before {
  content: "";
  width: 1.75rem;
  height: 1px;
  margin: 0 0.6rem;
  background: rgba(120, 132, 153, 0.45);
}

.pay-step-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  border: 1px solid rgba(120, 132, 153, 0.5);
  border-radius: 50%;
  background: rgba(252, 253, 255, 0.8);
  font-size: 0.72rem;
  line-height: 1;
}

.pay-step.is-current {
  color: var(--lk-title-color);
}

.pay-step.is-current .pay-step-dot {
  border-color: #47596e;
  background: #47596e;
  color: #fff;
}

.pay-step.is-done .pay-step-dot {
  border-color: var(--lk-accent-border);
  background: var(--lk-accent-soft);
  color: var(--lk-accent);
}

.pay-step.is-done + .pay-step::before {
  background: rgba(79, 99, 122, 0.7);
}

@media (max-width: 420px) {
  /* Narrow phones: only the current step keeps its name. */
  .pay-step:not(.is-current) .pay-step-name {
    display: none;
  }

  .pay-step + .pay-step::before {
    width: 1.25rem;
    margin: 0 0.45rem;
  }
}

.logo {
  width: 124px;
  max-width: 38vw;
  height: auto;
}

.title-main {
  color: var(--lk-title-color);
  font-weight: 700;
  line-height: 1.15;
}

.subtitle-main {
  color: var(--lk-muted);
  margin: 0;
  font-size: 0.92rem;
}

.content-title {
  font-weight: 700;
  margin-bottom: 1rem;
  letter-spacing: 0.01em;
}

.muted {
  color: var(--lk-muted);
}

.search-form,
.form-error-slot {
  width: min(100%, var(--form-width));
  margin-left: auto;
  margin-right: auto;
}

.field-block {
  margin-bottom: 1.35rem;
}

.field-label {
  display: block;
  margin: 0 0 0.7rem;
  font-size: 0.72rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #58657a;
  font-weight: 700;
  text-align: center;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.service-card {
  min-height: 126px;
  border-radius: 1rem;
  border: 1px solid rgba(132, 145, 161, 0.42);
  background: rgba(252, 253, 255, 0.92);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
  padding: 0.8rem 0.7rem 0.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  cursor: pointer;
  transition: all 0.2s ease;
}

.service-card:hover {
  border-color: rgba(95, 114, 138, 0.58);
}

.service-card .service-main {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  margin-bottom: 0.1rem;
  color: #1d2430;
}

.service-card .service-main i {
  font-size: 1.15rem;
  color: #54677f;
}

.service-card .name {
  font-size: 1rem;
  font-weight: 700;
  color: #1d2430;
}

.service-card .hint {
  display: block;
  font-size: 0.72rem;
  line-height: 1.3;
  color: #58657a;
}

.service-card .selected-badge {
  position: absolute;
  left: 50%;
  bottom: 0.5rem;
  transform: translateX(-50%);
  opacity: 0;
  background: rgba(219, 227, 237, 0.86);
  color: #334252;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 0.15rem 0.6rem;
}

.btn-check:checked + .service-card {
  border-color: rgba(92, 109, 130, 0.6);
  background: rgba(229, 236, 244, 0.72);
  box-shadow: 0 0 0 0.18rem rgba(151, 165, 183, 0.24);
}

.btn-check:checked + .service-card .selected-badge {
  opacity: 1;
  transform: translateX(-50%);
}

.agreement-field {
  display: flex;
  align-items: center;
  width: 100%;
  border: 1px solid rgba(120, 132, 153, 0.45);
  border-radius: 0.8rem;
  background: rgba(247, 249, 252, 0.8);
  overflow: hidden;
  min-height: 52px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.agreement-field:focus-within {
  border-color: var(--lk-accent-border);
  box-shadow: 0 0 0 0.2rem color-mix(in srgb, var(--lk-accent-soft) 70%, transparent);
}

.agreement-prefix {
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: stretch;
  min-width: 52px;
  font-size: 1.2rem;
  color: #6a7585;
  background: rgba(225, 232, 240, 0.65);
  border-right: 1px solid rgba(120, 132, 153, 0.35);
  font-weight: 700;
}

.agreement-field input {
  flex: 1;
  border: 0;
  outline: none;
  background: transparent;
  padding: 0.85rem 1rem;
  font-size: 1.05rem;
  color: #1d2430;
}

.agreement-field input::placeholder {
  color: #7f8ca0;
}

.submit-button {
  display: block;
  width: 100%;
  border: 1px solid #3d4e62;
  border-radius: 0.8rem;
  background: #47596e;
  color: #fff;
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  padding: 0.9rem 1rem;
  box-shadow: 0 1px 2px rgba(28, 34, 43, 0.18);
  margin-top: 0.5rem;
  transition: background-color 0.18s ease, box-shadow 0.18s ease, transform 0.05s ease;
}

.submit-button:hover {
  color: #fff;
  background: #3d4e62;
  box-shadow: 0 4px 12px rgba(28, 34, 43, 0.18);
}

.submit-button:active {
  transform: translateY(1px);
  box-shadow: 0 1px 2px rgba(28, 34, 43, 0.18);
}

.submit-button:focus-visible {
  color: #fff;
  outline: 0;
  box-shadow: 0 0 0 0.2rem rgba(151, 165, 183, 0.55);
}

.submit-button:disabled {
  opacity: 0.6;
}

/* Secondary action: a Bootstrap button in the page colours. */
.btn-back {
  --bs-btn-color: #47596e;
  --bs-btn-bg: rgba(252, 253, 255, 0.92);
  --bs-btn-border-color: rgba(92, 109, 130, 0.5);
  --bs-btn-hover-color: #26303d;
  --bs-btn-hover-bg: rgba(229, 236, 244, 0.9);
  --bs-btn-hover-border-color: rgba(79, 99, 122, 0.7);
  --bs-btn-active-color: #26303d;
  --bs-btn-active-bg: rgba(219, 227, 237, 0.95);
  --bs-btn-active-border-color: rgba(79, 99, 122, 0.7);
  --bs-btn-focus-shadow-rgb: 151, 165, 183;
  --bs-btn-border-radius: 0.8rem;
  --bs-btn-padding-y: 0.72rem;
  --bs-btn-font-weight: 600;
}

.support-phone {
  color: var(--lk-title-color);
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.support-phone:hover,
.support-phone:focus {
  color: var(--lk-accent);
}

.tile {
  border: 1px solid var(--lk-border);
  border-radius: 0.95rem;
  padding: 0.9rem;
  background: color-mix(in srgb, var(--lk-surface) 88%, transparent);
}

.info-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.info-card {
  border: 1px solid var(--lk-border);
  border-radius: 1rem;
  padding: 0.85rem 0.95rem;
  background: color-mix(in srgb, var(--lk-surface) 86%, transparent);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.015);
}

.info-card .label {
  color: var(--lk-muted);
  font-size: 0.79rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.3rem;
}

.info-card .value {
  color: var(--lk-title-color);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
  word-break: break-word;
}

.info-card.highlight {
  border-color: var(--lk-accent-border);
  background: linear-gradient(135deg, var(--lk-highlight), color-mix(in srgb, var(--lk-surface) 80%, transparent));
}

.info-card.success {
  border-color: rgba(25, 135, 84, 0.35);
  background: linear-gradient(135deg, var(--lk-success-soft), color-mix(in srgb, var(--lk-surface) 82%, transparent));
}

.info-card.danger {
  border-color: rgba(220, 53, 69, 0.35);
  background: linear-gradient(135deg, var(--lk-danger-soft), color-mix(in srgb, var(--lk-surface) 82%, transparent));
}

/* Agreement summary: a Bootstrap list group in the page colours. */
.summary-list {
  --bs-list-group-bg: transparent;
  --bs-list-group-color: var(--lk-title-color);
  --bs-list-group-border-color: rgba(132, 145, 161, 0.26);
  --bs-list-group-border-radius: 1rem;
  --bs-list-group-item-padding-x: 1.1rem;
  --bs-list-group-item-padding-y: 0.78rem;
  border: 1px solid rgba(132, 145, 161, 0.42);
  border-radius: 1rem;
  overflow: hidden;
  background:
    linear-gradient(135deg, var(--lk-surface-strong), var(--lk-surface-soft)),
    rgba(252, 253, 255, 0.92);
  box-shadow: 0 10px 22px rgba(28, 34, 43, 0.08);
}

.summary-list .list-group-item {
  border-left: 0;
  border-right: 0;
}

.summary-list .list-group-item:first-child {
  border-top: 0;
}

.summary-list .list-group-item:last-child {
  border-bottom: 0;
}

.summary-list .label {
  flex-shrink: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #58657a;
}

.summary-list .value {
  font-weight: 700;
  text-align: right;
  word-break: break-word;
}

/* Highlighted row: balance on the payment page, amount on the Portmone page. */
.summary-list .success,
.summary-list .danger {
  --bs-list-group-item-padding-y: 0.95rem;
}

.summary-list .success {
  background: linear-gradient(135deg, rgba(25, 135, 84, 0.2), rgba(25, 135, 84, 0.06));
  box-shadow: inset 4px 0 0 #198754;
}

.summary-list .danger {
  background: linear-gradient(135deg, rgba(220, 53, 69, 0.2), rgba(220, 53, 69, 0.06));
  box-shadow: inset 4px 0 0 #c5404f;
}

.summary-list .success .label,
.summary-list .danger .label {
  color: var(--lk-title-color);
}

.summary-list .amount {
  font-size: 1.2rem;
  font-weight: 800;
  line-height: 1.1;
  padding: 0.32rem 0.8rem;
  border-radius: 999px;
  background: rgba(252, 253, 255, 0.9);
  border: 1px solid transparent;
}

.summary-list .success .amount {
  color: #146c43;
  border-color: rgba(25, 135, 84, 0.4);
}

.summary-list .danger .amount {
  color: #9a313e;
  border-color: rgba(220, 53, 69, 0.42);
}

.alert {
  border-width: 1px;
  border-radius: 0.85rem;
}

.alert-danger {
  background: var(--lk-danger-soft);
  border-color: rgba(220, 53, 69, 0.42);
  color: #7f1f29;
}

.alert-light {
  background: color-mix(in srgb, var(--lk-surface-strong) 72%, #d7dfeb);
  border-color: color-mix(in srgb, var(--lk-border) 82%, #8fa3bf);
  color: var(--lk-muted);
}

.form-error-slot {
  margin-bottom: 1rem;
}

/* Error message: a white card with a red marker, same shape as the other cards. */
.form-error-alert {
  padding: 0.8rem 0.9rem;
  border: 1px solid rgba(184, 73, 87, 0.38);
  border-radius: 1rem;
  background: rgba(252, 253, 255, 0.95);
  box-shadow: inset 4px 0 0 #c5404f, 0 8px 18px rgba(120, 38, 49, 0.1);
  color: var(--lk-title-color);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.35;
}

.form-error-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 50%;
  background: var(--lk-danger-soft);
  color: #9a313e;
  font-size: 1.25rem;
}

.form-error-alert .btn-close {
  width: 0.7rem;
  height: 0.7rem;
  padding: 0.3rem;
  opacity: 0.5;
}

.form-error-alert .btn-close:hover,
.form-error-alert .btn-close:focus {
  opacity: 0.85;
}

.form-label,
.form-text {
  color: var(--lk-muted);
}

.form-control,
.form-select,
.search-form .input-group-text {
  border-color: var(--lk-border);
  background-color: color-mix(in srgb, var(--lk-surface) 90%, transparent);
  color: var(--lk-title-color);
}

.search-form .input-group-text {
  min-width: 3.1rem;
  justify-content: center;
  font-weight: 700;
}

.search-form .input-group > .form-control {
  border-left: 0;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--lk-accent-border);
  box-shadow: 0 0 0 0.2rem color-mix(in srgb, var(--lk-accent-soft) 70%, transparent);
}

@media (max-width: 576px) {
  :root {
    --lk-bg-start: #c2ccd9;
    --lk-bg-end: #b1bed0;
    --lk-surface: rgba(232, 238, 246, 0.86);
    --lk-surface-strong: rgba(239, 244, 251, 0.92);
  }

  .pay-head {
    padding: 1rem;
  }

  .pay-body {
    padding: 1.08rem 1rem 1.3rem;
  }

  .title-main {
    font-size: 1.1rem;
  }

  .subtitle-main {
    font-size: 0.88rem;
  }

  .logo {
    width: 98px;
  }

  .info-grid {
    gap: 0.6rem;
  }

  .info-card {
    padding: 0.7rem 0.8rem;
  }

  .info-card .label {
    font-size: 0.72rem;
  }

  /* Cards stay side by side on a phone: the icon moves above the name. */
  .service-card .service-main {
    flex-direction: column;
    gap: 0.15rem;
  }

  .service-card .selected-badge {
    position: static;
    transform: none;
    margin-top: 0.35rem;
  }

  .btn-check:checked + .service-card .selected-badge {
    transform: none;
  }
}

@media (max-width: 768px) {
  :root {
    --form-width: 100%;
  }

  .hero-shell {
    padding: 0.7rem 0.6rem 1rem;
  }

  .pay-card,
  .pay-card.page-search,
  .pay-card.page-checkout {
    border-radius: 1rem;
    box-shadow: 0 12px 26px rgba(35, 44, 56, 0.13);
  }

  .pay-head {
    padding: 1rem 0.95rem;
  }

  .pay-body {
    padding: 1rem 0.95rem 1.1rem;
  }

  .title-main {
    font-size: 1.22rem;
  }

  .subtitle-main {
    font-size: 0.93rem;
  }

  .field-block {
    margin-bottom: 1.05rem;
  }

  .field-label {
    margin-bottom: 0.56rem;
    font-size: 0.7rem;
  }

  .service-grid {
    gap: 0.6rem;
  }

  .service-card {
    min-height: 102px;
    padding: 0.72rem 0.62rem 0.46rem;
  }

  .service-card .name {
    font-size: 0.95rem;
  }

  .service-card .hint {
    font-size: 0.69rem;
  }

  .agreement-field {
    min-height: 50px;
  }

  .agreement-field input {
    font-size: 1rem;
    padding: 0.75rem 0.86rem;
  }

  .submit-button {
    min-height: 52px;
  }
}
