:root {
  color-scheme: dark;
  --bg: #07090d;
  --panel: rgba(16, 20, 28, 0.82);
  --panel-solid: #10141c;
  --line: rgba(255, 255, 255, 0.12);
  --text: #f5f7fb;
  --muted: #9aa6b2;
  --cyan: #41d9ff;
  --green: #4cf09f;
  --gold: #f1b84b;
  --red: #ff6b6b;
  --shadow: 0 22px 70px rgba(0, 0, 0, 0.34);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 12% 18%, rgba(65, 217, 255, 0.12), transparent 26rem),
    radial-gradient(circle at 88% 12%, rgba(76, 240, 159, 0.1), transparent 28rem),
    linear-gradient(180deg, #07090d 0%, #0a0d12 52%, #080a0e 100%);
  color: var(--text);
  min-width: 320px;
}

button,
input,
select {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

input.invalid {
  border-color: rgba(255, 107, 107, 0.78);
  box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.12);
}

.field-error {
  display: block;
  margin-top: 7px;
  color: var(--red);
  font-size: 12px;
  font-style: normal;
  font-weight: 760;
}

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

svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: 0 0 auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 22px;
  min-height: 72px;
  padding: 0 clamp(18px, 4vw, 56px);
  background: rgba(7, 9, 13, 0.76);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.brand,
.nav,
.top-social-links,
.login-button,
.hero-actions,
.wallet-card-top,
.metric-row,
.section-head,
.chain-pill,
.primary-button,
.secondary-button,
.checkin-button,
.icon-button,
.leader-row,
.linked-item {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  overflow: hidden;
  background: #c9ff00;
  color: #061014;
  box-shadow: 0 0 28px rgba(201, 255, 0, 0.22);
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.nav {
  gap: 18px;
  margin-left: auto;
  color: var(--muted);
  font-size: 14px;
}

.nav a:hover {
  color: var(--text);
}

.nav a.active {
  color: var(--cyan);
}

.top-social-links {
  gap: 8px;
}

.top-social-links a {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
}

.top-social-links a:hover {
  border-color: rgba(65, 217, 255, 0.42);
  color: var(--cyan);
}

.top-social-links img {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
}

.wallet-menu {
  position: relative;
}

.login-button {
  gap: 8px;
  min-width: 132px;
  height: 42px;
  padding: 0 12px;
  border: 1px solid rgba(65, 217, 255, 0.46);
  border-radius: 8px;
  background: rgba(7, 22, 31, 0.78);
  color: #d8fbff;
  box-shadow: 0 0 20px rgba(65, 217, 255, 0.1);
}

.login-button svg {
  color: var(--cyan);
}

.login-button .chevron-icon {
  width: 14px;
  height: 14px;
  margin-left: auto;
  color: var(--muted);
  transition: transform 160ms ease;
}

.wallet-menu.open .chevron-icon {
  transform: rotate(180deg);
}

.wallet-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 40;
  display: none;
  width: min(300px, calc(100vw - 36px));
  overflow: hidden;
  border: 1px solid rgba(65, 217, 255, 0.22);
  border-radius: 8px;
  background: rgba(13, 18, 29, 0.98);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.42);
}

.wallet-menu.open .wallet-dropdown {
  display: block;
}

.dropdown-section {
  display: grid;
  gap: 8px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
}

.dropdown-title {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.dropdown-section strong {
  color: var(--text);
  font-size: 13px;
  word-break: break-all;
}

.dropdown-accounts {
  display: grid;
  gap: 8px;
}

.dropdown-account {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--text);
  font-size: 13px;
}

.dropdown-account span {
  color: var(--muted);
}

.dropdown-account.discord-connected strong,
.dropdown-account.discord-connected span {
  color: #b9c7ff;
}

.disconnect-button {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  background: rgba(255, 107, 107, 0.08);
  color: var(--red);
  text-align: left;
}

.disconnect-button:hover {
  background: rgba(255, 107, 107, 0.14);
}

.wallet-connect-dialog {
  width: min(920px, calc(100vw - 36px));
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  background: #191b20;
  color: var(--text);
  box-shadow: 0 26px 90px rgba(0, 0, 0, 0.62);
}

