/* members.lastlightrpg.com: the same palette and type as lastlightrpg.com (website/assets/lastlight.css).
   Every file is served flat from /assets/, so the fonts and pictures sit next to this file. */
@font-face {
  font-family: 'Pixelify Sans';
  src: url('/assets/pixelify-sans-latin-400-normal.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Pixelify Sans';
  src: url('/assets/pixelify-sans-latin-700-normal.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: 'Silkscreen';
  src: url('/assets/silkscreen-latin-400-normal.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}

:root {
  --night: #0d0b14;
  --deep: #120f1c;
  --slate: #1b1a26;
  --slate-2: #24222f;
  --line: #3a3550;
  --brass: #b8913f;
  --gold: #ffd25a;
  --lamp: #ffb347;
  --cream: #ffe2a0;
  --text: #e8e2d0;
  --soft: #d8d2c4;
  --dim: #b3abc2;
  --bad: #ff9a8a;
  --pixel: 'Pixelify Sans', ui-monospace, 'Courier New', monospace;
  --body: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: radial-gradient(ellipse 70% 420px at 50% 0, rgba(255, 170, 60, 0.11), rgba(255, 170, 60, 0) 100%) no-repeat, var(--night);
  color: var(--text);
  font: 17px/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}
img {
  display: block;
  max-width: 100%;
  height: auto;
}
a {
  color: var(--gold);
  text-underline-offset: 2px;
}
a:hover {
  color: #ffe08a;
}
h1,
h2,
h3 {
  font-family: var(--pixel);
  font-weight: 700;
  line-height: 1.15;
  margin: 0;
  text-wrap: balance;
}
p {
  margin: 0;
}
[hidden] {
  display: none !important;
}
::selection {
  background: rgba(255, 210, 90, 0.35);
  color: #fff;
}
.nowrap {
  white-space: nowrap;
}
/* For screen readers only. */
.vh {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}
/* Headings take focus when the view changes, for screen readers; they don't need a ring. */
[tabindex='-1']:focus {
  outline: none;
}
.wrap {
  width: min(1000px, 100% - 32px);
  margin-inline: auto;
}
.skip {
  position: absolute;
  left: -999px;
}
.skip:focus {
  left: 16px;
  top: 16px;
  z-index: 20;
  background: var(--gold);
  color: var(--night);
  padding: 8px 12px;
}

/* ---------------------------------------------------------------- header */
.top {
  display: flex;
  align-items: center;
  gap: 12px 18px;
  min-height: 61px;
  padding: 10px max(16px, calc((100% - 1000px) / 2));
  background: rgba(13, 11, 20, 0.88);
  border-bottom: 1px solid rgba(184, 145, 63, 0.35);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-right: auto;
  font: 700 20px var(--pixel);
  color: var(--gold);
  text-decoration: none;
  white-space: nowrap;
}
.brand:hover {
  color: var(--gold);
}
.brand img {
  flex: none;
}
.brand-dot {
  color: var(--brass);
}
.brand-sub {
  font-weight: 400;
  color: #f0d9a0;
}
.acct {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}
.acct-email {
  min-width: 0;
  max-width: 300px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  color: var(--dim);
}
.acct-as {
  display: none;
}

/* ---------------------------------------------------------------- buttons (as on lastlightrpg.com) */
.btn {
  display: inline-block;
  margin: 0;
  font: 700 18px/1.3 var(--pixel);
  color: #2a1c05;
  text-align: center;
  text-decoration: none;
  background: linear-gradient(#f3c860, #d99a2b);
  border: 2px solid #fff0bf;
  border-radius: 0;
  box-shadow: 0 0 0 2px #7a5a16, 0 6px 0 #5d430e, 0 10px 24px rgba(255, 179, 71, 0.25);
  padding: 10px 22px;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  transition: transform 0.08s ease, box-shadow 0.08s ease, filter 0.15s ease;
}
.btn:hover {
  color: #2a1c05;
  filter: brightness(1.08);
}
.btn:active {
  transform: translateY(4px);
  box-shadow: 0 0 0 2px #7a5a16, 0 2px 0 #5d430e;
}
/* The second choice: dark, with a brass edge. */
.btn--quiet {
  color: var(--gold);
  background: linear-gradient(#2f2b3e, #221f2e);
  border-color: #c9a457;
  box-shadow: 0 0 0 2px #0a0810, 0 6px 0 #0a0810, 0 10px 22px rgba(0, 0, 0, 0.35);
}
.btn--quiet:hover {
  color: #ffe08a;
  filter: brightness(1.18);
}
.btn--quiet:active {
  box-shadow: 0 0 0 2px #0a0810, 0 2px 0 #0a0810;
}
.btn--small {
  font-size: 15px;
  padding: 5px 13px;
  box-shadow: 0 0 0 2px #0a0810, 0 3px 0 #0a0810;
}
.btn--small:active {
  transform: translateY(2px);
  box-shadow: 0 0 0 2px #0a0810, 0 1px 0 #0a0810;
}
.btn--wide {
  display: block;
  width: 100%;
}
.btn:focus-visible {
  outline-offset: 6px;
}
.btn:disabled {
  cursor: default;
  filter: saturate(0.35) brightness(0.75);
  transform: none;
}
.btn:disabled:active {
  box-shadow: 0 0 0 2px #7a5a16, 0 6px 0 #5d430e;
}
.btn--quiet:disabled:active {
  box-shadow: 0 0 0 2px #0a0810, 0 6px 0 #0a0810;
}

/* ---------------------------------------------------------------- page */
main {
  flex: 1 0 auto;
  padding: 44px 0 72px;
}
.noscript {
  width: min(420px, 100% - 32px);
  margin: 40px auto;
  text-align: center;
  color: var(--soft);
}

/* The thank-you after paying, above whichever view is showing. */
.thanks {
  margin-bottom: 32px;
  padding: 14px 18px;
  background: linear-gradient(90deg, rgba(255, 210, 90, 0.14), rgba(255, 210, 90, 0.03));
  border: 1px solid #5f4c22;
  border-left: 4px solid var(--gold);
  color: #fff3d6;
}
.thanks strong {
  font: 700 18px var(--pixel);
  color: var(--gold);
  margin-right: 4px;
}
.thanks-late {
  margin-top: 6px;
  font-size: 15px;
  color: var(--soft);
}
/* Over the sign-in card, as wide as the card. */
[data-view='signin'] .thanks-wrap,
[data-view='loading'] .thanks-wrap,
[data-view='error'] .thanks-wrap {
  width: min(420px, 100% - 32px);
}

/* ---------------------------------------------------------------- loading and failure */
.loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 80px 0;
  font: 400 16px var(--pixel);
  color: var(--dim);
  animation: appear 0.3s ease 0.25s both;
}
.loading-lamp {
  animation: flicker 2.4s ease-in-out infinite;
}
@keyframes appear {
  from {
    opacity: 0;
  }
}
@keyframes flicker {
  0%,
  100% {
    opacity: 1;
    filter: drop-shadow(0 0 10px rgba(255, 170, 60, 0.55));
  }
  50% {
    opacity: 0.7;
    filter: drop-shadow(0 0 4px rgba(255, 170, 60, 0.25));
  }
}
.failed {
  width: min(460px, 100% - 32px);
  margin: 40px auto 0;
  text-align: center;
}
.failed h1 {
  font-size: 30px;
  color: var(--cream);
}
.failed p {
  margin: 10px 0 26px;
  color: var(--soft);
}

/* ---------------------------------------------------------------- sign in */
.signin {
  width: min(420px, 100% - 32px);
  margin-inline: auto;
  padding-top: 12px;
}
.signin-card {
  padding: 30px 28px 28px;
  background: var(--slate-2);
  border: 1px solid var(--line);
  border-top: 3px solid var(--brass);
  box-shadow: 0 0 0 6px rgba(16, 14, 24, 0.9), 0 24px 60px rgba(0, 0, 0, 0.5);
}
.signin-lamp {
  margin: 0 auto 16px;
  filter: drop-shadow(0 0 16px rgba(255, 170, 60, 0.45));
}
.signin h1 {
  font-size: 32px;
  color: var(--cream);
  text-align: center;
}
.signin-lede {
  margin-top: 6px;
  text-align: center;
  font-size: 16px;
  color: var(--dim);
}
.field {
  margin-top: 18px;
}
.field + .field {
  margin-top: 14px;
}
.field label {
  display: block;
  margin-bottom: 6px;
  font: 400 15px var(--pixel);
  color: var(--gold);
}
.field input {
  display: block;
  width: 100%;
  padding: 10px 12px;
  background: #100e19;
  border: 1px solid var(--line);
  border-radius: 0;
  color: var(--text);
  font: 16px/1.4 var(--body);
  -webkit-appearance: none;
  appearance: none;
}
.field input:hover {
  border-color: #4d4769;
}
.field input:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 1px;
  border-color: var(--brass);
}
.field input:-webkit-autofill {
  -webkit-text-fill-color: var(--text);
  box-shadow: 0 0 0 100px #100e19 inset;
  caret-color: var(--text);
}
.signin .btn--wide {
  margin-top: 26px;
}
.err {
  margin-top: 14px;
  font-size: 15px;
  line-height: 1.45;
  color: var(--bad);
}
.err:empty,
.note:empty {
  margin: 0;
}
.signin-help {
  margin-top: 10px;
  text-align: center;
  font-size: 14px;
  color: var(--dim);
  text-wrap: balance;
}
.signin-card + .signin-help {
  margin-top: 26px;
}

/* ---------------------------------------------------------------- signed in */
.account h1 {
  font-size: clamp(32px, 5vw, 46px);
  color: var(--cream);
}
.layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
  gap: 28px;
  align-items: start;
  margin-top: 26px;
}

/* The status card: in the spirit of the game's Membership window. */
.status {
  padding: 26px 28px 28px;
  background: var(--slate-2);
  border: 1px solid var(--line);
  border-top: 3px solid var(--brass);
  box-shadow: 0 0 0 6px rgba(16, 14, 24, 0.9), 0 24px 60px rgba(0, 0, 0, 0.45);
}
.status.is-member {
  background: linear-gradient(180deg, rgba(255, 210, 90, 0.1), rgba(255, 210, 90, 0.02) 60%), var(--slate-2);
  border-color: #5f4c22;
  border-top-color: var(--gold);
}
.status-head {
  display: flex;
  align-items: center;
  gap: 14px;
}
.status-star {
  flex: none;
  image-rendering: pixelated;
}
.status h2 {
  font-size: 30px;
  color: var(--text);
}
.status.is-member h2 {
  color: var(--gold);
}
.status-left {
  display: inline-block;
  margin-left: 0.4em;
  font: 400 16px var(--body);
  color: var(--dim);
  white-space: nowrap;
  vertical-align: 0.2em;
}
.status-left.is-own-line {
  display: block;
  margin: 4px 0 0;
  vertical-align: 0;
}
.status-left.is-own-line .status-dot {
  display: none;
}
.status-lines p {
  margin-top: 12px;
  color: var(--soft);
  text-wrap: pretty;
}
.status-lines p + p {
  margin-top: 6px;
}
.warn {
  margin-top: 16px;
  padding: 10px 14px;
  background: rgba(230, 110, 70, 0.12);
  border-left: 3px solid #e2734a;
  font-size: 15px;
  line-height: 1.5;
  color: #ffcdb5;
}
.section {
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.status.is-member .section {
  border-top-color: rgba(184, 145, 63, 0.3);
}
.buy-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 18px;
  padding-bottom: 6px;
}
.small {
  margin-top: 14px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--dim);
}
p.section.small {
  margin-top: 24px;
}
.manage .small {
  margin-top: 16px;
}
.note {
  margin-top: 16px;
  font-size: 15px;
  color: var(--dim);
}
.status .err:not(:empty) {
  margin-top: 16px;
}

.help {
  margin-top: 28px;
  padding: 16px 20px 18px;
  background: var(--slate);
  border: 1px solid var(--line);
  border-left: 4px solid var(--brass);
}
.help h2 {
  font-size: 19px;
  color: var(--gold);
}
.help p {
  margin-top: 4px;
  color: var(--soft);
}

.perks {
  padding: 22px 24px 24px;
  background: var(--deep);
  border: 1px solid #2a2640;
}
.perks h2 {
  font-size: 22px;
  color: #fff3d6;
}
.perks ul {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
}
.perks li {
  position: relative;
  padding-left: 22px;
  font-size: 16px;
  line-height: 1.5;
  color: var(--soft);
}
.perks li + li {
  margin-top: 12px;
}
/* A pixel lamp for a bullet. */
.perks li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 0.5em;
  width: 8px;
  height: 8px;
  background: var(--gold);
  box-shadow: 0 0 0 2px #5d430e, 0 0 10px rgba(255, 179, 71, 0.5);
}
.perks strong {
  color: var(--cream);
  font-weight: 600;
}
.perks p {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid #2a2640;
  font-size: 15px;
}

/* ---------------------------------------------------------------- footer */
.foot {
  border-top: 1px solid #262238;
  padding: 24px 0 32px;
  font-size: 14px;
  color: #8f88a0;
}
.foot .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  justify-content: center;
}
.foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  justify-content: center;
  width: 100%;
}
.foot a {
  color: #b9a26a;
}
.foot a:hover {
  color: var(--gold);
}

