:root {
  --bg: #fbfaf8;
  --panel: #fffdfb;
  --panel-soft: #fff4ef;
  --ink: #282625;
  --muted: #736c68;
  --line: #ece4df;
  --line-strong: #f06f58;
  --accent: #ee765f;
  --accent-soft: #f9b8ad;
  --green: #08b66c;
  --shadow: 0 22px 70px rgba(72, 48, 36, 0.08);
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  letter-spacing: 0;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  color: var(--accent);
}

button,
input {
  font: inherit;
  letter-spacing: 0;
}

.shell {
  width: min(960px, calc(100% - 32px));
  margin: 0 auto;
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 23px;
  font-weight: 700;
}

.mark {
  width: 28px;
  height: 22px;
  position: relative;
  display: inline-block;
}

.mark::before,
.mark::after,
.mark span {
  content: "";
  position: absolute;
  left: 0;
  height: 4px;
  border-radius: 999px;
  background: var(--ink);
}

.mark::before {
  width: 16px;
  top: 0;
  left: 10px;
  background: var(--accent);
}

.mark span {
  width: 28px;
  top: 9px;
}

.mark::after {
  width: 21px;
  bottom: 0;
}

.nav {
  display: flex;
  align-items: center;
  gap: 28px;
  color: #3f3b38;
  font-size: 14px;
  font-weight: 600;
}

.moon {
  width: 19px;
  height: 19px;
  border: 2px solid currentColor;
  border-radius: 50%;
  position: relative;
  color: var(--ink);
}

.moon::after {
  content: "";
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--bg);
  position: absolute;
  left: 6px;
  top: -1px;
}

.hero {
  text-align: center;
  padding: 20px 0 18px;
}

.stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 auto 38px;
  padding: 9px 18px;
  border: 1px solid #f1ede9;
  border-radius: 999px;
  background: #f4f2ef;
  color: var(--muted);
  font-size: 14px;
  box-shadow: 0 12px 28px rgba(41, 34, 29, 0.03);
}

.live-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--green);
  display: inline-block;
}

.stat-pill strong {
  color: var(--green);
}

h1 {
  margin: 0;
  font-size: clamp(40px, 5.4vw, 62px);
  line-height: 1.02;
  font-weight: 800;
  letter-spacing: 0;
}

.price-control {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--accent);
}

.stepper {
  width: 26px;
  height: 26px;
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: var(--accent);
  background: #fde9e5;
  cursor: pointer;
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
  padding: 0;
}

.stepper:focus-visible,
.primary:focus-visible,
.claim-button:focus-visible,
.bid-input:focus-visible,
.target-input:focus-visible,
.payment-close:focus-visible,
.payment-link:focus-visible {
  outline: 3px solid rgba(238, 118, 95, 0.28);
  outline-offset: 3px;
}

.hero-copy {
  width: min(530px, 100%);
  margin: 26px auto 22px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.7;
}

.hero-copy strong {
  color: var(--accent);
  font-weight: 700;
}

.claim-form {
  display: grid;
  grid-template-columns: 1fr 98px;
  gap: 12px;
  align-items: center;
  margin: 0 auto;
  width: min(880px, 100%);
}

.target-wrap {
  position: relative;
}

.globe {
  position: absolute;
  left: 17px;
  top: 50%;
  width: 17px;
  height: 17px;
  transform: translateY(-50%);
  border: 1.8px solid #9c9692;
  border-radius: 50%;
}

.globe::before,
.globe::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-left: 1px solid #9c9692;
  border-right: 1px solid #9c9692;
  border-radius: 50%;
}

.globe::after {
  inset: 7px 2px auto;
  height: 1px;
  border: 0;
  border-top: 1px solid #9c9692;
}

