:root {
  --bg: #ffffff;
  --soft: #f6f5f2;
  --ink: #1b1b1b;
  --yellow: #ffcc00;
  --yellow-d: #e8b500;
  --green: #147a3d;
  --red: #b3261e;
  --shadow: 5px 5px 0 var(--ink);
  --shadow-sm: 3px 3px 0 var(--ink);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: "Nunito", system-ui, sans-serif;
}

body {
  overflow-x: hidden;
}

a {
  color: inherit;
}

button,
input,
select {
  font: inherit;
}

.wrap {
  width: min(980px, 100%);
  margin: 0 auto;
  padding: 18px 16px 28px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 15px;
}

.brand,
.home-link,
.logout-link,
.mode-link {
  text-decoration: none;
}

.brand {
  display: block;
  border-radius: 12px;
  padding: 4px 6px;
  margin: -4px -6px;
}

.brand:hover {
  background: rgba(255, 204, 0, 0.16);
}

.brand h1 {
  margin: 0;
  font-family: "Fredoka", system-ui, sans-serif;
  font-size: 21px;
  line-height: 1;
  letter-spacing: 0;
}

.brand p {
  margin: 3px 0 0;
  color: var(--yellow-d);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 1.6px;
  text-transform: uppercase;
}

.topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.home-link,
.logout-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 13px;
  border: 2.5px solid var(--ink);
  border-radius: 999px;
  background: #fff;
  box-shadow: var(--shadow-sm);
  font-family: "Fredoka", system-ui, sans-serif;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.logout-link {
  background: var(--yellow);
  cursor: pointer;
}

.logout-link[hidden] {
  display: none;
}

.home-link:active,
.logout-link:active {
  transform: translate(3px, 3px);
  box-shadow: 0 0 0 var(--ink);
}

.shell {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(340px, 1.08fr);
  gap: 18px;
  align-items: stretch;
}

.hero,
.panel {
  border: 3px solid var(--ink);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: 286px;
  background: var(--yellow);
  padding: 22px;
  display: grid;
  gap: 24px;
  align-content: space-between;
}

.kicker {
  margin-bottom: 8px;
  font-family: "Fredoka", system-ui, sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1.6px;
  text-transform: uppercase;
}

.hero h2 {
  margin: 0;
  font-family: "Fredoka", system-ui, sans-serif;
  font-size: clamp(42px, 7vw, 70px);
  line-height: 0.92;
  letter-spacing: 0;
}

.hero h2 span {
  display: block;
  color: #fff;
  text-shadow: 3px 3px 0 var(--ink);
}

.hero-copy {
  position: relative;
  z-index: 2;
}

.hero-copy p {
  max-width: 315px;
  margin: 13px 0 0;
  font-size: 17px;
  font-weight: 900;
  line-height: 1.22;
}

.mode-switch {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.mode-link {
  min-height: 46px;
  display: grid;
  place-items: center;
  border: 3px solid var(--ink);
  border-radius: 13px;
  background: #fff;
  box-shadow: var(--shadow-sm);
  font-family: "Fredoka", system-ui, sans-serif;
  font-size: 15px;
  font-weight: 700;
}

.mode-link.active {
  background: var(--ink);
  color: #fff;
}

.panel {
  background: #fff;
  padding: 18px;
}

.panel h2 {
  margin: 0 0 5px;
  font-family: "Fredoka", system-ui, sans-serif;
  font-size: 31px;
  line-height: 1;
  letter-spacing: 0;
}

.panel-note {
  margin: 0 0 14px;
  color: rgba(27, 27, 27, 0.66);
  font-size: 13px;
  font-weight: 900;
  line-height: 1.28;
}

.form {
  display: grid;
  gap: 12px;
}

.field {
  display: grid;
  gap: 5px;
  color: rgba(27, 27, 27, 0.64);
  font-size: 11px;
  font-weight: 900;
}

.input,
.select,
.phone-field {
  width: 100%;
  min-height: 48px;
  padding: 11px 12px;
  border: 2.5px solid var(--ink);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  box-shadow: 2px 2px 0 var(--ink);
  font-family: "Fredoka", system-ui, sans-serif;
  font-size: 15px;
  font-weight: 700;
}

.input:focus,
.select:focus,
.phone-field:focus-within {
  outline: 3px solid rgba(255, 204, 0, 0.45);
  outline-offset: 1px;
}

.phone-field {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 8px;
  padding: 0 12px 0 0;
}

.phone-prefix {
  height: 100%;
  min-width: 64px;
  display: grid;
  place-items: center;
  border-right: 2.5px solid var(--ink);
  background: var(--yellow);
  font-family: "Fredoka", system-ui, sans-serif;
  font-size: 15px;
  font-weight: 700;
}

.phone-input {
  width: 100%;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-family: "Fredoka", system-ui, sans-serif;
  font-size: 15px;
  font-weight: 700;
  outline: none;
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  cursor: pointer;
}

.chip input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.chip span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 10px;
  border: 2.5px solid var(--ink);
  border-radius: 999px;
  background: #fff;
  box-shadow: 2px 2px 0 var(--ink);
  font-family: "Fredoka", system-ui, sans-serif;
  font-size: 12px;
  font-weight: 700;
}