.social-status-badge {
  padding: 5px 8px;
  border-radius: 6px;
  background: rgba(88, 101, 242, 0.14);
  color: #c7d2ff;
  font-size: 12px;
  font-weight: 800;
}

.wallet-connect-dialog::backdrop {
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(8px);
}

.wallet-connect-card {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  min-height: 520px;
}

.wallet-connect-sidebar {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 26px 28px;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.wallet-connect-sidebar h2,
.wallet-connect-info h2 {
  font-size: 22px;
}

.wallet-group-label {
  margin-top: 14px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.wallet-option {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-height: 54px;
  padding: 7px 8px;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  text-align: left;
}

.wallet-option:hover,
.wallet-option:focus-visible {
  background: rgba(255, 255, 255, 0.06);
  outline: none;
}

.wallet-option:disabled {
  opacity: 0.45;
}

.wallet-option span:last-child {
  display: grid;
  gap: 2px;
}

.wallet-option strong {
  font-size: 15px;
}

.wallet-option em {
  color: var(--cyan);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.wallet-logo {
  position: relative;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  overflow: hidden;
  border-radius: 6px;
  font-size: 0;
}

.okx-logo {
  background: url("/assets/icon-okx-wallet.png") center / cover no-repeat;
}

.binance-logo {
  background: url("/assets/icon-binance-wallet.png") center / cover no-repeat;
}

.metamask-logo {
  background: url("/assets/icon-metamask-wallet.png") center / cover no-repeat;
}

.walletconnect-logo {
  background: url("/assets/icon-walletconnect.png") center / cover no-repeat;
}

.browser-logo {
  background: url("/assets/icon-browser-wallet.png") center / cover no-repeat;
}

.wallet-connect-info {
  position: relative;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 26px;
  padding: 48px 64px;
  text-align: left;
}

.wallet-connect-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
}

.wallet-info-item {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 18px;
  width: min(430px, 100%);
}

.wallet-info-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  overflow: hidden;
  border-radius: 12px;
  background: transparent;
}

.wallet-info-icon.accent {
  background: transparent;
}

.wallet-info-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.wallet-info-item strong {
  display: block;
  margin-bottom: 5px;
  font-size: 15px;
}

.wallet-info-item p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.wallet-learn-button,
.wallet-learn-link {
  justify-self: center;
  font-weight: 800;
}

.wallet-learn-button {
  min-height: 38px;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--cyan);
  color: #061014;
  font-size: 14px;
}

.wallet-learn-link {
  color: var(--cyan);
  font-size: 13px;
}

.icon-button {
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 390px);
  align-items: end;
  min-height: calc(100vh - 72px);
  padding: clamp(48px, 8vw, 96px) clamp(18px, 4vw, 56px) clamp(30px, 5vw, 58px);
  overflow: hidden;
}

.hero-image,
.hero-scrim {
  position: absolute;
  inset: 0;
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.86;
}