/* ---------------------------------------------------------------- narrower screens */
@media (max-width: 860px) {
  .layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }
  .help {
    margin-top: 24px;
  }
}
@media (max-width: 600px) {
  body {
    font-size: 16px;
  }
  main {
    padding: 28px 0 56px;
  }
  /* The account moves to a row of its own: brand and Sign out above, the email under them. */
  .top {
    flex-wrap: wrap;
    column-gap: 12px;
  }
  .brand {
    font-size: 17px;
    gap: 8px;
  }
  .top .btn--small {
    font-size: 14px;
    padding: 4px 11px;
  }
  .acct {
    display: contents;
  }
  .acct-email {
    order: 3;
    flex: 1 0 100%;
    max-width: none;
    margin-top: -4px;
    font-size: 13px;
  }
  .acct-as {
    display: inline;
  }
  .foot-links {
    gap: 8px 16px;
  }
  .thanks {
    margin-bottom: 24px;
    padding: 12px 14px;
  }
  .signin {
    padding-top: 0;
  }
  .signin-card {
    padding: 24px 18px 22px;
  }
  .signin h1 {
    font-size: 28px;
  }
  .layout {
    margin-top: 18px;
  }
  .status {
    padding: 20px 18px 22px;
  }
  .status-head {
    align-items: flex-start;
    gap: 12px;
  }
  .status-star {
    width: 26px;
    height: 24px;
    margin-top: 2px;
  }
  .status h2 {
    font-size: 24px;
  }
  .status-left {
    font-size: 15px;
  }
  .buy-btns .btn,
  .manage .btn {
    display: block;
    width: 100%;
  }
  .perks {
    padding: 20px 18px 22px;
  }
  .help {
    padding: 14px 16px 16px;
  }
}
/* The smallest phones: brand and Sign out still share a row. */
@media (max-width: 359px) {
  .brand {
    font-size: 15px;
    gap: 6px;
  }
  .brand img {
    width: 24px;
    height: 24px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .btn {
    transition: none;
  }
  .loading,
  .loading-lamp {
    animation: none;
  }
}

/* ---------------------------------------------------------------- the emailed sign-in code */
.code-input {
  text-align: center;
  font-family: var(--pixel);
  font-size: 26px;
  letter-spacing: 0.35em;
}
.linkbtn {
  padding: 0;
  border: 0;
  background: none;
  color: var(--gold);
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}
.linkbtn:hover {
  color: #ffe08a;
}
.linkbtn:disabled {
  color: var(--dim);
  cursor: default;
}