.chip input:checked + span {
  background: var(--yellow);
}

.consent {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 8px;
  align-items: start;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.25;
}

.consent input {
  width: 18px;
  height: 18px;
  accent-color: var(--yellow);
}

.staff-verify {
  display: grid;
  gap: 12px;
  padding: 14px;
  background: #fff7ed;
  border: 3px solid var(--ink);
  border-radius: 13px;
  box-shadow: 5px 5px 0 var(--ink);
}

.staff-verify[hidden] {
  display: none;
}

.staff-verify-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.staff-verify-head b {
  font-family: "Fredoka", system-ui, sans-serif;
  font-size: 18px;
}

.staff-verify-head span {
  padding: 4px 8px;
  background: #fff;
  border: 2px solid var(--ink);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
}

.staff-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.staff-compare > div {
  min-width: 0;
  padding: 10px;
  background: #fff;
  border: 2px solid rgba(27, 27, 27, 0.16);
  border-radius: 10px;
}

.staff-compare h3 {
  margin: 0 0 8px;
  font-size: 13px;
}

.staff-compare dl {
  display: grid;
  gap: 6px;
  margin: 0;
  font-size: 12px;
}

.staff-compare div div {
  display: grid;
  gap: 2px;
}

.staff-compare dt {
  color: rgba(27, 27, 27, 0.58);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.staff-compare dd {
  margin: 0;
  overflow-wrap: anywhere;
  font-weight: 900;
}

.staff-confirm {
  padding: 10px;
  background: rgba(255, 255, 255, 0.64);
  border-radius: 10px;
}

.status {
  min-height: 18px;
  color: rgba(27, 27, 27, 0.68);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.25;
}

.status.ok {
  color: var(--green);
}

.status.error {
  color: var(--red);
}

.submit,
.secondary {
  width: 100%;
  min-height: 50px;
  border: 3px solid var(--ink);
  border-radius: 13px;
  box-shadow: var(--shadow);
  cursor: pointer;
  font-family: "Fredoka", system-ui, sans-serif;
  font-size: 16px;
  font-weight: 700;
}

.submit {
  background: var(--yellow);
  color: var(--ink);
}

.secondary {
  display: grid;
  place-items: center;
  background: #fff;
  color: var(--ink);
  text-decoration: none;
}

.submit:active,
.secondary:active {
  transform: translate(3px, 3px);
  box-shadow: 0 0 0 var(--ink);
}

.submit:disabled {
  opacity: 0.68;
  cursor: wait;
}

.member-card {
  display: none;
  margin-top: 16px;
}

.member-card.show {
  display: block;
}

.has-member-card .shell {
  display: block;
  width: min(430px, 100%);
  margin: 0 auto;
}

.has-member-card .hero,
.has-member-card .panel > h2,
.has-member-card .panel-note,
.has-member-card .form {
  display: none;
}

.has-member-card .panel {
  padding: 14px;
}

.has-member-card .member-card {
  margin-top: 0;
}

.digital-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 16px;
  border: 3px solid var(--ink);
  border-radius: 18px;
  background: var(--yellow);
  box-shadow: var(--shadow);
}

.digital-card::before {
  content: "";
  position: absolute;
  z-index: -1;
  right: -18%;
  bottom: -42%;
  width: 95%;
  height: 105%;
  background: #ff8fb2;
  transform: rotate(-35deg);
  transform-origin: center;
}

.digital-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.digital-card-top span {
  display: block;
  margin-bottom: 7px;
  color: rgba(27, 27, 27, 0.68);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.digital-card-top b {
  display: block;
  font-family: "Fredoka", system-ui, sans-serif;
  font-size: 30px;
  line-height: 0.96;
  letter-spacing: 0;
}

.digital-card-top strong {
  min-width: 74px;
  min-height: 42px;
  display: grid;
  place-items: center;
  padding: 7px 10px;
  border: 2.5px solid var(--ink);
  border-radius: 999px;
  background: var(--ink);
  color: var(--yellow);
  box-shadow: 2px 2px 0 #fff;
  font-family: "Fredoka", system-ui, sans-serif;
  font-size: 15px;
  white-space: nowrap;
}

.digital-card-number {
  margin: 18px 0 10px;
}

.digital-card-number span {
  display: block;
  margin-bottom: 4px;
  color: rgba(27, 27, 27, 0.62);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.digital-card-number strong {
  display: block;
  font-family: "Fredoka", system-ui, sans-serif;
  font-size: clamp(25px, 8vw, 38px);
  line-height: 1;
  letter-spacing: 0;
}

.digital-card-code {
  margin: 12px 0;
  padding: 10px 9px 8px;
  border: 2.5px solid var(--ink);
  border-radius: 13px;
  background: #fff;
}

.digital-barcode {
  display: block;
  width: 100%;
  height: auto;
  max-height: 82px;
}

.barcode-fallback {
  min-height: 58px;
  display: grid;
  place-items: center;
  font-family: "Fredoka", system-ui, sans-serif;
  font-size: 20px;
  font-weight: 700;
}

.digital-card-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 126px));
  gap: 8px;
  margin-top: 12px;
}

