:root {
  --bg: #efe1c7;
  --paper: #fff6e5;
  --paper-strong: #fffdf7;
  --ink: #33251d;
  --muted: #6c5748;
  --accent: #9c2d1f;
  --accent-dark: #6f1b14;
  --line: #cfb891;
  --water: #c9e7f5;
  --success-bg: #eef8ea;
  --success-line: #91bf80;
  --error-bg: #fff1ee;
  --error-line: #da9a90;
  --shadow: 0 16px 28px rgba(70, 40, 18, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at top, rgba(255, 248, 229, 0.92), rgba(239, 225, 199, 0.96) 48%, rgba(224, 199, 156, 0.98)),
    linear-gradient(180deg, #f6ead0 0%, #e4ca9f 100%);
  font-family: Georgia, "Times New Roman", "Microsoft YaHei", serif;
}

a {
  color: var(--accent-dark);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.wallet-page,
.admin-page {
  padding: 24px 18px 44px;
}

.page-topbar {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  max-width: 1380px;
  margin: 0 auto 14px;
}

.locale-toggle {
  min-width: 110px;
  height: 42px;
  padding: 0 16px;
  border: 1px solid rgba(156, 45, 31, 0.3);
  border-radius: 999px;
  background: rgba(255, 253, 247, 0.9);
  color: var(--accent-dark);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow);
}

.wallet-toggle {
  min-width: 170px;
}

.wallet-menu-root {
  position: relative;
}

.wallet-menu-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 20;
  display: grid;
  min-width: 190px;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(156, 45, 31, 0.18);
  border-radius: 18px;
  background: rgba(255, 252, 245, 0.98);
  box-shadow: var(--shadow);
}

.wallet-menu-panel[hidden] {
  display: none !important;
}

.wallet-menu-action {
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid rgba(156, 45, 31, 0.18);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--accent-dark);
  font: inherit;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.wallet-menu-action:hover {
  filter: brightness(1.03);
}

.wallet-menu-action:disabled {
  cursor: not-allowed;
  opacity: 0.5;
  filter: none;
}

.wallet-menu-status {
  margin: 2px 0 0;
  padding: 8px 10px;
  font-size: 12px;
  line-height: 1.45;
}

.locale-toggle:hover {
  filter: brightness(1.03);
}

.wallet-layout {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 22px;
  max-width: 1380px;
  margin: 0 auto;
}

.wallet-sidebar,
.wallet-content {
  min-width: 0;
}

.faucet-figure {
  width: 164px;
  margin-bottom: 14px;
}

.faucet-figure svg {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 14px 18px rgba(111, 27, 20, 0.12));
}

.faucet-nav {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.faucet-nav-button {
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid rgba(156, 45, 31, 0.18);
  border-radius: 16px;
  background: rgba(255, 252, 245, 0.82);
  color: #8a6446;
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}

.faucet-nav-button:hover {
  transform: translateY(-1px);
  border-color: rgba(156, 45, 31, 0.3);
}

.faucet-nav-button.is-active {
  border-color: rgba(156, 45, 31, 0.34);
  background: linear-gradient(135deg, #fff7e9 0%, #f2dfc2 100%);
  color: var(--accent-dark);
  box-shadow: 0 10px 18px rgba(111, 27, 20, 0.08);
}

.faucet-tab-panel[hidden] {
  display: none !important;
}

body[data-faucet-tab="home"] [data-faucet-panel]:not([data-faucet-panel="home"]),
body[data-faucet-tab="fair"] [data-faucet-panel]:not([data-faucet-panel="fair"]),
body[data-faucet-tab="contribution"] [data-faucet-panel]:not([data-faucet-panel="contribution"]) {
  display: none !important;
}

body[data-faucet-tab="home"] [data-faucet-panel="home"],
body[data-faucet-tab="fair"] [data-faucet-panel="fair"],
body[data-faucet-tab="contribution"] [data-faucet-panel="contribution"] {
  display: block;
}

.side-box,
.section-card,
.hero {
  margin-bottom: 18px;
  padding: 18px;
  border: 2px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 253, 247, 0.98), rgba(255, 246, 229, 0.98)),
    var(--paper);
  border-radius: 20px;
  box-shadow: var(--shadow);
}

.side-box h2,
.section-card h2 {
  margin: 0 0 14px;
  color: var(--accent-dark);
  font-size: 22px;
  letter-spacing: 0.02em;
}

