/* Page-local RPG auth shell: premium campaign vault, minimal and readable. */

:root {
  --auth-bg: #05070d;
  --auth-panel: rgba(10, 12, 18, .78);
  --auth-panel-strong: rgba(7, 9, 14, .9);
  --auth-border: rgba(255, 214, 128, .16);
  --auth-border-hover: rgba(255, 214, 128, .34);
  --auth-gold: #d6a84f;
  --auth-gold-soft: #f0d58e;
  --auth-text: #f3efe6;
  --auth-muted: #a9a195;
  --auth-dim: #706a60;
  --auth-teal: #78b9a6;
}

.embers-layer {
  display: none !important;
}

.auth-page--rpg {
  min-height: 100vh;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1rem, 4vw, 4rem);
  overflow: visible;
  isolation: isolate;
}

body:has(#cookie-consent-banner:not([hidden])) .auth-page--rpg {
  padding-bottom: 10rem;
}

.auth-page--rpg::before,
.auth-page--rpg::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.auth-page--rpg::before {
  background:
    linear-gradient(90deg, rgba(5, 7, 13, .93) 0%, rgba(5, 7, 13, .62) 45%, rgba(5, 7, 13, .9) 100%),
    radial-gradient(ellipse at center, rgba(5, 7, 13, .08) 0%, rgba(5, 7, 13, .72) 100%);
}

.auth-page--rpg::after {
  opacity: .32;
  background:
    linear-gradient(rgba(255, 244, 214, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 244, 214, .026) 1px, transparent 1px);
  background-size: 84px 84px;
  mask-image: linear-gradient(90deg, transparent 0%, #000 18%, #000 82%, transparent 100%);
}

.auth-shell {
  position: relative;
  z-index: 2;
  width: min(1140px, 100%);
  min-height: min(690px, calc(100vh - 4rem));
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 420px);
  gap: clamp(1rem, 2.4vw, 2rem);
  align-items: stretch;
}

.auth-quest-panel,
.auth-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--auth-border);
  border-radius: 8px;
  color: var(--auth-text);
  backdrop-filter: blur(14px);
}

.auth-quest-panel {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: clamp(1rem, 2vw, 1.5rem);
  padding: clamp(1.35rem, 3vw, 2.45rem);
  background:
    linear-gradient(110deg, rgba(10, 12, 18, .56), rgba(10, 12, 18, .2)),
    linear-gradient(180deg, rgba(255, 214, 128, .055), transparent 34%);
  box-shadow:
    0 28px 90px rgba(0, 0, 0, .42),
    inset 0 1px 0 rgba(255, 255, 255, .06);
}

.auth-quest-panel::before,
.auth-card::before {
  content: "";
  position: absolute;
  inset: .65rem;
  border: 1px solid rgba(255, 214, 128, .08);
  pointer-events: none;
}

.auth-quest-panel::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 45%;
  pointer-events: none;
  background: linear-gradient(0deg, rgba(5, 7, 13, .64), transparent);
}

.auth-game-brand,
.auth-quest-copy,
.auth-preview-panel,
.auth-feature-list,
.auth-card-frame,
.auth-card-header,
.auth-alert,
.auth-stage-list,
.auth-card-view {
  position: relative;
  z-index: 1;
}

.auth-game-brand {
  width: min(320px, 78%);
  display: block;
  filter: drop-shadow(0 14px 28px rgba(0, 0, 0, .55));
}

.auth-game-brand img {
  display: block;
  width: 100%;
  height: auto;
}

.auth-kicker,
.auth-view-label,
.auth-preview-caption span,
.auth-field .form-label {
  display: block;
  font-family: 'Space Mono', monospace;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--auth-gold-soft);
}

.auth-quest-copy h1 {
  max-width: 12ch;
  margin: .5rem 0 .75rem;
  font-family: 'RPGFont', 'Fraunces', serif;
  font-size: clamp(3rem, 5.6vw, 4.55rem);
  line-height: .94;
  letter-spacing: 0;
  color: #fff6df;
  text-shadow: 0 16px 38px rgba(0, 0, 0, .52);
}

