:root {
  --bg: #050608;
  --panel: #0a0b0d;
  --panel-soft: #0d0f12;
  --ink: #eee7d9;
  --muted: #bdb4a4;
  --gold: #c9953f;
  --gold-soft: #e2bb6a;
  --line: rgba(202, 153, 70, 0.32);
  --line-soft: rgba(202, 153, 70, 0.16);
  --danger: #ffb2b2;
  font-family: "Crimson Pro", Georgia, serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--bg); }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 50% -12%, rgba(112, 69, 26, .11), transparent 33%),
    linear-gradient(rgba(2, 3, 4, .94), rgba(2, 3, 4, .98)),
    repeating-linear-gradient(0deg, rgba(255,255,255,.008) 0 1px, transparent 1px 4px),
    #050608;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input, textarea { font: inherit; }
[hidden], .hidden { display: none !important; }

/* Full-width frame, fixed editorial content width */
.ref-header,
.ref-footer {
  width: 100%;
  background: rgba(3, 4, 5, .94);
}

.ref-header {
  min-height: 70px;
  border-bottom: 1px solid var(--line-soft);
  box-shadow: 0 12px 40px rgba(0,0,0,.22);
}

.ref-header-inner,
.ref-shell,
.ref-footer-inner,
.ref-copyright,
.ref-login-main,
.ref-login-footer {
  width: min(1180px, calc(100% - 48px));
  margin-inline: auto;
}

.ref-header-inner {
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.ref-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
}

.ref-brand-shield {
  width: 50px;
  height: 58px;
  display: grid;
  place-items: center;
  font: 800 25px/1 "Cinzel", Georgia, serif;
  color: #14100a;
  background: linear-gradient(145deg, #e0b85f, #9c6825);
  clip-path: polygon(50% 0, 90% 15%, 82% 74%, 50% 100%, 18% 74%, 10% 15%);
  filter: drop-shadow(0 5px 10px rgba(0,0,0,.55));
  position: relative;
}

.ref-brand-shield::after {
  content: "";
  position: absolute;
  inset: 7px;
  clip-path: inherit;
  border: 1px solid rgba(18, 12, 6, .56);
}

.ref-brand-copy strong {
  display: block;
  font: 700 20px/1 "Cinzel", Georgia, serif;
  letter-spacing: .055em;
  text-transform: uppercase;
}

.ref-brand-copy small {
  display: block;
  margin-top: 5px;
  color: var(--gold);
  font: 700 9px/1 "Cinzel", Georgia, serif;
  letter-spacing: .27em;
  text-transform: uppercase;
}

.ref-nav {
  display: flex;
  align-items: center;
  gap: clamp(18px, 2.7vw, 34px);
  font: 600 12px/1 "Cinzel", Georgia, serif;
  letter-spacing: .055em;
  text-transform: uppercase;
  white-space: nowrap;
}

.ref-nav a {
  color: #aaa092;
  position: relative;
  padding: 27px 0 25px;
  transition: color .18s ease;
}

.ref-nav a:hover,
.ref-nav a.active {
  color: var(--gold-soft);
}

.ref-nav a.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 16px;
  height: 1px;
  background: var(--gold);
  box-shadow: 0 0 9px rgba(201,149,63,.36);
}

.ref-shell { padding: 0 0 16px; }

/* Hero – matching the supplied concept */
.ref-hero {
  display: grid;
  grid-template-columns: 44% 56%;
  min-height: 382px;
  border-bottom: 1px solid var(--line-soft);
  overflow: hidden;
}

.ref-hero-copy {
  padding: 48px 20px 36px 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  z-index: 2;
}

.ref-hero-copy::before {
  content: "";
  position: absolute;
  left: 0;
  top: 79px;
  width: 2px;
  height: 28px;
  background: linear-gradient(180deg, transparent, var(--gold), transparent);
}

.ref-hero h1 {
  margin: 0;
  font: 700 clamp(34px, 4.35vw, 57px)/1.03 "Cinzel", Georgia, serif;
  letter-spacing: -.035em;
  text-transform: uppercase;
  text-shadow: 0 8px 22px rgba(0,0,0,.62);
}

.ref-hero h1 span { color: var(--gold-soft); }

.ref-gold-divider {
  width: min(360px, 92%);
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 21px 0 18px;
  color: var(--gold);
}

.ref-gold-divider span {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(201,149,63,0), rgba(201,149,63,.9));
}
.ref-gold-divider span:last-child { transform: scaleX(-1); }
.ref-gold-divider b { font-size: 22px; line-height: 1; }