.hero-scrim {
  background:
    linear-gradient(90deg, rgba(7, 9, 13, 0.96) 0%, rgba(7, 9, 13, 0.7) 42%, rgba(7, 9, 13, 0.28) 100%),
    linear-gradient(0deg, #07090d 0%, rgba(7, 9, 13, 0.2) 40%);
}

.hero-content,
.wallet-card {
  position: relative;
  z-index: 1;
}

.hero-content {
  max-width: 720px;
  padding-bottom: 34px;
}

.chain-pill {
  width: fit-content;
  gap: 9px;
  padding: 9px 12px;
  border: 1px solid rgba(65, 217, 255, 0.28);
  border-radius: 8px;
  background: rgba(8, 18, 24, 0.78);
  color: #c9f5ff;
  font-size: 13px;
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 18px var(--green);
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  margin-top: 20px;
  font-size: clamp(56px, 8vw, 112px);
  line-height: 0.9;
  letter-spacing: 0;
}

.hero-copy {
  max-width: 610px;
  margin-top: 22px;
  color: #c3cad4;
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.58;
}

.hero-actions {
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 30px;
}

.primary-button,
.secondary-button,
.checkin-button,
.danger-button {
  justify-content: center;
  gap: 9px;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 8px;
  font-weight: 760;
}

.primary-button {
  background: linear-gradient(135deg, var(--cyan), var(--green));
  color: #061014;
  box-shadow: 0 16px 36px rgba(65, 217, 255, 0.2);
}

.secondary-button {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.danger-button {
  display: inline-flex;
  border: 1px solid rgba(255, 107, 107, 0.38);
  background: rgba(255, 107, 107, 0.12);
  color: #ffd0d0;
}

.wallet-card,
.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.wallet-card {
  padding: 22px;
  align-self: center;
}

.wallet-card-top {
  justify-content: space-between;
  gap: 10px;
}

.muted-label,
.stat span,
.task-card p,
.section-head .eyebrow,
label span,
td,
.state-line,
.linked-item span {
  color: var(--muted);
}

.network-badge,
.task-status {
  padding: 5px 9px;
  border-radius: 8px;
  background: rgba(76, 240, 159, 0.1);
  color: #bafbd8;
  font-size: 12px;
  white-space: nowrap;
}

#walletAddress {
  display: block;
  min-height: 34px;
  margin-top: 18px;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 16px;
  overflow-wrap: anywhere;
}

.metric-row {
  gap: 12px;
  margin-top: 22px;
}

.metric-row > div {
  flex: 1;
  padding: 16px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
}

.metric-row span,
.metric-row strong {
  display: block;
}

.metric-row strong {
  margin-top: 6px;
  font-size: 30px;
}

.checkin-button {
  width: 100%;
  margin-top: 18px;
  background: var(--gold);
  color: #171005;
}

.state-line {
  margin-top: 14px;
  min-height: 22px;
  font-size: 14px;
}

.stats-band {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  padding: 1px clamp(18px, 4vw, 56px);
  background: var(--line);
}

.stat {
  padding: 24px;
  background: rgba(11, 14, 20, 0.96);
}

.stat span,
.stat strong {
  display: block;
}

.stat strong {
  margin-top: 8px;
  font-size: clamp(28px, 4vw, 44px);
}

.workspace,
.records {
  display: grid;
  gap: 18px;
  padding: clamp(22px, 4vw, 56px);
}

.workspace {
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.75fr);
}

.records {
  grid-template-columns: minmax(300px, 0.55fr) minmax(0, 1.45fr);
  padding-top: 0;
}

.account-page {
  min-height: calc(100vh - 72px);
  padding: clamp(22px, 4vw, 56px);
}

.account-public {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  align-items: stretch;
  gap: 18px;
}

.account-story {
  display: grid;
  align-content: center;
  gap: 18px;
  min-height: 560px;
  padding: clamp(24px, 4vw, 44px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(11, 14, 20, 0.76);
}

.account-story h2 {
  max-width: 720px;
  font-size: clamp(34px, 5vw, 62px);
  line-height: 1;
}

.account-story > p {
  max-width: 720px;
  color: #c3cad4;
  font-size: 17px;
  line-height: 1.65;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 10px;
}

.feature-card {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 190px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.feature-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: rgba(65, 217, 255, 0.1);
  color: var(--cyan);
}

.feature-card strong {
  font-size: 15px;
}

.feature-card p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.account-visual {
  position: relative;
  min-height: 560px;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0c1118;
}

.account-visual img {
  width: 100%;
  height: 100%;
  min-height: 560px;
  object-fit: cover;
  opacity: 0.78;
}

.account-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(7, 9, 13, 0.04), rgba(7, 9, 13, 0.78));
}

.account-visual figcaption {
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 22px;
  z-index: 1;
  display: grid;
  gap: 8px;
}

.account-visual figcaption strong {
  font-size: clamp(24px, 3vw, 34px);
}

.account-visual figcaption span {
  max-width: 520px;
  color: #c3cad4;
  line-height: 1.55;
}

.account-admin-records {
  grid-template-columns: 1fr;
  padding: 0;
}

.earn-page {
  min-height: calc(100vh - 72px);
  padding: clamp(22px, 4vw, 56px);
}

.earn-hero {
  display: grid;
  gap: 18px;
  margin-bottom: 18px;
  background:
    linear-gradient(135deg, rgba(65, 217, 255, 0.1), rgba(76, 240, 159, 0.08)),
    var(--panel);
}

.earn-copy {
  max-width: 820px;
  color: #c3cad4;
  font-size: 17px;
  line-height: 1.65;
}

.earn-tagline {
  width: fit-content;
  padding: 10px 12px;
  border: 1px solid rgba(76, 240, 159, 0.28);
  border-radius: 8px;
  background: rgba(76, 240, 159, 0.1);
  color: #bafbd8;
  font-weight: 800;
}