.target-input {
  width: 100%;
  min-height: 52px;
  border: 1px solid #e3d9d1;
  border-radius: 999px;
  background: #fffefc;
  color: var(--ink);
  padding: 0 20px 0 48px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.target-input::placeholder {
  color: #837d78;
}

.primary,
.claim-button {
  min-height: 52px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  font-weight: 800;
  cursor: pointer;
  padding: 0 22px;
  transition: transform 120ms ease, background 120ms ease, box-shadow 120ms ease;
}

.primary {
  background: var(--accent);
  box-shadow: 0 12px 28px rgba(238, 118, 95, 0.24);
}

.primary[data-loading="true"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.primary[data-loading="true"]::before {
  content: "";
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.5);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 760ms linear infinite;
}

.claim-button {
  background: var(--accent-soft);
}

.primary:hover {
  transform: translateY(-1px);
  background: #e8624b;
  box-shadow: 0 14px 32px rgba(238, 118, 95, 0.32);
}

.primary:disabled {
  background: var(--accent);
  box-shadow: 0 12px 28px rgba(238, 118, 95, 0.2);
  cursor: wait;
  opacity: 1;
}

.claim-button:hover {
  transform: translateY(-1px);
  background: var(--accent);
}

.helper {
  min-height: 22px;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.helper[data-state="error"] {
  color: #b9402e;
}

.helper[data-state="success"] {
  color: #087e4e;
}

.micro-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin: 18px auto 28px;
}

.micro-card {
  min-height: 184px;
  background: var(--panel);
  border: 1px solid #f4eee9;
  border-radius: 28px;
  box-shadow: var(--shadow);
  padding: 22px 25px 18px;
}

.micro-card h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  font-size: 17px;
  line-height: 1.25;
}

.tiny-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  display: inline-block;
}

.micro-list {
  display: grid;
  gap: 0;
}

.micro-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  min-height: 36px;
  border-top: 1px solid var(--line);
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
}

.micro-row:first-child {
  border-top: 0;
}

.avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  background: #ebe5df;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  flex: 0 0 auto;
  overflow: hidden;
}

.avatar img,
.listing-avatar img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border-radius: inherit;
}

.avatar img + span,
.listing-avatar img + span {
  display: none;
}

.avatar.icon-failed span,
.listing-avatar.icon-failed span {
  display: inline-grid;
  place-items: center;
  width: 100%;
  height: 100%;
}

.micro-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #36312e;
  font-weight: 700;
}

.board {
  display: grid;
  gap: 14px;
  margin: 0 0 42px;
}

.listing {
  display: grid;
  grid-template-columns: 54px 64px minmax(0, 1fr) 172px;
  align-items: start;
  gap: 16px;
  min-height: 108px;
  border: 2px solid var(--line-strong);
  border-radius: 24px;
  background: #fff0eb;
  padding: 20px 20px 18px;
}

.listing:nth-child(n + 4) {
  border-color: #f3c6bc;
  background: #fff8f5;
}

.rank-pill {
  min-width: 44px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
}

.listing-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  background: #fff;
  border: 1px solid rgba(40, 38, 37, 0.08);
  color: var(--ink);
  font-size: 23px;
  font-weight: 900;
  overflow: hidden;
}

.listing-avatar img {
  object-fit: contain;
  padding: 5px;
  background: #fff;
}

.listing h3 {
  margin: 0 0 7px;
  font-size: 18px;
  line-height: 1.18;
}

.listing-main {
  min-width: 0;
  padding-top: 1px;
}

.listing p {
  margin: 0;
  color: #8a817c;
  line-height: 1.45;
}

.meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  color: #6e6660;
  font-size: 13px;
}

.meta strong {
  color: #36312e;
  font-weight: 800;
}

.meta-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.listing-side {
  display: grid;
  justify-items: end;
  align-content: space-between;
  gap: 18px;
  min-height: 70px;
}

.bid {
  color: var(--accent);
  font-weight: 800;
  font-size: 18px;
}

.claim-button {
  min-height: 38px;
  font-size: 13px;
  padding: 0 16px;
}

.rank-divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  margin: 0 0 2px;
  color: #6e6660;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.rank-divider::before,
.rank-divider::after {
  content: "";
  height: 1px;
  background: #eadfd7;
}

.rank-divider span {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  justify-content: center;
  border: 1px solid #eadfd7;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  padding: 0 16px;
  box-shadow: 0 8px 22px rgba(72, 48, 36, 0.05);
}

.empty {
  border: 1px dashed #e2d7cf;
  border-radius: 27px;
  background: rgba(255, 255, 255, 0.64);
  padding: 30px;
  color: var(--muted);
  text-align: center;
}

.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 86px;
  border-top: 1px solid #ece5df;
  color: var(--muted);
  font-size: 13px;
}

.footer nav {
  display: flex;
  gap: 18px;
}

.page {
  padding: 20px 0 56px;
}

.page article {
  width: min(720px, 100%);
  margin: 0 auto;
  background: var(--panel);
  border: 1px solid #f2ece6;
  border-radius: 28px;
  box-shadow: var(--shadow);
  padding: 34px;
}

.page h1 {
  font-size: clamp(34px, 5vw, 50px);
  margin-bottom: 20px;
}