.ref-hero-copy > p {
  max-width: 485px;
  margin: 0;
  color: #d4ccbf;
  font-size: 17px;
  line-height: 1.48;
}

.ref-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 23px;
}

.ref-button {
  min-width: 170px;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border: 1px solid var(--line);
  font: 700 12px/1 "Cinzel", Georgia, serif;
  letter-spacing: .025em;
  text-transform: uppercase;
  transition: transform .16s ease, border-color .16s ease, color .16s ease, background .16s ease;
}

.ref-button:hover { transform: translateY(-2px); }
.ref-button.primary {
  color: #171109;
  background: linear-gradient(180deg, #e0bd70, #bd8736);
  border-color: rgba(238,199,112,.62);
  box-shadow: inset 0 1px rgba(255,255,255,.38), 0 7px 20px rgba(0,0,0,.24);
}
.ref-button.secondary {
  color: #e9e1d4;
  background: rgba(4,5,7,.65);
}
.ref-button.secondary:hover { border-color: rgba(226,187,106,.72); color: var(--gold-soft); }

.ref-hero-art {
  position: relative;
  min-height: 382px;
  overflow: hidden;
}

.ref-hero-art::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(90deg, #050608 0%, rgba(5,6,8,.72) 10%, rgba(5,6,8,.12) 31%, rgba(5,6,8,.04) 70%),
    linear-gradient(180deg, rgba(5,6,8,.06), rgba(5,6,8,.24));
}

.ref-hero-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: brightness(.82) contrast(1.08) saturate(.78);
}

/* Centered chapter marker */
.ref-section-title {
  position: relative;
  padding: 16px 0 13px;
  text-align: center;
}

.ref-title-crown {
  width: 36px;
  height: 24px;
  display: grid;
  place-items: center;
  margin: -28px auto 4px;
  color: var(--gold-soft);
  font-size: 23px;
  background: var(--bg);
  position: relative;
  z-index: 2;
}

.ref-section-title h2 {
  margin: 0;
  font: 700 clamp(24px, 3vw, 35px)/1.1 "Cinzel", Georgia, serif;
  letter-spacing: .065em;
  text-transform: uppercase;
}

.ref-section-title p {
  margin: 5px 0 0;
  color: #c2b9aa;
  font-size: 16px;
}

.ref-section-title p::before,
.ref-section-title p::after {
  content: "—";
  color: var(--gold);
  margin: 0 14px;
}

/* Exact horizontal concept panels */
.ref-features { display: grid; gap: 10px; }

.ref-feature {
  min-height: 151px;
  display: grid;
  grid-template-columns: 114px 35% 1fr;
  overflow: hidden;
  border: 1px solid rgba(195, 150, 75, .34);
  background:
    linear-gradient(180deg, rgba(14,15,17,.98), rgba(7,8,10,.98));
  box-shadow:
    inset 0 1px rgba(255,255,255,.025),
    inset 0 0 34px rgba(0,0,0,.32);
}

.ref-feature-icon {
  width: 74px;
  height: 74px;
  align-self: center;
  justify-self: center;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 2px solid rgba(202, 153, 70, .44);
  box-shadow: inset 0 0 0 5px rgba(5,6,8,.78);
  color: var(--gold-soft);
  font: 600 34px/1 "Cinzel", Georgia, serif;
  background: radial-gradient(circle, rgba(81,52,22,.38), rgba(4,5,7,.95));
}

.ref-feature-copy {
  align-self: center;
  padding: 18px 18px 18px 0;
  position: relative;
  z-index: 2;
}

.ref-feature-copy h3 {
  margin: 0 0 7px;
  font: 700 clamp(23px, 2.35vw, 32px)/1 "Cinzel", Georgia, serif;
  letter-spacing: .015em;
  text-transform: uppercase;
}

.ref-feature-copy p {
  margin: 0;
  color: #d1c9bc;
  font-size: 16px;
  line-height: 1.32;
}

.ref-feature-art {
  min-width: 0;
  position: relative;
  overflow: hidden;
}

.ref-feature-art::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(90deg, rgba(6,7,9,.94) 0%, rgba(6,7,9,.36) 13%, rgba(6,7,9,.02) 42%);
}

.ref-feature-art::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(5,6,8,.03), rgba(5,6,8,.18));
}

.ref-feature-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(.75) contrast(1.08) saturate(.79);
}

.ref-feature-character .ref-feature-art img { object-position: center; }
.ref-feature-dungeon .ref-feature-art img { object-position: center 46%; }
.ref-feature-arena .ref-feature-art img { object-position: center 48%; }
.ref-feature-kingdom .ref-feature-art img { object-position: center 52%; }

