/* ==========================================================================
   Retro Clash ID: hosted pages. Tokens and components follow the Retro
   Clash landing site (retroclash.net). Mobile first: 360px is the baseline.
   ========================================================================== */

:root {
  --bg: #0c1430;
  --bg-deep: #080e24;
  --panel: #141f45;
  --panel-2: #1b2a59;
  --line: rgba(160, 180, 255, 0.12);

  --ink: #f6f2e7;
  --ink-2: #b4bdd8;
  --ink-3: #7f89aa;
  --outline: #070b1c;

  --gold: #ffc72c;
  --gold-top: #ffdb5c;
  --gold-bot: #f5a91b;
  --green-top: #8ee05a;
  --green-bot: #52b22e;
  --blue: #3f8cff;
  --blue-top: #6aaeff;
  --blue-bot: #2f72e6;
  --red: #f0473c;
  --red-top: #ff7a6e;
  --live: #7ee04f;

  --font-display: "Lilita One", "Arial Rounded MT Bold", system-ui, sans-serif;
  --font-pixel: "Silkscreen", ui-monospace, monospace;
  --font-body: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; background: var(--bg-deep); }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  color: var(--ink);
  font: 500 16px/1.55 var(--font-body);
  -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(720px 420px at 50% -120px, rgba(63, 140, 255, 0.28), transparent 70%),
    repeating-linear-gradient(26.565deg, transparent 0 39px, rgba(255, 255, 255, 0.025) 39px 40px),
    repeating-linear-gradient(-26.565deg, transparent 0 39px, rgba(255, 255, 255, 0.025) 39px 40px),
    var(--bg);
  background-attachment: fixed;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
b, strong { font-weight: 900; color: #fff; }

:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 10px; }

.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;
}

/* ---------- Type ---------- */
.stroke {
  color: #fff;
  -webkit-text-stroke: var(--sw, 5px) var(--outline);
  paint-order: stroke fill;
  text-shadow: 0 var(--sh, 3px) 0 var(--outline);
}
.gold { color: var(--gold); }

.title {
  --sw: 5px; --sh: 3px;
  font: 400 34px/1.05 var(--font-display);
  letter-spacing: 0.005em;
  overflow-wrap: anywhere;
}

.eyebrow {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 10px;
  font: 400 13px/1.2 var(--font-display);
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--gold);
}
.eyebrow--center { justify-content: center; }
.eyebrow__icon { width: 20px; height: auto; flex: none; }

.sub { margin-top: 10px; color: var(--ink-2); font-size: 16px; }

/* ---------- Header / brand ---------- */
.top {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  width: min(460px, 100% - 32px);
  margin: 0 auto;
  padding: 16px 0 14px;
}
.top--wide { width: min(680px, 100% - 32px); }

.brand { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; min-width: 0; }
.brand__mark { width: 30px; flex: none; filter: drop-shadow(0 3px 0 rgba(0, 0, 0, 0.35)); image-rendering: pixelated; }
.brand__word {
  font: 700 18px/1 var(--font-pixel); text-transform: uppercase; white-space: nowrap;
  color: var(--gold);
  text-shadow: 2px 2px 0 #b4580a;
}
.brand__retro { font-weight: 400; color: #8fb4ff; text-shadow: none; }
.brand__id {
  padding: 4px 6px 3px;
  font: 700 12px/1 var(--font-pixel); letter-spacing: 0.06em;
  color: var(--outline);
  background: var(--gold);
  border: 2px solid var(--outline); border-radius: 7px;
  box-shadow: 0 2px 0 var(--outline);
}

.me { text-decoration: none; flex: none; border-radius: 12px; }

/* ---------- Main + cards ---------- */
.main {
  flex: 1;
  width: min(460px, 100% - 24px);
  margin: 0 auto;
  padding: 0 0 28px;
}
.main--wide { width: min(680px, 100% - 24px); }

.card,
.panel {
  position: relative;
  background: linear-gradient(180deg, var(--panel-2), var(--panel) 260px);
  border: 3px solid var(--outline);
  border-radius: 24px;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.07), 0 8px 0 var(--outline);
}
.card { padding: 24px 18px 22px; }
.card--center { text-align: center; }
.card--center .sub { margin-inline: auto; max-width: 34ch; }
.card > .btn--block,
.card--center .btn { margin-top: 22px; }

.panel { padding: 20px 16px 18px; }
.panel + .panel,
.panel + .signout { margin-top: 22px; }

