/* ---------- header account button ---------- */
.account-btn { gap: 8px; }
.account-btn svg { width: 17px; height: 17px; stroke: currentColor; stroke-width: 1.9; }
@media (max-width: 640px) {
  .account-btn { width: 40px; padding: 0; }
  .account-btn span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
}

/* ---------- footer payment band ---------- */
.pay-band { height: 26px; width: auto; max-width: 100%; opacity: .92; }

/* ---------- toast ---------- */
.toast-region {
  position: fixed; z-index: 90; left: 50%; bottom: 28px; transform: translateX(-50%);
  width: min(460px, calc(100vw - 32px)); pointer-events: none;
}
.toast {
  padding: 14px 18px; border-radius: 14px;
  background: rgba(7, 18, 40, .94); color: #fff; border: 1px solid rgba(255, 255, 255, .12);
  box-shadow: 0 18px 40px rgba(0, 0, 0, .3); backdrop-filter: blur(12px);
  font-size: var(--fs-sm); font-weight: 600; line-height: 1.5; text-align: center;
  opacity: 0; transform: translateY(10px); transition: opacity .3s ease, transform .4s var(--ease);
}
.toast.is-on { opacity: 1; transform: none; }
.toast-error { background: rgba(120, 20, 28, .95); }
.toast-ok { background: rgba(14, 82, 50, .95); }

/* ---------- modal ---------- */
.modal {
  position: fixed; z-index: 80; inset: 0; display: grid; place-items: center; padding: 20px;
  background: rgba(4, 10, 22, .55); backdrop-filter: blur(6px);
  opacity: 0; transition: opacity .25s ease;
}
.modal.is-on { opacity: 1; }
.modal-card {
  position: relative; width: min(440px, 100%); max-height: calc(100vh - 40px); overflow-y: auto;
  background: #fff; color: var(--text); border-radius: 22px; padding: clamp(24px, 3vw, 34px);
  box-shadow: 0 30px 70px rgba(0, 0, 0, .3);
  transform: translateY(12px) scale(.98); transition: transform .35s var(--ease);
}
.modal.is-on .modal-card { transform: none; }
.modal-close {
  position: absolute; top: 14px; right: 14px; width: 36px; height: 36px; border: 0; border-radius: 10px;
  background: var(--paper-2); color: var(--text-2); display: grid; place-items: center;
}
.modal-close:hover { background: #e8edf4; }
.modal-close svg { width: 16px; height: 16px; stroke: currentColor; stroke-width: 2; }
.modal h2 { font-size: 22px; font-weight: 800; letter-spacing: -.02em; margin-bottom: 6px; padding-right: 40px; }
.modal .sub { font-size: var(--fs-sm); color: var(--text-2); margin-bottom: 20px; }
/* Legal documents in a window (legal-modal.js): the card does not scroll, the
   document inside it does, so the close and back buttons stay in view. */
html.modal-open { overflow: hidden; }
.modal-legal { overscroll-behavior: contain; }
.modal-legal .modal-card {
  width: min(880px, 100%); max-height: calc(100vh - 40px); max-height: calc(100dvh - 40px);
  padding: 0; display: flex; flex-direction: column; overflow: hidden;
}
.modal-legal-body {
  flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; outline: none;
  padding: 64px clamp(20px, 4vw, 48px) clamp(24px, 3vw, 40px);
}
.modal-legal .legal-doc { border: 0; box-shadow: none; border-radius: 0; padding: 0; background: transparent; }
.modal-back {
  position: absolute; top: 14px; left: 14px; z-index: 1; width: 36px; height: 36px; border: 0; border-radius: 10px;
  background: var(--paper-2); color: var(--text-2); display: grid; place-items: center;
}
.modal-back:hover { background: #e8edf4; }
.modal-back svg { width: 16px; height: 16px; stroke: currentColor; stroke-width: 2; }
.modal-legal .modal-close { z-index: 1; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-note { font-size: 13px; color: var(--text-2); text-align: center; }
.form-note button, .text-btn {
  background: none; border: 0; padding: 0; font-weight: 700; color: var(--blue); text-decoration: underline; text-underline-offset: 3px;
}
.form-error {
  padding: 10px 12px; border-radius: 10px; background: #fff3f3; border: 1px solid #f6c9cb;
  color: #b4232a; font-size: 13px; font-weight: 600;
}
.form-error:empty { display: none; }
.code-input { letter-spacing: .5em; font-weight: 800; font-size: 20px !important; text-align: center; }
.btn[disabled] { opacity: .5; cursor: not-allowed; box-shadow: none; }
@media (max-width: 480px) { .row-2 { grid-template-columns: 1fr; } }
