/* ==========================================================================
   Pirate Valor · custom-v4.css
   The ONLY file in the project permitted to contain a literal colour.
   Load order: bootstrap.min.css → fontawesome → custom-v4.css
   ========================================================================== */

:root {
  /* --- brand ramp (literal hex lives here and nowhere else) --- */
  --pv-navy-900: #071628;
  --pv-navy-800: #0d2140;
  --pv-navy-700: #123056;
  --pv-navy-600: #1a4272;
  --pv-blue-600: #1560a8;
  --pv-blue-500: #1a72c4;
  --pv-blue-400: #4a90d0;
  --pv-blue-200: #cfdff2;
  --pv-blue-100: #eaf2fc;

  --pv-surface-0: #ffffff;
  --pv-surface-1: #f4f7fb;
  --pv-surface-2: #eef2f7;
  --pv-surface-3: #e2e9f2;
  --pv-border:    #dfe8f2;
  --pv-border-strong: #cfdae8;

  --pv-ink-900: #0d2140;
  --pv-ink-700: #33507a;
  --pv-ink-500: #6a83a3;
  --pv-ink-300: #93a7bf;
  --pv-on-dark: #ffffff;
  --pv-on-dark-dim: #9fc0e0;

  /* gold — currency and rewards ONLY */
  --pv-gold-600: #9a7a14;
  --pv-gold-500: #c9a227;
  --pv-gold-300: #ecd9a4;
  --pv-gold-100: #fff8e4;
  --pv-gold-ink: #7a5c11;

  /* semantic — red must never be reused decoratively */
  --pv-danger:      #b3322f;
  --pv-danger-bg:   #fdf1f1;
  --pv-danger-border: #f3d4d4;
  --pv-success:     #1f7a4d;
  --pv-success-bg:  #eef7f2;
  --pv-warning-ink: var(--pv-gold-ink);

  /* --- type scale --- */
  /* Maven Pro everywhere: rounded, friendly - matches the anime/pirate art. No serif, no mono. */
  --pv-font-sans: "Maven Pro", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --pv-font-mono: "Maven Pro", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --pv-font-display: "Maven Pro", "Helvetica Neue", Helvetica, Arial, sans-serif;

  --pv-fs-display: 2.375rem;  /* 38px · auth wordmark only */
  --pv-fs-balance: 1.625rem;  /* 26px · balance figure */
  --pv-fs-h2:      1.0625rem; /* 17px · section + sheet heading */
  --pv-fs-body:    0.9375rem; /* 15px · default body */
  --pv-fs-input:   1rem;      /* 16px · never smaller (iOS zoom) */
  --pv-fs-label:   0.8125rem; /* 13px · field label, secondary */
  --pv-fs-meta:    0.75rem;   /* 12px · meta, captions */
  --pv-fs-micro:   0.6875rem; /* 11px · mono eyebrow, tags */

  --pv-lh-tight: 1.15;
  --pv-lh-body: 1.55;

  /* --- space / radius / motion --- */
  --pv-sp-1: 4px;  --pv-sp-2: 8px;  --pv-sp-3: 12px;
  --pv-sp-4: 16px; --pv-sp-5: 22px; --pv-sp-6: 30px;
  --pv-r-sm: 6px;  --pv-r-md: 10px; --pv-r-lg: 12px;
  --pv-r-sheet: 18px; --pv-r-pill: 999px;
  --pv-tap: 44px;
  --pv-shadow-1: 0 1px 2px rgba(13, 33, 64, .05);
  --pv-shadow-2: 0 6px 20px rgba(13, 33, 64, .10);
  --pv-shadow-sheet: 0 -12px 40px rgba(9, 22, 43, .28);
  --pv-ease: 160ms cubic-bezier(.2, .7, .3, 1);

  /* --- bootstrap 5.3 bridge --- */
  --bs-body-bg: var(--pv-surface-1);
  --bs-body-color: var(--pv-ink-900);
  --bs-body-font-family: var(--pv-font-sans);
  --bs-body-font-size: var(--pv-fs-body);
  --bs-body-line-height: var(--pv-lh-body);
  --bs-primary: var(--pv-blue-600);
  --bs-primary-rgb: 21, 96, 168;
  --bs-secondary: var(--pv-ink-500);
  --bs-danger: var(--pv-danger);
  --bs-success: var(--pv-success);
  --bs-warning: var(--pv-gold-500);
  --bs-border-color: var(--pv-border);
  --bs-border-radius: var(--pv-r-md);
  --bs-link-color: var(--pv-blue-600);
  --bs-link-hover-color: var(--pv-navy-800);
  --bs-focus-ring-color: rgba(21, 96, 168, .35);
  --bs-focus-ring-width: 2px;
}

/* ==========================================================================
   base
   ========================================================================== */

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--pv-surface-1);
  color: var(--pv-ink-900);
  font-family: var(--pv-font-sans);
  font-size: var(--pv-fs-body);
  line-height: var(--pv-lh-body);
  -webkit-font-smoothing: antialiased;
  text-wrap: pretty;
}

a { color: var(--pv-blue-600); text-decoration: none; }
a:hover, a:focus-visible { color: var(--pv-navy-800); text-decoration: underline; }

/* the whole app is a single centred column; no desktop variant */
.pv-app { width: 100%; max-width: 700px; margin-inline: auto; }

.pv-eyebrow {
  font-family: var(--pv-font-mono);
  font-size: var(--pv-fs-micro);
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--pv-ink-500);
}
.pv-h2 { font-size: var(--pv-fs-h2); font-weight: 500; color: var(--pv-ink-900); margin: 0; }
.pv-body { font-size: var(--pv-fs-body); color: var(--pv-ink-700); margin: 0; }
.pv-meta { font-size: var(--pv-fs-meta); color: var(--pv-ink-500); margin: 0; }
.pv-display { font-family: var(--pv-font-display); font-size: var(--pv-fs-display); font-weight: 800; letter-spacing: -.015em; line-height: var(--pv-lh-tight); }

