/* ============================================================================
   RO-style component library cho /register/, /download/, /register-success/.
   Đồng bộ với .vfro-dlplaque (extra.css) — palette gold + crimson, viền lục giác,
   font Cinzel cho tiêu đề embossed, corner brackets, parchment marble surface.
   ============================================================================ */

/* Cormorant SC = serif Roman small-caps có VIETNAMESE subset đầy đủ
   (Cinzel/Marcellus chỉ có latin/latin-ext, thiếu U+1EA0–U+1EF1 cho ậ ợ ạ ...).
   Cinzel giữ làm fallback cho khối Latin-only (vd "VFRO Account"). */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+SC:wght@500;600;700&family=Cinzel:wght@500;700;900&display=swap');

/* ===== Page banner (scroll header) ===========================================
   Thay cho hero bar generic — dải ngắn có dải vàng hai đầu giả ribbon RO. */
.ro-banner {
  position: relative;
  isolation: isolate;
  margin: -1.5rem -1.2rem 2.4rem;
  padding: 2.8rem 1.5rem 2.4rem;
  text-align: center;
  color: #ffe88a;
  background:
    radial-gradient(ellipse 70% 100% at 50% 100%, rgba(214, 58, 68, 0.42), transparent 70%),
    radial-gradient(ellipse 50% 80% at 50% 0%, rgba(240, 191, 66, 0.22), transparent 60%),
    linear-gradient(180deg, #1a070b 0%, #2a0d12 50%, #4a121c 100%);
  border-bottom: 2px solid rgba(240, 191, 66, 0.35);
  overflow: hidden;
}
.ro-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url('../assets/hero/bg-1.jpg') center/cover no-repeat;
  opacity: 0.14;
  filter: saturate(0.7) hue-rotate(-10deg);
  z-index: 0;
}
.ro-banner::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  bottom: 0;
  height: 3px;
  background: linear-gradient(90deg,
    transparent 0%,
    #5a3a08 8%,
    #f0bf42 22%,
    #ffe88a 50%,
    #f0bf42 78%,
    #5a3a08 92%,
    transparent 100%);
  z-index: 2;
}
.ro-banner > * { position: relative; z-index: 1; }