.earn-stats,
.earn-dashboard-grid,
.earn-workspace {
  display: grid;
  gap: 18px;
}

.earn-stats,
.earn-dashboard-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.earn-dashboard-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.earn-stats > div,
.earn-dashboard-grid > div {
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
}

.earn-stats span,
.earn-dashboard-grid span,
.earn-estimate span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.earn-stats strong,
.earn-dashboard-grid strong {
  display: block;
  margin-top: 8px;
  font-size: clamp(22px, 3vw, 34px);
}

.earn-dashboard-grid small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}

.vault-display-admin {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 12px;
}

.vault-display-admin input {
  min-width: 0;
  height: 34px;
  padding: 0 10px;
}

.earn-workspace {
  grid-template-columns: minmax(320px, 0.62fr) minmax(0, 1fr);
}

.earn-dashboard-panel {
  grid-column: 1 / -1;
}

.contract-tools {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.contract-function-list {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.contract-function-list span {
  min-height: 30px;
  padding: 7px 10px;
  border: 1px solid rgba(65, 217, 255, 0.18);
  border-radius: 8px;
  background: rgba(65, 217, 255, 0.07);
  color: #c9f5ff;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 12px;
}

.earn-deposit-panel {
  display: grid;
  align-content: start;
  gap: 16px;
}

.earn-estimate {
  display: grid;
  gap: 7px;
  padding: 14px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
}

.earn-estimate strong {
  color: var(--green);
  font-size: 22px;
}

.earn-deposit-list {
  display: grid;
  gap: 10px;
}

.earn-deposit-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
}

.earn-deposit-item div,
.earn-deposit-actions,
.earn-withdrawal-actions {
  display: grid;
  gap: 5px;
}

.earn-deposit-item strong {
  font-size: 15px;
}

.earn-deposit-item span {
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.earn-deposit-item em {
  color: var(--gold);
  font-style: normal;
  font-weight: 800;
  white-space: nowrap;
}

.earn-deposit-actions,
.earn-withdrawal-actions {
  justify-items: end;
}

.mini-button {
  min-height: 34px;
  padding: 0 12px;
  font-size: 12px;
}

.inline-refresh {
  width: fit-content;
  min-height: 30px;
  margin-top: 10px;
}

.withdraw-chip {
  display: inline-grid;
  place-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 8px;
  background: rgba(76, 240, 159, 0.12);
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.withdraw-chip.pending {
  background: rgba(241, 184, 75, 0.14);
  color: var(--gold);
}

.withdraw-chip.rejected,
.withdraw-chip.closed {
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
}

.earn-admin-withdrawals {
  grid-column: 1 / -1;
}

.earn-withdrawal-list {
  display: grid;
  gap: 10px;
}

.earn-withdrawal-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
}

.earn-withdrawal-item > div:first-child {
  display: grid;
  gap: 5px;
}

.earn-withdrawal-item span {
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.account-leaderboard-panel {
  margin-top: 18px;
}

.leaderboard-note {
  max-width: 760px;
  margin: -4px 0 18px;
  color: #c3cad4;
  line-height: 1.6;
}

.panel {
  padding: 22px;
}

.section-head {
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.section-head h2 {
  font-size: clamp(22px, 3vw, 30px);
}

.eyebrow {
  order: 2;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.task-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.task-card {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 96px;
  padding: 15px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.task-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  color: var(--cyan);
  background: rgba(65, 217, 255, 0.1);
}

.task-card h3 {
  font-size: 16px;
}

.task-card p {
  margin-top: 4px;
  font-size: 13px;
}

.bind-form {
  display: grid;
  gap: 14px;
}

.oauth-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.achievement-section {
  padding: 8px clamp(22px, 4vw, 56px) clamp(28px, 4vw, 56px);
}

.achievement-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.achievement-badge {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  min-height: 118px;
  padding: 20px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(11, 14, 20, 0.72);
}

.achievement-badge.locked {
  color: var(--muted);
}

.achievement-badge.locked .achievement-icon {
  opacity: 0.42;
  filter: grayscale(1);
}

.achievement-icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
}

.achievement-icon svg {
  width: 30px;
  height: 30px;
}

.achievement-badge.unlocked .achievement-icon {
  border-color: rgba(245, 193, 86, 0.55);
  background: rgba(245, 193, 86, 0.13);
  color: var(--gold);
  box-shadow: 0 0 24px rgba(245, 193, 86, 0.13);
}

.achievement-copy,
.achievement-state {
  display: grid;
  gap: 5px;
}

.achievement-copy span,
.achievement-state span {
  color: var(--muted);
  font-size: 13px;
}

.achievement-state {
  min-width: 86px;
  text-align: right;
}

.achievement-badge.unlocked .achievement-state strong {
  color: var(--green);
}

.achievement-badge.coming-soon .achievement-icon {
  opacity: 0.92;
  filter: none;
  border-color: rgba(65, 217, 255, 0.35);
  background: rgba(65, 217, 255, 0.08);
  color: var(--cyan);
}

.achievement-badge.coming-soon .achievement-state strong {
  color: var(--cyan);
}

.account-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 220px;
}

.account-badges span {
  padding: 5px 8px;
  border-radius: 6px;
  background: rgba(76, 240, 159, 0.1);
  color: #bafbd8;
  font-size: 12px;
  white-space: nowrap;
}

.account-badges .muted-badge {
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
}

label {
  display: grid;
  gap: 7px;
}

input,
select {
  min-height: 46px;
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
  padding: 0 12px;
  outline: 0;
}

select option {
  background: #10141c;
}

input:focus,
select:focus {
  border-color: rgba(65, 217, 255, 0.68);
  box-shadow: 0 0 0 3px rgba(65, 217, 255, 0.12);
}

.linked-list,
.leaderboard-list {
  display: grid;
  gap: 10px;
}

.linked-list {
  margin-top: 18px;
}

.linked-item,
.leader-row {
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
}

.leader-main,
.leader-meta {
  display: grid;
  gap: 5px;
}

.leader-main {
  min-width: 0;
}

.leader-meta {
  justify-items: end;
  text-align: right;
}

.linked-item strong,
.leader-row strong {
  overflow-wrap: anywhere;
}

.linked-item strong {
  font-size: 14px;
}

.leader-row strong {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 13px;
}

.leader-meta span {
  color: var(--gold);
  font-weight: 800;
  white-space: nowrap;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
}

th,
td {
  padding: 14px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  text-align: left;
  font-size: 14px;
}

th {
  color: #dbe2ea;
  font-weight: 760;
}

td:first-child {
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  overflow-wrap: anywhere;
}

.empty-state {
  padding: 16px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--muted);
}

.points-modal {
  width: min(430px, calc(100vw - 28px));
  padding: 0;
  border: 1px solid rgba(76, 240, 159, 0.28);
  border-radius: 8px;
  background: var(--panel-solid);
  color: var(--text);
  box-shadow: var(--shadow);
}

.points-modal::backdrop {
  background: rgba(0, 0, 0, 0.66);
  backdrop-filter: blur(8px);
}

.points-modal-card {
  position: relative;
  display: grid;
  gap: 14px;
  padding: 24px;
}

.points-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
}

.points-modal h2 {
  max-width: calc(100% - 48px);
  font-size: 28px;
}

.points-modal strong {
  display: block;
  padding: 18px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(65, 217, 255, 0.18), rgba(76, 240, 159, 0.16));
  color: var(--green);
  font-size: 34px;
  line-height: 1;
}