/* gold is reserved: currency figures and reward affordances */
.pv-currency { font-family: var(--pv-font-mono); font-weight: 700; color: var(--pv-gold-500); }

/* ==========================================================================
   buttons — 3 variants, all ≥44px, no hover-only affordances
   ========================================================================== */

.btn {
  --bs-btn-font-size: var(--pv-fs-input);
  --bs-btn-font-weight: 500;
  --bs-btn-border-radius: var(--pv-r-lg);
  min-height: var(--pv-tap);
  /* declared in the same sheet that defines the vars: without this, a transitioned
     property fed by a custom property can stay at Bootstrap's transparent default
     when this stylesheet lands after first paint (Chromium). */
  background-color: var(--bs-btn-bg);
  border-color: var(--bs-btn-border-color);
  transition: filter var(--pv-ease);
}

.btn-pv-primary {
  --bs-btn-color: var(--pv-on-dark);
  --bs-btn-bg: var(--pv-blue-600);
  --bs-btn-border-color: var(--pv-blue-600);
  --bs-btn-hover-color: var(--pv-on-dark);
  --bs-btn-hover-bg: var(--pv-navy-600);
  --bs-btn-hover-border-color: var(--pv-navy-600);
  --bs-btn-active-color: var(--pv-on-dark);
  --bs-btn-active-bg: var(--pv-navy-700);
  --bs-btn-active-border-color: var(--pv-navy-700);
  --bs-btn-disabled-color: var(--pv-ink-500);
  --bs-btn-disabled-bg: var(--pv-border-strong);
  --bs-btn-disabled-border-color: var(--pv-border-strong);
  --bs-btn-disabled-opacity: 1;
}

.btn-pv-secondary {
  --bs-btn-color: var(--pv-blue-600);
  --bs-btn-bg: var(--pv-surface-0);
  --bs-btn-border-color: var(--pv-border-strong);
  --bs-btn-hover-color: var(--pv-navy-800);
  --bs-btn-hover-bg: var(--pv-blue-100);
  --bs-btn-hover-border-color: var(--pv-blue-200);
  --bs-btn-active-color: var(--pv-ink-900);
  --bs-btn-active-bg: var(--pv-blue-200);
  --bs-btn-active-border-color: var(--pv-blue-200);
  --bs-btn-disabled-color: var(--pv-ink-500);
  --bs-btn-disabled-bg: var(--pv-surface-2);
  --bs-btn-disabled-border-color: var(--pv-border);
  --bs-btn-disabled-opacity: 1;
}

/* gold: reward claim only */
.btn-pv-reward {
  --bs-btn-color: #241a00;
  --bs-btn-bg: var(--pv-gold-500);
  --bs-btn-border-color: var(--pv-gold-500);
  --bs-btn-hover-color: #241a00;
  --bs-btn-hover-bg: var(--pv-gold-600);
  --bs-btn-hover-border-color: var(--pv-gold-600);
  --bs-btn-active-color: #241a00;
  --bs-btn-active-bg: var(--pv-gold-600);
  --bs-btn-active-border-color: var(--pv-gold-600);
  --bs-btn-disabled-color: var(--pv-ink-500);
  --bs-btn-disabled-bg: var(--pv-surface-2);
  --bs-btn-disabled-border-color: var(--pv-border);
  --bs-btn-disabled-opacity: 1;
}

.btn-pv-block { width: 100%; min-height: 52px; }
.btn.is-loading { pointer-events: none; position: relative; color: transparent !important; }
.btn.is-loading::after {
  content: ""; position: absolute; inset: 0; margin: auto;
  width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid currentColor; border-top-color: transparent;
  color: var(--pv-on-dark);
  animation: pv-spin .7s linear infinite;
}
.btn-pv-secondary.is-loading::after { color: var(--pv-blue-600); }

@keyframes pv-spin { to { transform: rotate(360deg); } }

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

.pv-field { display: flex; flex-direction: column; gap: 7px; }
.pv-label { font-size: var(--pv-fs-label); font-weight: 500; color: var(--pv-ink-700); }

.pv-input, .pv-select {
  height: 48px;
  border: 1px solid var(--pv-border-strong);
  background: var(--pv-surface-0);
  border-radius: var(--pv-r-md);
  padding-inline: var(--pv-sp-3);
  font-size: var(--pv-fs-input);
  color: var(--pv-ink-900);
  width: 100%;
}
.pv-input::placeholder { color: var(--pv-ink-300); }
.pv-input:focus-visible, .pv-select:focus-visible {
  outline: var(--bs-focus-ring-width) solid var(--pv-blue-600);
  outline-offset: -2px;
  border-color: var(--pv-blue-600);
}
.pv-input:disabled, .pv-select:disabled {
  background: var(--pv-surface-2); color: var(--pv-ink-300);
  border-color: var(--pv-border); cursor: not-allowed;
}
.pv-input.is-invalid { border-color: var(--pv-danger); background: var(--pv-danger-bg); }
.pv-error {
  display: flex; align-items: flex-start; gap: 6px;
  font-size: var(--pv-fs-label); color: var(--pv-danger);
}
.pv-hint { font-size: var(--pv-fs-label); color: var(--pv-ink-500); }