.ro-banner__crest {
  display: block;
  margin: 0 auto 0.6rem;
  width: 64px;
  height: 36px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.6))
          drop-shadow(0 0 6px rgba(214, 58, 68, 0.45));
}
.ro-banner__eyebrow {
  display: inline-block;
  padding: 0.25rem 1rem;
  margin-bottom: 0.7rem;
  font-family: "Cormorant SC", "Cinzel", "Trajan Pro", "Times New Roman", serif;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: #f0bf42;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.35));
  border: 1px solid rgba(240, 191, 66, 0.4);
  border-left: none;
  border-right: none;
}
.ro-banner__title {
  font-family: "Cormorant SC", "Cinzel", "Trajan Pro", "Times New Roman", serif;
  font-weight: 900;
  font-size: 2.4rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin: 0 0 0.5rem;
  color: #ffe88a;
  background: linear-gradient(180deg, #fff5c2 0%, #f0bf42 50%, #9a6e16 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter:
    drop-shadow(1px 1px 0 #4a2a08)
    drop-shadow(0 2px 0 #2a1604)
    drop-shadow(0 4px 6px rgba(0, 0, 0, 0.6));
}
.ro-banner__lead {
  max-width: 560px;
  margin: 0 auto;
  font-family: "Philosopher", Georgia, serif;
  font-size: 0.95rem;
  font-style: italic;
  color: rgba(255, 232, 138, 0.78);
  letter-spacing: 0.02em;
}

@media (max-width: 540px) {
  .ro-banner__title { font-size: 1.6rem; letter-spacing: 0.1em; }
  .ro-banner { padding: 2rem 1rem 1.8rem; margin: -1rem -0.5rem 2rem; }
}

/* Mobile (<540px): siết padding panel + grid items có thể shrink + scale
   reCAPTCHA xuống 0.85 vì widget Google v2 cố định 304px tràn viewport hẹp */
@media (max-width: 540px) {
  .ro-panel--ornate { padding: 1.4rem 1rem 1.6rem; }
  .ro-form-grid { gap: 1.2rem; }
  .ro-form-grid > * { min-width: 0; }
  .ro-form .g-recaptcha {
    transform: scale(0.85);
    transform-origin: center top;
    margin: 0.5rem 0 0.4rem;
  }
}
@media (max-width: 360px) {
  .ro-form .g-recaptcha {
    transform: scale(0.74);
    margin: 0.3rem 0 -0.6rem;
  }
}

/* ===== RO Panel (scroll/window) ===============================================
   Khung hộp thoại RO: viền vàng lục giác mờ + corner brackets + bề mặt marble đỏ. */
.ro-panel {
  position: relative;
  padding: 1.8rem 1.7rem;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(214, 58, 68, 0.18), transparent 70%),
    repeating-linear-gradient(
      48deg,
      rgba(255, 230, 200, 0.018) 0,
      transparent 2px,
      transparent 14px,
      rgba(0, 0, 0, 0.04) 16px),
    linear-gradient(180deg, #2a1014 0%, #1a0a0d 100%);
  border: 1px solid rgba(240, 191, 66, 0.55);
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.65),
    inset 0 1px 0 rgba(255, 230, 150, 0.12),
    inset 0 -1px 0 rgba(0, 0, 0, 0.5),
    0 10px 30px rgba(0, 0, 0, 0.55),
    0 0 24px rgba(214, 58, 68, 0.18);
}
.ro-panel--ornate {
  /* extra padding cho corner brackets không đè content */
  padding: 2rem 1.9rem 2.1rem;
}

/* Corner brackets — 4 L-shapes vàng ở 4 góc */
.ro-panel__corner {
  position: absolute;
  width: 14px;
  height: 14px;
  pointer-events: none;
  border: 0 solid #f0bf42;
  filter: drop-shadow(0 0 3px rgba(240, 191, 66, 0.5));
}
.ro-panel__corner--tl { top: -1px; left: -1px; border-top-width: 2px; border-left-width: 2px; }
.ro-panel__corner--tr { top: -1px; right: -1px; border-top-width: 2px; border-right-width: 2px; }
.ro-panel__corner--bl { bottom: -1px; left: -1px; border-bottom-width: 2px; border-left-width: 2px; }
.ro-panel__corner--br { bottom: -1px; right: -1px; border-bottom-width: 2px; border-right-width: 2px; }

/* Title bar bên trong panel */
.ro-panel__heading {
  margin: -0.4rem 0 1.4rem;
  padding-bottom: 0.7rem;
  text-align: center;
  font-family: "Cormorant SC", "Cinzel", "Trajan Pro", "Times New Roman", serif;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #f0bf42;
  border-bottom: 1px solid transparent;
  border-image: linear-gradient(90deg,
    transparent 0%,
    rgba(240, 191, 66, 0.5) 20%,
    rgba(240, 191, 66, 0.85) 50%,
    rgba(240, 191, 66, 0.5) 80%,
    transparent 100%) 1;
  position: relative;
}
.ro-panel__heading::before,
.ro-panel__heading::after {
  content: "◆";
  display: inline-block;
  margin: 0 0.65rem;
  font-size: 0.55em;
  vertical-align: middle;
  color: #f0bf42;
  opacity: 0.85;
}

/* ===== Form layout ============================================================ */
.ro-form-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 1.8rem;
  align-items: start;
  margin-bottom: 2.5rem;
}
@media (max-width: 880px) {
  .ro-form-grid { grid-template-columns: 1fr; }
}

/* ===== Form sections ========================================================== */
.ro-form__section + .ro-form__section {
  margin-top: 1.6rem;
  padding-top: 1.4rem;
  border-top: 1px dashed rgba(240, 191, 66, 0.18);
}
.ro-form__legend {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0 0 1rem;
  font-family: "Cormorant SC", "Cinzel", "Trajan Pro", "Times New Roman", serif;
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #f0bf42;
}
.ro-form__legend::before {
  content: "";
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  background:
    radial-gradient(circle at 30% 30%, #ffe88a, #f0bf42 50%, #6b4d10 100%);
  border-radius: 50%;
  box-shadow:
    0 0 0 1px #3a2208,
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    0 0 6px rgba(240, 191, 66, 0.5);
}
.ro-form__legend-aux {
  margin-left: 0.4rem;
  color: rgba(244, 230, 196, 0.7);
  font-family: "Philosopher", Georgia, serif;
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: normal;
  text-transform: none;
  font-style: italic;
}

/* ===== Form fields & inputs (inventory-slot style) ============================ */
.ro-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1.05rem;
}
.ro-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
@media (max-width: 600px) {
  .ro-row { grid-template-columns: 1fr; }
}

.ro-label {
  font-family: "Philosopher", Georgia, serif;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #ffe88a;
}
.ro-label__req { color: #ff6b6b; margin-left: 0.15rem; }

.ro-input,
.ro-select {
  position: relative;
  padding: 0.6rem 0.75rem;
  font-family: "Philosopher", Georgia, serif;
  font-size: 0.92rem;
  color: #f4e6c4;
  background:
    /* brass nail studs ở 4 góc */
    radial-gradient(circle at 5px 5px, #f0bf42 0, #f0bf42 1.5px, transparent 2px),
    radial-gradient(circle at calc(100% - 5px) 5px, #f0bf42 0, #f0bf42 1.5px, transparent 2px),
    radial-gradient(circle at 5px calc(100% - 5px), #f0bf42 0, #f0bf42 1.5px, transparent 2px),
    radial-gradient(circle at calc(100% - 5px) calc(100% - 5px), #f0bf42 0, #f0bf42 1.5px, transparent 2px),
    /* inset depth */
    linear-gradient(180deg, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0.35) 100%);
  border: 1px solid rgba(240, 191, 66, 0.4);
  border-radius: 2px;
  box-shadow:
    inset 0 1px 3px rgba(0, 0, 0, 0.6),
    inset 0 0 0 1px rgba(0, 0, 0, 0.4);
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
.ro-input:focus,
.ro-select:focus {
  outline: none;
  border-color: #f0bf42;
  box-shadow:
    inset 0 1px 3px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(240, 191, 66, 0.6),
    0 0 14px rgba(240, 191, 66, 0.32);
}
.ro-input::placeholder { color: rgba(244, 230, 196, 0.55); font-style: italic; }
.ro-select { appearance: none; cursor: pointer; padding-right: 2rem;
  background-image:
    linear-gradient(45deg, transparent 50%, #f0bf42 50%),
    linear-gradient(135deg, #f0bf42 50%, transparent 50%),
    radial-gradient(circle at 5px 5px, #f0bf42 0, #f0bf42 1.5px, transparent 2px),
    radial-gradient(circle at calc(100% - 5px) 5px, #f0bf42 0, #f0bf42 1.5px, transparent 2px),
    radial-gradient(circle at 5px calc(100% - 5px), #f0bf42 0, #f0bf42 1.5px, transparent 2px),
    radial-gradient(circle at calc(100% - 5px) calc(100% - 5px), #f0bf42 0, #f0bf42 1.5px, transparent 2px),
    linear-gradient(180deg, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0.35) 100%);
  background-position:
    calc(100% - 14px) 50%,
    calc(100% - 8px) 50%,
    5px 5px, calc(100% - 5px) 5px, 5px calc(100% - 5px), calc(100% - 5px) calc(100% - 5px),
    0 0;
  background-size:
    6px 6px, 6px 6px,
    auto, auto, auto, auto,
    100% 100%;
  background-repeat: no-repeat;
}
.ro-select option { background: #1a0a0d; color: #f4e6c4; }

/* ===== Custom checkbox ======================================================== */
.ro-check {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  font-family: "Philosopher", Georgia, serif;
  font-size: 0.88rem;
  color: rgba(244, 230, 196, 0.85);
  cursor: pointer;
  user-select: none;
}
.ro-check input[type="checkbox"] {
  appearance: none;
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin: 0.15rem 0 0;
  background:
    radial-gradient(circle at 3px 3px, #f0bf42 0, #f0bf42 1.2px, transparent 2px),
    radial-gradient(circle at calc(100% - 3px) 3px, #f0bf42 0, #f0bf42 1.2px, transparent 2px),
    radial-gradient(circle at 3px calc(100% - 3px), #f0bf42 0, #f0bf42 1.2px, transparent 2px),
    radial-gradient(circle at calc(100% - 3px) calc(100% - 3px), #f0bf42 0, #f0bf42 1.2px, transparent 2px),
    linear-gradient(180deg, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.4));
  border: 1px solid rgba(240, 191, 66, 0.5);
  border-radius: 2px;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.5);
  cursor: pointer;
  position: relative;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.ro-check input[type="checkbox"]:focus {
  outline: none;
  border-color: #f0bf42;
  box-shadow: 0 0 0 2px rgba(240, 191, 66, 0.35);
}
.ro-check input[type="checkbox"]:checked::after {
  content: "✓";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Cormorant SC", "Cinzel", serif;
  font-size: 14px;
  font-weight: 900;
  color: #ffe88a;
  text-shadow: 0 0 4px rgba(240, 191, 66, 0.7);
}

/* ===== reCAPTCHA box wrap (centered) ========================================== */
.ro-form .g-recaptcha {
  margin: 1rem 0 1.2rem;
  display: flex;
  justify-content: center;
}

/* ===== Submit button — RO seal stamp =========================================
   Hex shape, dark red marble core, gold frame, embossed Cinzel text.
   Đồng bộ với .vfro-dlplaque nhưng phẳng hơn (cho form CTA). */
.ro-submit {
  display: block;
  width: 100%;
  position: relative;
  margin-top: 0.4rem;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  filter: drop-shadow(0 6px 12px rgba(214, 58, 68, 0.3));
  transition: filter 0.18s, transform 0.12s;
}
.ro-submit:hover { filter: drop-shadow(0 10px 20px rgba(245, 197, 66, 0.5)); transform: translateY(-1px); }
.ro-submit:active { transform: translateY(0); }
.ro-submit:disabled { opacity: 0.5; cursor: not-allowed; transform: none; filter: none; }

.ro-submit__plate {
  display: block;
  position: relative;
  height: 58px;
  background: linear-gradient(180deg,
    #ffe88a 0%, #f0bf42 25%, #b88720 55%, #6b4d10 90%, #3a2b08 100%);
  clip-path: polygon(
    0% 50%,
    4% 0%, 96% 0%,
    100% 50%,
    96% 100%, 4% 100%);
}
.ro-submit__plate::before {
  content: "";
  position: absolute;
  inset: 4px;
  background:
    repeating-linear-gradient(48deg,
      rgba(255, 230, 200, 0.05) 0,
      transparent 2px,
      transparent 14px,
      rgba(0, 0, 0, 0.08) 16px),
    radial-gradient(ellipse 80% 90% at 50% 35%, rgba(255, 80, 80, 0.32) 0%, transparent 60%),
    linear-gradient(180deg, #b22228 0%, #6c1018 60%, #3a060c 100%);
  clip-path: polygon(
    0% 50%,
    4% 0%, 96% 0%,
    100% 50%,
    96% 100%, 4% 100%);
}
.ro-submit__plate::after {
  content: "";
  position: absolute;
  inset: 4px;
  background: linear-gradient(180deg,
    rgba(255, 255, 255, 0.18) 0%,
    transparent 18%,
    transparent 82%,
    rgba(0, 0, 0, 0.4) 100%);
  clip-path: polygon(
    0% 50%,
    4% 0%, 96% 0%,
    100% 50%,
    96% 100%, 4% 100%);
  pointer-events: none;
}
.ro-submit__text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  font-family: "Cormorant SC", "Cinzel", "Trajan Pro", serif;
  font-weight: 900;
  font-size: 1.05rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #ffd866;
  background: linear-gradient(180deg, #fff5c2 0%, #f0bf42 45%, #9a6e16 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter:
    drop-shadow(1px 1px 0 #4a2a08)
    drop-shadow(0 2px 0 #2a1604)
    drop-shadow(0 3px 4px rgba(0, 0, 0, 0.5));
  pointer-events: none;
}

/* ===== Tip scroll (sidebar parchment) ======================================== */
.ro-tip-scroll {
  padding: 1.4rem 1.4rem 1.5rem;
  background:
    repeating-linear-gradient(48deg,
      rgba(255, 230, 200, 0.022) 0,
      transparent 2px,
      transparent 14px,
      rgba(0, 0, 0, 0.04) 16px),
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(214, 58, 68, 0.10), transparent 70%),
    linear-gradient(180deg, #1d0a0d 0%, #170709 100%);
  border: 1px solid rgba(240, 191, 66, 0.32);
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 230, 150, 0.08),
    0 6px 18px rgba(0, 0, 0, 0.45);
  position: relative;
}
.ro-tip-scroll h3 {
  margin: 0 0 0.7rem;
  font-family: "Cormorant SC", "Cinzel", "Trajan Pro", "Times New Roman", serif;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #f0bf42;
}
.ro-tip-scroll h3:not(:first-child) {
  margin-top: 1.4rem;
  padding-top: 1.1rem;
  border-top: 1px dashed rgba(240, 191, 66, 0.22);
}
.ro-tip-scroll ul {
  margin: 0;
  padding-left: 1.2rem;
  list-style: none;
  font-family: "Philosopher", Georgia, serif;
}
.ro-tip-scroll li {
  position: relative;
  padding: 0.32rem 0;
  font-size: 0.88rem;
  color: rgba(244, 230, 196, 0.82);
  line-height: 1.55;
}
.ro-tip-scroll li::before {
  content: "◈";
  position: absolute;
  left: -1.2rem;
  top: 0.4rem;
  color: #f0bf42;
  font-size: 0.6rem;
  filter: drop-shadow(0 0 2px rgba(240, 191, 66, 0.6));
}
.ro-tip-scroll a { color: #ffe88a; text-decoration: none; border-bottom: 1px dotted rgba(240, 191, 66, 0.4); }
.ro-tip-scroll a:hover { color: #fff5c2; border-bottom-color: #f0bf42; }
.ro-tip-scroll code {
  padding: 0.05rem 0.35rem;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(240, 191, 66, 0.25);
  border-radius: 2px;
  font-size: 0.82em;
  color: #f0bf42;
}

/* ===== Error banner =========================================================== */
.ro-alert {
  margin: 0 0 1.2rem;
  padding: 0.8rem 1rem;
  font-family: "Philosopher", Georgia, serif;
  font-size: 0.9rem;
  border: 1px solid;
  border-radius: 2px;
  position: relative;
}
.ro-alert--error {
  color: #ffb4a8;
  background: rgba(178, 34, 40, 0.18);
  border-color: rgba(214, 58, 68, 0.5);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.35);
}
.ro-alert--error::before {
  content: "✕";
  display: inline-block;
  margin-right: 0.5rem;
  font-weight: 900;
  color: #d63a44;
}
.ro-alert[hidden] { display: none; }

/* =============================================================================
   DOWNLOAD page components
   ============================================================================= */

.ro-dl-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 1.6rem;
  margin: 0 0 2.3rem;
}
@media (max-width: 880px) {
  .ro-dl-grid { grid-template-columns: 1fr; }
}

/* Primary download card — gold frame + red marble + crest icon ================= */
.ro-treasure {
  display: block;
  position: relative;
  text-decoration: none !important;
  color: #ffe88a !important;
  padding: 0;
  filter: drop-shadow(0 10px 24px rgba(214, 58, 68, 0.32));
  transition: filter 0.18s, transform 0.18s;
}
.ro-treasure:hover { transform: translateY(-3px); filter: drop-shadow(0 16px 32px rgba(245, 197, 66, 0.45)); }

.ro-treasure__plate {
  position: relative;
  padding: 1.8rem 1.7rem;
  background: linear-gradient(180deg,
    #ffe88a 0%, #f0bf42 18%, #b88720 50%, #6b4d10 88%, #3a2b08 100%);
  clip-path: polygon(
    0% 8%, 4% 0%,
    96% 0%, 100% 8%,
    100% 92%, 96% 100%,
    4% 100%, 0% 92%);
}
.ro-treasure__plate::before {
  content: "";
  position: absolute;
  inset: 5px;
  background:
    repeating-linear-gradient(48deg,
      rgba(255, 230, 200, 0.05) 0,
      transparent 2px,
      transparent 14px,
      rgba(0, 0, 0, 0.07) 16px),
    radial-gradient(ellipse 90% 100% at 50% 20%, rgba(255, 80, 80, 0.28) 0%, transparent 65%),
    linear-gradient(180deg, #b22228 0%, #6c1018 60%, #3a060c 100%);
  clip-path: polygon(
    0% 8%, 4% 0%,
    96% 0%, 100% 8%,
    100% 92%, 96% 100%,
    4% 100%, 0% 92%);
  z-index: 0;
}
.ro-treasure__plate::after {
  content: "";
  position: absolute;
  inset: 5px;
  background: linear-gradient(180deg,
    rgba(255, 255, 255, 0.18) 0%,
    transparent 22%,
    transparent 78%,
    rgba(0, 0, 0, 0.4) 100%);
  clip-path: polygon(
    0% 8%, 4% 0%,
    96% 0%, 100% 8%,
    100% 92%, 96% 100%,
    4% 100%, 0% 92%);
  z-index: 1;
  pointer-events: none;
}
.ro-treasure__inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1.2rem;
  align-items: center;
}
.ro-treasure__icon {
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: #ffe88a;
  background:
    radial-gradient(circle at 30% 30%, rgba(255, 232, 138, 0.25), rgba(0, 0, 0, 0.45) 70%);
  border: 1px solid rgba(240, 191, 66, 0.55);
  border-radius: 50%;
  box-shadow:
    inset 0 1px 3px rgba(0, 0, 0, 0.5),
    inset 0 0 0 1px rgba(255, 230, 150, 0.12),
    0 0 12px rgba(240, 191, 66, 0.25);
  filter: drop-shadow(0 0 4px rgba(0, 0, 0, 0.5));
}
.ro-treasure__title {
  font-family: "Cormorant SC", "Cinzel", "Trajan Pro", serif;
  font-weight: 900;
  font-size: 1.45rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 0 0 0.25rem;
  color: #ffe88a;
  background: linear-gradient(180deg, #fff5c2 0%, #f0bf42 50%, #9a6e16 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter:
    drop-shadow(1px 1px 0 #4a2a08)
    drop-shadow(0 2px 0 #2a1604);
}
.ro-treasure__sub {
  font-family: "Philosopher", Georgia, serif;
  font-size: 0.86rem;
  font-style: italic;
  color: rgba(255, 232, 138, 0.78);
  margin: 0;
}
.ro-treasure__cta {
  font-family: "Cormorant SC", "Cinzel", serif;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #ffe88a;
  padding: 0.55rem 1rem;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0.65));
  border: 1px solid rgba(240, 191, 66, 0.55);
  border-radius: 2px;
  white-space: nowrap;
}
.ro-treasure:hover .ro-treasure__cta {
  background: linear-gradient(180deg, rgba(240, 191, 66, 0.18), rgba(240, 191, 66, 0.08));
}

@media (max-width: 600px) {
  .ro-treasure__inner { grid-template-columns: 1fr; gap: 0.8rem; text-align: center; }
  .ro-treasure__icon { margin: 0 auto; }
  .ro-treasure__title { font-size: 1.2rem; }
}

/* Secondary download card — dark RO panel ==================================== */
.ro-treasure--alt {
  display: block;
  position: relative;
  padding: 1.4rem 1.4rem 1.5rem;
  text-decoration: none !important;
  color: #f4e6c4 !important;
  background:
    repeating-linear-gradient(48deg,
      rgba(255, 230, 200, 0.018) 0,
      transparent 2px,
      transparent 14px,
      rgba(0, 0, 0, 0.04) 16px),
    linear-gradient(180deg, #1d0a0d 0%, #150608 100%);
  border: 1px solid rgba(240, 191, 66, 0.35);
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 230, 150, 0.08),
    0 6px 16px rgba(0, 0, 0, 0.4);
  transition: border-color 0.18s, transform 0.18s, box-shadow 0.18s;
}
.ro-treasure--alt:hover {
  transform: translateY(-2px);
  border-color: rgba(240, 191, 66, 0.7);
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 230, 150, 0.12),
    0 10px 22px rgba(0, 0, 0, 0.5),
    0 0 18px rgba(240, 191, 66, 0.18);
}
.ro-treasure--alt .ro-treasure__icon {
  width: 48px;
  height: 48px;
  font-size: 1.5rem;
  margin-bottom: 0.7rem;
}
.ro-treasure--alt .ro-treasure__title {
  font-size: 1.05rem;
  margin: 0 0 0.3rem;
}
.ro-treasure--alt .ro-treasure__sub { font-size: 0.82rem; }

/* ===== Stat tiles (RO status window) ========================================= */
.ro-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.85rem;
  margin: 1.4rem 0 2.4rem;
}
.ro-stat {
  position: relative;
  padding: 1rem 0.9rem 1.1rem;
  text-align: center;
  background:
    linear-gradient(180deg, rgba(40, 18, 22, 0.7) 0%, rgba(20, 10, 12, 0.85) 100%);
  border: 1px solid rgba(240, 191, 66, 0.35);
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.5),
    0 4px 10px rgba(0, 0, 0, 0.35);
}
.ro-stat::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg,
    transparent 0%,
    #f0bf42 50%,
    transparent 100%);
}
.ro-stat__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin: 0 auto 0.5rem;
  font-size: 1.3rem;
  color: #f0bf42;
  background:
    radial-gradient(circle at 30% 30%, rgba(255, 232, 138, 0.18), rgba(0, 0, 0, 0.45) 70%);
  border: 1px solid rgba(240, 191, 66, 0.45);
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.5);
}
.ro-stat__label {
  font-family: "Cormorant SC", "Cinzel", "Trajan Pro", "Times New Roman", serif;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(244, 230, 196, 0.78);
  margin-bottom: 0.3rem;
}
.ro-stat__value {
  font-family: "Philosopher", Georgia, serif;
  font-weight: 700;
  font-size: 0.98rem;
  color: #ffe88a;
  letter-spacing: 0.02em;
}

/* ===== Quest log steps ======================================================= */
.ro-quest-log {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
  counter-reset: ro-quest;
}
.ro-quest-log > li {
  counter-increment: ro-quest;
  position: relative;
  padding: 1rem 1.2rem 1rem 4rem;
  margin-bottom: 0.8rem;
  font-family: "Philosopher", Georgia, serif;
  font-size: 0.92rem;
  line-height: 1.55;
  color: #f4e6c4;
  background:
    repeating-linear-gradient(48deg,
      rgba(255, 230, 200, 0.018) 0,
      transparent 2px,
      transparent 14px,
      rgba(0, 0, 0, 0.04) 16px),
    linear-gradient(180deg, rgba(40, 18, 22, 0.5), rgba(20, 10, 12, 0.7));
  border: 1px solid rgba(240, 191, 66, 0.25);
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.4),
    0 4px 10px rgba(0, 0, 0, 0.3);
  transition: border-color 0.18s, background 0.18s;
}
.ro-quest-log > li:hover {
  border-color: rgba(240, 191, 66, 0.55);
}
.ro-quest-log > li::before {
  content: counter(ro-quest);
  position: absolute;
  left: 0.8rem;
  top: 50%;
  transform: translateY(-50%);
  width: 2.2rem;
  height: 2.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Cormorant SC", "Cinzel", "Trajan Pro", serif;
  font-weight: 900;
  font-size: 1.1rem;
  color: #1a0608;
  background: linear-gradient(180deg, #ffe88a 0%, #f0bf42 30%, #b88720 70%, #6b4d10 100%);
  border: 1px solid #3a2208;
  border-radius: 50%;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.4),
    0 2px 6px rgba(240, 191, 66, 0.35),
    0 0 0 2px rgba(0, 0, 0, 0.5);
}
.ro-quest-log code {
  padding: 0.08rem 0.4rem;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(240, 191, 66, 0.3);
  border-radius: 2px;
  font-size: 0.85em;
  color: #f0bf42;
}
.ro-quest-log a { color: #ffe88a; border-bottom: 1px dotted rgba(240, 191, 66, 0.4); text-decoration: none; }
.ro-quest-log a:hover { color: #fff5c2; border-bottom-color: #f0bf42; }

/* Section heading reuse (Cinzel uppercase, gold rule) ========================= */
.ro-section-heading {
  font-family: "Cormorant SC", "Cinzel", "Trajan Pro", "Times New Roman", serif !important;
  font-weight: 700 !important;
  font-size: 1.05rem !important;
  letter-spacing: 0.16em !important;
  text-transform: uppercase !important;
  color: #f0bf42 !important;
  margin: 2.5rem 0 1.2rem !important;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid;
  border-image: linear-gradient(90deg,
    transparent, rgba(240, 191, 66, 0.65) 30%, rgba(240, 191, 66, 0.65) 70%, transparent) 1;
  text-align: center;
}
.ro-section-heading::before,
.ro-section-heading::after {
  content: "◆";
  display: inline-block;
  margin: 0 0.7rem;
  font-size: 0.55em;
  vertical-align: middle;
  color: #f0bf42;
  opacity: 0.85;
}

/* ============================================================================
   Bold + brighter pass for all uppercase gold labels.
   Cormorant SC max font-weight là 700 (Google Fonts), nên dùng text-shadow
   stack 1px cùng màu để fake heavier strokes — kết hợp brighten gold tone.
   ============================================================================ */
.ro-banner__eyebrow,
.ro-panel__heading,
.ro-form__legend,
.ro-tip-scroll h3,
.ro-section-heading,
.ro-treasure__cta {
  color: #ffd866 !important;
  text-shadow:
    0 0 0.6px currentColor,
    0 0 0.6px currentColor,
    0 1px 2px rgba(0, 0, 0, 0.55);
}
.ro-panel__heading::before,
.ro-panel__heading::after,
.ro-section-heading::before,
.ro-section-heading::after {
  color: #ffd866;
  opacity: 1;
  text-shadow: 0 0 4px rgba(255, 216, 102, 0.5);
}
.ro-form__legend::before {
  /* gem ball gold: brighten gradient stops */
  background:
    radial-gradient(circle at 30% 30%, #fff5c2, #ffd866 50%, #8a5e10 100%);
  box-shadow:
    0 0 0 1px #3a2208,
    inset 0 1px 0 rgba(255, 255, 255, 0.6),
    0 0 8px rgba(255, 216, 102, 0.65);
}

/* Stat tile label: cream → brighter gold-cream cho dễ đọc */
.ro-stat__label {
  color: #ffe88a !important;
  text-shadow:
    0 0 0.6px currentColor,
    0 1px 1px rgba(0, 0, 0, 0.5);
}

/* Banner title cũng bump shadow nhẹ để nét đậm hơn */
.ro-banner__title {
  text-shadow: none;  /* override bất kỳ rule khác */
  filter:
    drop-shadow(1px 1px 0 #4a2a08)
    drop-shadow(0 2px 0 #2a1604)
    drop-shadow(0 4px 6px rgba(0, 0, 0, 0.7))
    drop-shadow(0 0 1px #ffd866);
}

/* ============================================================================
   Register success page — account chip + steps + pill buttons
   ============================================================================ */
.ro-success-panel { padding: 2rem 1.9rem 2.1rem; }

.ro-success-account {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  padding: 1.1rem 1rem 1.3rem;
  margin: 0 0 1.5rem;
  background:
    radial-gradient(ellipse 100% 100% at 50% 0%, rgba(240, 191, 66, 0.12), transparent 70%),
    linear-gradient(180deg, rgba(40, 18, 22, 0.4), rgba(20, 8, 11, 0.55));
  border: 1px solid rgba(240, 191, 66, 0.45);
  border-radius: 4px;
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 230, 150, 0.18);
}
.ro-success-account__label {
  font-family: "Cormorant SC", "Cinzel", "Trajan Pro", serif;
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #ffd866;
}
.ro-success-account__id {
  font-family: "Cinzel", "Trajan Pro", serif;
  font-weight: 900;
  font-size: 1.6rem;
  letter-spacing: 0.06em;
  color: #ffe88a;
  background: linear-gradient(180deg, #fff5c2 0%, #f0bf42 50%, #9a6e16 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter:
    drop-shadow(1px 1px 0 #4a2a08)
    drop-shadow(0 2px 0 #2a1604)
    drop-shadow(0 3px 5px rgba(0, 0, 0, 0.55));
}

.ro-success-steps { display: flex; flex-direction: column; gap: 1rem; }
.ro-success-step {
  display: grid;
  grid-template-columns: 2.4rem 1fr;
  gap: 0.9rem;
  align-items: start;
}
.ro-success-step__num {
  width: 2.4rem;
  height: 2.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Cinzel", "Trajan Pro", serif;
  font-weight: 900;
  font-size: 1.15rem;
  color: #1a0608;
  background: linear-gradient(180deg, #ffe88a 0%, #f0bf42 30%, #b88720 70%, #6b4d10 100%);
  border: 1px solid #3a2208;
  border-radius: 50%;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.4),
    0 2px 6px rgba(240, 191, 66, 0.32),
    0 0 0 2px rgba(0, 0, 0, 0.5);
  flex-shrink: 0;
}
.ro-success-step__body {
  font-family: "Philosopher", Georgia, serif;
  font-size: 0.95rem;
  line-height: 1.55;
  color: #f4e6c4;
  padding-top: 0.15rem;
}
.ro-success-step__body strong { color: #ffe88a; }
.ro-success-step__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.7rem;
}

.ro-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.95rem;
  font-family: "Cormorant SC", "Cinzel", serif;
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none !important;
  color: #ffe88a !important;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0.65));
  border: 1px solid rgba(240, 191, 66, 0.5);
  border-radius: 3px;
  transition: background 0.15s, transform 0.12s, border-color 0.15s;
}
.ro-pill-btn:hover {
  background: linear-gradient(180deg, rgba(240, 191, 66, 0.18), rgba(240, 191, 66, 0.08));
  border-color: #f0bf42;
  transform: translateY(-1px);
}
.ro-pill-btn--primary {
  color: #1a0608 !important;
  background: linear-gradient(180deg, #ffe88a 0%, #f0bf42 50%, #b88720 100%);
  border-color: #b88720;
  box-shadow: 0 2px 8px rgba(240, 191, 66, 0.32);
}
.ro-pill-btn--primary:hover {
  background: linear-gradient(180deg, #fff5c2 0%, #ffd866 50%, #c89522 100%);
  box-shadow: 0 4px 14px rgba(240, 191, 66, 0.5);
}

/* ============================================================================
   Error popup modal — center overlay, ornate gold border
   ============================================================================ */
.ro-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(3px);
  z-index: 9998;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.ro-modal-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.ro-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  z-index: 9999;
  width: min(92vw, 440px);
  padding: 1.8rem 1.6rem 1.6rem;
  background:
    radial-gradient(ellipse 80% 40% at 50% 0%, rgba(214, 58, 68, 0.18), transparent 70%),
    linear-gradient(180deg, #2a1014 0%, #1a0a0d 100%);
  border: 1px solid rgba(255, 216, 102, 0.85);
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.55),
    inset 0 0 0 3px rgba(214, 58, 68, 0.6),
    inset 0 0 0 4px rgba(255, 216, 102, 0.55),
    0 0 24px rgba(214, 58, 68, 0.3),
    0 14px 40px rgba(0, 0, 0, 0.65);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.25s cubic-bezier(0.4, 1.4, 0.6, 1);
  text-align: center;
}
.ro-modal.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}

.ro-modal__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3.2rem;
  height: 3.2rem;
  margin: 0 auto 0.9rem;
  font-family: "Cinzel", serif;
  font-size: 1.8rem;
  font-weight: 900;
  color: #ff6b6b;
  background:
    radial-gradient(circle at 30% 30%, rgba(255, 107, 107, 0.25), rgba(0, 0, 0, 0.5) 70%);
  border: 1px solid rgba(214, 58, 68, 0.7);
  border-radius: 50%;
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.55),
    0 0 14px rgba(214, 58, 68, 0.4);
}
.ro-modal__title {
  font-family: "Cormorant SC", "Cinzel", "Trajan Pro", serif;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #ffd866;
  margin: 0 0 0.7rem;
  text-shadow: 0 0 6px rgba(255, 216, 102, 0.4);
}
.ro-modal__msg {
  font-family: "Philosopher", Georgia, serif;
  font-size: 0.95rem;
  line-height: 1.55;
  color: #f4e6c4;
  margin: 0 0 1.3rem;
}
.ro-modal__actions {
  display: flex;
  justify-content: center;
  gap: 0.6rem;
}
.ro-modal__close {
  padding: 0.55rem 1.4rem;
  font-family: "Cormorant SC", "Cinzel", serif;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #1a0608;
  background: linear-gradient(180deg, #ffe88a 0%, #f0bf42 50%, #b88720 100%);
  border: 1px solid #3a2208;
  border-radius: 2px;
  cursor: pointer;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.4),
    0 2px 8px rgba(240, 191, 66, 0.32);
  transition: transform 0.12s, box-shadow 0.15s;
}
.ro-modal__close:hover {
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    0 4px 14px rgba(240, 191, 66, 0.5);
}

@media (max-width: 600px) {
  .ro-success-step { grid-template-columns: 2rem 1fr; gap: 0.7rem; }
  .ro-success-step__num { width: 2rem; height: 2rem; font-size: 0.95rem; }
  .ro-success-account__id { font-size: 1.3rem; }
}
