:root {
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: #273249;
  background: #fffaf3;
  --ink: #273249;
  --muted: #64718a;
  --line: #e7e3df;
  --coral: #d94d62;
  --purple: #6849b8;
  --teal: #087e81;
  --yellow: #ffd56a;
}
* {
  box-sizing: border-box;
}
html {
  min-height: 100%;
}
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 7% 8%, #ffe4df 0, transparent 22rem),
    radial-gradient(circle at 96% 25%, #e4e8ff 0, transparent 24rem), #fffaf3;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
input,
select {
  font: inherit;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: not-allowed;
}
img {
  max-width: 100%;
}
.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 0.95rem max(4vw, 1.25rem);
  background: #fffefbe8;
  border-bottom: 1px solid #e9e3dc;
  box-shadow: 0 4px 24px #4a3f5a0b;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: -0.04em;
  color: #34305e;
  white-space: nowrap;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 0.75rem;
  background: linear-gradient(135deg, #e6546b, #ffab60);
  color: #fff;
  font-size: 1.4rem;
  transform: rotate(-8deg);
  box-shadow: 0 5px 12px #e6546b44;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.topbar nav {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  flex-wrap: wrap;
}
.topbar nav a,
.nav-button {
  color: #4a5270;
  font-weight: 700;
  font-size: 0.93rem;
}
.topbar nav a:hover,
.nav-button:hover {
  color: var(--coral);
}
.nav-button {
  border: 0;
  background: transparent;
  padding: 0.3rem 0;
}
.language-picker {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--muted);
}
.language-picker select {
  border: 1px solid #d9d3e8;
  background: #fff;
  border-radius: 0.6rem;
  color: var(--ink);
  padding: 0.48rem 0.65rem;
  min-height: 2.4rem;
}
.content {
  width: min(1160px, calc(100% - 2rem));
  margin: 0 auto;
  flex: 1;
  padding: 3.2rem 0 5rem;
}
footer {
  display: flex;
  justify-content: center;
  gap: 0.8rem;
  padding: 1.5rem;
  color: #67708a;
  border-top: 1px solid #e9e3dc;
  background: #fffdf9;
  font-size: 0.87rem;
}
footer strong {
  color: #6549af;
}
h1 {
  font-size: clamp(2.2rem, 4.5vw, 3.8rem);
  line-height: 1.08;
  letter-spacing: -0.05em;
  margin: 0.45rem 0 1rem;
  color: var(--ink);
}
h2 {
  font-size: 1.45rem;
  line-height: 1.22;
  margin: 0 0 1.25rem;
  color: var(--ink);
}
p {
  color: var(--muted);
  line-height: 1.6;
}
.eyebrow {
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  color: var(--purple);
}
.heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
}
.pill {
  border: 1px solid #cfc7f4;
  border-radius: 100px;
  padding: 0.55rem 1rem;
  background: #eee9ff;
  color: #5b459d;
  font-weight: 800;
}
.button,
.secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: 0;
  border-radius: 0.8rem;
  padding: 0.84rem 1.25rem;
  font-weight: 800;
  min-height: 2.75rem;
  transition:
    transform 0.15s,
    box-shadow 0.15s,
    background 0.15s;
}
.button {
  background: var(--coral);
  color: #fff;
  box-shadow: 0 8px 18px #d94d6230;
}
.button:hover {
  background: #bf3b53;
  transform: translateY(-1px);
  box-shadow: 0 10px 22px #d94d6240;
}
.secondary {
  background: #eae5fb;
  color: #5741a0;
}
.secondary:hover {
  background: #ded5f8;
}
.button:disabled,
.secondary:disabled {
  opacity: 0.5;
  transform: none;
  box-shadow: none;
}
.text-button {
  border: 0;
  background: transparent;
  color: #694bb4;
  font-weight: 800;
  padding: 0.7rem 0;
}
.text-button:hover {
  text-decoration: underline;
}
.actions {
  display: flex;
  gap: 0.7rem;
  flex-wrap: wrap;
}
.auth-experience {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(340px, 0.96fr);
  min-height: 620px;
  border-radius: 1.6rem;
  overflow: hidden;
  box-shadow: 0 26px 70px #56487020;
  background: #fff;
}
.auth-story {
  position: relative;
  overflow: hidden;
  padding: clamp(2rem, 4vw, 4rem);
  background:
    radial-gradient(circle at 88% 14%, #a999f8 0, transparent 11rem),
    radial-gradient(circle at 14% 84%, #ec83a4 0, transparent 15rem),
    linear-gradient(145deg, #5658bb, #765ac5 58%, #8f65c2);
  color: #fff;
}
.auth-story::before,
.auth-story::after {
  content: "";
  position: absolute;
  border: 2px solid #ffffff2e;
  border-radius: 50%;
  pointer-events: none;
}
.auth-story::before {
  width: 23rem;
  height: 23rem;
  right: -9rem;
  top: -11rem;
}
.auth-story::after {
  width: 27rem;
  height: 27rem;
  left: -12rem;
  bottom: -15rem;
}
.auth-story .eyebrow {
  color: #ffdf83;
}
.auth-story h2 {
  position: relative;
  z-index: 1;
  color: #fff;
  font-size: clamp(2.3rem, 4vw, 3.8rem);
  letter-spacing: -0.055em;
  line-height: 1.1;
  max-width: 11ch;
  margin: 1.1rem 0 1rem;
}
.auth-story p {
  position: relative;
  z-index: 1;
  color: #f7efff;
  max-width: 27rem;
  font-size: 1.05rem;
}
.auth-features {
  position: relative;
  z-index: 1;
  list-style: none;
  padding: 0;
  margin: 2rem 0 0;
  display: grid;
  gap: 0.7rem;
  font-weight: 700;
  color: #fff;
}
.auth-features li {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}
.auth-features li span {
  display: grid;
  place-items: center;
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 0.5rem;
  background: #ffffff2d;
  color: #ffdf83;
}
.card-art {
  position: absolute;
  right: 4%;
  bottom: -1.5rem;
  width: 19rem;
  height: 13rem;
  opacity: 0.9;
  pointer-events: none;
}
.art-card {
  position: absolute;
  width: 9.5rem;
  height: 12.5rem;
  border-radius: 1rem;
  border: 4px solid #fff8;
  box-shadow: 0 15px 30px #36236c45;
}
.art-card-back {
  right: 6rem;
  bottom: -2rem;
  background: linear-gradient(150deg, #ffbd77, #f67279);
  transform: rotate(-23deg);
}
.art-card-middle {
  right: 2rem;
  bottom: -1.4rem;
  background: linear-gradient(150deg, #79d9df, #5b95da);
  transform: rotate(16deg);
}
.art-card-front {
  right: 3.4rem;
  bottom: -1.2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  background: linear-gradient(140deg, #ffe388, #ffad6e);
  color: #593878;
  transform: rotate(-4deg);
  border-color: #fff;
}
.art-card-front span {
  font-size: 3rem;
}
.art-card-front strong {
  font-size: 1.1rem;
  letter-spacing: -0.04em;
}
.art-card-front small {
  font-size: 0.48rem;
  letter-spacing: 0.07em;
  text-align: center;
  font-weight: 900;
}
.auth-panel {
  padding: clamp(2rem, 4vw, 4.2rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.auth-panel-intro p {
  font-size: 0.95rem;
  margin: 0.35rem 0 1.7rem;
}
.auth-tabs {
  display: flex;
  gap: 0.2rem;
  background: #f3f0fb;
  border-radius: 0.8rem;
  padding: 0.25rem;
  margin-bottom: 1.5rem;
}
.auth-tabs button {
  flex: 1;
  border: 0;
  border-radius: 0.6rem;
  padding: 0.67rem 0.55rem;
  background: transparent;
  color: #675f7a;
  font-weight: 800;
}
.auth-tabs button.selected {
  background: #fff;
  color: #5e45ac;
  box-shadow: 0 2px 7px #4f3c7d1d;
}
.auth-panel h1 {
  font-size: 2.3rem;
  margin-bottom: 1.2rem;
}
.auth-panel form {
  display: grid;
  gap: 0.1rem;
}
.auth-panel label,
.panel label {
  display: block;
  font-weight: 800;
  font-size: 0.91rem;
  color: #35405b;
  margin: 0.8rem 0;
}
.auth-panel input,
.panel input {
  display: block;
  width: 100%;
  background: #fff;
  border: 1px solid #d9dce5;
  border-radius: 0.7rem;
  color: var(--ink);
  padding: 0.85rem 0.9rem;
  margin-top: 0.5rem;
  min-height: 2.9rem;
  box-shadow: 0 2px 5px #1c245108;
}
.auth-panel input:focus,
.panel input:focus,
.language-picker select:focus {
  outline: 3px solid #a894f380;
  border-color: #7559be;
}
.auth-panel .hint {
  margin: 0.1rem 0 1rem;
}
.auth-submit {
  width: 100%;
  margin-top: 1rem;
}
.auth-switch {
  align-self: center;
  margin-top: 0.85rem;
  text-align: center;
}
.hint {
  font-size: 0.82rem;
  color: #738097;
}
.member-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  background: linear-gradient(115deg, #ffe195, #ffc191 60%, #ffaba8);
  border: 1px solid #f2b684;
  border-radius: 1.35rem;
  padding: 2.2rem 2.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 15px 34px #e8a07d2b;
}
.member-card .eyebrow {
  color: #79519a;
}
.member-card h2 {
  font-size: 3.7rem;
  margin: 0.4rem 0;
  color: #37304f;
}
.member-card h2 small {
  font-size: 1.2rem;
}
.member-card p {
  margin: 0;
  color: #634e62;
}
.qr-wrap {
  background: #fff;
  color: #273249;
  padding: 0.7rem;
  border-radius: 0.9rem;
  display: grid;
  text-align: center;
  gap: 0.35rem;
  box-shadow: 0 7px 18px #935c6824;
}
.qr-wrap img {
  width: 138px;
  height: 138px;
}
.qr-wrap strong {
  letter-spacing: 0.13em;
  font-size: 0.76rem;
}
.columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: 1.2rem;
}
.panel {
  background: #fff;
  border: 1px solid #ebe6e2;
  border-radius: 1.15rem;
  padding: 1.6rem;
  margin-bottom: 1.2rem;
  box-shadow: 0 8px 22px #534a6810;
}
.panel h2 {
  color: #3d365d;
}
.panel hr {
  border: 0;
  border-top: 1px solid #ece7e3;
  margin: 1.7rem 0;
}
.list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid #eee9e4;
}
.list-item:last-child {
  border-bottom: 0;
}
.list-item p {
  margin: 0.25rem 0 0;
  font-size: 0.88rem;
}
.list-item span {
  white-space: nowrap;
  font-weight: 800;
  color: #5e4a9d;
}
.list-item .positive {
  color: #087d72;
}
.member-result {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 0;
  font-weight: 800;
}
.member-result span {
  color: #087d72;
}
.notice,
.error {
  padding: 0.8rem 1rem;
  border-radius: 0.75rem;
  margin: 0 0 1rem;
}
.notice {
  background: #e0f5e9;
  color: #155e42;
}
.error {
  background: #ffebeb;
  color: #9d3041;
}
.scanner {
  width: 100%;
  max-height: 300px;
  margin-top: 1rem;
  border-radius: 0.75rem;
}
.loading-state {
  text-align: center;
  padding: 5rem 1rem;
}
#app > .loading-progress {
  display: block;
  width: 6rem;
  height: 6rem;
  margin: 20vh auto 0;
  animation: spin 1.5s linear infinite;
}
#app > .loading-progress circle {
  fill: none;
  stroke: #d4c5f4;
  stroke-width: 8%;
}
#app > .loading-progress circle:last-child {
  stroke: #df5574;
  stroke-dasharray: 80 250;
  stroke-linecap: round;
}
#app > .loading-progress-text {
  text-align: center;
  margin-top: 1rem;
  font-weight: 900;
  color: #6449ac;
}
#app > .loading-progress-text::after {
  content: "CardClub…";
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
#blazor-error-ui {
  display: none;
  background: #a32f48;
  color: #fff;
  padding: 1rem;
  position: fixed;
  bottom: 0;
  width: 100%;
  z-index: 20;
}
@media (max-width: 800px) {
  .auth-experience {
    grid-template-columns: 1fr;
  }
  .auth-story {
    min-height: 280px;
    padding: 2rem;
  }
  .auth-story h2 {
    max-width: 20ch;
    font-size: 2.4rem;
  }
  .auth-features {
    margin-top: 1.3rem;
  }
  .card-art {
    right: -3rem;
    bottom: -5.5rem;
    transform: scale(0.7);
  }
  .auth-panel {
    padding: 2rem;
  }
}
@media (max-width: 600px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
    padding: 1rem;
  }
  .header-actions {
    width: 100%;
    justify-content: space-between;
    gap: 0.7rem;
  }
  .topbar nav {
    gap: 0.8rem;
  }
  .topbar nav a,
  .nav-button {
    font-size: 0.85rem;
  }
  .language-picker span {
    display: none;
  }
  .language-picker select {
    max-width: 8rem;
  }
  .content {
    width: min(100% - 1.2rem, 1160px);
    padding: 1.1rem 0 3rem;
  }
  .auth-experience {
    border-radius: 1.1rem;
  }
  .auth-story {
    min-height: 255px;
  }
  .auth-story h2 {
    font-size: 2rem;
    max-width: 17ch;
  }
  .auth-story p {
    font-size: 0.9rem;
  }
  .auth-features {
    font-size: 0.82rem;
  }
  .auth-panel {
    padding: 1.5rem;
  }
  .member-card {
    padding: 1.5rem;
    align-items: flex-start;
  }
  .member-card h2 {
    font-size: 2.7rem;
  }
  .qr-wrap img {
    width: 95px;
    height: 95px;
  }
  .heading {
    align-items: flex-start;
    flex-direction: column;
  }
  footer {
    flex-direction: column;
    text-align: center;
    gap: 0.2rem;
  }
}
/* Keep the sign-in form first on small screens and in keyboard navigation. */
@media (min-width: 801px) {
  .auth-story {
    grid-column: 1;
    grid-row: 1;
  }
  .auth-panel {
    grid-column: 2;
    grid-row: 1;
  }
}
@media (max-width: 800px) {
  .auth-panel {
    grid-row: 1;
  }
  .auth-story {
    grid-row: 2;
  }
}
@media (max-width: 600px) {
  .topbar.guest {
    align-items: center;
    flex-direction: row;
  }
  .topbar.guest .header-actions {
    width: auto;
  }
  .topbar.guest nav {
    display: none;
  }
  .auth-story {
    min-height: 250px;
    padding-bottom: 6.5rem;
  }
  .card-art {
    opacity: 0.75;
  }
}