.pv-captcha {
  width: 108px; height: 48px; flex: 0 0 auto;
  border: 1px solid var(--pv-border-strong); border-radius: var(--pv-r-md);
  background: repeating-linear-gradient(115deg, #dfe7f1 0 6px, #eef3f9 6px 12px);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--pv-font-mono); font-size: 17px; letter-spacing: .18em;
  color: var(--pv-blue-600);
}

/* segmented control — 2 or 3 items, labels expand ~30% under translation */
.pv-segmented {
  display: grid; gap: var(--pv-sp-1);
  background: var(--pv-surface-3); border-radius: var(--pv-r-sm); padding: var(--pv-sp-1);
}
.pv-segmented[data-items="2"] { grid-template-columns: repeat(2, 1fr); }
.pv-segmented[data-items="3"] { grid-template-columns: repeat(3, 1fr); }
.pv-segmented > button {
  border: 0; background: transparent; color: var(--pv-ink-500);
  font-size: var(--pv-fs-label); font-weight: 500; line-height: 1.2;
  min-height: var(--pv-tap); border-radius: var(--pv-r-sm); cursor: pointer;
  padding-inline: var(--pv-sp-1);
}
.pv-segmented > button[aria-selected="true"] {
  background: var(--pv-surface-0); color: var(--pv-ink-900); box-shadow: var(--pv-shadow-1);
}

/* ==========================================================================
   surfaces
   ========================================================================== */

.pv-card {
  background: var(--pv-surface-0);
  border: 1px solid var(--pv-border);
  border-radius: var(--pv-r-lg);
  padding: var(--pv-sp-3) var(--pv-sp-4);
}
.pv-card--navy { background: var(--pv-navy-800); border-color: transparent; color: var(--pv-on-dark); }

.pv-badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--pv-font-mono); font-size: var(--pv-fs-micro); font-weight: 500;
  padding: 4px 7px; border-radius: var(--pv-r-sm);
  background: var(--pv-blue-100); color: var(--pv-navy-600);
}
.pv-badge--gold { background: var(--pv-gold-100); color: var(--pv-gold-ink); }

/* copy field — the workhorse of every transfer sheet */
.pv-copy {
  display: flex; align-items: center; gap: var(--pv-sp-3);
  background: var(--pv-surface-0); border: 1px solid var(--pv-border);
  border-radius: var(--pv-r-md); padding: 11px var(--pv-sp-3);
}
.pv-copy__body { flex: 1; min-width: 0; }
.pv-copy__value {
  font-family: var(--pv-font-mono); font-size: var(--pv-fs-body); font-weight: 500; font-variant-numeric: tabular-nums;
  color: var(--pv-ink-900); word-break: break-all; margin-top: 3px;
}
.pv-copy__btn {
  flex: 0 0 auto; min-height: var(--pv-tap); padding-inline: var(--pv-sp-3);
  border: 1px solid var(--pv-border-strong); border-radius: var(--pv-r-md);
  background: var(--pv-surface-1); color: var(--pv-blue-600);
  font-size: var(--pv-fs-label); font-weight: 500; cursor: pointer;
}
.pv-copy__btn.is-copied { background: var(--pv-success-bg); color: var(--pv-success); border-color: var(--pv-success); }

/* list row / table row — 390px first, never a horizontal scroller */
.pv-row {
  display: flex; align-items: center; gap: var(--pv-sp-3);
  width: 100%; text-align: left;
  background: var(--pv-surface-0); border: 1px solid var(--pv-border);
  border-radius: var(--pv-r-md); padding: var(--pv-sp-3);
  min-height: 60px; cursor: pointer;
}
.pv-row__body { flex: 1; min-width: 0; }
.pv-row__title { font-size: var(--pv-fs-body); font-weight: 500; color: var(--pv-ink-900); }
.pv-row__chevron { color: var(--pv-ink-500); flex: 0 0 auto; }
.pv-row.is-active { border: 2px solid var(--pv-blue-600); background: var(--pv-blue-100); }

/* logo / image slot */
.pv-logo {
  width: 46px; height: 34px; flex: 0 0 auto;
  border: 1px solid var(--pv-border-strong); border-radius: var(--pv-r-sm);
  background: var(--pv-surface-0);
  object-fit: contain; padding: 3px;
}
.pv-coin { width: 26px; height: 26px; flex: 0 0 auto; }

/* ==========================================================================
   app chrome — option A: utility row + sticky action bar, no tab bar
   ========================================================================== */

.pv-topbar {
  position: sticky; top: 0; z-index: 20;
  background: var(--pv-navy-800); color: var(--pv-on-dark);
  padding: var(--pv-sp-4) var(--pv-sp-4) 18px;
}
.pv-topbar__label { font-family: var(--pv-font-mono); font-size: 10px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--pv-blue-400); }
.pv-topbar__balance { font-size: var(--pv-fs-balance); font-weight: 700; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.pv-topbar__user { font-size: var(--pv-fs-meta); color: var(--pv-on-dark-dim); margin-top: 2px; }
.pv-topbar__icon {
  width: var(--pv-tap); height: var(--pv-tap); flex: 0 0 auto;
  border: 1px solid var(--pv-navy-600); border-radius: var(--pv-r-md);
  background: #16294a; color: #cfe0f2; font-size: 17px; cursor: pointer;
}
.pv-reward-chip {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: var(--pv-tap); padding-inline: var(--pv-sp-3);
  border: 1px solid var(--pv-gold-500); border-radius: var(--pv-r-pill);
  background: rgba(201, 162, 39, .14); color: #f0d478;
  font-size: var(--pv-fs-label); font-weight: 500; cursor: pointer;
}
.pv-reward-chip__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--pv-gold-500); }

/* status strips */

/* ==========================================================================
   bottom sheet
   ========================================================================== */