.points-modal p {
  color: var(--muted);
  line-height: 1.5;
}

.db-shell {
  min-height: calc(100vh - 72px);
  padding: clamp(22px, 4vw, 56px);
}

.db-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 470px);
  align-items: end;
  gap: 20px;
  margin-bottom: 22px;
}

.db-hero h1 {
  margin-top: 18px;
  font-size: clamp(48px, 7vw, 92px);
}

.db-path-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
}

.db-path-card span,
.db-path-card strong {
  display: block;
}

.db-path-card span {
  color: var(--muted);
  font-size: 13px;
}

.db-path-card strong {
  margin-top: 8px;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 14px;
  overflow-wrap: anywhere;
}

.db-workspace {
  display: grid;
  grid-template-columns: minmax(260px, 0.3fr) minmax(0, 1fr);
  gap: 18px;
}

.db-table-list {
  display: grid;
  gap: 10px;
}

.db-table-button {
  display: grid;
  gap: 5px;
  width: 100%;
  padding: 13px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--text);
  text-align: left;
}

.db-table-button.active {
  border-color: rgba(65, 217, 255, 0.58);
  background: rgba(65, 217, 255, 0.12);
}

.db-table-button span {
  color: var(--muted);
  font-size: 13px;
}

.db-table-head,
.db-tools,
.db-meta,
.db-pagination {
  display: flex;
  align-items: center;
}