.digital-card-stats span {
  min-width: 0;
  min-height: 62px;
  display: grid;
  align-content: center;
  gap: 3px;
  padding: 8px 7px;
  border: 2px solid var(--ink);
  border-radius: 12px;
  background: #fff;
  box-shadow: 2px 2px 0 var(--ink);
}

.digital-card-stats b,
.digital-card-stats small {
  display: block;
  overflow-wrap: anywhere;
  line-height: 1.05;
}

.digital-card-stats b {
  font-family: "Fredoka", system-ui, sans-serif;
  font-size: 16px;
  font-weight: 700;
}

.digital-card-stats small {
  color: rgba(27, 27, 27, 0.62);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.digital-card-phone {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 14px 0 0;
  font-family: "Fredoka", system-ui, sans-serif;
  font-size: 13px;
  font-weight: 700;
}

.digital-card-phone b {
  font-size: 12px;
}

.club-reward {
  display: grid;
  gap: 12px;
  margin-top: 18px;
  padding: 18px;
  border: 3px solid var(--ink);
  border-radius: 18px;
  background: linear-gradient(135deg, #fff4d7, #ffdce8);
  box-shadow: var(--shadow);
}

.club-reward-kicker {
  color: #c4164f;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.club-reward-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.club-reward-title strong {
  max-width: 290px;
  font-family: "Fredoka", system-ui, sans-serif;
  font-size: 29px;
  line-height: 1.02;
}

.club-reward-title span {
  flex: 0 0 auto;
  padding: 6px 10px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: #ff4f7e;
  font-weight: 900;
}

.club-reward > p {
  margin: 0;
  font-size: 13px;
  font-weight: 900;
}

.club-reward-code {
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 2px dashed var(--ink);
  border-radius: 13px;
  background: #fff;
}

.club-reward-code small {
  color: rgba(27, 27, 27, 0.62);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.club-reward-code b {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 20px;
  letter-spacing: 0.4px;
  overflow-wrap: anywhere;
}

.club-reward-expiry {
  font-size: 12px !important;
}

.club-reward-store {
  display: grid;
  gap: 3px;
  padding: 11px;
  border: 2px solid var(--ink);
  border-radius: 12px;
  background: #fff;
  font-size: 12px;
  line-height: 1.3;
}

.club-reward-store span {
  color: rgba(27, 27, 27, 0.66);
  font-weight: 900;
}

.club-reward-scan {
  display: grid;
  grid-template-columns: 112px 1fr;
  align-items: center;
  gap: 12px;
  padding: 11px;
  border: 2px solid var(--ink);
  border-radius: 12px;
  background: #fff;
}

.club-reward-scan img {
  display: block;
  width: 112px;
  height: 112px;
}

.club-reward-scan div {
  display: grid;
  gap: 5px;
  font-size: 12px;
  line-height: 1.3;
}

.club-reward-scan span {
  color: rgba(27, 27, 27, 0.66);
  font-weight: 900;
}

.club-reward.is-closed {
  background: var(--soft);
}

@media (min-width: 760px) {
  .has-member-card .shell {
    width: min(900px, 100%);
  }

  .has-member-card .panel {
    padding: 18px;
  }

  .has-member-card .member-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 18px;
    align-items: start;
  }

  .has-member-card .club-reward {
    margin-top: 0;
  }
}
}

.member-card-note {
  margin-top: 14px;
  padding: 12px;
  border: 2.5px solid var(--ink);
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.member-card-note b {
  display: block;
  margin-bottom: 5px;
  font-family: "Fredoka", system-ui, sans-serif;
  font-size: 16px;
}

.member-card-note p {
  margin: 0;
  color: rgba(27, 27, 27, 0.64);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.32;
}

.redirect-card {
  width: min(520px, 100%);
  margin: 80px auto;
  padding: 18px;
  border: 3px solid var(--ink);
  border-radius: 18px;
  background: var(--yellow);
  box-shadow: var(--shadow);
}

.redirect-card h1 {
  margin: 0 0 8px;
  font-family: "Fredoka", system-ui, sans-serif;
  font-size: 34px;
}

@media (max-width: 860px) {
  .shell {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }
}

@media (max-width: 560px) {
  .wrap {
    padding: 12px 12px 24px;
  }

  .topbar {
    align-items: flex-start;
  }

  .brand h1 {
    font-size: 19px;
  }

  .topbar-actions {
    gap: 7px;
  }

  .home-link,
  .logout-link {
    min-height: 35px;
    padding: 7px 10px;
    font-size: 12px;
  }

  .hero {
    padding: 16px 14px;
    gap: 18px;
  }

  .hero h2 {
    font-size: 43px;
  }

  .hero-copy p {
    max-width: 100%;
    font-size: 14px;
  }

  .split {
    grid-template-columns: 1fr;
  }

  .staff-compare {
    grid-template-columns: 1fr;
  }

  .panel {
    padding: 14px;
  }

  .club-reward-scan {
    grid-template-columns: 96px 1fr;
  }

  .club-reward-scan img {
    width: 96px;
    height: 96px;
  }
}