.side-box p,
.section-card p,
.plain-list {
  margin: 0 0 10px;
  font-size: 14px;
  line-height: 1.75;
}

.sidebar-amount {
  font-size: 28px;
  color: var(--accent-dark);
}

.sidebar-amount strong {
  font-size: 38px;
}

.wallet-pill {
  padding: 12px 14px;
  border: 1px solid rgba(156, 45, 31, 0.18);
  border-radius: 14px;
  background: rgba(255, 253, 247, 0.88);
  word-break: break-all;
}

.stat-pair {
  margin-bottom: 12px;
  padding: 10px 0;
  border-top: 1px dashed rgba(156, 45, 31, 0.2);
}

.stat-pair span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.stat-pair strong {
  font-size: 14px;
}

.hero {
  padding: 24px 24px 18px;
}

.eyebrow {
  margin: 0 0 10px;
  color: #9a7055;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
}

.hero h1,
.admin-header h1 {
  margin: 0 0 14px;
  color: var(--accent-dark);
  font-size: clamp(36px, 5vw, 60px);
  line-height: 0.98;
}

.lead {
  max-width: 860px;
  color: #5a4538;
  font-size: 16px;
  line-height: 1.85;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.contributor-ticker {
  margin-top: 14px;
  overflow: hidden;
  border: 1px solid rgba(156, 45, 31, 0.16);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 248, 235, 0.98), rgba(255, 240, 216, 0.95));
  padding: 10px 0;
}

.contributor-ticker__text {
  display: inline-block;
  padding-left: 100%;
  white-space: nowrap;
  color: var(--accent-dark);
  font-weight: 700;
  animation: contributorTickerMove 16s linear infinite;
}

@keyframes contributorTickerMove {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-100%);
  }
}

.hero-badges span {
  padding: 7px 12px;
  border: 1px solid rgba(156, 45, 31, 0.25);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 700;
}

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

.free-claim-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 16px 0 14px;
}

.free-claim-card {
  padding: 14px 16px;
  border: 1px solid rgba(156, 45, 31, 0.16);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 252, 245, 0.92), rgba(255, 244, 221, 0.95));
}

.free-claim-title {
  margin: 0 0 6px;
  color: #8b6c57;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.free-claim-card strong {
  color: var(--accent-dark);
  font-size: 28px;
}

.free-claim-rule-list {
  display: grid;
  gap: 10px;
  margin: 8px 0 16px;
}

.free-claim-rule-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 11px 14px;
  border: 1px solid rgba(156, 45, 31, 0.14);
  border-radius: 14px;
  background: rgba(255, 252, 245, 0.9);
}

.free-claim-rule-item strong {
  color: var(--accent-dark);
  white-space: nowrap;
}

.turnstile-box {
  min-height: 72px;
  margin: 0 0 14px;
  padding: 12px;
  border: 1px dashed rgba(156, 45, 31, 0.2);
  border-radius: 16px;
  background: rgba(255, 253, 247, 0.88);
  display: flex;
  align-items: center;
  justify-content: center;
}

.free-claim-pause-notice {
  margin: 0 0 12px;
  padding: 12px 14px;
  border: 1px solid rgba(156, 45, 31, 0.18);
  border-radius: 14px;
  background: rgba(255, 248, 236, 0.92);
  color: var(--accent-dark);
  font-size: 16px;
  font-weight: 700;
  text-align: center;
}

.free-claim-invite-panel {
  margin: 0 0 12px;
  padding: 14px 16px;
  border: 1px solid rgba(156, 45, 31, 0.14);
  border-radius: 16px;
  background: rgba(255, 252, 245, 0.92);
}

.free-claim-invite-label,
.free-claim-invite-note {
  margin: 0;
  color: #6a4b38;
  font-size: 14px;
  line-height: 1.7;
}

.free-claim-invite-label {
  margin-bottom: 6px;
  font-weight: 700;
  color: var(--accent-dark);
}

.free-claim-invite-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}

#freeClaimInviteLink {
  display: block;
  min-width: 0;
  margin-bottom: 0;
  word-break: break-all;
}

.free-claim-copy-button {
  min-width: 88px;
  white-space: nowrap;
}

.contribution-main-card {
  width: 100%;
}

.rule-card {
  padding: 18px;
  border: 1px solid rgba(156, 45, 31, 0.18);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(255, 245, 222, 0.96));
}