.db-table-head {
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.db-tools {
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.db-tools input {
  width: min(280px, 100%);
}

.db-tools select {
  width: 132px;
}

.db-tools .primary-button {
  min-height: 46px;
  white-space: nowrap;
}

.db-meta {
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.db-meta span {
  padding: 6px 9px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  font-size: 13px;
}

.db-error {
  color: var(--red) !important;
}

.db-table-wrap {
  max-height: 62vh;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
}

.db-table-wrap table {
  min-width: 820px;
}

.db-table-wrap th {
  position: sticky;
  top: 0;
  background: #121720;
  z-index: 1;
}

.db-pagination {
  justify-content: flex-end;
  gap: 12px;
  margin-top: 16px;
  color: var(--muted);
}

.db-row-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 150px;
}

.compact-button {
  min-height: 34px;
  padding: 0 10px;
  font-size: 13px;
}

.db-dialog {
  width: min(760px, calc(100vw - 28px));
  max-height: calc(100vh - 48px);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-solid);
  color: var(--text);
  box-shadow: var(--shadow);
}

.db-dialog::backdrop {
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(8px);
}

.db-dialog-card {
  padding: 20px;
}

.db-dialog-head,
.db-dialog-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.db-dialog-head {
  margin-bottom: 18px;
}

.db-dialog-actions {
  justify-content: flex-end;
  margin-top: 18px;
}

.db-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  max-height: 58vh;
  overflow: auto;
  padding-right: 4px;
}

.db-form-grid label span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.db-form-grid em {
  color: var(--muted);
  font-style: normal;
  font-size: 11px;
  text-transform: uppercase;
}

@media (max-width: 980px) {
  .hero,
  .workspace,
  .records,
  .account-public,
  .earn-workspace,
  .db-hero,
  .db-workspace {
    grid-template-columns: 1fr;
  }

  .hero {
    align-items: start;
    min-height: auto;
    gap: 24px;
  }

  .wallet-card {
    align-self: stretch;
  }

  .stats-band {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .account-story,
  .account-visual,
  .account-visual img {
    min-height: auto;
  }

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

}

@media (max-width: 680px) {
  .topbar {
    gap: 12px;
    min-height: 66px;
  }

  .nav {
    display: none;
  }

  .wallet-menu {
    margin-left: auto;
  }

  .brand span:last-child {
    display: none;
  }

  .top-social-links {
    gap: 5px;
  }

  .top-social-links a {
    width: 30px;
    height: 30px;
  }

  .top-social-links svg {
    width: 15px;
    height: 15px;
  }

  .login-button {
    min-width: 96px;
  }

  .wallet-connect-dialog {
    width: calc(100vw - 22px);
    max-height: calc(100vh - 22px);
    overflow: auto;
  }

  .wallet-connect-card {
    grid-template-columns: 1fr;
  }

  .wallet-connect-sidebar {
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .wallet-connect-info {
    padding: 34px 24px;
  }

  .hero {
    padding-top: 54px;
  }

  .hero-copy {
    font-size: 16px;
  }

  .task-grid,
  .earn-stats,
  .stats-band {
    grid-template-columns: 1fr;
  }

  .task-card {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .achievement-badge {
    grid-template-columns: 52px minmax(0, 1fr);
  }

  .achievement-state {
    grid-column: 2;
    text-align: left;
  }

  .task-status {
    grid-column: 2;
    width: fit-content;
  }

  .metric-row {
    flex-direction: column;
  }

  .oauth-actions {
    grid-template-columns: 1fr;
  }

  .db-table-head,
  .db-tools,
  .db-dialog-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .db-tools input,
  .db-tools select,
  .db-tools .primary-button,
  .db-dialog-actions button {
    width: 100%;
  }

  .db-form-grid {
    grid-template-columns: 1fr;
  }
}