@media (min-width: 520px) {
  .top { padding: 28px 0 22px; }
  .brand__word { font-size: 20px; }
  .brand__mark { width: 34px; }
  .card { padding: 34px 34px 30px; }
  .panel { padding: 24px 26px 24px; }
  .title { font-size: 40px; }
}

.hero-icon { width: 60px; margin: 2px auto 16px; image-rendering: pixelated; filter: drop-shadow(0 5px 0 rgba(0, 0, 0, 0.35)); }

/* ---------- Flash messages ---------- */
.flash {
  display: flex; align-items: flex-start; gap: 12px;
  margin-top: 18px; padding: 12px 14px;
  font-size: 15px; font-weight: 700; line-height: 1.45;
  border: 2px solid var(--outline); border-radius: 14px;
  text-align: left;
}
.flash p { padding-top: 2px; }
.flash__icon {
  flex: none; display: grid; place-items: center;
  width: 26px; height: 26px;
  font: 400 16px/1 var(--font-display);
  color: var(--outline);
  border: 2px solid var(--outline); border-radius: 8px;
  box-shadow: 0 2px 0 var(--outline);
}
.flash--error { background: rgba(240, 71, 60, 0.16); color: #ffd9d5; }
.flash--error .flash__icon { background: var(--red-top); }
.flash--ok { background: rgba(126, 224, 79, 0.14); color: #dcf7cd; }
.flash--ok .flash__icon { background: var(--live); }

/* ---------- Forms ---------- */
.form { display: grid; gap: 16px; margin-top: 22px; }
.form--tight { gap: 12px; }

.field { display: grid; gap: 7px; }
.field__label { font-size: 14px; font-weight: 800; color: var(--ink-2); }
.field__hint { font-size: 13px; font-weight: 700; color: var(--ink-3); }
.field__link { justify-self: end; font-size: 14px; font-weight: 800; color: var(--gold); text-decoration: none; }
.field__link:hover { text-decoration: underline; }

input[type="email"],
input[type="text"],
input[type="password"] {
  width: 100%;
  min-height: 52px;
  padding: 0 14px;
  font: 700 17px/1.2 var(--font-body);
  color: #fff;
  background: rgba(7, 11, 28, 0.55);
  border: 3px solid var(--outline);
  border-radius: 14px;
  box-shadow: inset 0 3px 0 rgba(0, 0, 0, 0.3);
  transition: border-color 0.15s, box-shadow 0.15s;
  -webkit-appearance: none;
  appearance: none;
}
input::placeholder { color: var(--ink-3); }
input:focus { outline: none; border-color: var(--gold); box-shadow: inset 0 3px 0 rgba(0, 0, 0, 0.3), 0 0 0 3px rgba(255, 199, 44, 0.22); }
input:-webkit-autofill,
input:-webkit-autofill:focus {
  -webkit-text-fill-color: #fff;
  -webkit-box-shadow: 0 0 0 40px #101a3d inset;
  caret-color: #fff;
}

.pw { position: relative; }
.pw input { padding-right: 76px; }
.pw__toggle {
  position: absolute; right: 8px; top: 50%; translate: 0 -50%;
  min-width: 58px; height: 34px; padding: 0 10px;
  font: 800 13px/1 var(--font-body); color: var(--ink-2);
  background: rgba(255, 255, 255, 0.06);
  border: 2px solid rgba(255, 255, 255, 0.08); border-radius: 9px;
  cursor: pointer;
}
.pw__toggle:hover { color: #fff; background: rgba(255, 255, 255, 0.1); }
.pw__toggle[hidden] { display: none; }

.fine { font-size: 13px; font-weight: 700; color: var(--ink-3); text-align: center; }
.fine a { color: var(--ink-2); }

.alt { margin-top: 20px; text-align: center; font-weight: 700; color: var(--ink-2); }
.alt a { color: var(--gold); font-weight: 900; text-decoration: none; }
.alt a:hover { text-decoration: underline; }

/* ---------- Buttons ---------- */
.btn {
  --top: var(--gold-top);
  --bot: var(--gold-bot);
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 54px; padding: 0 22px;
  font: 400 19px/1 var(--font-display); letter-spacing: 0.02em;
  color: #fff; text-decoration: none; white-space: nowrap;
  -webkit-text-stroke: 3px var(--outline); paint-order: stroke fill;
  border: 3px solid var(--outline); border-radius: 14px;
  background: linear-gradient(var(--top) 0 52%, var(--bot) 52% 100%);
  box-shadow:
    inset 0 3px 0 rgba(255, 255, 255, 0.45),
    inset 0 -4px 0 rgba(0, 0, 0, 0.14),
    0 5px 0 var(--outline);
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { transform: translateY(-2px); filter: brightness(1.06); box-shadow: inset 0 3px 0 rgba(255,255,255,.45), inset 0 -4px 0 rgba(0,0,0,.14), 0 7px 0 var(--outline); }
.btn:active { transform: translateY(4px); box-shadow: inset 0 3px 0 rgba(255,255,255,.45), inset 0 -4px 0 rgba(0,0,0,.14), 0 1px 0 var(--outline); }
.btn--block { display: flex; width: 100%; }
.btn--green { --top: var(--green-top); --bot: var(--green-bot); }
.btn--blue  { --top: var(--blue-top);  --bot: var(--blue-bot); }
.btn--red   { --top: var(--red-top);   --bot: var(--red); }
.btn--ghost {
  --top: #2b3b78; --bot: #23316a;
  color: var(--ink);
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, 0.12), inset 0 -4px 0 rgba(0, 0, 0, 0.14), 0 5px 0 var(--outline);
}
.btn--ghost:hover { box-shadow: inset 0 3px 0 rgba(255,255,255,.12), inset 0 -4px 0 rgba(0,0,0,.14), 0 7px 0 var(--outline); }
.btn--ghost:active { box-shadow: inset 0 3px 0 rgba(255,255,255,.12), inset 0 -4px 0 rgba(0,0,0,.14), 0 1px 0 var(--outline); }
.btn--sm { min-height: 42px; padding: 0 14px; font-size: 16px; border-radius: 12px; }
.btn[disabled], .is-busy .btn { filter: saturate(0.6) brightness(0.9); cursor: progress; }

.linkbtn {
  padding: 8px 6px; margin: 0;
  font: 800 15px/1.3 var(--font-body); color: var(--ink-2);
  background: none; border: 0; border-radius: 8px;
  text-decoration: underline; text-decoration-color: rgba(180, 189, 216, 0.4); text-underline-offset: 3px;
  cursor: pointer;
}
.linkbtn:hover { color: #fff; text-decoration-color: currentColor; }

/* ---------- Google / Apple (their branding rules: logo untouched,
   "Continue with ...", light button, Roboto for Google, system font for
   Apple) ---------- */
.providers { display: grid; gap: 12px; margin-top: 22px; }
.providers--row { margin-top: 10px; }
@media (min-width: 560px) { .providers--row { grid-template-columns: 1fr 1fr; } }

.gbtn,
.abtn {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  min-height: 52px; padding: 0 18px;
  text-decoration: none; white-space: nowrap;
  border-radius: 14px;
  box-shadow: 0 4px 0 var(--outline);
  transition: transform 0.12s ease, box-shadow 0.12s ease, background-color 0.12s;
  -webkit-tap-highlight-color: transparent;
}
.gbtn:hover, .abtn:hover { transform: translateY(-1px); box-shadow: 0 5px 0 var(--outline); }
.gbtn:active, .abtn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--outline); }

.gbtn {
  font: 500 16px/1 "Roboto", system-ui, sans-serif; letter-spacing: 0.01em;
  color: #1f1f1f;
  background: #ffffff;
  border: 1px solid #747775;
}
.gbtn:hover { background-color: #f7f8f8; }
.gbtn__logo { width: 20px; height: 20px; flex: none; }

.abtn {
  font: 500 17px/1 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  color: #000000;
  background: #ffffff;
  border: 1px solid #ffffff;
}
.abtn:hover { background-color: #f5f5f7; }
.abtn__logo { width: 18px; height: 20px; flex: none; margin-top: -3px; }

.or {
  display: flex; align-items: center; gap: 12px;
  margin: 22px 0 0;
  font: 400 12px/1 var(--font-pixel); letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-3);
}
.or::before,
.or::after { content: ""; flex: 1; height: 2px; background: var(--line); border-radius: 2px; }
.or + .form { margin-top: 18px; }

/* ---------- Consent ---------- */
.consent__art { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 4px 0 20px; }
.consent__arrow {
  width: 34px; height: 4px; border-radius: 4px;
  background: repeating-linear-gradient(90deg, var(--ink-3) 0 6px, transparent 6px 11px);
}
.game-tile {
  display: grid; place-items: center;
  width: 66px; height: 66px;
  background: linear-gradient(180deg, #24366f, #1a2856);
  border: 3px solid var(--outline); border-radius: 18px;
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, 0.1), 0 4px 0 var(--outline);
}
.game-tile img { width: 40px; image-rendering: pixelated; }
.as {
  margin-top: 12px;
  font-size: 18px; font-weight: 700; color: var(--ink-2);
}
.as b { font-size: 20px; overflow-wrap: anywhere; }
.as__email { display: block; margin-top: 2px; font-size: 14px; color: var(--ink-3); overflow-wrap: anywhere; }
.consent .sub { font-size: 14px; color: var(--ink-3); }
.consent .form { margin-top: 22px; }
.switch { margin-top: 14px; }

/* ---------- Avatar ---------- */
.avatar {
  display: grid; place-items: center; flex: none;
  width: 42px; height: 42px;
  font: 400 22px/1 var(--font-display);
  color: #fff; -webkit-text-stroke: 3px var(--outline); paint-order: stroke fill;
  background: linear-gradient(var(--gold-top) 0 52%, var(--gold-bot) 52%);
  border: 3px solid var(--outline); border-radius: 13px;
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, 0.45), 0 3px 0 var(--outline);
  text-transform: uppercase;
}
.avatar--sm { width: 40px; height: 40px; font-size: 20px; border-radius: 12px; }
.avatar--lg { width: 66px; height: 66px; font-size: 34px; border-radius: 18px; -webkit-text-stroke-width: 5px; box-shadow: inset 0 4px 0 rgba(255, 255, 255, 0.45), 0 4px 0 var(--outline); }

/* ---------- Dashboard ---------- */
.profile__head { display: flex; align-items: center; gap: 14px; min-width: 0; }
.profile__id { min-width: 0; }
.profile__id .eyebrow { margin-bottom: 4px; }
.profile__name { --sw: 5px; --sh: 3px; font: 400 30px/1.05 var(--font-display); overflow-wrap: anywhere; }
.profile__email { margin-top: 4px; font-size: 14px; font-weight: 700; color: var(--ink-3); overflow-wrap: anywhere; }
@media (min-width: 520px) { .profile__name { font-size: 36px; } }

.banner {
  display: grid; grid-template-columns: auto 1fr; gap: 12px 14px; align-items: center;
  margin-top: 18px; padding: 14px;
  background: rgba(63, 140, 255, 0.12);
  border: 2px solid rgba(106, 174, 255, 0.35); border-radius: 16px;
  font-size: 14px; color: var(--ink-2);
}
.banner__icon { width: 42px; image-rendering: pixelated; }
.banner__title { font-weight: 900; color: #fff; font-size: 16px; }
.banner form { grid-column: 1 / -1; }
.banner .btn { width: 100%; }
@media (min-width: 520px) {
  .banner { grid-template-columns: auto 1fr auto; }
  .banner form { grid-column: auto; }
  .banner .btn { width: auto; }
}

.panel__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.panel__title {
  display: flex; align-items: center; gap: 10px;
  font: 400 24px/1.1 var(--font-display); letter-spacing: 0.01em;
}
.panel__title img { width: 26px; image-rendering: pixelated; }
.panel__sub { margin-top: 6px; font-size: 14px; color: var(--ink-3); font-weight: 700; }
.panel__note {
  margin-top: 12px; padding: 10px 12px;
  font-size: 13px; font-weight: 800; color: #ffe7a6;
  background: rgba(255, 199, 44, 0.1); border: 2px dashed rgba(255, 199, 44, 0.35); border-radius: 12px;
}
.panel__label {
  margin-top: 20px;
  font: 400 13px/1 var(--font-display); letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ink-3);
}

.count {
  flex: none;
  padding: 6px 10px 5px;
  font: 700 14px/1 var(--font-pixel);
  color: var(--outline); background: var(--gold);
  border: 2px solid var(--outline); border-radius: 999px;
  box-shadow: 0 3px 0 var(--outline);
}
.count span { opacity: 0.6; }

.rows { display: grid; gap: 10px; margin: 16px 0 0; padding: 0; list-style: none; }
.row {
  display: flex; align-items: center; gap: 12px;
  min-width: 0;
  padding: 12px;
  background: rgba(7, 11, 28, 0.38);
  border: 2px solid rgba(255, 255, 255, 0.06); border-radius: 16px;
}
.row > form { margin-left: auto; flex: none; }
.row__icon { flex: none; display: grid; place-items: center; width: 34px; }
.row__icon img { width: 30px; image-rendering: pixelated; }
.row__icon--brand {
  width: 36px; height: 36px;
  background: #fff; border: 2px solid var(--outline); border-radius: 10px;
}
.row__icon--brand svg { width: 20px; height: 20px; }
.row__icon--apple { color: #000; }
.row__icon--email { background: none; border: 0; }
.row__main { display: grid; min-width: 0; flex: 1; }
.row__title { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; font-size: 16px; font-weight: 900; color: #fff; line-height: 1.3; overflow-wrap: anywhere; }
.row__meta { font-size: 13px; font-weight: 700; color: var(--ink-3); line-height: 1.4; }
.row__meta--break { overflow-wrap: anywhere; }
.row__title .row__tag { margin-left: auto; }
.row__tag {
  flex: none;
  font: 400 12px/1 var(--font-pixel); color: var(--ink-2);
  padding: 5px 7px 4px;
  background: rgba(255, 255, 255, 0.05); border-radius: 8px;
}
/* Narrow screens: the action drops below the text instead of squeezing it. */
@media (max-width: 440px) {
  .row { flex-wrap: wrap; row-gap: 10px; }
  .row__main { flex: 1 1 170px; }
  .row > form { margin-left: 46px; }
}

.tag {
  display: inline-flex; align-items: center;
  padding: 5px 9px 4px;
  font: 400 11px/1 var(--font-display); letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--outline); background: #fff;
  border: 2px solid var(--outline); border-radius: 999px;
  box-shadow: 0 2px 0 var(--outline);
  white-space: nowrap;
}
.tag--live { background: var(--live); }
.tag--soon { background: var(--gold); }
.tag--xs { padding: 3px 7px 2px; font-size: 10px; }

.empty {
  margin-top: 14px; padding: 16px;
  font-size: 14px; font-weight: 700; color: var(--ink-3); text-align: center;
  border: 2px dashed rgba(160, 180, 255, 0.2); border-radius: 16px;
}
.empty b { color: var(--ink-2); }

.disclosure { margin-top: 18px; border-top: 2px solid var(--line); padding-top: 14px; }
.disclosure > summary {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  cursor: pointer; list-style: none;
  font-weight: 900; color: #fff;
  border-radius: 10px;
}
.disclosure > summary::-webkit-details-marker { display: none; }
.disclosure > summary::after {
  content: "+";
  display: grid; place-items: center; flex: none;
  width: 30px; height: 30px;
  font: 400 22px/1 var(--font-display); color: #fff;
  -webkit-text-stroke: 3px var(--outline); paint-order: stroke fill;
  background: linear-gradient(var(--gold-top) 0 52%, var(--gold-bot) 52%);
  border: 2px solid var(--outline); border-radius: 9px;
  box-shadow: 0 3px 0 var(--outline);
  transition: rotate 0.2s ease;
}
.disclosure[open] > summary::after { rotate: 45deg; }
.disclosure .form { margin-top: 16px; }

.inline-form { display: flex; gap: 10px; margin-top: 14px; }
.inline-form input { flex: 1; min-width: 0; min-height: 46px; }
.inline-form .btn { flex: none; min-height: 46px; }

.signout { margin-top: 26px; }

/* ---------- Dev mailbox ---------- */
.mail { margin-top: 16px; background: rgba(7, 11, 28, 0.38); border: 2px solid rgba(255, 255, 255, 0.06); border-radius: 16px; overflow: hidden; }
.mail__head { padding: 12px 14px; border-bottom: 2px solid rgba(255, 255, 255, 0.06); }
.mail__subject { font-weight: 900; color: #fff; }
.mail__meta { font-size: 13px; font-weight: 700; color: var(--ink-3); overflow-wrap: anywhere; }
.mail__body { margin: 0; padding: 12px 14px; font: 600 14px/1.55 var(--font-body); color: var(--ink-2); white-space: pre-wrap; overflow-wrap: anywhere; }
.mail__body a { color: var(--gold); }

/* ---------- Footer ---------- */
.foot {
  display: grid; justify-items: center; gap: 6px;
  padding: 8px 16px 28px;
  font-size: 13px; font-weight: 700; color: var(--ink-3); text-align: center;
}
.foot nav { display: flex; gap: 8px; }
.foot a { color: var(--ink-2); text-decoration: none; }
.foot a:hover { color: #fff; text-decoration: underline; }

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