.rule-kicker {
  color: #97704f;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
}

.rule-card h3 {
  margin: 0 0 10px;
  color: var(--accent-dark);
  font-size: 24px;
  line-height: 1.2;
}

.rule-copy {
  color: #5b4739;
}

.rule-links {
  margin-top: 16px;
  padding: 10px 12px 0;
}

.rule-links-relocated {
  margin-top: 18px;
  padding: 0;
  border-top: 1px dashed rgba(156, 45, 31, 0.18);
  padding-top: 18px;
}

.mini-fomo-card {
  margin-top: 16px;
  padding: 18px;
  border: 1px solid rgba(156, 45, 31, 0.18);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 251, 244, 0.96), rgba(246, 233, 206, 0.96));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.mini-fomo-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.mini-fomo-card__eyebrow {
  margin: 0 0 4px;
  color: #9a7055;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.mini-fomo-card__header h3 {
  margin: 0;
  color: var(--accent-dark);
  font-size: 22px;
  line-height: 1.15;
}

.mini-fomo-card__badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 12px;
  border: 1px solid rgba(156, 45, 31, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  color: #8a6446;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.mini-fomo-card__countdown {
  margin-bottom: 14px;
  color: #7b2416;
  font-size: 42px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.06em;
}

.mini-fomo-card__stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.mini-fomo-card__stat {
  padding: 12px 14px;
  border: 1px solid rgba(156, 45, 31, 0.14);
  border-radius: 14px;
  background: rgba(255, 253, 247, 0.82);
}

.mini-fomo-card__stat span {
  display: block;
  margin-bottom: 6px;
  color: #8a6446;
  font-size: 12px;
}

.mini-fomo-card__stat strong {
  display: block;
  color: var(--accent-dark);
  font-size: 16px;
  line-height: 1.3;
  word-break: break-word;
}

.mini-fomo-card__note {
  margin: 12px 0 0;
  padding: 10px 12px;
  border: 1px dashed rgba(156, 45, 31, 0.18);
  border-radius: 12px;
  background: rgba(255, 253, 247, 0.5);
  color: #7b4a32;
  font-size: 13px;
  line-height: 1.55;
}

.mini-fomo-card__entries {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed rgba(156, 45, 31, 0.18);
}

.mini-fomo-card__entries-head {
  margin-bottom: 10px;
  color: var(--accent-dark);
  font-size: 14px;
}

.mini-fomo-card__entries-list {
  display: grid;
  gap: 8px;
}

.mini-fomo-card__entry-row {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid rgba(156, 45, 31, 0.12);
  border-radius: 12px;
  background: rgba(255, 253, 247, 0.72);
}

.mini-fomo-card__entry-rank,
.mini-fomo-card__entry-amount {
  color: #7b2416;
  font-size: 13px;
  font-weight: 700;
}

.mini-fomo-card__entry-amount {
  text-align: right;
  white-space: nowrap;
}

.mini-fomo-card__entry-address {
  min-width: 0;
  color: #6c5748;
  font-size: 13px;
}

.mini-fomo-card__entry-empty {
  padding: 12px 14px;
  border: 1px dashed rgba(156, 45, 31, 0.18);
  border-radius: 12px;
  color: #8a6446;
  font-size: 13px;
}

.rule-metric-row {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.rule-metric-row-wide {
  grid-template-columns: 140px minmax(0, 1fr);
}

.metric-action-button {
  min-height: 46px;
  padding: 8px 10px;
  border: 1px solid rgba(156, 45, 31, 0.22);
  border-radius: 18px;
  background: linear-gradient(180deg, #fff8ec, #fff0d6);
  color: #d24a2d;
  font: inherit;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.1;
  text-align: left;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}

.metric-action-button:hover {
  transform: translateY(-1px);
  border-color: rgba(156, 45, 31, 0.36);
  box-shadow: 0 8px 18px rgba(156, 45, 31, 0.08);
}

.metric-action-button-wide {
  font-size: 16px;
}

.metric-input {
  min-height: 46px;
  width: 100%;
  padding: 10px 14px;
  border: 1px solid rgba(156, 45, 31, 0.18);
  border-radius: 14px;
  background: rgba(255, 252, 245, 0.92);
  color: #7b2a1c;
  font: inherit;
  font-size: 16px;
  line-height: 1.2;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.metric-input:focus {
  outline: none;
  border-color: rgba(156, 45, 31, 0.32);
  box-shadow: 0 0 0 3px rgba(156, 45, 31, 0.08);
}

#assetActionStatus {
  margin-top: 8px;
}

.deposit-panel {
  margin-top: 22px;
  padding: 18px;
  border: 1px solid rgba(156, 45, 31, 0.18);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 251, 242, 0.9), rgba(255, 244, 221, 0.92));
}