.page h2 {
  margin-top: 32px;
  font-size: 22px;
}

.page p,
.page li {
  color: var(--muted);
  line-height: 1.7;
}

.page a {
  color: var(--accent);
  font-weight: 700;
}

.success-panel {
  text-align: center;
}

.payment-modal {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(40, 38, 37, 0.24);
  backdrop-filter: blur(8px);
}

.payment-dialog {
  position: relative;
  width: min(420px, 100%);
  border: 1px solid #f1d5ce;
  border-radius: 24px;
  background: #fffdfb;
  box-shadow: 0 32px 90px rgba(72, 48, 36, 0.2);
  padding: 34px 30px 30px;
  text-align: center;
}

.payment-close {
  position: absolute;
  right: 16px;
  top: 14px;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  background: #fff1ed;
  color: var(--accent);
  cursor: pointer;
  font-weight: 900;
  line-height: 1;
}

.payment-spinner {
  width: 44px;
  height: 44px;
  margin: 0 auto 18px;
  border: 4px solid #fde3dd;
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 820ms linear infinite;
}

.payment-modal[data-state="ready"] .payment-spinner,
.payment-modal[data-state="error"] .payment-spinner {
  animation: none;
}

.payment-modal[data-state="ready"] .payment-spinner::after,
.payment-modal[data-state="error"] .payment-spinner::after {
  content: "";
  display: block;
  width: 14px;
  height: 14px;
  margin: 11px auto;
  border-radius: 50%;
  background: var(--accent);
}

.payment-modal[data-state="error"] .payment-spinner {
  border-color: #f6d2cc;
}

.payment-dialog h2 {
  margin: 0 0 10px;
  font-size: 23px;
  line-height: 1.2;
}

.payment-dialog p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.payment-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  margin-top: 22px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
  padding: 0 18px;
  box-shadow: 0 12px 28px rgba(238, 118, 95, 0.24);
}

.payment-link:hover {
  color: #fff;
  background: #e8624b;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.hidden {
  display: none !important;
}

@media (max-width: 760px) {
  .shell {
    width: 100%;
    max-width: 100%;
    padding-left: 12px;
    padding-right: 12px;
  }

  .top {
    min-height: 64px;
    gap: 12px;
  }

  .brand {
    font-size: 19px;
  }

  .nav {
    gap: 10px;
    font-size: 13px;
  }

  .nav a {
    display: none;
  }

  .hero {
    padding-top: 12px;
    overflow: hidden;
  }

  .stat-pill {
    width: min(300px, 100%);
    margin-bottom: 26px;
    padding-left: 12px;
    padding-right: 12px;
    font-size: 12px;
    max-width: 100%;
    justify-content: center;
    flex-wrap: wrap;
    overflow-wrap: anywhere;
  }

  h1 {
    display: grid;
    justify-items: center;
    gap: 8px;
    font-size: 36px;
  }

  .price-control {
    gap: 8px;
  }

  .hero-copy {
    width: min(280px, calc(100vw - 64px));
    font-size: 14px;
    margin-top: 18px;
    overflow-wrap: anywhere;
  }

  .claim-form,
  .micro-grid {
    grid-template-columns: 1fr;
    min-width: 0;
    max-width: 100%;
  }

  .claim-form {
    width: min(340px, 100%);
  }

  .micro-grid {
    width: 100%;
  }

  .target-wrap {
    min-width: 0;
    max-width: 100%;
  }

  .primary {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  .target-input {
    min-width: 0;
    max-width: 100%;
    padding-right: 14px;
  }

  .helper {
    width: min(320px, calc(100vw - 48px));
    margin-left: auto;
    margin-right: auto;
    line-height: 1.45;
    overflow-wrap: anywhere;
  }

  .micro-grid {
    gap: 14px;
  }

  .micro-card {
    min-width: 0;
  }

  .listing {
    grid-template-columns: 44px 44px minmax(0, 1fr);
    gap: 12px;
    padding: 16px;
  }

  .listing-avatar {
    width: 44px;
    height: 44px;
    font-size: 18px;
  }

  .listing-side {
    grid-column: 1 / -1;
    grid-template-columns: 1fr auto;
    justify-items: start;
    align-items: center;
    align-content: center;
    min-height: 0;
    width: 100%;
  }

  .rank-divider {
    gap: 10px;
  }

  .rank-divider span {
    min-height: 26px;
    padding: 0 12px;
  }

  .footer {
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    padding: 20px 0;
  }

  .page article {
    padding: 24px;
  }
}