.pv-backdrop { position: fixed; inset: 0; background: rgba(9, 22, 43, .5); z-index: 40; }
.pv-sheet {
  position: fixed; inset: auto 0 0 0; z-index: 50;
  max-width: 700px; margin-inline: auto;
  display: flex; flex-direction: column;
  max-height: 92vh;
  background: var(--pv-surface-1);
  border-radius: var(--pv-r-sheet) var(--pv-r-sheet) 0 0;
  box-shadow: var(--pv-shadow-sheet);
}
.pv-sheet__handle { width: 40px; height: 4px; border-radius: 2px; background: var(--pv-border-strong); margin: 8px auto 0; }
.pv-sheet__header {
  display: flex; align-items: center; gap: var(--pv-sp-3);
  padding: var(--pv-sp-3) var(--pv-sp-4);
  border-bottom: 1px solid var(--pv-border);
}
.pv-sheet__title { flex: 1; font-size: var(--pv-fs-h2); font-weight: 500; margin: 0; }
.pv-sheet__icon {
  width: var(--pv-tap); height: var(--pv-tap); margin-block: -8px;
  border: 0; background: transparent; color: var(--pv-ink-500);
  font-size: 18px; cursor: pointer;
}
.pv-sheet__back { color: var(--pv-blue-600); margin-left: -8px; }
.pv-sheet__body { overflow-y: auto; -webkit-overflow-scrolling: touch; padding: var(--pv-sp-4) var(--pv-sp-4) var(--pv-sp-6); }

/* ==========================================================================
   feedback
   ========================================================================== */

.pv-alert {
  display: flex; gap: var(--pv-sp-3);
  border-radius: var(--pv-r-md); padding: var(--pv-sp-3);
  font-size: var(--pv-fs-label); line-height: var(--pv-lh-body);
}
.pv-alert--info { background: var(--pv-blue-100); border: 1px solid var(--pv-blue-200); color: var(--pv-navy-600); }
.pv-alert--warn { background: var(--pv-gold-100); border: 1px solid var(--pv-gold-300); color: var(--pv-gold-ink); }
.pv-alert--error { background: var(--pv-danger-bg); border: 1px solid var(--pv-danger-border); color: var(--pv-danger); }
.pv-alert--success { background: var(--pv-success-bg); border: 1px solid #cfe6da; color: var(--pv-success); }

.pv-toast {
  position: fixed; left: var(--pv-sp-4); right: var(--pv-sp-4); bottom: 150px; z-index: 60;
  max-width: 668px; margin-inline: auto;
  background: var(--pv-navy-800); color: var(--pv-on-dark);
  border-radius: var(--pv-r-md); padding: var(--pv-sp-3);
  font-size: var(--pv-fs-body); text-align: center;
}

.pv-empty {
  display: flex; flex-direction: column; align-items: center; gap: var(--pv-sp-3);
  padding: var(--pv-sp-6) var(--pv-sp-4); text-align: center;
}
.pv-empty__icon {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--pv-surface-3); color: var(--pv-ink-500);
  display: flex; align-items: center; justify-content: center; font-size: 22px;
}
.pv-empty__title { font-size: var(--pv-fs-h2); font-weight: 500; color: var(--pv-ink-900); }
.pv-empty__body { font-size: var(--pv-fs-label); color: var(--pv-ink-500); max-width: 30ch; }

@keyframes pv-shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }

/* sweetalert2 bridge */
.swal2-popup { border-radius: var(--pv-r-lg); font-family: var(--pv-font-sans); }
.swal2-title { font-size: var(--pv-fs-h2); color: var(--pv-ink-900); }
.swal2-html-container { font-size: var(--pv-fs-body); color: var(--pv-ink-700); }
.swal2-confirm.btn-pv-primary { min-height: var(--pv-tap); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ==========================================================================
   Blade port additions - everything below uses the tokens above.
   ========================================================================== */

/* --- layout: the 390px column, topbar, sub-screen header ------------------ */
.pv-app { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.pv-main { flex: 1 1 auto; }
.pv-section { padding: 20px var(--pv-sp-4) var(--pv-sp-6); }
.pv-section__head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.pv-stack { display: flex; flex-direction: column; gap: var(--pv-sp-3); }
.pv-stack--tight { gap: var(--pv-sp-2); }
.pv-stack--form { gap: 14px; }
.pv-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.pv-topbar__row { display: flex; align-items: center; gap: 10px; }
.pv-topbar__main { flex: 1; min-width: 0; color: inherit; text-decoration: none; display: block; }
.pv-topbar__main:hover, .pv-topbar__main:focus-visible { color: inherit; text-decoration: none; }
.pv-topbar__figure { display: flex; align-items: baseline; gap: 7px; }
.pv-topbar__figure .pv-currency { font-size: var(--pv-fs-meta); }
.pv-topbar__user { word-break: break-all; }
.pv-reward-chip.is-badged { box-shadow: 0 0 0 3px rgba(201, 162, 39, .22); }
a.pv-reward-chip:hover, a.pv-reward-chip:focus-visible { color: #f0d478; text-decoration: none; }

/* sub-screen header (account / rewards / history): same chrome as a sheet header, in-page */
.pv-screenbar {
  display: flex; align-items: center; gap: var(--pv-sp-3);
  padding: var(--pv-sp-3) var(--pv-sp-4);
  border-bottom: 1px solid var(--pv-border);
  background: var(--pv-surface-1);
}
.pv-screenbar__title { flex: 1; font-size: var(--pv-fs-h2); font-weight: 500; margin: 0; }
.pv-screenbar__back {
  width: var(--pv-tap); height: var(--pv-tap); margin: -8px 0 -8px -8px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--pv-blue-600); font-size: 18px; border-radius: var(--pv-r-md);
}
.pv-screenbar__back:hover { text-decoration: none; background: var(--pv-blue-100); }

/* --- guest shell ----------------------------------------------------------- */
.pv-guest { background: var(--pv-navy-800); min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.pv-guest-hero { padding: 40px 22px 26px; background: linear-gradient(180deg, var(--pv-navy-800) 0%, var(--pv-navy-700) 100%); }
.pv-guest-crest {
  width: var(--pv-tap); height: var(--pv-tap); border-radius: 50%;
  border: 2px solid var(--pv-gold-500); color: var(--pv-gold-500);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--pv-font-mono); font-size: var(--pv-fs-label);
  overflow: hidden;
}
.pv-guest-crest img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.pv-guest-hero .pv-display { margin: 16px 0 6px; color: var(--pv-on-dark); }
.pv-guest-hero .pv-body { color: var(--pv-on-dark-dim); }
.pv-guest-body {
  flex: 1 1 auto;
  background: var(--pv-surface-1);
  border-radius: 22px 22px 0 0;
  padding: 20px 20px 40px;
}
.pv-guest-links {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 18px;
  margin-top: 26px; padding-top: 16px; border-top: 1px solid var(--pv-border);
}
.pv-guest-links a, .pv-guest-links button {
  display: inline-flex; align-items: center; gap: 6px; min-height: var(--pv-tap);
  border: 0; background: transparent; padding: 0 4px;
  font-size: var(--pv-fs-label); color: var(--pv-ink-500); cursor: pointer;
}
.pv-guest-links a:hover, .pv-guest-links button:hover { color: var(--pv-blue-600); text-decoration: none; }
.pv-segmented > a {
  display: flex; align-items: center; justify-content: center; text-decoration: none;
  color: var(--pv-ink-500); font-size: var(--pv-fs-label); font-weight: 500; line-height: 1.2;
  min-height: var(--pv-tap); border-radius: var(--pv-r-sm); padding-inline: var(--pv-sp-1); text-align: center;
}
.pv-segmented > a[aria-current="page"], .pv-segmented > a[aria-selected="true"] {
  background: var(--pv-surface-0); color: var(--pv-ink-900); box-shadow: var(--pv-shadow-1);
}
.pv-segmented > a:hover { color: var(--pv-ink-900); text-decoration: none; }

/* --- forms: error text under a field, captcha row ------------------------- */
.pv-field .invalid-feedback { display: block; margin: 0; font-size: var(--pv-fs-label); color: var(--pv-danger); }
.pv-captcha-row { display: flex; gap: var(--pv-sp-2); align-items: stretch; }
.pv-captcha-row .pv-input { flex: 1; min-width: 0; }
.pv-captcha { width: 132px; padding: 0; overflow: hidden; cursor: pointer; background: var(--pv-surface-0); }
.pv-captcha img { width: 100%; height: 100%; object-fit: contain; display: block; }
.pv-auth-form { margin-top: 20px; }
.pv-auth-foot { text-align: center; margin-top: 2px; }
.pv-captcha-reload {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 6px;
  min-height: 32px; font-size: var(--pv-fs-label); color: var(--pv-blue-600);
}
.pv-input[type="file"] { padding-block: 11px; }

/* --- bottom sheet: open / closed states (markup ships hidden in the page) -- */
.pv-backdrop { opacity: 0; pointer-events: none; transition: opacity var(--pv-ease); }
.pv-backdrop.is-open { opacity: 1; pointer-events: auto; }
.pv-sheet {
  transform: translateY(100%); visibility: hidden; pointer-events: none;
  transition: transform 260ms cubic-bezier(.32, .72, 0, 1), visibility 0s linear 260ms;
  max-height: calc(var(--pv-vvh, 100vh) * .92);
}
.pv-sheet.is-open { transform: none; visibility: visible; pointer-events: auto; transition-delay: 0s; }
.pv-sheet__body { overscroll-behavior: contain; }
body.pv-sheet-open { overflow: hidden; }
.pv-sheet__icon:hover { color: var(--pv-ink-900); }
.pv-sheet__back:hover { color: var(--pv-navy-800); }
[hidden] { display: none !important; }

/* --- menu sheet rows / language picker ------------------------------------ */
.pv-row--danger .pv-row__title { color: var(--pv-danger); }
a.pv-row, a.pv-row:hover, a.pv-row:focus-visible { color: inherit; text-decoration: none; }
a.pv-row:hover { border-color: var(--pv-border-strong); }
.pv-lang { position: relative; }
.pv-lang__list { display: none; flex-direction: column; gap: 4px; padding: 6px 0 2px 0; }
.pv-lang.show .pv-lang__list { display: flex; }
.pv-lang__option {
  display: flex; align-items: center; gap: 10px; min-height: var(--pv-tap);
  padding: 0 var(--pv-sp-3); border-radius: var(--pv-r-md); cursor: pointer;
  font-size: var(--pv-fs-body); color: var(--pv-ink-700); background: var(--pv-surface-0);
  border: 1px solid var(--pv-border);
}
.pv-lang__option.active { border-color: var(--pv-blue-600); background: var(--pv-blue-100); color: var(--pv-ink-900); }
.pv-lang__flag { font-size: 18px; }
#google_translate_element { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; pointer-events: none; }
/* google translate banner must never push the sticky chrome */
body { top: 0 !important; }
.skiptranslate iframe, .goog-te-banner-frame { display: none !important; }
.goog-tooltip, .goog-tooltip:hover, #goog-gt-tt { display: none !important; }
.goog-text-highlight { background: none !important; box-shadow: none !important; }

/* --- account screen --------------------------------------------------------- */
.pv-profile {
  background: linear-gradient(180deg, var(--pv-navy-800), var(--pv-navy-700));
  border-radius: var(--pv-r-lg); padding: var(--pv-sp-4);
  display: flex; align-items: center; gap: var(--pv-sp-3); color: var(--pv-on-dark);
}
.pv-profile__name { font-family: var(--pv-font-display); font-size: 22px; font-weight: 700; line-height: 1.2; word-break: break-all; }
.pv-profile__meta { font-size: var(--pv-fs-meta); color: var(--pv-on-dark-dim); margin-top: 2px; }
.pv-kv {
  background: var(--pv-surface-0); border: 1px solid var(--pv-border);
  border-radius: var(--pv-r-md); padding: var(--pv-sp-3);
  display: flex; align-items: center; gap: 10px;
}
.pv-kv__body { flex: 1; min-width: 0; }
.pv-kv__value { font-size: var(--pv-fs-body); color: var(--pv-ink-900); margin-top: 3px; word-break: break-all; }
.pv-kv__value--muted { color: var(--pv-ink-500); }
.pv-kv__ok { color: var(--pv-success); flex: 0 0 auto; font-size: 18px; padding-inline: 6px; }
.pv-kv .btn { flex: 0 0 auto; }
.btn-pv-sm { min-height: var(--pv-tap); --bs-btn-font-size: var(--pv-fs-label); --bs-btn-padding-x: var(--pv-sp-3); --bs-btn-border-radius: var(--pv-r-md); }

/* --- rewards ---------------------------------------------------------------- */
.pv-progress { height: 8px; border-radius: 4px; background: var(--pv-surface-3); margin-top: 10px; overflow: hidden; }
.pv-progress__bar { height: 8px; border-radius: 4px; background: linear-gradient(90deg, var(--pv-gold-500), #e6c860); }
.pv-milestone { border-radius: var(--pv-r-lg); padding: 13px 14px; display: flex; align-items: center; gap: var(--pv-sp-3);
  background: var(--pv-surface-0); border: 1px solid var(--pv-border); cursor: pointer; width: 100%; text-align: left; }
.pv-milestone.is-open { border-color: var(--pv-gold-300); }
.pv-milestone.is-active { border: 2px solid var(--pv-blue-600); background: var(--pv-blue-100); }
.pv-milestone__coin { width: 40px; height: 40px; border-radius: 50%; flex: 0 0 auto;
  background: radial-gradient(circle at 32% 28%, #f4dd93 0%, var(--pv-gold-500) 62%, var(--pv-gold-600) 100%); }
.pv-milestone__body { flex: 1; min-width: 0; }
.pv-milestone__title { display: block; font-size: var(--pv-fs-body); font-weight: 500; color: var(--pv-ink-900); }
.pv-milestone__meta { display: block; font-size: var(--pv-fs-label); color: var(--pv-ink-500); margin-top: 2px; }
.pv-reward-item { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--pv-border); }
.pv-reward-item:last-child { border-bottom: 0; }
.pv-reward-item img { width: 40px; height: 40px; border-radius: var(--pv-r-sm); background: var(--pv-surface-2); object-fit: contain; flex: 0 0 auto; }
.pv-reward-item__name { flex: 1; min-width: 0; font-size: var(--pv-fs-body); color: var(--pv-ink-900); }
.pv-reward-item__qty { font-family: var(--pv-font-mono); font-size: var(--pv-fs-label); color: var(--pv-ink-700); }

/* --- history: DataTables collapsed to one card column ---------------------- */
.pv-history table.dataTable { width: 100% !important; border-collapse: collapse; margin: 0; background: transparent; }
.pv-history table.dataTable, .pv-history table.dataTable.no-footer { border: 0; }
.pv-history table.dataTable thead th, .pv-history table.dataTable thead td { border: 0; }
.pv-history table.dataTable thead { display: none; }
.pv-history table.dataTable tbody td { padding: 0 0 var(--pv-sp-2) 0; border: 0; background: transparent; }
.pv-history table.dataTable tbody tr { background: transparent; }
.pv-history table.dataTable tbody td.dataTables_empty { padding: var(--pv-sp-4) 0; text-align: center; color: var(--pv-ink-500); font-size: var(--pv-fs-label); }
.pv-history .dataTables_wrapper { position: relative; }
.pv-history .dataTables_processing {
  position: absolute; top: 0; left: 0; right: 0; height: auto; margin: 0; padding: var(--pv-sp-3);
  background: var(--pv-surface-1); color: var(--pv-ink-500); font-size: var(--pv-fs-label); text-align: center; z-index: 1;
  border: 0; box-shadow: none;
}
.pv-history .dataTables_info { font-family: var(--pv-font-mono); font-size: var(--pv-fs-meta); color: var(--pv-ink-500); padding: var(--pv-sp-2) 0 0; float: none; text-align: center; }
.pv-history .dataTables_paginate { float: none; display: flex; align-items: center; justify-content: space-between; gap: var(--pv-sp-2); padding: var(--pv-sp-2) 0 0; text-align: left; }
.pv-history .dataTables_paginate .ellipsis { display: none; }
.pv-history .dataTables_paginate span { display: flex; gap: 4px; overflow: hidden; }
.pv-history .dataTables_paginate .paginate_button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: var(--pv-tap); min-width: var(--pv-tap); padding: 0 var(--pv-sp-3) !important; margin: 0 !important;
  border: 1px solid var(--pv-border-strong) !important; border-radius: 9px !important;
  background: var(--pv-surface-0) !important; color: var(--pv-blue-600) !important;
  font-size: var(--pv-fs-label); cursor: pointer; box-shadow: none !important;
}
.pv-history .dataTables_paginate .paginate_button.current { background: var(--pv-navy-800) !important; color: var(--pv-on-dark) !important; border-color: var(--pv-navy-800) !important; }
.pv-history .dataTables_paginate .paginate_button.disabled { color: var(--pv-ink-300) !important; cursor: default; }
.pv-history .dataTables_paginate .paginate_button:hover { background: var(--pv-blue-100) !important; }
.history-row { display: flex; align-items: center; gap: var(--pv-sp-3); background: var(--pv-surface-0); border: 1px solid var(--pv-border); border-radius: var(--pv-r-md); padding: 12px 13px; }
.history-row__body { flex: 1; min-width: 0; }
.history-row__title { font-size: 14px; font-weight: 500; color: var(--pv-ink-900); }
.history-row__meta { font-family: var(--pv-font-mono); font-size: var(--pv-fs-micro); color: var(--pv-ink-500); margin-top: 3px; }
.history-row__end { flex: 0 0 auto; text-align: right; }
.history-row__amount { font-size: 14px; font-weight: 500; color: var(--pv-ink-900); }
.history-row__status { font-size: var(--pv-fs-micro); margin-top: 3px; color: var(--pv-success); }
.history-row__content { font-size: 14px; color: var(--pv-ink-900); line-height: 1.45; }

/* --- top-up funnel ---------------------------------------------------------- */
.pv-package {
  position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 8px;
  text-align: left; padding: 13px 12px 14px; border-radius: var(--pv-r-lg);
  border: 1px solid var(--pv-border); background: var(--pv-surface-0); cursor: pointer; min-height: 100px;
  box-shadow: var(--pv-shadow-1); width: 100%;
}
.pv-package.is-active { border: 2px solid var(--pv-blue-600); background: var(--pv-blue-100); }
.pv-package__head { display: flex; align-items: center; gap: 8px; width: 100%; }
.pv-package__price { font-size: 18px; font-weight: 500; color: var(--pv-ink-900); letter-spacing: -.01em; }
.pv-package__coins { font-family: var(--pv-font-mono); font-size: var(--pv-fs-micro); color: var(--pv-ink-700); margin-top: 2px; }
.pv-package__bonus { position: absolute; top: 10px; right: 10px; }
.pv-method { min-height: 68px; }
.pv-method .pv-logo { display: flex; align-items: center; justify-content: center; color: #7d93ad; font-size: 15px; }
.pv-method .pv-logo i { font-size: 20px; }
.pv-method__sub { display: block; font-size: var(--pv-fs-meta); color: var(--pv-ink-500); margin-top: 2px; }
.pv-paygrid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pv-paygrid .pv-row { min-height: 56px; padding: 11px; }
.pv-paygrid .pv-row .pv-logo { width: 30px; height: 22px; padding: 1px; }
.pv-qr { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.pv-qr img { width: 168px; height: 168px; border-radius: var(--pv-r-md); border: 1px solid var(--pv-border); background: var(--pv-surface-0); object-fit: contain; }
.pv-divider { height: 1px; background: var(--pv-border); }
.pv-upload {
  width: 100%; min-height: 92px; border: 1.5px dashed #b6c8dd; border-radius: var(--pv-r-lg);
  background: var(--pv-surface-0); color: var(--pv-blue-600); font-size: 14px; font-weight: 500; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; padding: var(--pv-sp-3);
  text-align: center;
}
.pv-upload__hint { font-size: var(--pv-fs-meta); color: var(--pv-ink-500); font-weight: 400; }
.pv-upload img { max-width: 100%; max-height: 160px; border-radius: var(--pv-r-sm); }
.pv-upload input[type="file"] { display: none; }
.pv-video { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; border-radius: var(--pv-r-lg); }
.pv-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* --- error pages ------------------------------------------------------------ */
.pv-error { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: var(--pv-sp-6) var(--pv-sp-4); text-align: center; gap: var(--pv-sp-3); }
.pv-error__code { font-family: var(--pv-font-mono); font-size: var(--pv-fs-micro); letter-spacing: .12em; text-transform: uppercase; color: var(--pv-ink-500); }

/* --- sweetalert2: tokens instead of the old dark-theme literals ------------- */
.swal2-popup { background: var(--pv-surface-0) !important; color: var(--pv-ink-900) !important; }
.swal2-confirm { background: var(--pv-blue-600) !important; border-radius: var(--pv-r-md) !important; min-height: var(--pv-tap); }
.swal2-confirm:focus { box-shadow: 0 0 0 3px rgba(21, 96, 168, .35) !important; }

/* --- component helpers ------------------------------------------------------ */
.pv-alert__icon { margin-top: 2px; flex: 0 0 auto; }
.pv-row__sub { display: block; margin-top: 2px; }
.pv-lang--row {
  display: flex; flex-direction: column; align-items: stretch; gap: 0;
  background: var(--pv-surface-0); border: 1px solid var(--pv-border);
  border-radius: var(--pv-r-md); padding: 0 var(--pv-sp-3); cursor: pointer;
}
.pv-lang--row .pv-lang__toggle { display: flex; align-items: center; gap: var(--pv-sp-3); min-height: 60px; }
.pv-lang--row .pv-lang__list { padding-bottom: var(--pv-sp-3); }
.pv-lang--inline { margin-top: var(--pv-sp-2); display: flex; flex-direction: column; align-items: center; }
.pv-lang--inline .pv-lang__toggle {
  display: inline-flex; align-items: center; gap: 6px; min-height: var(--pv-tap);
  border: 0; background: transparent; padding: 0 4px;
  font-size: var(--pv-fs-label); color: var(--pv-ink-500); cursor: pointer;
}
.pv-lang--inline .pv-lang__toggle:hover { color: var(--pv-blue-600); }
.pv-lang--inline .pv-lang__list { width: 100%; max-width: 320px; }
.pv-account { padding-bottom: var(--pv-sp-6); }

/* --- hero artwork + desktop framing -----------------------------------------
   Mobile is the design; on a laptop the single column must not stretch edge to
   edge. ≥720px: the column is centred over the key-art backdrop with a shadow. */
.pv-guest-hero {
  position: relative;
  padding: 150px 22px 26px;
  background:
    linear-gradient(180deg, rgba(13, 33, 64, .10) 0%, rgba(13, 33, 64, .45) 38%, rgba(13, 33, 64, .92) 68%, var(--pv-navy-800) 100%),
    url("../img/banner.jpg") center 22% / cover no-repeat;
}
.pv-guest-hero .pv-display { text-shadow: 0 2px 12px rgba(7, 22, 40, .6); }
.pv-guest-hero .pv-body { text-shadow: 0 1px 8px rgba(7, 22, 40, .7); }
.pv-guest-crest { background: rgba(7, 22, 40, .55); box-shadow: 0 2px 10px rgba(7, 22, 40, .4); }
.pv-guest-body { margin-top: -22px; position: relative; }

@media (min-width: 720px) {
  body {
    background:
      linear-gradient(180deg, rgba(7, 22, 40, .72), rgba(7, 22, 40, .82)),
      url("../img/background.png") center / cover no-repeat fixed;
  }
  /* flex + margin:auto centres the column vertically, and (unlike justify-content) never clips the top when the page is taller than the viewport */
  body { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; padding: 40px 0; }
  .pv-guest {
    width: 100%;
    max-width: 480px;
    margin: auto;
    min-height: 0;
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 22px 60px rgba(7, 22, 40, .45);
  }
  .pv-guest-hero { border-radius: 22px 22px 0 0; }
  .pv-app {
    width: 100%;
    background: var(--pv-surface-1);
    margin: auto;
    min-height: 0;
    border-radius: 22px;
    overflow: clip;
    box-shadow: 0 22px 60px rgba(7, 22, 40, .45);
  }
  .pv-topbar { border-radius: 22px 22px 0 0; }
  .pv-sheet { bottom: 40px; border-radius: var(--pv-r-sheet); }
  .pv-sheet, .pv-toast { max-width: 700px; }
}

/* --- quick actions (account) + labelled back ---------------------------------
   Option A parks navigation behind the "···" chip. On the sub-screens that reads
   as a dead end, so the account screen carries explicit tiles and the back button
   names its destination instead of being a bare chevron. */
.pv-quick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.pv-quick__item {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  min-height: 96px; padding: 14px 8px;
  background: var(--pv-surface-0); border: 1px solid var(--pv-border);
  border-radius: var(--pv-r-lg); box-shadow: var(--pv-shadow-1);
  color: var(--pv-ink-900); text-decoration: none; text-align: center;
}
.pv-quick__item:hover, .pv-quick__item:focus-visible {
  color: var(--pv-ink-900); text-decoration: none;
  border-color: var(--pv-blue-200); background: var(--pv-blue-100);
}
.pv-quick__icon { width: 40px; height: 40px; object-fit: contain; flex: 0 0 auto; }
.pv-quick__label { font-size: var(--pv-fs-label); font-weight: 500; line-height: 1.2; }
.pv-section__label { padding-inline: 2px; }

.pv-screenbar__back {
  width: auto; min-height: var(--pv-tap); padding-inline: var(--pv-sp-2);
  gap: 6px; font-size: var(--pv-fs-label); font-weight: 500;
}
.pv-screenbar__back i { font-size: 16px; }

/* --- rewards / history additions -------------------------------------------- */
/* present to the form and to assistive tech only when it is the real control */
.pv-sr-only {
  position: absolute !important; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
/* not-yet-reached milestone: dimmed, but still selectable — the server stays the authority
   on whether a claim is allowed, exactly as before. */
.pv-milestone.is-dim { background: var(--pv-surface-2); }
.pv-milestone.is-dim .pv-milestone__title { color: var(--pv-ink-700); }
.pv-milestone .pv-badge { flex: 0 0 auto; }
.history-row__content { margin-top: 0; }
.pv-history + .pv-history { margin-top: 0; }
.pv-card > .pv-progress:first-child { margin-top: 0; }

/* --- funnel additions -------------------------------------------------------- */
.pv-topup-block { margin-top: var(--pv-sp-5); }
.pv-topup-block:first-child { margin-top: var(--pv-sp-3); }
.pv-topup-block > .pv-meta + .pv-grid-2,
.pv-topup-block > .pv-section__head + .pv-meta { margin-top: 6px; }
.pv-topup-block .pv-grid-2,
.pv-topup-block .pv-stack { margin-top: var(--pv-sp-3); }
#packages-grid:empty::after, #card-packages-grid:empty::after {
  content: ""; display: block; grid-column: 1 / -1; height: 100px;
  border-radius: var(--pv-r-lg);
  background: linear-gradient(90deg, var(--pv-surface-2) 25%, var(--pv-surface-3) 37%, var(--pv-surface-2) 63%);
  background-size: 400% 100%; animation: pv-shimmer 1.4s ease infinite;
}
.pv-package__head { min-height: 26px; }
.pv-package__price { display: block; }
.pv-package__coins { display: block; }
.pv-method.is-active, .pv-paygrid .pv-row.is-active { border: 2px solid var(--pv-blue-600); background: var(--pv-blue-100); }
.pv-pay-amount { font-size: 25px; font-weight: 700; color: var(--pv-on-dark); margin-top: 4px; letter-spacing: -.01em; }
.pv-pay-coins { font-size: var(--pv-fs-label); color: var(--pv-on-dark-dim); margin-top: 3px; }
.pv-copy__value a { word-break: break-all; }
.pv-upload > span { display: flex; flex-direction: column; align-items: center; gap: 5px; }
.pv-lang__note { margin: 4px 2px 0; }