.deposit-title {
  margin: 0 0 12px;
  color: var(--accent-dark);
  font-size: 16px;
  font-weight: 700;
}

.deposit-note {
  margin: 0 0 12px;
  color: #8a6446;
  font-size: 13px;
  line-height: 1.7;
}

.deposit-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.deposit-tab {
  height: 40px;
  border: 1px solid rgba(156, 45, 31, 0.18);
  border-radius: 12px;
  background: rgba(255, 252, 245, 0.84);
  color: #8a6446;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.deposit-tab.is-active {
  border-color: rgba(156, 45, 31, 0.3);
  background: linear-gradient(135deg, #fff8eb 0%, #f3e1c3 100%);
  color: var(--accent-dark);
}

.deposit-display {
  min-height: 56px;
  margin-bottom: 12px;
  padding: 0 16px;
  border: 1px solid rgba(156, 45, 31, 0.2);
  border-radius: 14px;
  background: rgba(255, 253, 247, 0.88);
  color: #6d3c1d;
  display: flex;
  align-items: center;
  gap: 12px;
}

.deposit-amount-input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
  color: #6d3c1d;
  font-size: 28px;
}

.deposit-amount-input::-webkit-outer-spin-button,
.deposit-amount-input::-webkit-inner-spin-button {
  margin: 0;
  -webkit-appearance: none;
}

.deposit-amount-input[type="number"] {
  -moz-appearance: textfield;
}

.deposit-amount-token {
  flex-shrink: 0;
  color: #6d3c1d;
  font-size: 28px;
}

.deposit-range-note {
  margin: -4px 0 12px;
  color: #8a6446;
  font-size: 13px;
}

.entry-preview-panel {
  margin: 14px 0;
  padding: 14px;
  border: 1px solid rgba(156, 45, 31, 0.16);
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(255, 253, 247, 0.96), rgba(247, 232, 205, 0.9)),
    repeating-linear-gradient(45deg, rgba(156, 45, 31, 0.035) 0 1px, transparent 1px 8px);
}

.entry-preview-panel strong,
.entry-preview-panel span {
  transition: color 0.18s ease, opacity 0.18s ease;
}

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

.entry-preview-kicker {
  margin: 0 0 4px;
  color: #8a6446;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.entry-preview-head strong {
  color: var(--accent-dark);
  font-size: 14px;
}