.auth-quest-copy p {
  max-width: 39rem;
  margin: 0;
  color: rgba(243, 239, 230, .78);
  font-size: clamp(.98rem, 1.4vw, 1.08rem);
  line-height: 1.68;
}

.auth-preview-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(9.5rem, 11.5rem);
  gap: .9rem;
  align-items: stretch;
  margin-top: auto;
}

.auth-preview-media,
.auth-preview-caption {
  border: 1px solid rgba(255, 214, 128, .16);
  background: rgba(5, 7, 13, .66);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05), 0 18px 46px rgba(0, 0, 0, .32);
}

.auth-preview-media {
  min-height: 236px;
  overflow: hidden;
}

.auth-preview-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(.95) contrast(1.05) brightness(.88);
}

.auth-preview-caption {
  display: flex;
  flex-direction: column;
  justify-content: end;
  gap: .55rem;
  padding: 1rem;
  background:
    linear-gradient(180deg, rgba(20, 24, 32, .64), rgba(5, 7, 13, .84)),
    rgba(5, 7, 13, .78);
}

.auth-preview-caption strong {
  color: var(--auth-text);
  font-size: 1.25rem;
  line-height: 1.08;
  font-weight: 700;
}

.auth-feature-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .7rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.auth-feature-list li {
  min-height: 4.45rem;
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .82rem .9rem;
  border: 1px solid rgba(255, 255, 255, .095);
  background: rgba(5, 7, 13, .48);
  color: rgba(243, 239, 230, .78);
}

.auth-feature-list svg {
  width: 1.15rem;
  height: 1.15rem;
  flex: 0 0 auto;
  color: var(--auth-gold);
}

.auth-feature-list span {
  min-width: 0;
  font-size: .86rem;
  line-height: 1.24;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  margin-left: auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1.15rem;
  padding: clamp(1.25rem, 2.4vw, 1.85rem);
  background:
    linear-gradient(180deg, rgba(15, 17, 24, .88), rgba(5, 7, 13, .94)),
    var(--auth-panel);
  box-shadow:
    0 34px 90px rgba(0, 0, 0, .56),
    inset 0 1px 0 rgba(255, 255, 255, .06);
}

.auth-card-frame {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .72;
  background:
    linear-gradient(90deg, var(--auth-gold) 0 42px, transparent 42px calc(100% - 42px), var(--auth-gold) calc(100% - 42px)) top / 100% 1px no-repeat,
    linear-gradient(90deg, var(--auth-gold) 0 42px, transparent 42px calc(100% - 42px), var(--auth-gold) calc(100% - 42px)) bottom / 100% 1px no-repeat,
    linear-gradient(0deg, var(--auth-gold) 0 42px, transparent 42px calc(100% - 42px), var(--auth-gold) calc(100% - 42px)) left / 1px 100% no-repeat,
    linear-gradient(0deg, var(--auth-gold) 0 42px, transparent 42px calc(100% - 42px), var(--auth-gold) calc(100% - 42px)) right / 1px 100% no-repeat;
}

.auth-card-headline {
  margin: .25rem 0 0;
  font-family: 'RPGFont', 'Fraunces', serif !important;
  font-size: clamp(2rem, 3.2vw, 2.4rem);
  line-height: .98;
  letter-spacing: 0;
  color: #fff6df;
  text-align: left;
}

.auth-card-subtitle {
  margin: .5rem 0 0;
  max-width: 21rem;
  color: rgba(243, 239, 230, .68);
  font-size: .95rem;
  line-height: 1.52;
}

.auth-alert {
  margin: 0;
  padding: .78rem .9rem;
  border: 1px solid rgba(201, 69, 58, .36);
  border-radius: 6px;
  background: rgba(201, 69, 58, .13);
  color: #ffd8d0;
  font-size: .88rem;
  line-height: 1.45;
}

.auth-stage-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .45rem;
}

.auth-stage-list span {
  min-height: 1.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, .08);
  background: rgba(255, 255, 255, .03);
  color: rgba(243, 239, 230, .42);
  font-family: 'Space Mono', monospace;
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.auth-stage-list .is-active {
  border-color: rgba(255, 214, 128, .36);
  background: rgba(214, 168, 79, .12);
  color: var(--auth-gold-soft);
}