/* YouTube disclosure */
.ref-youtube {
  display: grid;
  grid-template-columns: 114px 1fr;
  gap: 0;
  padding: 22px 28px 20px 0;
  border: 1px solid rgba(195, 150, 75, .28);
  background: linear-gradient(180deg, rgba(12,13,15,.98), rgba(7,8,10,.98));
}

.ref-youtube-icon {
  width: 74px;
  height: 74px;
  align-self: start;
  justify-self: center;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 2px solid rgba(202,153,70,.35);
  box-shadow: inset 0 0 0 5px rgba(5,6,8,.72);
  background: #0a0b0d;
}
.ref-youtube-icon img { width: 46px; }

.ref-youtube h3,
.ref-youtube h4 {
  margin: 0 0 6px;
  font-family: "Cinzel", Georgia, serif;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.ref-youtube h3 { font-size: 22px; }
.ref-youtube h4 { font-size: 16px; color: #d9d0c2; }
.ref-youtube p { margin: 0; color: #cfc7bb; font-size: 15px; line-height: 1.35; }
.ref-youtube hr { border: 0; border-top: 1px solid var(--line-soft); margin: 12px 0 9px; }

/* Footer */
.ref-footer {
  margin-top: 14px;
  border-top: 1px solid var(--line-soft);
}

.ref-footer-inner {
  display: grid;
  grid-template-columns: 1fr .9fr 1.1fr;
  gap: 34px;
  padding: 25px 24px 22px;
}

.footer-lockup .ref-brand-shield { width: 52px; height: 60px; }
.footer-lockup .ref-brand-copy strong { font-size: 21px; }

.ref-socials {
  display: flex;
  gap: 10px;
  margin: 18px 0 0 64px;
}

.ref-socials span {
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(202,153,70,.22);
  background: #090a0c;
}
.ref-socials img { width: 18px; max-height: 19px; object-fit: contain; }
.ref-socials span:nth-child(2) img { width: 20px; }
.ref-socials span:nth-child(3) img { width: 17px; }

.ref-footer h3 {
  margin: 0 0 9px;
  color: #ddd3c4;
  font: 600 17px/1.2 "Cinzel", Georgia, serif;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.ref-footer-links { display: grid; align-content: start; gap: 5px; }
.ref-footer-links a { color: #bfb5a5; font-size: 14px; }
.ref-footer-links a:hover { color: var(--gold-soft); }

.ref-footer-cta p {
  max-width: 355px;
  margin: 0 0 12px;
  color: #bfb5a5;
  font-size: 14px;
  line-height: 1.35;
}

.ref-footer-cta .profile-action { min-width: 240px; }

.ref-copyright {
  padding: 13px 24px 18px;
  border-top: 1px solid var(--line-soft);
  color: #928a7e;
  font-size: 13px;
  text-align: center;
}

/* Dedicated login page */
.ref-login-page {
  background:
    linear-gradient(90deg, rgba(4,5,7,.96), rgba(4,5,7,.65) 46%, rgba(4,5,7,.86)),
    url("/assets/landing/hero-castle.webp") center / cover fixed,
    #050608;
}

.ref-login-header { background: rgba(3,4,5,.9); }

.ref-login-main {
  min-height: calc(100vh - 136px);
  display: grid;
  grid-template-columns: minmax(300px, 1fr) minmax(390px, 500px);
  gap: clamp(42px, 7vw, 110px);
  align-items: center;
  padding: 76px 24px 70px;
}

.ref-login-copy { max-width: 610px; }
.ref-login-kicker,
.ref-auth-kicker {
  margin: 0 0 12px;
  color: var(--gold);
  font: 700 11px/1 "Cinzel", Georgia, serif;
  letter-spacing: .2em;
  text-transform: uppercase;
}
.ref-login-copy h1 {
  margin: 0 0 20px;
  font: 700 clamp(42px, 5vw, 72px)/1.02 "Cinzel", Georgia, serif;
  text-transform: uppercase;
}
.ref-login-copy > p:last-child {
  margin: 0;
  color: #d6cdbf;
  font-size: 19px;
  line-height: 1.55;
}

.ref-auth-card {
  position: relative;
  padding: 54px 42px 34px;
  border: 1px solid rgba(202,153,70,.42);
  background: linear-gradient(160deg, rgba(26,27,31,.97), rgba(9,10,13,.98));
  box-shadow: 0 28px 75px rgba(0,0,0,.58), inset 0 1px rgba(255,255,255,.035);
}
.ref-auth-card::before,
.ref-auth-card::after {
  content: "";
  position: absolute;
  width: 26px;
  height: 26px;
  border-color: rgba(226,187,106,.55);
}
.ref-auth-card::before { top: 10px; left: 10px; border-top: 1px solid; border-left: 1px solid; }
.ref-auth-card::after { right: 10px; bottom: 10px; border-right: 1px solid; border-bottom: 1px solid; }

.ref-auth-seal {
  width: 70px;
  height: 70px;
  position: absolute;
  top: -36px;
  left: 50%;
  transform: translateX(-50%);
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--gold-soft);
  color: var(--gold-soft);
  background: radial-gradient(circle, #332314, #110d09 70%);
  box-shadow: 0 8px 24px rgba(0,0,0,.5);
  font: 700 21px/1 "Cinzel", Georgia, serif;
}

.ref-auth-kicker { text-align: center; margin-top: 4px; }
.ref-auth-card h2 {
  margin: 0;
  text-align: center;
  font: 700 27px/1.1 "Cinzel", Georgia, serif;
  text-transform: uppercase;
}
.ref-auth-description {
  margin: 8px 0 25px;
  color: #a9a196;
  text-align: center;
  font-size: 14px;
}
.ref-auth-buttons { display: grid; gap: 11px; }

.ref-platform {
  min-height: 65px;
  display: grid;
  grid-template-columns: 45px 1fr 18px;
  gap: 13px;
  align-items: center;
  padding: 10px 14px;
  border: 1px solid rgba(255,255,255,.11);
  background: rgba(255,255,255,.035);
  transition: transform .17s ease, border-color .17s ease, background .17s ease;
}
.ref-platform:hover { transform: translateY(-2px); background: rgba(255,255,255,.065); }
.ref-platform.twitch:hover { border-color: rgba(145,70,255,.7); }
.ref-platform.youtube:hover { border-color: rgba(255,0,0,.68); }
.ref-platform.kick:hover { border-color: rgba(83,252,24,.62); }

.ref-platform-icon {
  width: 42px;
  height: 40px;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,.06);
}
.ref-platform-icon img { max-width: 28px; max-height: 28px; object-fit: contain; }
.ref-platform.youtube .ref-platform-icon img { max-width: 31px; }
.ref-platform.kick .ref-platform-icon img { max-width: 24px; }
.ref-platform strong { display: block; font-family: Arial, sans-serif; font-size: 14px; }
.ref-platform small { display: block; margin-top: 3px; color: #aaa39a; font-family: Arial, sans-serif; font-size: 11px; }
.ref-arrow { color: #827b72; font-size: 24px; }
.ref-auth-note { margin: 20px 0 0; color: #777168; text-align: center; font-size: 12px; }
.ref-alert {
  margin: 0 0 15px;
  padding: 11px 13px;
  border: 1px solid rgba(239,115,115,.45);
  color: var(--danger);
  background: rgba(110,25,25,.28);
  font-family: Arial, sans-serif;
  font-size: 12px;
}

.ref-login-footer {
  min-height: 66px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 22px;
  border-top: 1px solid var(--line-soft);
  color: #9f978b;
  font-size: 13px;
}
.ref-login-footer a:hover { color: var(--gold-soft); }

/* Tablet */
@media (max-width: 900px) {
  .ref-header-inner { align-items: flex-start; padding: 10px 0; }
  .ref-nav {
    max-width: 58vw;
    overflow-x: auto;
    gap: 18px;
    scrollbar-width: none;
  }
  .ref-nav::-webkit-scrollbar { display: none; }
  .ref-nav a { padding-block: 19px; }

  .ref-hero { grid-template-columns: 1fr; }
  .ref-hero-copy { padding: 48px 18px 34px; }
  .ref-hero-art { min-height: 380px; }
  .ref-hero-art::before { background: linear-gradient(180deg, #050608 0%, rgba(5,6,8,.14) 26%, rgba(5,6,8,.1)); }

  .ref-feature { grid-template-columns: 100px 1fr; }
  .ref-feature-art { grid-column: 1 / -1; min-height: 230px; border-top: 1px solid var(--line-soft); }
  .ref-feature-copy { padding-right: 24px; }

  .ref-footer-inner { grid-template-columns: 1fr 1fr; }
  .ref-footer-cta { grid-column: 1 / -1; }

  .ref-login-main { grid-template-columns: 1fr; max-width: 720px; }
  .ref-login-copy { text-align: center; margin-inline: auto; }
  .ref-auth-card { width: min(500px, 100%); margin-inline: auto; }
}

/* Phone */
@media (max-width: 620px) {
  .ref-header-inner,
  .ref-shell,
  .ref-footer-inner,
  .ref-copyright,
  .ref-login-main,
  .ref-login-footer {
    width: calc(100% - 28px);
  }

  .ref-header-inner { min-height: 78px; align-items: center; }
  .ref-brand-shield { width: 42px; height: 49px; font-size: 21px; }
  .ref-brand-copy strong { font-size: 16px; }
  .ref-brand-copy small { font-size: 7px; }
  .ref-nav { max-width: 47vw; font-size: 10px; }

  .ref-hero h1 { font-size: 36px; }
  .ref-hero-copy > p { font-size: 16px; }
  .ref-hero-actions { display: grid; }
  .ref-button { width: 100%; }
  .ref-hero-art { min-height: 280px; }

  .ref-section-title h2 { font-size: 24px; }
  .ref-section-title p { font-size: 14px; }
  .ref-section-title p::before,
  .ref-section-title p::after { display: none; }

  .ref-feature { grid-template-columns: 1fr; }
  .ref-feature-icon { margin-top: 18px; }
  .ref-feature-copy { padding: 13px 18px 21px; text-align: center; }
  .ref-feature-copy h3 { font-size: 25px; }
  .ref-feature-copy p { font-size: 15px; }
  .ref-feature-art { min-height: 190px; }

  .ref-youtube { grid-template-columns: 1fr; padding: 18px; text-align: center; }
  .ref-youtube-icon { margin: 0 auto 15px; }

  .ref-footer-inner { grid-template-columns: 1fr; padding-inline: 4px; }
  .ref-socials { margin-left: 0; }
  .ref-footer-cta .profile-action { width: 100%; min-width: 0; }

  .ref-login-main { padding-inline: 0; padding-top: 70px; }
  .ref-login-copy h1 { font-size: 37px; }
  .ref-login-copy > p:last-child { font-size: 16px; }
  .ref-auth-card { padding: 50px 20px 28px; }
  .ref-login-footer { padding-block: 16px; }
}

/* Branding verification clarity v6.1 */
.ref-app-name {
  margin: 0 0 8px;
  color: var(--gold-soft);
  font: 700 clamp(18px, 1.9vw, 25px)/1 "Cinzel", Georgia, serif;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.ref-hero .ref-hero-tagline {
  margin: 0;
  font: 700 clamp(34px, 4.35vw, 57px)/1.03 "Cinzel", Georgia, serif;
  letter-spacing: -.035em;
  text-transform: uppercase;
  text-shadow: 0 8px 22px rgba(0,0,0,.62);
}

.ref-hero .ref-hero-tagline span { color: var(--gold-soft); }

.ref-purpose {
  margin: 14px 0 10px;
  display: grid;
  grid-template-columns: minmax(230px, .62fr) minmax(0, 1.38fr);
  gap: 34px;
  padding: 28px 34px;
  border: 1px solid rgba(195, 150, 75, .34);
  background:
    radial-gradient(circle at 0 0, rgba(116, 72, 25, .18), transparent 35%),
    linear-gradient(180deg, rgba(14,15,17,.98), rgba(7,8,10,.98));
  box-shadow: inset 0 1px rgba(255,255,255,.025), inset 0 0 34px rgba(0,0,0,.32);
}

.ref-purpose-heading {
  padding-right: 26px;
  border-right: 1px solid var(--line-soft);
}

.ref-purpose-kicker {
  margin: 0 0 9px;
  color: var(--gold);
  font: 700 11px/1 "Cinzel", Georgia, serif;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.ref-purpose-heading h2 {
  margin: 0;
  font: 700 clamp(26px, 2.8vw, 39px)/1.08 "Cinzel", Georgia, serif;
  text-transform: uppercase;
}

.ref-purpose-copy {
  display: grid;
  gap: 12px;
}

.ref-purpose-copy p {
  margin: 0;
  color: #d8d0c3;
  font-size: 17px;
  line-height: 1.48;
}

.ref-purpose-copy strong { color: var(--gold-soft); }

.ref-purpose-copy .ref-purpose-en {
  padding-top: 12px;
  border-top: 1px solid var(--line-soft);
  color: #bdb4a4;
  font-size: 14px;
  line-height: 1.5;
}

@media (max-width: 760px) {
  .ref-purpose {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 24px 20px;
  }

  .ref-purpose-heading {
    padding-right: 0;
    padding-bottom: 17px;
    border-right: 0;
    border-bottom: 1px solid var(--line-soft);
  }

  .ref-app-name {
    font-size: 16px;
  }
}