.entry-max-button {
  min-width: 72px;
  height: 38px;
  border: 1px solid rgba(156, 45, 31, 0.26);
  border-radius: 999px;
  background: linear-gradient(135deg, #fff8eb, #f1d3a4);
  color: var(--accent-dark);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.entry-preview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.entry-preview-item {
  min-height: 68px;
  padding: 10px 12px;
  border: 1px solid rgba(156, 45, 31, 0.12);
  border-radius: 14px;
  background: rgba(255, 252, 245, 0.78);
}

.entry-preview-item span {
  display: block;
  margin-bottom: 5px;
  color: #8a6446;
  font-size: 12px;
}

.entry-preview-item strong {
  color: #5f2d18;
  font-size: 14px;
  word-break: break-word;
}

.entry-preview-item.is-warning {
  border-color: rgba(189, 55, 42, 0.42);
  background: #fff0eb;
}

.entry-preview-item.is-warning strong {
  color: #9c2d1f;
}

.entry-preview-panel.is-loading .entry-preview-item {
  background:
    linear-gradient(90deg, rgba(255, 252, 245, 0.75), rgba(255, 243, 221, 0.98), rgba(255, 252, 245, 0.75));
  background-size: 200% 100%;
  animation: shimmer 1.4s linear infinite;
}

@keyframes shimmer {
  from {
    background-position: 200% 0;
  }
  to {
    background-position: -200% 0;
  }
}

.deposit-preset-row {
  margin-bottom: 14px;
}

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

.deposit-preset {
  min-width: 58px;
  height: 34px;
  padding: 0 14px;
  border: 1px solid rgba(156, 45, 31, 0.24);
  border-radius: 10px;
  background: rgba(255, 252, 245, 0.9);
  color: #8a6446;
  font: inherit;
  cursor: pointer;
}

.deposit-preset.is-active {
  border-color: rgba(156, 45, 31, 0.42);
  background: rgba(245, 224, 188, 0.95);
  color: var(--accent-dark);
  font-weight: 700;
}

.deposit-action {
  width: 100%;
  height: 46px;
  border: 1px solid #b7601f;
  border-radius: 14px;
  color: #fff7ef;
  background: linear-gradient(135deg, #c86c1f 0%, #de8c31 100%);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.deposit-action:hover {
  filter: brightness(1.04);
}

.guide-panel {
  margin-top: 14px;
  padding: 14px 16px;
  border: 1px solid rgba(156, 45, 31, 0.16);
  border-radius: 16px;
  background: rgba(255, 250, 240, 0.72);
}

.guide-title {
  margin: 0 0 8px;
  color: var(--accent-dark);
  font-size: 16px;
  font-weight: 700;
}

.guide-list {
  margin: 0 0 14px;
  padding-left: 20px;
  color: #5b4739;
  font-size: 14px;
  line-height: 1.75;
}

.guide-list li {
  margin-bottom: 6px;
}

.guide-list-alpha {
  padding-left: 22px;
}

.guide-note {
  margin: 0;
  color: #6a4b38;
  font-size: 14px;
  line-height: 1.8;
}

.stack-form {
  display: grid;
  gap: 8px;
}

.stack-form label,
.admin-form label {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
}

.stack-form input,
.stack-form select,
.admin-form input {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border: 1px solid rgba(156, 45, 31, 0.2);
  border-radius: 12px;
  background: var(--paper-strong);
  color: var(--ink);
  font: inherit;
}

.readonly-input {
  background: #f1e8d9;
}

.stack-form button,
.admin-form button,
.ghost-button {
  height: 42px;
  padding: 0 14px;
  border-radius: 12px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.stack-form button,
.admin-form button {
  border: 1px solid var(--accent-dark);
  color: #fff7f2;
  background: linear-gradient(135deg, #b33b23 0%, #7f1f15 100%);
}

.stack-form button:hover,
.admin-form button:hover,
.ghost-button:hover {
  filter: brightness(1.04);
}

.stack-form button:disabled,
.metric-action-button:disabled,
.deposit-action:disabled,
.claim-reward-button:disabled {
  cursor: not-allowed;
  filter: none;
  opacity: 0.52;
  box-shadow: none;
}

.stack-form button.is-disabled,
.metric-action-button.is-disabled,
.deposit-action.is-disabled,
.claim-reward-button.is-disabled {
  border-color: rgba(156, 45, 31, 0.14);
  background: linear-gradient(180deg, #eee5d8, #ddd0bc);
  color: #8f7b67;
}

.inline-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 110px;
  gap: 10px;
}

.inline-actions-double {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.inline-actions-triple {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ghost-button {
  border: 1px solid rgba(156, 45, 31, 0.28);
  color: var(--accent-dark);
  background: rgba(255, 255, 255, 0.72);
}

.status-box {
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  font-size: 13px;
  line-height: 1.65;
  white-space: pre-line;
}

.status-box[hidden] {
  display: none !important;
}

.status-box.neutral {
  background: rgba(255, 253, 247, 0.88);
  color: #5d493b;
}

.status-box.success {
  border-color: var(--success-line);
  background: var(--success-bg);
  color: #335f2d;
}

.status-box.error {
  border-color: var(--error-line);
  background: var(--error-bg);
  color: #8c332a;
}

.bound-panel {
  margin-top: 14px;
  padding: 14px;
  border: 1px dashed rgba(156, 45, 31, 0.28);
  border-radius: 14px;
  background: rgba(255, 250, 239, 0.78);
}

.sponsor-funding-metrics {
  padding-top: 10px;
  padding-bottom: 10px;
}

.bound-label {
  margin-bottom: 6px;
  color: #8b6c57;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

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

.bound-reward-item {
  padding: 10px 12px;
  border: 1px solid rgba(156, 45, 31, 0.12);
  border-radius: 12px;
  background: rgba(255, 252, 245, 0.9);
}

.bound-reward-item p:last-child {
  margin: 0;
  color: var(--accent-dark);
  font-weight: 700;
}

.sponsor-user-reward-grid {
  margin-top: 16px;
  margin-bottom: 10px;
}

.claim-reward-button {
  width: 100%;
  min-height: 46px;
  padding: 10px 14px;
  border: 1px solid rgba(156, 45, 31, 0.24);
  border-radius: 14px;
  background: linear-gradient(180deg, #c96520, #e39131);
  color: #fff8ef;
  font: inherit;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 18px rgba(156, 45, 31, 0.14);
}

.claim-reward-button:hover {
  filter: brightness(1.03);
}

.invite-alias-button {
  width: 100%;
  margin-top: 10px;
  min-height: 42px;
  border-radius: 12px;
  background: rgba(255, 252, 245, 0.9);
}

#claimMyRewardStatus {
  margin-top: 10px;
}

#sponsorFundingStatus,
#assetActionStatus,
#claimMyRewardStatus {
  display: none !important;
}

.recent-list,
.sponsor-list {
  display: grid;
  gap: 12px;
}

.contribution-leaderboard {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(156, 45, 31, 0.14);
}

.contribution-leaderboard__header h3 {
  margin: 4px 0 8px;
  color: var(--accent-dark);
}

.contribution-leaderboard__header p:last-child {
  margin-bottom: 14px;
  color: #7a5b46;
  line-height: 1.6;
}

.sponsor-list-pinned {
  margin-bottom: 14px;
}

.recent-item {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid rgba(156, 45, 31, 0.16);
  border-radius: 14px;
  background: rgba(255, 253, 247, 0.86);
}

.sponsor-item {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) minmax(220px, 320px);
  gap: 14px;
  align-items: start;
  padding: 14px;
  border: 1px solid rgba(156, 45, 31, 0.18);
  border-radius: 16px;
  background: rgba(255, 253, 247, 0.84);
}

.sponsor-item-pinned {
  border-color: rgba(156, 45, 31, 0.34);
  background: linear-gradient(180deg, rgba(255, 250, 239, 0.98), rgba(255, 246, 228, 0.96));
  box-shadow: 0 10px 24px rgba(156, 45, 31, 0.08);
}

.sponsor-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border-radius: 14px;
  color: var(--accent-dark);
  background: rgba(201, 231, 245, 0.6);
  font-size: 20px;
  font-weight: 700;
}

.sponsor-main {
  display: grid;
  gap: 4px;
}

.sponsor-reward-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 4px;
  color: #b64b34;
  font-weight: 700;
}

.sponsor-wallet {
  word-break: break-all;
}

.sponsor-actions {
  display: grid;
  gap: 8px;
}

.invite-link {
  appearance: none;
  display: inline-block;
  padding: 10px 12px;
  border: 1px solid rgba(156, 45, 31, 0.18);
  border-radius: 12px;
  background: rgba(255, 248, 236, 0.92);
  color: var(--accent-dark);
  font-size: 13px;
  line-height: 1.5;
  word-break: break-all;
}

.invite-link:hover {
  background: #fff7ea;
  text-decoration: none;
}

.sponsor-use-button {
  width: 100%;
  text-align: left;
  cursor: pointer;
  font: inherit;
}

.invite-link.subtle {
  color: #775e4d;
}

.plain-list {
  padding-left: 20px;
}

.empty-line {
  color: #7c6758;
}

.admin-layout {
  max-width: 1380px;
  margin: 0 auto;
}

.admin-header {
  margin-bottom: 18px;
}

.admin-header p {
  margin: 0 0 8px;
  font-size: 15px;
  line-height: 1.75;
  color: #5d493c;
}

.admin-form {
  display: grid;
  grid-template-columns: auto minmax(0, 320px) auto;
  align-items: end;
  gap: 10px;
}

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

.overview-card {
  padding: 16px;
  border: 1px solid rgba(156, 45, 31, 0.14);
  border-radius: 16px;
  background: rgba(255, 253, 247, 0.85);
}

.overview-card span {
  display: block;
  margin-bottom: 8px;
  color: #7a624f;
  font-size: 13px;
}

.overview-card strong {
  color: var(--accent-dark);
  font-size: 18px;
}

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

.admin-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
}

.admin-table th,
.admin-table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(156, 45, 31, 0.12);
  text-align: left;
  vertical-align: top;
  font-size: 13px;
}

.admin-table th {
  color: #7b624f;
  background: rgba(255, 248, 236, 0.88);
}

.reward-history-panel {
  width: 100%;
  margin: 18px 0 0;
  padding: 18px;
  border: 1px solid rgba(156, 45, 31, 0.16);
  border-radius: 18px;
  background: rgba(255, 253, 247, 0.9);
  box-shadow: 0 14px 34px rgba(92, 54, 24, 0.08);
}

.reward-history-header h3 {
  margin: 2px 0 14px;
  color: var(--accent-dark);
  font-size: 20px;
}

.reward-history-timezone-note {
  margin: -8px 0 14px;
  color: #8a6446;
  font-size: 12px;
}

.reward-history-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 12px;
  align-items: stretch;
}

.reward-history-card {
  min-width: 0;
  padding: 13px;
  border: 1px solid rgba(156, 45, 31, 0.14);
  border-radius: 16px;
  background: rgba(255, 253, 247, 0.86);
}

.reward-history-card h4 {
  margin: 0 0 10px;
  color: #7d1f17;
  font-size: 13px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.reward-history-list {
  display: grid;
  gap: 8px;
}

.reward-history-row {
  display: grid;
  grid-template-columns: minmax(108px, 0.95fr) minmax(92px, 1fr) minmax(76px, 0.75fr);
  gap: 8px;
  align-items: center;
  padding: 8px 9px;
  border: 1px solid rgba(156, 45, 31, 0.1);
  border-radius: 12px;
  background: rgba(255, 248, 236, 0.72);
}

.reward-history-time {
  color: #8b6c57;
  font-size: 12px;
}

.reward-history-address {
  color: var(--accent-dark);
  font-size: 12px;
  line-height: 1.35;
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.reward-history-amount {
  color: #185b42;
  font-size: 12px;
  font-weight: 800;
  text-align: right;
  white-space: nowrap;
}

.reward-history-empty,
.reward-history-status {
  margin: 0;
  color: #7a6759;
  font-size: 13px;
}

.reward-history-status {
  margin-top: 12px;
}

.mono {
  font-family: Consolas, "Courier New", monospace;
}

.break-all {
  word-break: break-all;
}

.subtle-line {
  margin-top: 4px;
  color: #7a6759;
}

@media (max-width: 1080px) {
  .wallet-layout {
    grid-template-columns: 1fr;
  }

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

  .rule-grid,
  .overview-grid,
  .reward-history-grid {
    grid-template-columns: 1fr;
  }

  .reward-history-panel {
    margin-left: 0;
  }

  .reward-history-row {
    grid-template-columns: 1fr 1fr;
  }

  .free-claim-grid {
    grid-template-columns: 1fr;
  }

  .sponsor-item {
    grid-template-columns: 1fr;
  }

  .mini-fomo-card__stats {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 520px) {
  .reward-history-row {
    grid-template-columns: 1fr;
  }

  .reward-history-address,
  .reward-history-amount {
    text-align: left;
  }
}

@media (max-width: 720px) {
  .wallet-page,
  .admin-page {
    padding: 16px 12px 30px;
  }

  .faucet-figure {
    width: 112px;
    margin-bottom: 10px;
  }

  .side-box,
  .section-card,
  .hero {
    padding: 16px;
  }

  .admin-form,
  .inline-actions {
    grid-template-columns: 1fr;
  }

  .page-topbar {
    margin-bottom: 12px;
  }

  .faucet-nav {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .faucet-nav-button {
    min-height: 44px;
    font-size: 15px;
  }

  .wallet-menu-panel {
    min-width: 170px;
    max-width: min(86vw, 260px);
  }

  .rule-metric-row,
  .rule-metric-row-wide {
    grid-template-columns: 1fr;
  }

  .free-claim-rule-item {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .entry-preview-head {
    align-items: stretch;
    flex-direction: column;
  }

  .entry-max-button {
    width: 100%;
  }

  .entry-preview-grid {
    grid-template-columns: 1fr;
  }

  .free-claim-invite-row {
    grid-template-columns: 1fr;
  }

  .free-claim-copy-button {
    width: 100%;
  }

  .mini-fomo-card__countdown {
    font-size: 34px;
  }

  .mini-fomo-card__entry-row {
    grid-template-columns: 32px minmax(0, 1fr);
  }

  .mini-fomo-card__entry-amount {
    grid-column: 2;
  }

  .contribution-leaderboard__header p:last-child {
    margin-bottom: 10px;
  }
}
