:root {
  --bg: #fff5e9;
  --ink: #17130f;
  --paper: #ffffff;
  --accent: #ff5f1f;
  --accent-dark: #c93c07;
  --accent-soft: #ffd8c7;
  --line: #221d17;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  font-family: "Space Grotesk", Arial, sans-serif;
  background: radial-gradient(circle at 15% 20%, #ffe5be 0%, transparent 35%),
    radial-gradient(circle at 85% 30%, #ffc0ab 0%, transparent 32%),
    linear-gradient(125deg, #fff5e9 0%, #ffeede 45%, #ffe2cc 100%);
  color: var(--ink);
  position: relative;
  overflow-x: hidden;
}

.max-damage-theme {
  --bg: #ffe6df;
  --paper: #ffe0da;
  --accent: #ff4b34;
  --accent-dark: #7a0900;
  --accent-soft: #ffb6ab;
  --line: #4b0a04;
  background: radial-gradient(circle at 14% 18%, #ffcfb8 0%, transparent 35%),
    radial-gradient(circle at 85% 26%, #ff9f91 0%, transparent 30%),
    linear-gradient(125deg, #ffece7 0%, #ffd7cf 52%, #ffc3b8 100%);
}

.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.1;
  background-image: radial-gradient(#000 0.5px, transparent 0.5px);
  background-size: 4px 4px;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.2rem 5vw;
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 80%, white 20%);
  backdrop-filter: blur(8px);
  border-bottom: 2px solid color-mix(in srgb, var(--line) 30%, transparent 70%);
}

[id] {
  scroll-margin-top: 8.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  color: var(--ink);
  text-decoration: none;
}

.brand-text {
  font-family: "Bebas Neue", sans-serif;
  letter-spacing: 0.08em;
  font-size: clamp(1.4rem, 2vw, 1.9rem);
  line-height: 1;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.2rem;
}

.nav-links a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
}

main {
  width: min(1100px, 90vw);
  margin: 2rem auto 4rem;
  padding-right: 14px;
  position: relative;
  z-index: 2;
}

.hero {
  border: 3px solid var(--line);
  background: var(--paper);
  border-radius: 28px;
  padding: clamp(1.5rem, 4vw, 3rem);
  box-shadow: 12px 12px 0 #000;
  animation: rise-in 500ms ease-out both;
}

.chip {
  display: inline-block;
  background: var(--accent-soft);
  border: 2px solid var(--line);
  border-radius: 999px;
  padding: 0.4rem 0.8rem;
  font-size: 0.9rem;
  margin-bottom: 0.8rem;
}

h1,
h2,
h3 {
  margin-top: 0;
}

h1 {
  font-family: "Bebas Neue", sans-serif;
  letter-spacing: 0.03em;
  font-size: clamp(2.6rem, 7vw, 5.3rem);
  line-height: 0.95;
  margin-bottom: 1rem;
}

h1 span {
  color: var(--accent-dark);
}

.hero-copy {
  font-size: clamp(1rem, 2vw, 1.3rem);
  max-width: 45ch;
  min-height: 3em;
}

.section-subtitle {
  margin-top: -0.8rem;
  margin-bottom: 2rem;
}

.hero-actions {
  margin-top: 1.5rem;
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  border: 2px solid var(--line);
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  padding: 0.8rem 1rem;
  font-family: inherit;
  color: var(--ink);
  transition: transform 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button-primary {
  background: var(--accent);
  box-shadow: 4px 4px 0 #000;
}

.button-outline {
  background: transparent;
}

.button-ghost {
  background: #fff;
}

.section {
  margin-top: 2.6rem;
}

.section h2 {
  font-size: clamp(1.7rem, 4vw, 2.4rem);
  font-family: "Bebas Neue", sans-serif;
  letter-spacing: 0.03em;
  margin-bottom: 1rem;
}

.section-explainer {
  position: relative;
  text-align: center;
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
  border: 3px solid var(--line);
  background: var(--accent-soft);
  border-radius: 20px;
  padding: clamp(1.4rem, 3.5vw, 2.2rem);
  box-shadow: 8px 8px 0 #000;
  overflow: visible;
}

.section-explainer::after {
  content: "READ THIS";
  position: absolute;
  top: -0.25rem;
  right: -1rem;
  transform: rotate(12deg);
  font-family: "Bebas Neue", sans-serif;
  font-size: clamp(1.4rem, 4vw, 2rem);
  font-weight: 400;
  letter-spacing: 0.12em;
  color: var(--accent-dark);
  border: 4px solid var(--accent-dark);
  border-radius: 6px;
  padding: 0.05em 0.35em;
  line-height: 1;
  white-space: nowrap;
  pointer-events: none;
  background: var(--accent-soft);
  opacity: 0.9;
  text-shadow: 0 0 2px rgba(201, 60, 7, 0.25);
  z-index: 2;
}

.section-explainer h2 {
  margin-bottom: 0.6rem;
}

.explainer-copy {
  font-size: clamp(1.05rem, 2vw, 1.2rem);
  line-height: 1.7;
  margin: 0;
}

.explainer-tagline {
  margin: 1rem 0 0;
  font-size: clamp(1.05rem, 2vw, 1.2rem);
}

.tier-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.tier-card {
  background: var(--paper);
  border: 2px solid var(--line);
  border-radius: 20px;
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  box-shadow: 6px 6px 0 #000;
}

.tier-card-max {
  position: relative;
  background: linear-gradient(145deg, #ffb1a6 0%, #ff7a67 52%, #ff4b34 100%);
  border: 3px solid #7a0900;
  box-shadow: 8px 8px 0 #4f0600;
  overflow: hidden;
}

.tier-card-max::after {
  content: "MAX";
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  background: #7a0900;
  color: #fff4ee;
  border: 2px solid #2f0500;
  border-radius: 999px;
  padding: 0.12rem 0.45rem;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.tier-card-max .tier-name {
  color: #5b0500;
  padding-right: 3.6rem;
}

.tier-card-max .tier-price {
  color: #5b0500;
}

.tier-card-max .tier-range {
  color: #390300;
}

.tier-name {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
  font-size: 0.9rem;
}

.tier-price {
  margin: 0;
  font-size: 1.9rem;
  font-family: "Bebas Neue", sans-serif;
}

.tier-range {
  margin: 0 0 0.4rem;
  min-height: 2.7em;
}

.tier-card .button {
  margin-top: auto;
}

.section-alt .steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.step {
  border: 2px solid var(--line);
  background: color-mix(in srgb, var(--paper) 70%, var(--accent-soft) 30%);
  border-radius: 16px;
  padding: 1rem;
}

.step-number {
  margin: 0 0 0.5rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.step h3 {
  margin-bottom: 0.4rem;
}

.site-footer {
  margin: 2.5rem auto 1.5rem;
  width: min(1100px, 92vw);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  padding-top: 1rem;
  border-top: 2px dashed color-mix(in srgb, var(--line) 40%, transparent 60%);
  font-size: 0.95rem;
}

.site-footer p {
  margin: 0;
}

.footer-brand {
  font-family: "Bebas Neue", sans-serif;
  font-size: 1.35rem;
  letter-spacing: 0.06em;
}

.legal-links {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.legal-links a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.legal-links a:hover {
  border-bottom-color: var(--ink);
}

.legal-links span {
  opacity: 0.7;
}

.flow-main {
  width: min(920px, 92vw);
  margin: 2rem auto 4rem;
}

.flow-card {
  border: 3px solid var(--line);
  background: var(--paper);
  border-radius: 24px;
  box-shadow: 10px 10px 0 #000;
  padding: clamp(1.2rem, 3vw, 2rem);
}

.max-damage-theme .flow-card {
  border-color: #7a0900;
  background: linear-gradient(165deg, #ffe8e3 0%, #ffd4cc 58%, #ffc1b5 100%);
  box-shadow: 10px 10px 0 #4f0600;
}

.flow-copy {
  margin: 0.35rem 0 1rem;
  max-width: 65ch;
}

.lock-notice {
  margin: 0.2rem 0 1rem;
  border: 2px solid #8d1a05;
  border-radius: 12px;
  background: #ffe3d8;
  padding: 0.75rem;
}

.lock-notice a {
  color: #8d1a05;
  font-weight: 700;
}

.tier-chip {
  border: 2px solid var(--line);
  border-radius: 14px;
  padding: 0.85rem;
  background: color-mix(in srgb, var(--paper) 70%, var(--accent-soft) 30%);
  margin-bottom: 1rem;
}

.max-damage-theme .chip {
  background: #ffd0c7;
  border-color: #7a0900;
}

.max-damage-theme .tier-chip {
  border-color: #7a0900;
  background: linear-gradient(160deg, #ffe8e4 0%, #ffd7d0 100%);
}

.tier-chip p {
  margin: 0.2rem 0;
}

.tier-chip-title {
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-size: 0.78rem;
  font-weight: 700;
}

.flow-form {
  display: grid;
  gap: 0.7rem;
}

.flow-form label {
  font-weight: 700;
}

.field-note {
  margin: -0.15rem 0 0.2rem;
  font-size: 0.9rem;
  opacity: 0.85;
}

.flow-form input[type="text"],
.flow-form input[type="email"],
.flow-form input[type="password"],
.flow-form select {
  -webkit-appearance: none;
  appearance: none;
  display: block;
  width: 100%;
  border: 2px solid var(--line);
  border-radius: 10px;
  padding: 0.75rem;
  min-height: 3.1rem;
  line-height: 1.25;
  font: inherit;
  background: #fff;
}

.flow-form select {
  padding-right: 2.4rem;
  background-image: linear-gradient(45deg, transparent 50%, #231d17 50%),
    linear-gradient(135deg, #231d17 50%, transparent 50%);
  background-position: calc(100% - 1.05rem) calc(50% - 0.12rem), calc(100% - 0.72rem) calc(50% - 0.12rem);
  background-size: 0.38rem 0.38rem, 0.38rem 0.38rem;
  background-repeat: no-repeat;
}

.flow-submit {
  margin-top: 0.45rem;
}

#pay-flex-amount {
  display: inline-block;
  text-align: center;
  white-space: normal;
}

.auth-actions {
  display: grid;
  gap: 0.6rem;
}

.auth-divider {
  margin: 0.15rem 0;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  opacity: 0.7;
}

.auth-divider span {
  padding: 0;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  border-top: 1px solid color-mix(in srgb, var(--line) 30%, transparent 70%);
}

.button-google {
  background: var(--accent);
  box-shadow: 4px 4px 0 #000;
}

.button-email {
  background: #fff;
}

.auth-mode-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.auth-mode {
  background: #fff;
  box-shadow: none;
}

.auth-mode.is-active {
  background: color-mix(in srgb, var(--accent-soft) 70%, white 30%);
  box-shadow: 3px 3px 0 #000;
}

.auth-helper {
  margin: 0.05rem 0 0;
  font-size: 0.86rem;
  opacity: 0.82;
}

.switch-link {
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.switch-link:hover {
  border-bottom-color: var(--ink);
}

.auth-status {
  min-height: 1.2em;
  margin: 0.2rem 0 0;
  font-size: 0.9rem;
}

.auth-status.is-error {
  color: #8d1a05;
}

.auth-status.is-success {
  color: #1b5f1b;
}

.rules-list {
  margin: 0 0 1rem;
  padding-left: 1.1rem;
  display: grid;
  gap: 0.55rem;
}

.check-row {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.summary-row {
  border: 2px dashed var(--line);
  border-radius: 12px;
  padding: 0.8rem;
  margin-bottom: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.max-damage-theme .summary-row {
  border-color: #7a0900;
  background: #ffe7e2;
}

.summary-row p {
  margin: 0;
}

.summary-stack {
  display: grid;
  gap: 0.5rem;
}

.summary-amount {
  font-family: "Bebas Neue", sans-serif;
  font-size: 2rem;
  letter-spacing: 0.03em;
}

.number-reveal {
  border: 3px solid var(--line);
  border-radius: 18px;
  padding: 1rem;
  background: linear-gradient(145deg, #ffd6c2 0%, #ffc2a8 100%);
  text-align: center;
  margin-bottom: 1rem;
}

.max-damage-theme .number-reveal {
  border-color: #7a0900;
  background: linear-gradient(145deg, #ffb7a8 0%, #ff866f 58%, #ff5b3e 100%);
}

.number-reveal p {
  margin: 0;
}

.number-reveal p:first-child {
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  font-weight: 700;
}

.flex-amount {
  font-family: "Bebas Neue", sans-serif;
  font-size: clamp(3.4rem, 10vw, 6rem);
  line-height: 1;
  margin-top: 0.12em;
  color: #7a0900;
}

.flow-copy-catty {
  margin-top: -0.35rem;
  font-weight: 600;
  color: #7a0900;
}

.max-damage-theme .button-primary,
.max-damage-theme .button-google {
  background: linear-gradient(145deg, #ff7c64 0%, #ff4b34 100%);
  border-color: #5b0500;
  color: #2d0400;
  box-shadow: 4px 4px 0 #4f0600;
}

.max-damage-theme .button-outline {
  border-color: #7a0900;
  color: #5b0500;
}

.certificate-panel {
  border: 3px solid var(--line);
  border-radius: 18px;
  background: #fff8ef;
  box-shadow: inset 0 0 0 3px #edd9c2;
  padding: 1.1rem 1.1rem 1.5rem;
  margin: 1rem 0;
  position: relative;
  overflow: hidden;
  display: grid;
  justify-items: center;
  text-align: center;
  max-width: 100%;
  box-sizing: border-box;
}

.cert-overline {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.72rem;
  font-weight: 800;
  text-align: center;
}

.cert-name {
  margin: 0.5rem 0 0.45rem;
  font-family: "Bebas Neue", sans-serif;
  font-size: clamp(2.2rem, 8vw, 4rem);
  letter-spacing: 0.05em;
  line-height: 0.9;
  text-align: center;
  text-transform: uppercase;
}

.cert-stat {
  margin: 0;
  border: 2px solid color-mix(in srgb, var(--line) 45%, transparent 55%);
  border-radius: 12px;
  background: color-mix(in srgb, #ffffff 75%, transparent 25%);
  padding: 0.58rem 0.7rem;
  text-align: center;
}

.cert-stat-label {
  display: block;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-size: 0.73rem;
  font-weight: 700;
  opacity: 0.86;
}

.cert-stat-value {
  display: block;
  margin-top: 0.24rem;
  font-size: 1.06rem;
  line-height: 1.25;
}

.cert-verification-link {
  display: block;
  margin-top: 0.2rem;
  color: inherit;
  font-weight: 700;
  text-decoration: none;
}

.cert-verification-link:hover {
  text-decoration: underline;
}

.cert-verification-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.36rem;
}

.verification-check {
  width: 1.16rem;
  height: 1.16rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(150deg, #21a1ff 0%, #1d9bf0 52%, #137fd4 100%);
  color: #ffffff;
  border: 1px solid #0f5f9d;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2);
  font-size: 0.74rem;
  font-weight: 800;
  line-height: 1;
}

.cert-flex-label {
  margin: 0.2rem 0 0;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.82rem;
  font-weight: 800;
  text-align: center;
}

.cert-amount-hero {
  margin: 0.14rem 0 0.25rem;
  font-family: "Bebas Neue", sans-serif;
  font-size: clamp(4rem, 16vw, 13.5rem);
  line-height: 0.86;
  letter-spacing: 0.02em;
  text-align: center;
  text-wrap: balance;
  word-break: break-all;
  max-width: 100%;
}

.cert-subcopy {
  margin: 0.1rem auto 1rem;
  max-width: 34ch;
  font-weight: 600;
  text-align: center;
}

.cert-amount-label {
  margin: 0.24rem 0 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 1.3rem;
  font-weight: 800;
  text-align: center;
}

.cert-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 0.5rem;
  width: 100%;
  max-width: 820px;
  margin-top: clamp(1.4rem, 3.6vw, 2.6rem);
}

body[data-page="player"] .flow-main {
  width: min(720px, 90vw);
}

body[data-page="player"] .player-active,
body[data-page="player"] .player-revoked {
  text-align: center;
  display: grid;
  align-content: center;
  padding: 2rem 0;
}

body[data-page="player"] .player-active[hidden],
body[data-page="player"] .player-revoked[hidden] {
  display: none;
}

body[data-page="player"] .player-active .certificate-panel {
  min-height: auto;
  width: min(640px, calc(100% - 1rem));
  margin-inline: auto;
  display: grid;
  align-content: center;
}

body[data-page="player"] .player-active h1 {
  text-align: center;
  margin-bottom: 0.4rem;
}

/* "Your turn. What can you flex?" CTA on the public Proof of Flex page.
   Matches the orange pill that appears in the bottom of OG share images so
   the live page and the shared image feel like the same product. Sends
   visitors who see someone else's flex straight into the flex flow.
   Width matches the certificate panel above so the CTA never extends past
   the cert visually. */
.player-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.18rem;
  /* Match the cert panel: width: min(640px, calc(100% - 1rem)); margin-inline: auto */
  width: min(640px, calc(100% - 1rem));
  margin: 1.4rem auto 0;
  padding: 1rem 1.4rem;
  box-sizing: border-box;
  background: var(--accent, #FF5F1F);
  color: var(--ink, #1A130F);
  border: 3px solid var(--ink, #1A130F);
  border-radius: 18px;
  text-decoration: none;
  font-weight: 700;
  text-align: center;
  box-shadow: 4px 4px 0 var(--ink, #1A130F);
  transition: transform 80ms ease, box-shadow 80ms ease;
}
.player-cta:hover,
.player-cta:focus-visible {
  transform: translate(-1px, -1px);
  box-shadow: 5px 5px 0 var(--ink, #1A130F);
  outline: none;
}
.player-cta:active {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--ink, #1A130F);
}
.player-cta-headline {
  font-size: 1.7rem;
  letter-spacing: -0.01em;
  line-height: 1;
}
.player-cta-sub {
  font-size: 1.1rem;
  font-weight: 500;
  opacity: 0.85;
}
@media (max-width: 600px) {
  .player-cta {
    padding: 0.85rem 1.1rem;
    margin-top: 1rem;
  }
  .player-cta-headline { font-size: 1.4rem; }
  .player-cta-sub { font-size: 0.95rem; }
}

body[data-page="player"] .player-revoked h1 {
  text-align: center;
  margin-bottom: 0.4rem;
  color: #9b1c1c;
}

.certificate-voided {
  border-color: #9b1c1c;
  background: repeating-linear-gradient(
    -45deg,
    #fff8f0,
    #fff8f0 18px,
    #ffeee4 18px,
    #ffeee4 20px
  );
  box-shadow: inset 0 0 0 3px #e8c4b8, 0 4px 0 #9b1c1c;
  min-height: 40vh;
  width: min(960px, 100%);
  margin-inline: auto;
  display: grid;
  align-content: center;
  position: relative;
  opacity: 0.75;
}

.certificate-voided .cert-name,
.certificate-voided .cert-amount-hero {
  color: #9b1c1c;
  opacity: 0.6;
}

.void-stamp {
  position: absolute;
  top: 0.8rem;
  left: 1rem;
  transform: rotate(-16deg);
  font-family: "Bebas Neue", sans-serif;
  font-size: clamp(3rem, 9vw, 4.5rem);
  font-weight: 700;
  letter-spacing: 0.14em;
  color: #9a0000;
  opacity: 1;
  border: 7px double #9a0000;
  border-radius: 8px;
  padding: 0.05em 0.35em;
  pointer-events: none;
  line-height: 1;
  white-space: nowrap;
  z-index: 2;
  text-shadow:
    0 0 2px rgba(154, 0, 0, 0.8),
    0 0 8px rgba(154, 0, 0, 0.4);
}

.revoked-tagline {
  margin-top: 1.5rem;
  font-size: 1.1rem;
  font-weight: 500;
  color: #1a1a1a;
  text-align: center;
}

body[data-page="certificate"] .certificate-panel {
  min-height: auto;
}

.certificate-tier-light .certificate-panel {
  border-color: #11446e;
  background: linear-gradient(160deg, #eef8ff 0%, #d9efff 55%, #c7e6ff 100%);
  box-shadow: inset 0 0 0 3px #b2d9fb, 0 4px 0 #11446e;
}

.certificate-tier-light .certificate-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(circle at 2px 2px, rgba(17, 68, 110, 0.2) 1px, transparent 1px);
  background-size: 14px 14px;
  opacity: 0.45;
}

.certificate-tier-light .cert-overline,
.certificate-tier-light .cert-name,
.certificate-tier-light .cert-flex-label,
.certificate-tier-light .cert-amount-hero {
  color: #0b3558;
}

.certificate-tier-medium .certificate-panel {
  border-color: #4a4f57;
  background: linear-gradient(170deg, #f5f7fb 0%, #dfe4ec 52%, #c6cdd9 100%);
  box-shadow: inset 0 0 0 3px #a9b2c0, 0 4px 0 #4a4f57;
}

.certificate-tier-medium .certificate-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    -30deg,
    rgba(74, 79, 87, 0.12) 0,
    rgba(74, 79, 87, 0.12) 8px,
    transparent 8px,
    transparent 22px
  );
}

.certificate-tier-medium .cert-overline,
.certificate-tier-medium .cert-name,
.certificate-tier-medium .cert-flex-label,
.certificate-tier-medium .cert-amount-hero {
  color: #303741;
}

.certificate-tier-nuclear .certificate-panel {
  border-color: #7a5a00;
  background: linear-gradient(145deg, #fff3c7 0%, #ffe08a 48%, #ffc84b 100%);
  box-shadow: inset 0 0 0 3px #dca62a, 0 4px 0 #7a5a00;
}

.certificate-tier-nuclear .certificate-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    -45deg,
    rgba(122, 90, 0, 0.16) 0,
    rgba(122, 90, 0, 0.16) 9px,
    transparent 9px,
    transparent 22px
  );
}

.certificate-tier-nuclear .cert-overline,
.certificate-tier-nuclear .cert-name,
.certificate-tier-nuclear .cert-flex-label,
.certificate-tier-nuclear .cert-amount-hero {
  color: #5c4300;
}

.certificate-tier-max .certificate-panel {
  border-color: #560700;
  background: linear-gradient(150deg, #ffd1c8 0%, #ff8a74 48%, #ff5038 100%);
  box-shadow: inset 0 0 0 3px #d33a21, 0 4px 0 #560700;
}

.certificate-tier-max .certificate-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 90% 8%, rgba(255, 231, 227, 0.75) 0, transparent 32%);
}

.certificate-tier-max .cert-overline,
.certificate-tier-max .cert-name,
.certificate-tier-max .cert-flex-label,
.certificate-tier-max .cert-amount-hero {
  color: #530700;
}

.certificate-tier-max .cert-amount-hero {
  text-shadow: 0.04em 0.04em 0 rgba(67, 4, 0, 0.22);
}

.certificate-tier-light .flow-card,
.certificate-tier-medium .flow-card,
.certificate-tier-nuclear .flow-card,
.certificate-tier-max .flow-card {
  box-shadow: 10px 10px 0 #000;
}

.share-panel {
  margin: 1.2rem 0 1.4rem;
  border: 2px solid var(--line);
  border-radius: 16px;
  padding: 1.2rem 1rem;
  background: color-mix(in srgb, var(--paper) 85%, var(--accent-soft) 15%);
  text-align: center;
}

.share-title {
  margin: 0 0 0.75rem;
  font-family: "Bebas Neue", "Impact", sans-serif;
  font-size: 1.35rem;
  letter-spacing: 0.04em;
  text-align: center;
}

.share-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: center;
}

.share-actions-compact {
  margin-top: 0.45rem;
}

.history-card .share-actions {
  justify-content: flex-start;
}

.history-card .share-actions-compact {
  gap: 0.36rem;
}

.history-card .share-button {
  width: auto;
  height: auto;
  min-width: 2.2rem;
  min-height: 2.2rem;
  padding: 0.3rem;
  box-shadow: 1px 1px 0 #000;
}

.history-card .share-button .share-label {
  display: none;
}

.history-card .share-icon {
  width: 1rem;
  height: 1rem;
}

.share-button {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 1rem 0.55rem 0.75rem;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: "Space Grotesk", sans-serif;
  box-shadow: 2px 2px 0 #000;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  border: 2px solid transparent;
  white-space: nowrap;
}

.share-button:hover {
  transform: translateY(-2px);
  box-shadow: 3px 4px 0 #000;
}

.share-button:active {
  transform: translateY(0);
  box-shadow: 1px 1px 0 #000;
}

.share-icon {
  width: 1.25rem;
  height: 1.25rem;
  display: block;
  flex-shrink: 0;
}

.share-label {
  display: inline;
}

[data-share-platform="x"],
[data-history-share="x"] {
  background: #0f0f0f;
  color: #ffffff;
}

[data-share-platform="facebook"],
[data-history-share="facebook"] {
  background: #1877f2;
  color: #ffffff;
}

[data-share-platform="instagram"],
[data-history-share="instagram"] {
  background: linear-gradient(135deg, #f9ce34 0%, #ee2a7b 55%, #6228d7 100%);
  color: #ffffff;
}

[data-share-platform="tiktok"],
[data-history-share="tiktok"] {
  background: #000000;
  color: #ffffff;
}

[data-share-platform="linkedin"],
[data-history-share="linkedin"] {
  background: #0a66c2;
  color: #ffffff;
}

[data-share-platform="download"],
[data-history-share="download"] {
  background: var(--paper);
  color: var(--ink);
  border-color: var(--line);
}

.share-status {
  margin-top: 0.4rem;
  text-align: center;
}

.certificate-share-render {
  position: absolute;
  left: -9999px;
  top: 0;
  width: 1080px;
  padding: 48px 56px;
  background: #fff8ef;
  pointer-events: none;
  text-align: center;
}

.certificate-share-render .share-brand-top {
  font-family: "Bebas Neue", sans-serif;
  font-size: 2.4rem;
  letter-spacing: 0.08em;
  color: var(--line, #1a130f);
  margin-bottom: 20px;
}

.certificate-share-render .share-brand-bottom {
  font-family: "Bebas Neue", sans-serif;
  font-size: 1.4rem;
  letter-spacing: 0.06em;
  color: #888;
  margin-top: 24px;
}

.certificate-share-render .cert-name {
  font-size: 3rem;
}

.certificate-share-render .cert-amount-hero {
  font-size: 8rem;
}

.certificate-share-render .cert-amount-label {
  font-size: 1.2rem;
}

.certificate-share-render .cert-meta-grid {
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  border: 0;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.account-grid {
  margin: 1rem 0;
  border: 2px solid var(--line);
  border-radius: 14px;
  padding: 0.8rem;
  background: #fff9f1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem 1rem;
}

.account-grid p {
  margin: 0;
}

.account-grid p:nth-child(odd) {
  font-weight: 700;
}

.account-consent-panel {
  margin: 0.9rem 0 0.4rem;
  border: 2px solid var(--line);
  border-radius: 12px;
  padding: 0.75rem;
  background: #fff9f1;
}

/* ── Hall of Flex Title Block ── */

.leaderboard-main {
  max-width: 820px;
}

.leaderboard-live-card {
  overflow: visible;
}

.hall-title-block {
  text-align: center;
  margin-bottom: 1.5rem;
}

.hall-eyebrow {
  margin: 0 0 0.2rem;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  opacity: 0.6;
}

.hall-title {
  margin: 0;
  font-family: "Bebas Neue", sans-serif;
  font-size: clamp(3.5rem, 12vw, 6rem);
  line-height: 0.9;
  letter-spacing: 0.04em;
  background: linear-gradient(135deg, var(--accent) 0%, #ff8c42 40%, var(--accent-dark) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(3px 3px 0 rgba(0, 0, 0, 0.15));
}

.hall-subtitle {
  margin: 0.4rem 0 0;
  font-size: clamp(0.95rem, 2vw, 1.15rem);
  opacity: 0.7;
}

/* ── Leaderboard Rows ── */

.leaderboard-list {
  display: grid;
  gap: 0.75rem;
}

.leaderboard-row {
  border: 3px solid var(--line);
  border-radius: 16px;
  background: #fffaf5;
  padding: 1rem 1.2rem;
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 1rem;
  align-items: center;
  box-shadow: 4px 4px 0 #000;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.leaderboard-row:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 #000;
}

.leaderboard-row:first-child {
  border-color: var(--accent);
  border-width: 3px;
  background: linear-gradient(135deg, #fff5ed 0%, #ffe8d4 100%);
  box-shadow: 6px 6px 0 var(--accent-dark);
  padding: 1.3rem 1.4rem;
}

.leaderboard-row:first-child .leaderboard-rank {
  font-size: 2.8rem;
  color: var(--accent);
}

.leaderboard-row:first-child .leaderboard-name {
  font-size: 1.25rem;
}

.leaderboard-row:first-child .leaderboard-amount {
  font-size: 2.8rem;
  color: var(--accent-dark);
}

.leaderboard-rank {
  margin: 0;
  font-family: "Bebas Neue", sans-serif;
  font-size: 2rem;
  line-height: 1;
  opacity: 0.7;
}

.leaderboard-main p,
.leaderboard-amount,
.leaderboard-link {
  margin: 0;
}

.leaderboard-name {
  font-weight: 700;
  font-size: 1.05rem;
}

.leaderboard-meta {
  font-size: 0.85rem;
  opacity: 0.65;
}

.leaderboard-amount {
  font-family: "Bebas Neue", sans-serif;
  font-size: 2.2rem;
  line-height: 0.9;
}

.leaderboard-link a {
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  font-size: 0.9rem;
}

.leaderboard-link a:hover {
  border-bottom-color: var(--accent);
  color: var(--accent-dark);
}

.leaderboard-empty-cell {
  opacity: 0.3;
}

.hall-cta {
  text-align: center;
  margin-top: 1.5rem;
}

/* ── Wall of Shame ── */

.shame-live-card {
  background: var(--ink);
  color: #fff;
  border-color: #444;
  box-shadow: 12px 12px 0 rgba(0, 0, 0, 0.5);
  overflow: visible;
}

.shame-title-block {
  text-align: center;
  margin-bottom: 1.5rem;
}

.shame-eyebrow {
  margin: 0 0 0.2rem;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  opacity: 0.4;
}

.shame-title {
  margin: 0;
  font-family: "Bebas Neue", sans-serif;
  font-size: clamp(3.5rem, 12vw, 6rem);
  line-height: 0.9;
  letter-spacing: 0.04em;
  background: linear-gradient(135deg, #ff4444 0%, #cc0000 50%, #880000 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(3px 3px 0 rgba(255, 0, 0, 0.15));
}

.shame-subtitle {
  margin: 0.4rem 0 0;
  font-size: clamp(0.95rem, 2vw, 1.15rem);
  opacity: 0.5;
  font-style: italic;
}

.shame-list {
  display: grid;
  gap: 0.75rem;
}

.shame-row {
  border: 2px solid #444;
  border-radius: 16px;
  background: #2a2220;
  padding: 1rem 1.2rem;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1rem;
  align-items: center;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.4);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.shame-row:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 rgba(0, 0, 0, 0.5);
}

.shame-row:first-child {
  border-color: #cc0000;
  border-width: 3px;
  background: linear-gradient(135deg, #2a1515 0%, #3a1a1a 100%);
  box-shadow: 6px 6px 0 #660000;
  padding: 1.3rem 1.4rem;
}

.shame-row:first-child .shame-rank {
  font-size: 2.8rem;
  color: #ff4444;
}

.shame-row:first-child .shame-name {
  font-size: 1.25rem;
}

.shame-row:first-child .shame-amount {
  font-size: 2.8rem;
  color: #ff4444;
}

.shame-rank {
  margin: 0;
  font-family: "Bebas Neue", sans-serif;
  font-size: 2rem;
  line-height: 1;
  opacity: 0.5;
  color: #ff6666;
}

.shame-main p {
  margin: 0;
}

.shame-name {
  font-weight: 700;
  font-size: 1.05rem;
}

.shame-meta {
  font-size: 0.85rem;
  opacity: 0.4;
}

.shame-amount {
  margin: 0;
  font-family: "Bebas Neue", sans-serif;
  font-size: 2.2rem;
  line-height: 0.9;
  text-align: right;
}

.shame-unpaid {
  display: block;
  font-family: "Space Grotesk", Arial, sans-serif;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: #ff4444;
  text-align: right;
  margin-top: 0.15rem;
}

.shame-empty-cell {
  opacity: 0.2;
}

.admin-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 0.55rem;
  margin: 0.8rem 0 1rem;
}

.admin-kpi {
  margin: 0;
  border: 2px solid var(--line);
  border-radius: 12px;
  padding: 0.6rem;
  background: #fff9f1;
}

.admin-kpi p {
  margin: 0;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  opacity: 0.85;
}

.admin-kpi strong {
  font-family: "Bebas Neue", sans-serif;
  font-size: 2rem;
  line-height: 1;
}

.admin-button-row {
  margin-top: 0.55rem;
}

.admin-game-card {
  border: 2px solid var(--line);
  border-radius: 12px;
  background: #fff9f1;
  padding: 0.85rem;
}

.admin-game-card p {
  margin: 0.2rem 0;
}

.admin-game-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.45rem 0.8rem;
}

.admin-chart {
  margin: 0.8rem 0 1rem;
  border: 2px solid var(--line);
  border-radius: 12px;
  background: #fff9f1;
  padding: 0.75rem;
  overflow-x: auto;
}

.admin-matrix {
  width: 100%;
  border-collapse: collapse;
  min-width: 520px;
}

.admin-matrix th,
.admin-matrix td {
  border: 1px solid color-mix(in srgb, var(--line) 28%, transparent 72%);
  padding: 0.5rem 0.6rem;
  text-align: left;
}

.admin-matrix thead th {
  background: #f6ece1;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.admin-matrix tbody th {
  font-size: 0.92rem;
}

.admin-matrix td {
  font-weight: 700;
}

.admin-log {
  display: grid;
  gap: 0.45rem;
}

.admin-log-item {
  border: 2px solid var(--line);
  border-radius: 12px;
  background: #fff9f1;
  padding: 0.6rem 0.7rem;
}

.admin-log-time {
  margin: 0;
  font-size: 0.8rem;
  opacity: 0.78;
}

.admin-log-title {
  margin: 0.12rem 0 0;
  font-weight: 700;
}

.admin-log-summary {
  margin: 0.18rem 0 0;
  font-size: 0.95rem;
  font-weight: 500;
  opacity: 0.95;
}

.admin-log-meta {
  margin: 0.18rem 0 0;
  padding: 0.32rem 0.5rem;
  background: rgba(0, 0, 0, 0.04);
  border-radius: 6px;
  font-family: var(--monospace-font, ui-monospace, SFMono-Regular, Menlo, monospace);
  font-size: 0.78rem;
  opacity: 0.7;
  word-break: break-all;
}

.admin-activity-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  font-size: 0.95rem;
}
.admin-activity-controls select {
  padding: 0.3rem 0.5rem;
  border: 2px solid var(--ink);
  border-radius: 6px;
  font-size: 0.95rem;
  font-family: inherit;
  background: var(--paper);
}

.admin-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 1rem;
}

.admin-pagination .page-info {
  font-size: 0.95rem;
  font-weight: 500;
  opacity: 0.8;
}

.admin-detail-header-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.admin-note {
  font-size: 0.85rem;
  opacity: 0.7;
  font-style: italic;
}

.button-danger {
  background: #ffd9d2;
  border-color: #651105;
  color: #651105;
}

.button-danger:hover {
  background: #ffbfb3;
}

.admin-search-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}

.admin-search-row input[type="text"] {
  flex: 1;
  min-width: 180px;
}

.admin-user-grid {
  display: grid;
  gap: 0.65rem;
}

.admin-user-card {
  border: 2px solid var(--line);
  border-radius: 12px;
  background: #fff9f1;
  padding: 0.85rem;
}

.admin-user-card p {
  margin: 0.2rem 0;
}

.admin-user-detail {
  margin-top: 1rem;
  border: 2px solid var(--accent);
  border-radius: 12px;
  background: #fff5e9;
  padding: 1rem;
}

.admin-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.admin-detail-header h3 {
  margin: 0;
  font-size: 1.1rem;
  word-break: break-all;
}

.admin-user-detail h4 {
  margin: 1rem 0 0.5rem;
  font-size: 1rem;
}

.revoked-wall {
  font-size: clamp(1.4rem, 5vw, 2.6rem);
  line-height: 1.4;
  margin: 0.4rem 0 0.8rem;
}

.legal-card {
  width: min(920px, 100%);
}

.history-grid {
  display: grid;
  gap: 0.75rem;
}

.history-card {
  border: 2px solid var(--line);
  border-radius: 12px;
  background: #fff9f1;
  padding: 0.8rem;
}

.history-card p {
  margin: 0.2rem 0;
}

.history-links {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.history-links a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.history-links a:hover {
  border-bottom-color: var(--ink);
}

.empty-note {
  margin: 0.15rem 0;
  opacity: 0.8;
}

.button-disabled {
  pointer-events: none;
  opacity: 0.55;
  box-shadow: none;
}

@media (max-width: 1160px) {
  .tier-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 940px) {
  main {
    width: min(1100px, 86vw);
    padding-right: 10px;
    padding-left: 4px;
  }

  .flow-main {
    width: min(920px, 86vw);
  }

  .flow-card,
  .hero {
    box-shadow: 6px 6px 0 #000;
  }

  .tier-grid,
  .section-alt .steps {
    grid-template-columns: 1fr;
  }

  .site-header {
    flex-wrap: wrap;
    justify-content: center;
  }

  .nav-links {
    order: 3;
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
  }

  .brand {
    justify-content: center;
  }

  .site-footer {
    flex-direction: column;
  }

  .button-row {
    flex-direction: column;
    align-items: stretch;
  }

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

  .admin-kpi-grid {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  }

  .admin-search-row {
    flex-direction: column;
    align-items: stretch;
  }

  .leaderboard-row {
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
  }

  .leaderboard-amount {
    grid-column: 1 / -1;
    text-align: center;
  }

  .leaderboard-link {
    grid-column: 1 / -1;
    text-align: center;
  }

  .shame-row {
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
  }

  .shame-amount {
    grid-column: 1 / -1;
    text-align: center;
  }

  .leaderboard-row {
    grid-template-columns: 1fr;
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  html, body {
    overflow-x: hidden;
  }

  main {
    width: 90vw;
    margin-left: auto;
    margin-right: auto;
    padding-right: 0;
    padding-left: 0;
  }

  .flow-main {
    width: 84vw;
  }

  body[data-page="player"] .flow-main {
    width: 84vw;
  }

  .flow-card,
  .hero {
    box-shadow: 4px 4px 0 #000;
    padding: clamp(0.8rem, 2.5vw, 1.5rem);
  }

  .max-damage-theme .flow-card {
    box-shadow: 4px 4px 0 #4f0600;
  }

  .certificate-panel {
    padding: 0.8rem;
  }

  .cert-meta-grid {
    grid-template-columns: 1fr;
  }

  .cert-amount-hero {
    font-size: clamp(3rem, 13vw, 8rem);
  }

  .cert-name {
    font-size: clamp(1rem, 4.5vw, 1.8rem);
  }
}
