/* Berkah Kemilau microsite. Diturunkan dari "Berkah Kemilau Microsite v3" (Claude Design). */

:root {
  --sky: #2a98dd;
  --sky-light: #4cc0ef;
  --navy: #1c449b;
  --navy-deep: #12307f;
  --navy-card-top: #2449aa;
  --navy-card-bottom: #1a3a94;
  --navy-line: #4b86ea;
  --navy-ink: #0f2a6e;
  --gold: #ffd21f;
  --gold-light: #fff07a;
  --gold-label: #ffe27a;
  --gold-btn-top: #ffe24d;
  --gold-btn-bottom: #ffbf00;
  --gold-shadow: #c96a00;
  --red: #af2228;
  --red-deep: #8c171c;
  --mist: #cfe0ff;
  --mist-soft: #e3ecfd;
  --danger: #ffb3a8;
  --ok: #a9f2c8;
  --warn: #ffd84d;

  --gold-text: linear-gradient(170deg, #fff6b0 0%, #ffd21f 32%, #ffb300 62%, #f47b12 100%);
  --gold-text-outline:
    drop-shadow(2px 0 0 #2a63d6) drop-shadow(-2px 0 0 #2a63d6) drop-shadow(0 2px 0 #2a63d6)
    drop-shadow(0 -2px 0 #2a63d6) drop-shadow(0 5px 0 #1b47b3) drop-shadow(0 4px 0 #12307f)
    drop-shadow(0 14px 18px rgba(8, 24, 70, 0.35));
  --sunburst:
    radial-gradient(ellipse 60% 50% at 50% 38%, rgba(255, 255, 255, 0.45), rgba(255, 255, 255, 0) 70%),
    repeating-conic-gradient(from 0deg at 50% 38%, var(--sky-light) 0deg, var(--sky) 5deg, var(--sky-light) 10deg);
  --card-shadow: 0 7px 0 var(--navy-deep), 0 18px 32px rgba(8, 24, 70, 0.3);
  --kv-mask-x: linear-gradient(90deg, transparent 0, #000 6%, #000 94%, transparent 100%);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--sky);
  color: #fff;
  font-family: 'Nunito', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; }
/* <picture> hanya pembungkus pilihan WebP/PNG; layout tetap diatur lewat <img>. */
picture { display: contents; }
a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-light); }
input::placeholder { color: #8fa6d6; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 6px; }
[hidden] { display: none !important; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ---------- Teks emas bergradasi: satu-satunya "suara keras" halaman ---------- */
.gold-text {
  margin: 0;
  font-weight: 900;
  text-transform: uppercase;
  background: var(--gold-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: var(--gold-text-outline);
}

/* ---------- Tombol ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 58px; padding: 0 34px;
  border: none; border-radius: 999px;
  font-family: inherit; font-size: 18px; font-weight: 900;
  text-transform: uppercase; letter-spacing: 0.02em;
  cursor: pointer;
}
.btn-gold {
  background: linear-gradient(180deg, var(--gold-btn-top) 0%, var(--gold-btn-bottom) 100%);
  color: var(--navy-deep);
  box-shadow: 0 5px 0 var(--gold-shadow), 0 12px 22px rgba(8, 24, 70, 0.3);
}
.btn-gold:hover { background: linear-gradient(180deg, var(--gold-light) 0%, #ffcc1a 100%); color: var(--navy-deep); }
.btn-gold:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--gold-shadow), 0 6px 12px rgba(8, 24, 70, 0.3); }
.btn-navy {
  padding: 0 30px;
  background: var(--navy); color: #fff;
  border: 3px solid var(--navy-line);
  box-shadow: 0 5px 0 var(--navy-deep), 0 12px 22px rgba(8, 24, 70, 0.3);
}
.btn-navy:hover { background: var(--navy-card-top); color: #fff; }
.btn-sm { height: 44px; padding: 0 22px; font-size: 15px; box-shadow: 0 4px 0 var(--gold-shadow); }
.btn-md { height: 50px; font-size: 16px; }
.btn-block { width: 100%; margin-top: 6px; }
.link-btn {
  background: none; border: none; padding: 0;
  font: inherit; font-weight: 900; color: var(--gold); cursor: pointer;
}
.link-btn:hover { color: var(--gold-light); }

/* ---------- Kartu navy ---------- */
.card {
  background: linear-gradient(180deg, var(--navy-card-top) 0%, var(--navy-card-bottom) 100%);
  border: 3px solid var(--navy-line);
  border-radius: 28px;
  box-shadow: var(--card-shadow);
}

/* ---------- Navigasi ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: var(--navy);
  box-shadow: 0 2px 0 var(--navy-deep), 0 8px 24px rgba(8, 24, 70, 0.25);
}
.nav-inner {
  max-width: 1200px; margin: 0 auto;
  padding: 10px 24px; min-height: 76px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px 28px; flex-wrap: wrap;
}
.nav-logo { display: flex; align-items: center; }
.nav-logo img { height: 52px; width: auto; display: block; }
.nav-links { display: flex; align-items: center; gap: 6px 24px; flex-wrap: wrap; font-size: 15px; }
.nav-links a:not(.btn) { color: #fff; font-weight: 800; }
.nav-links a:not(.btn):hover,
.nav-links a[aria-current="page"] { color: var(--gold); }

@media (max-width: 720px) {
  .nav { position: static; }
  .nav-inner { justify-content: center; padding: 10px 16px; }
  .nav-logo img { height: 40px; }
  .nav-links { justify-content: center; gap: 6px 16px; }
}

/* ---------- Bagian ---------- */
.section { padding: clamp(72px, 9vw, 120px) 24px; background: var(--sunburst); }
.section-auth { padding: clamp(40px, 6vw, 88px) 24px clamp(72px, 9vw, 120px); }
.wrap { max-width: 1200px; margin: 0 auto; }
.wrap-1000 { max-width: 1000px; margin: 0 auto; }
.wrap-900 { max-width: 900px; margin: 0 auto; }
.wrap-860 { max-width: 860px; margin: 0 auto; }
.section-title { text-align: center; line-height: 0.95; font-size: clamp(36px, 6vw, 72px); }
.section-title-sm { font-size: clamp(30px, 4.6vw, 56px); }
.lede {
  margin: 20px auto 0; max-width: 620px;
  text-align: center; font-size: clamp(17px, 1.8vw, 20px);
  line-height: 1.5; font-weight: 700; color: var(--navy-ink);
  text-wrap: pretty;
}
@media (max-width: 480px) {
  .section, .section-auth { padding-left: 16px; padding-right: 16px; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background: var(--sunburst);
  padding: clamp(16px, 3vw, 32px) 16px clamp(56px, 7vw, 88px);
}
.hero-inner { max-width: 820px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; }
.kv {
  display: block; width: 100%;
  -webkit-mask-image: var(--kv-mask-x), linear-gradient(180deg, transparent 0, #000 4%, #000 100%);
  -webkit-mask-composite: source-in;
  mask-image: var(--kv-mask-x), linear-gradient(180deg, transparent 0, #000 4%, #000 100%);
  mask-composite: intersect;
}
.kv-small {
  max-width: 400px;
  -webkit-mask-image: var(--kv-mask-x), linear-gradient(180deg, transparent 0, #000 4%, #000 92%, transparent 100%);
  mask-image: var(--kv-mask-x), linear-gradient(180deg, transparent 0, #000 4%, #000 92%, transparent 100%);
}
.hero-plaque {
  position: relative; margin-top: -10px;
  width: min(100%, 640px); padding: 20px 24px 22px; text-align: center;
}
.hero-plaque-lead {
  font-size: clamp(17px, 2.4vw, 26px); font-weight: 800;
  letter-spacing: 0.08em; color: var(--gold); text-transform: uppercase;
}
.hero-plaque-lead strong { font-weight: 900; }
.hero-plaque-alt { margin-top: 4px; font-size: clamp(22px, 3.4vw, 36px); letter-spacing: 0.04em; }
.hero-cta { margin-top: 40px; display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* ---------- Pita periode ---------- */
.ribbon { background: var(--red); box-shadow: inset 0 3px 0 rgba(0, 0, 0, 0.12); }
.ribbon-inner {
  max-width: 1200px; margin: 0 auto; padding: 22px 24px;
  display: flex; justify-content: center; align-items: center;
  gap: 16px 48px; flex-wrap: wrap; text-align: center;
}
.ribbon-label { font-size: 16px; font-weight: 800; }
.ribbon-dates { font-size: clamp(18px, 2vw, 24px); font-weight: 900; }
.countdown { display: flex; gap: 10px; align-items: center; }
.countdown-cell {
  min-width: 66px; padding: 8px 6px; border-radius: 14px;
  background: var(--red-deep);
  display: flex; flex-direction: column; align-items: center;
}
.countdown-num { font-size: 28px; font-weight: 900; line-height: 1.1; font-variant-numeric: tabular-nums; }
.countdown-unit { font-size: 11px; font-weight: 800; letter-spacing: 0.1em; }
@media (max-width: 400px) {
  .countdown { gap: 6px; }
  .countdown-cell { min-width: 58px; }
}

/* ---------- Grid 4 kolom yang turun ke 2 lalu 1 ---------- */
.grid-4 {
  margin-top: 56px;
  display: grid; gap: 28px 20px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
/* Titik pecah dipilih supaya keterangan kartu hadiah (mis. "Untuk 60 pemenang
   @10 juta") selalu muat satu baris. */
@media (max-width: 1119px) { .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 639px) { .grid-4 { grid-template-columns: 1fr; } }

/* ---------- Kartu hadiah ---------- */
.prize { display: flex; flex-direction: column; align-items: center; text-align: center; }
.prize-photo {
  position: relative; z-index: 0;
  width: 100%; aspect-ratio: 16 / 9;
  border-radius: 24px 24px 0 0; overflow: hidden;
}
.prize-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.prize-body {
  position: relative; z-index: 1;
  width: 100%; margin-top: -18px;
  padding: 22px 14px 24px;
  display: flex; flex-direction: column; gap: 6px;
  /* Mengisi sisa tinggi kartu supaya keempat kartu dalam satu baris sama tinggi
     walau judulnya beda jumlah baris. */
  flex: 1; justify-content: center;
}
.prize-title { font-size: clamp(22px, 2.4vw, 28px); line-height: 1.05; }
.prize-desc { font-size: 17px; font-weight: 800; color: var(--gold); line-height: 1.35; }
@media (max-width: 1279px) { .prize-desc { font-size: 15px; } }

/* ---------- Hadiah utama (halaman Hadiah) ---------- */
.grand { margin: 56px auto 0; max-width: 920px; display: flex; flex-direction: column; align-items: center; }
.grand-photo {
  width: 100%; aspect-ratio: 16 / 9;
  border-radius: 28px; overflow: hidden;
  border: 4px solid var(--navy-line); box-shadow: var(--card-shadow);
}
.grand-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.grand-plaque {
  position: relative; margin-top: -28px;
  width: min(92%, 640px); padding: 22px 24px; text-align: center;
}
.grand-title { font-size: clamp(30px, 4.6vw, 52px); line-height: 1; }
.grand-sub { margin-top: 10px; font-size: clamp(16px, 1.8vw, 20px); font-weight: 800; color: var(--gold); }
.grand + .grid-4 { margin-top: 72px; }

/* ---------- Langkah ---------- */
.steps { list-style: none; padding: 0; }
.step {
  position: relative; margin-top: 28px;
  padding: 44px 24px 28px; text-align: center;
  display: flex; flex-direction: column; gap: 10px;
}
.step-num {
  position: absolute; top: -30px; left: 50%; transform: translateX(-50%);
  width: 60px; height: 60px; border-radius: 50%;
  background: linear-gradient(180deg, var(--gold-btn-top), #ffb300);
  border: 3px solid #fff; box-shadow: 0 4px 0 var(--gold-shadow);
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; font-weight: 900; color: var(--navy-deep);
}
.step-title { font-size: 24px; }
.step-desc { margin: 0; font-size: 16px; font-weight: 700; line-height: 1.5; }

/* ---------- Produk peserta ---------- */
.brands-head { margin-top: 96px; }
.brands {
  margin-top: 48px;
  display: grid; gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
}
.brand { padding: 12px 12px 22px; display: flex; flex-direction: column; gap: 16px; text-align: center; }
.brand-photo {
  aspect-ratio: 1 / 1; border-radius: 18px; overflow: hidden; background: #fff;
  display: flex; align-items: center; justify-content: center;
}
.brand-photo img { width: 100%; height: 100%; object-fit: contain; display: block; }
.brand-photo-empty { color: #8fa6d6; font-size: 15px; font-weight: 800; padding: 16px; }
.brand-name { font-size: 21px; font-weight: 900; color: var(--gold); }
.brand-sub { margin-top: -10px; font-size: 15px; font-weight: 700; }

/* ---------- Masuk / Daftar ---------- */
.auth-grid {
  max-width: 1120px; margin: 0 auto;
  display: grid; gap: 32px; align-items: center;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
}
.auth-aside { display: flex; flex-direction: column; align-items: center; gap: 24px; }
.perks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; width: 100%; max-width: 440px; }
.perks li {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 18px; border-radius: 999px;
  background: var(--navy); border: 2px solid var(--navy-line);
  font-size: 15px; font-weight: 800;
}
.perks li::before {
  content: '✓'; flex-shrink: 0;
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--gold); color: var(--navy-deep);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 900;
}
.auth-card { order: -1; justify-self: center; width: 100%; max-width: 520px; padding: clamp(24px, 4vw, 40px); }
.form { display: flex; flex-direction: column; gap: 18px; }
.form-title { font-size: 30px; }
.field { display: flex; flex-direction: column; gap: 8px; font-size: 14px; font-weight: 800; color: var(--gold-label); }
.field input, .field select {
  width: 100%; height: 56px; padding: 0 18px;
  border-radius: 14px; border: 2px solid var(--navy-line);
  background: var(--navy-deep); color: #fff;
  font: inherit; font-size: 16px; font-weight: 600; outline: none;
}
.field select {
  -webkit-appearance: none; appearance: none; padding-right: 44px; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--gold) 50%), linear-gradient(135deg, var(--gold) 50%, transparent 50%);
  background-position: calc(100% - 22px) 50%, calc(100% - 16px) 50%;
  background-size: 6px 6px; background-repeat: no-repeat;
}
.field select:disabled { opacity: 0.55; cursor: not-allowed; }
.field input:focus, .field select:focus { border-color: var(--gold); }
.field-group { margin: 0; padding: 0; border: 0; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.field-group legend { padding: 0; margin-bottom: 4px; font-size: 14px; font-weight: 900; color: var(--gold); }
.field-note { font-size: 13px; font-weight: 700; color: var(--mist); line-height: 1.4; }
.field-row { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; font-weight: 700; line-height: 1.5; cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--gold); flex-shrink: 0; }
.form-error { font-size: 14px; font-weight: 700; color: var(--danger); }
.form-hint { margin: -4px 0 0; font-size: 14px; font-weight: 700; line-height: 1.5; color: var(--mist); }
.form-foot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 14px; font-weight: 700; color: var(--mist); }
.form-foot-center { justify-content: center; }

/* ---------- Akun ---------- */
.account { margin-top: 48px; overflow: hidden; }
.account-head {
  padding: 20px clamp(20px, 4vw, 36px);
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  border-bottom: 2px solid var(--navy-line); background: var(--navy);
}
.who { display: flex; align-items: center; gap: 14px; }
.avatar {
  width: 50px; height: 50px; border-radius: 50%;
  background: linear-gradient(180deg, var(--gold-btn-top), #ffb300);
  border: 3px solid #fff; color: var(--navy-deep);
  display: flex; align-items: center; justify-content: center;
  font-weight: 900; font-size: 20px;
}
.who-name { font-size: 18px; font-weight: 900; }
.who-meta { font-size: 14px; font-weight: 700; color: var(--mist); }
.account-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.tabs { display: inline-flex; padding: 5px; gap: 4px; border-radius: 999px; background: var(--navy-deep); border: 2px solid var(--navy-line); }
.tab {
  border: none; border-radius: 999px; padding: 10px 22px;
  font-family: inherit; font-size: 15px; font-weight: 900; cursor: pointer;
  background: transparent; color: #fff;
}
.tab[aria-selected="true"] { background: var(--gold); color: var(--navy-deep); }
.logout { background: none; border: none; font: inherit; font-size: 14px; font-weight: 800; color: #fff; cursor: pointer; padding: 8px; }
.logout:hover { color: var(--gold); }

.submit-form {
  padding: clamp(36px, 6vw, 64px) clamp(20px, 5vw, 56px);
  display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center;
}
.submit-title { font-size: clamp(26px, 3.4vw, 38px); }
.submit-hint { margin: 0; font-size: 16px; font-weight: 700; max-width: 440px; line-height: 1.5; }
.code-input {
  margin-top: 10px; width: 100%; max-width: 520px; height: 84px;
  border-radius: 20px; border: 3px solid var(--gold);
  background: var(--navy-deep); color: #fff;
  font: inherit; font-size: clamp(26px, 4vw, 36px); font-weight: 900;
  letter-spacing: 0.25em; text-align: center; text-transform: uppercase; outline: none;
}
.submit-form .btn { min-width: 240px; margin-top: 8px; }

.status { padding: clamp(20px, 4vw, 36px); display: flex; flex-direction: column; gap: 24px; }
.stats { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); }
.stat { background: var(--navy-deep); border-radius: 18px; padding: 18px 22px; border: 2px solid var(--navy-line); }
.stat-label { font-size: 14px; font-weight: 800; color: var(--mist); }
.stat-value { margin-top: 6px; font-size: clamp(28px, 3.4vw, 38px); font-weight: 900; color: var(--gold); }
.codes { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.code-row {
  display: flex; justify-content: space-between; align-items: center; gap: 12px 24px; flex-wrap: wrap;
  padding: 16px 20px; border-radius: 18px; background: var(--navy-deep);
}
.code-id { display: flex; flex-direction: column; gap: 2px; flex: 0 0 260px; }
@media (max-width: 720px) { .code-id { flex-basis: 100%; } }
.code-value { font-size: 19px; font-weight: 900; letter-spacing: 0.12em; }
.code-date { font-size: 13px; font-weight: 700; color: var(--mist); }
.code-note { flex: 1 1 220px; font-size: 15px; font-weight: 700; }
.badge { padding: 7px 14px; border-radius: 999px; font-size: 13px; font-weight: 900; }
.badge-valid { background: rgba(140, 230, 175, 0.16); color: var(--ok); }
.badge-pending { background: rgba(255, 198, 26, 0.16); color: var(--warn); }
.badge-invalid, .badge-rejected { background: rgba(255, 140, 125, 0.16); color: var(--danger); }
.badge-photo, .badge-review { background: rgba(111, 210, 247, 0.16); color: #9fdcff; }
.pager { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.pager-btn { height: 44px; padding: 0 20px; font-size: 14px; }
.pager-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.pager-info { font-size: 14px; font-weight: 800; color: var(--mist); }
.empty { padding: 32px 0; text-align: center; font-size: 16px; font-weight: 700; }

/* ---------- Pemenang ---------- */
.instant {
  margin: 48px auto 0; max-width: 620px; padding: 28px 32px;
  display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap;
}
.instant-title { font-size: 20px; font-weight: 900; color: var(--gold); }
.instant-sub { margin-top: 4px; font-size: 15px; font-weight: 700; }

/* ---------- FAQ ---------- */
.faqs { margin-top: 48px; display: flex; flex-direction: column; gap: 14px; }
.faq { border-radius: 22px; box-shadow: 0 5px 0 var(--navy-deep), 0 12px 22px rgba(8, 24, 70, 0.25); }
.faq h3 { margin: 0; }
.faq-q {
  width: 100%; background: none; border: none; color: #fff;
  font: inherit; font-size: 18px; font-weight: 900; text-align: left;
  padding: 20px 24px; display: flex; justify-content: space-between; align-items: center; gap: 20px;
  cursor: pointer;
}
.faq-icon {
  flex-shrink: 0; width: 34px; height: 34px; border-radius: 50%;
  background: var(--gold); color: var(--navy-deep);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 900;
}
.faq-a { padding: 0 24px 22px; font-size: 16px; font-weight: 600; line-height: 1.6; color: var(--mist-soft); }
.faq-a p { margin: 0; }

/* ---------- Footer ---------- */
.footer { background: var(--red); }
.footer-inner { max-width: 1200px; margin: 0 auto; padding: 40px 24px 32px; display: flex; flex-direction: column; gap: 28px; }
.footer-top { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.footer-top img { height: 56px; width: auto; max-width: 100%; object-fit: contain; border-radius: 12px; display: block; }
.footer-links { display: flex; gap: 24px; font-size: 15px; font-weight: 800; flex-wrap: wrap; }
.footer-links a { color: #fff; }
.footer-links a:hover { color: var(--gold); }
.footer-bottom {
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  font-size: 14px; font-weight: 700;
  border-top: 1px solid rgba(255, 255, 255, 0.3); padding-top: 20px;
}
@media (max-width: 480px) {
  .footer-top img { height: 44px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn-gold:active { transform: none; }
}

/* ---------- Halaman error (404 / 500) ---------- */
.error-page {
  min-height: calc(100vh - 76px);
  padding: clamp(56px, 8vw, 104px) 24px;
  background: var(--sunburst);
  display: flex; align-items: center; justify-content: center;
}
.error-inner { max-width: 720px; width: 100%; display: flex; flex-direction: column; align-items: center; text-align: center; }
.error-code { font-size: clamp(132px, 26vw, 280px); line-height: 0.85; letter-spacing: -0.02em; text-transform: none; }
.error-card { margin-top: clamp(20px, 3vw, 32px); width: 100%; max-width: 600px; padding: clamp(26px, 4vw, 40px); }
.error-title { font-size: clamp(26px, 4vw, 40px); line-height: 1.05; }
.error-msg { margin: 14px auto 0; max-width: 460px; font-size: 17px; font-weight: 700; line-height: 1.55; color: var(--mist-soft); text-wrap: pretty; }
.error-actions { margin-top: 28px; display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.error-actions .btn { height: 56px; font-size: 17px; }
.btn-ghost {
  padding: 0 28px; background: var(--navy-deep); color: #fff;
  border: 3px solid var(--navy-line); box-shadow: 0 5px 0 #0a1f5c;
}
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); }
.error-help { margin-top: 28px; font-size: 15px; font-weight: 800; color: var(--navy-ink); }

/* ---------- Popup ---------- */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(10, 28, 80, 0.62);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  padding: 24px; overflow-y: auto;
}
.modal {
  position: relative; width: 100%; max-width: 460px; margin-top: 48px;
  padding: 68px clamp(22px, 5vw, 36px) 32px; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  animation: modal-in 220ms cubic-bezier(.2, .9, .3, 1.2);
}
@keyframes modal-in { from { opacity: 0; transform: translateY(16px) scale(.96); } }
.modal-icon {
  position: absolute; top: -48px; left: 50%; transform: translateX(-50%);
  width: 96px; height: 96px; border-radius: 50%; border: 5px solid #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 44px; font-weight: 900; line-height: 1;
}
.modal-close {
  position: absolute; top: 14px; right: 14px; width: 40px; height: 40px; border-radius: 50%;
  border: 2px solid var(--navy-line); background: var(--navy-deep); color: #fff;
  font: inherit; font-size: 20px; font-weight: 900; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.modal-close:hover { border-color: var(--gold); color: var(--gold); }
.modal-eyebrow { font-size: 13px; font-weight: 900; letter-spacing: 0.18em; text-transform: uppercase; }
.modal-title { font-size: clamp(26px, 4.4vw, 34px); line-height: 1.05; }
.modal-code {
  padding: 10px 20px; border-radius: 14px; background: var(--navy-deep);
  border: 2px dashed var(--gold); font-size: 22px; font-weight: 900; letter-spacing: 0.2em;
}
.modal-msg { margin: 0; font-size: 16px; font-weight: 700; line-height: 1.55; color: var(--mist-soft); text-wrap: pretty; }
.modal-actions { margin-top: 12px; width: 100%; display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.modal-actions .btn { height: 56px; font-size: 17px; flex: 1 1 150px; }
.pw-form { width: 100%; text-align: left; gap: 14px; }
.pw-form .modal-actions { margin-top: 4px; }
.btn-red { background: linear-gradient(180deg, #ef4a50, var(--red)); color: #fff; box-shadow: 0 5px 0 #7a1418, 0 12px 22px rgba(8, 24, 70, 0.3); }
.btn-red:hover { background: linear-gradient(180deg, #f2666b, #c0282e); color: #fff; }

.modal[data-tone="success"] .modal-icon { background: linear-gradient(180deg, var(--gold-btn-top), #ffb300); color: var(--navy-deep); box-shadow: 0 6px 0 var(--gold-shadow), 0 14px 24px rgba(8, 24, 70, 0.35); }
.modal[data-tone="success"] .modal-eyebrow { color: var(--gold); }
.modal[data-tone="error"] .modal-icon { background: linear-gradient(180deg, #ef4a50, var(--red)); color: #fff; box-shadow: 0 6px 0 #7a1418, 0 14px 24px rgba(8, 24, 70, 0.35); }
.modal[data-tone="error"] .modal-eyebrow { color: var(--danger); }
.modal[data-tone="warning"] .modal-icon { background: linear-gradient(180deg, #ffb347, #f47b12); color: #fff; box-shadow: 0 6px 0 #a84f00, 0 14px 24px rgba(8, 24, 70, 0.35); }
.modal[data-tone="warning"] .modal-eyebrow { color: #ffc27a; }
.modal[data-tone="info"] .modal-icon { background: linear-gradient(180deg, #6fd2f7, var(--sky)); color: #fff; box-shadow: 0 6px 0 #1a5cc0, 0 14px 24px rgba(8, 24, 70, 0.35); }
.modal[data-tone="info"] .modal-eyebrow { color: #9fdcff; }
body.modal-open { overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
  .modal { animation: none; }
}