.auth-card-view {
  width: 100%;
}

.auth-card-view.hidden {
  display: none;
}

.auth-chooser {
  display: flex;
  flex-direction: column;
  gap: .78rem;
  width: 100%;
}

.auth-chooser-btn {
  width: 100%;
  min-height: 3.55rem;
  display: grid;
  grid-template-columns: 1.45rem minmax(0, 1fr) auto;
  align-items: center;
  gap: .82rem;
  padding: .88rem .98rem;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, .13);
  background: linear-gradient(180deg, rgba(19, 23, 31, .9), rgba(8, 10, 15, .95));
  color: var(--auth-text);
  font-size: .98rem;
  font-weight: 700;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .3), inset 0 1px 0 rgba(255, 255, 255, .06);
  transition: background .18s ease, border-color .18s ease, box-shadow .18s ease, color .18s ease, transform .14s ease;
}

.auth-chooser-btn:hover {
  border-color: var(--auth-border-hover);
  background: linear-gradient(180deg, rgba(26, 31, 42, .95), rgba(8, 10, 15, .98));
  color: #fff8e8;
  box-shadow: 0 10px 26px rgba(0, 0, 0, .36), 0 0 0 1px rgba(214, 168, 79, .08), inset 0 1px 0 rgba(255, 255, 255, .08);
  transform: translateY(-1px);
}

.auth-chooser-btn:active {
  transform: translateY(1px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, .34);
}

.auth-chooser-btn--primary {
  border-color: rgba(255, 214, 128, .56);
  background: linear-gradient(180deg, #f5eee0, #d7c59a);
  color: #15120b;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .36), 0 0 0 1px rgba(255, 214, 128, .14);
}

.auth-chooser-btn--primary:hover {
  border-color: rgba(255, 230, 166, .84);
  background: linear-gradient(180deg, #fff8ea, #e3cf9e);
  color: #0b0905;
}

.auth-chooser-btn--disabled,
.auth-chooser-btn--disabled:disabled {
  opacity: .62;
  cursor: not-allowed;
  color: rgba(243, 239, 230, .62);
}

.auth-chooser-btn--disabled:hover,
.auth-chooser-btn--disabled:disabled:hover {
  transform: none;
  border-color: rgba(255, 255, 255, .13);
  background: linear-gradient(180deg, rgba(19, 23, 31, .9), rgba(8, 10, 15, .95));
  box-shadow: 0 6px 18px rgba(0, 0, 0, .3), inset 0 1px 0 rgba(255, 255, 255, .06);
}

.auth-chooser-icon,
.auth-chooser-arrow {
  width: 1.2rem;
  height: 1.2rem;
  flex-shrink: 0;
}

.auth-chooser-arrow {
  color: currentColor;
  opacity: .76;
}

.auth-chooser-tag {
  padding: .2rem .45rem;
  border: 1px solid rgba(255, 255, 255, .13);
  border-radius: 999px;
  background: rgba(255, 255, 255, .045);
  color: rgba(243, 239, 230, .66);
  font-size: .72rem;
  font-weight: 700;
}

.auth-view-top {
  display: flex;
  align-items: center;
  gap: .85rem;
  margin-bottom: 1rem;
}

.auth-view-top h3 {
  margin: .18rem 0 0;
  font-family: 'Fraunces', serif;
  font-size: 1.42rem;
  line-height: 1.08;
  color: var(--auth-text);
  letter-spacing: 0;
}

.auth-back {
  width: 2.75rem;
  height: 2.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  padding: 0;
  border-radius: 6px;
  border: 1px solid rgba(255, 214, 128, .22);
  background: rgba(5, 7, 13, .64);
  color: var(--auth-gold-soft);
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease, color .18s ease, transform .14s ease;
}

.auth-back svg {
  width: 1.1rem;
  height: 1.1rem;
}

.auth-back:hover {
  border-color: var(--auth-border-hover);
  background: rgba(214, 168, 79, .12);
  color: #fff6df;
  transform: translateX(-1px);
}

.auth-card-form {
  display: flex;
  flex-direction: column;
  gap: .88rem;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: .42rem;
}

.form-input-wrap {
  position: relative;
}

.auth-card-form .form-input {
  width: 100%;
  min-height: 3.1rem;
  margin-bottom: 0;
  padding: .82rem .95rem;
  border-radius: 6px;
  border: 1px solid rgba(255, 214, 128, .18);
  background: rgba(3, 5, 10, .74);
  color: #fbf7ed;
  font-size: 1rem;
  box-shadow: inset 0 2px 12px rgba(0, 0, 0, .26);
}

.auth-card-form .form-input:focus,
.auth-card-form .form-input:focus-visible {
  outline: none;
  border-color: rgba(255, 214, 128, .62);
  background: rgba(5, 7, 13, .93);
  box-shadow: 0 0 0 3px rgba(214, 168, 79, .2), inset 0 2px 12px rgba(0, 0, 0, .26);
}

.auth-card-form .form-input::placeholder {
  color: rgba(243, 239, 230, .36);
}

.auth-card-form .form-input-wrap .form-input {
  padding-right: 3rem;
}

.auth-password-toggle {
  position: absolute;
  top: 50%;
  right: .55rem;
  width: 2.1rem;
  height: 2.1rem;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: rgba(243, 239, 230, .58);
  cursor: pointer;
  transition: background .18s ease, color .18s ease;
}

.auth-password-toggle:hover {
  background: rgba(255, 255, 255, .07);
  color: var(--auth-gold-soft);
}

.auth-password-toggle svg {
  width: 1rem;
  height: 1rem;
}

.auth-password-toggle .toggle-icon-hide {
  display: none;
}

.auth-password-toggle[aria-pressed="true"] .toggle-icon-show {
  display: none;
}

.auth-password-toggle[aria-pressed="true"] .toggle-icon-hide {
  display: block;
}

.auth-card-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .65rem;
  font-size: .9rem;
}

.auth-card-row .form-check,
.form-check-block {
  color: rgba(243, 239, 230, .7);
}

.auth-card-row .form-check input[type="checkbox"],
.form-check-block input[type="checkbox"] {
  accent-color: var(--auth-gold);
}

.auth-card-cta {
  width: 100%;
  min-height: 3.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .65rem;
  padding: .95rem 1rem;
  border-radius: 6px;
  border: 1px solid rgba(255, 224, 138, .56);
  background: linear-gradient(180deg, #d6a84f 0%, #9f7431 100%);
  color: #12100a;
  font-size: .96rem;
  font-weight: 800;
  letter-spacing: .02em;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(0, 0, 0, .36), inset 0 1px 0 rgba(255, 255, 255, .24);
  transition: filter .18s ease, border-color .18s ease, box-shadow .18s ease, transform .14s ease;
}

.auth-card-cta svg {
  width: 1.05rem;
  height: 1.05rem;
}

.auth-card-cta:hover {
  filter: brightness(1.06);
  border-color: rgba(255, 237, 178, .82);
  box-shadow: 0 14px 34px rgba(0, 0, 0, .42), 0 0 26px rgba(214, 168, 79, .14), inset 0 1px 0 rgba(255, 255, 255, .28);
  transform: translateY(-1px);
}

.auth-card-cta:active {
  transform: translateY(1px);
  box-shadow: 0 7px 18px rgba(0, 0, 0, .38);
}

.auth-card-cta:disabled {
  opacity: .64;
  cursor: wait;
  filter: saturate(.7);
}

.password-strength {
  display: grid;
  gap: .4rem;
  margin-top: -.32rem;
}

.password-strength-bars {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: .3rem;
}

.password-strength-bars span {
  height: .42rem;
  border: 1px solid rgba(255, 255, 255, .08);
  background: rgba(255, 255, 255, .06);
}

.password-strength[data-score="1"] .password-strength-bars span.is-filled,
.password-strength[data-score="2"] .password-strength-bars span.is-filled {
  background: #c9453a;
  border-color: rgba(201, 69, 58, .8);
}

.password-strength[data-score="3"] .password-strength-bars span.is-filled {
  background: var(--auth-gold);
  border-color: rgba(214, 168, 79, .85);
}

.password-strength[data-score="4"] .password-strength-bars span.is-filled,
.password-strength[data-score="5"] .password-strength-bars span.is-filled {
  background: var(--auth-teal);
  border-color: rgba(120, 185, 166, .85);
}

.password-strength-label {
  color: rgba(243, 239, 230, .54);
  font-size: .78rem;
}

.auth-card-footer {
  margin: .2rem 0 0;
  text-align: center;
  color: rgba(243, 239, 230, .6);
  font-size: .93rem;
}

.auth-toggle-link,
.form-link-inline,
.auth-card .form-link {
  color: var(--auth-gold-soft);
  text-decoration: none;
}

.auth-toggle-link:hover,
.form-link-inline:hover,
.auth-card .form-link:hover {
  color: #fff1b3;
  text-decoration: underline;
}

.auth-chooser-btn:focus-visible,
.auth-back:focus-visible,
.auth-password-toggle:focus-visible,
.auth-card-cta:focus-visible,
.auth-toggle-link:focus-visible,
.form-link-inline:focus-visible,
.auth-card .form-link:focus-visible {
  outline: 2px solid rgba(255, 224, 138, .9);
  outline-offset: 3px;
}

@media (max-width: 1040px) {
  .auth-page--rpg {
    align-items: flex-start;
    padding: 1rem;
  }

  .auth-shell {
    min-height: auto;
    grid-template-columns: minmax(0, 1fr);
    width: min(760px, 100%);
  }

  .auth-card {
    max-width: 460px;
    min-height: auto;
    margin: 0 auto;
  }

  .auth-preview-panel {
    grid-template-columns: minmax(0, 1fr) minmax(9rem, 10rem);
  }

  .auth-preview-media {
    min-height: 190px;
  }

  .auth-quest-copy h1 {
    max-width: none;
    font-size: clamp(2.7rem, 8vw, 3.8rem);
  }
}

@media (max-width: 820px) {
  .auth-preview-panel {
    display: none;
  }

  .auth-quest-panel {
    min-height: auto;
  }
}

@media (max-width: 640px) {
  body:has(#cookie-consent-banner:not([hidden])) .auth-page--rpg {
    padding-bottom: 13rem;
  }

  .auth-page--rpg {
    padding: .75rem;
  }

  .auth-shell {
    gap: .6rem;
  }

  .auth-quest-panel {
    gap: .55rem;
    padding: .78rem .85rem;
  }

  .auth-quest-panel::before,
  .auth-card::before {
    inset: .45rem;
  }

  .auth-game-brand {
    width: min(205px, 80%);
  }

  .auth-quest-copy h1 {
    max-width: 9ch;
    margin: .25rem 0 .35rem;
    font-size: clamp(2rem, 11.5vw, 2.45rem);
    line-height: .95;
    text-wrap: balance;
    overflow-wrap: anywhere;
  }

  .auth-quest-copy p {
    max-width: 31ch;
    font-size: .9rem;
    line-height: 1.42;
  }

  .auth-feature-list {
    display: none;
  }

  .auth-card {
    justify-content: flex-start;
    padding: .9rem;
    gap: .72rem;
  }

  .auth-card-headline {
    font-size: 1.82rem;
  }

  .auth-stage-list {
    display: none;
  }

  .auth-view-top {
    margin-bottom: .65rem;
  }

  .auth-card-form {
    gap: .68rem;
  }

  .auth-card-form .form-input {
    min-height: 3rem;
    padding: .72rem .85rem;
  }

  .auth-card-cta,
  .auth-chooser-btn {
    min-height: 3rem;
  }

  .auth-card-footer {
    margin-top: 0;
  }

  .auth-chooser-btn {
    grid-template-columns: 1.3rem minmax(0, 1fr) auto;
    gap: .72rem;
    padding-inline: .88rem;
  }

  .auth-chooser {
    gap: .55rem;
  }

  .cookie-consent-banner__inner {
    align-items: stretch;
  }

  .cookie-consent-banner__actions {
    display: grid;
    grid-template-columns: 1fr;
    justify-content: stretch;
  }

  .cookie-button {
    width: 100%;
    min-height: 2.75rem;
  }
}
