body.faucet-page { background: #101312; color: #e7ece8; }
body.faucet-page .top { background: #fff; color: #111; border-bottom: 1px solid #111; }
body.faucet-page a { color: #7ee0c5; }
body.faucet-page .top a { color: #111; }
/* .top a beats .tabs a.on, so the open tab would be black on black without this. */
body.faucet-page .tabs a.on,
body.faucet-page .tabs button.on { background: #111; color: #fff; }
body.faucet-page main { max-width: 1100px; padding-left: max(1rem, env(safe-area-inset-left)); padding-right: max(1rem, env(safe-area-inset-right)); }
.faucet-stage {
  position: relative;
  border: 1px solid #2a3330;
  border-radius: 12px;
  padding: 1.4rem 1.2rem 1.6rem;
  overflow: hidden;
  background: #161a19;
}
.faucet-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("grok-bot-miner.jpg") center / cover no-repeat;
  opacity: 0.22;
  pointer-events: none;
}
.faucet-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 1.4rem;
}
.faucet-balance { font-size: 1.6rem; font-weight: 700; letter-spacing: -0.02em; }
.faucet-txs { font-size: 0.78rem; max-height: 22rem; overflow: auto; -webkit-overflow-scrolling: touch; }
.faucet-txs a, #from-addr, .addr-row code { word-break: break-all; overflow-wrap: anywhere; }
.addr-row { display: flex; gap: 0.5rem; align-items: flex-start; flex-wrap: wrap; }
.addr-row code { flex: 1; min-width: 0; }
.copy {
  font: inherit;
  font-size: 0.9rem;
  min-height: 44px;
  padding: 0.45rem 0.8rem;
  border: 1px solid #3d8f7a;
  border-radius: 8px;
  background: #0c0f0e;
  color: #e7ece8;
  cursor: pointer;
}
.faucet-card label, .faucet-card .hint { display: block; margin: 0.55rem 0 0.2rem; color: #b7c4be; font-size: 0.85rem; }
.faucet-card input, .faucet-card select {
  width: 100%;
  box-sizing: border-box;
  min-height: 44px;
  padding: 0.7rem 0.65rem;
  border: 1px solid #3d8f7a;
  border-radius: 8px;
  background: #0c0f0e;
  color: #e7ece8;
  font: inherit;
  font-size: 16px;
}
.faucet-card .go {
  margin-top: 0.85rem;
  width: 100%;
  min-height: 48px;
  background: #1f8fbf;
  border: 0;
  color: #fff;
  padding: 0.7rem 1.1rem;
  border-radius: 8px;
  font-weight: 650;
  font-size: 1.05rem;
  cursor: pointer;
}
.faucet-card .go:disabled { opacity: 0.45; cursor: not-allowed; }
.not-kaspanet { color: #f0d27a; font-weight: 650; }
.faucet-disclaimer {
  border: 1px solid #f0d27a;
  color: #f0d27a;
  padding: 0.95rem 1.05rem;
  margin: 0 0 1.15rem;
  border-radius: 8px;
  background: #1a1810;
  font-size: 1.05rem;
}
.faucet-disclaimer p { margin: 0; }
.faucet-disclaimer strong { color: #ffe9a8; }
.faucet-disclaimer a { color: #ffe9a8; }
.mine-prompt {
  white-space: pre-wrap;
  overflow: auto;
  max-height: 28rem;
  margin: 0.4rem 0 1.2rem;
  background: #0c0f0e;
  border: 1px solid #3d8f7a;
  border-radius: 8px;
  padding: 0.9rem 1rem;
  color: #e7ece8;
  font-size: 0.82rem;
  line-height: 1.45;
}
.fmodal {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.2rem;
}
.fmodal[hidden] { display: none; }
.fmodal-card {
  background: #1c2120;
  color: #e7ece8;
  width: min(26rem, 100%);
  max-height: min(32rem, 90vh);
  overflow: auto;
  border: 1px solid #2f3a37;
  border-radius: 10px;
  padding: 1rem 1.1rem 1.05rem;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}
.fmodal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.55rem;
}
.fmodal-title { margin: 0; font-weight: 700; font-size: 1.05rem; }
.fmodal-title.err { color: #e05c5c; }
.fmodal-title.ok { color: #7ee0c5; }
.fmodal-title.wait { color: #f0d27a; }
.fmodal-x {
  border: 0;
  background: transparent;
  color: #b7c4be;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}
.fmodal-body { color: #d5ddd9; font-size: 0.95rem; }
.fmodal-body p { margin: 0.35rem 0; }
.fmodal-body code { word-break: break-all; }
.fload { font-weight: 700; color: #f0d27a; }
.fspin {
  width: 0.85rem;
  height: 0.85rem;
  margin-right: 0.45rem;
  border: 2px solid #3d4945;
  border-top-color: #f0d27a;
  border-radius: 50%;
  display: inline-block;
  vertical-align: -2px;
  animation: fspin 0.8s linear infinite;
}
@keyframes fspin { to { transform: rotate(360deg); } }
.fsteps { list-style: none; margin: 0.7rem 0 0.2rem; padding: 0; }
.fsteps li {
  position: relative;
  margin: 0;
  padding: 0.22rem 0 0.22rem 1.2rem;
  color: #8b9893;
}
.fsteps li.on { color: #f0d27a; font-weight: 650; }
.fsteps li.done { color: #7ee0c5; }
.fsteps li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55rem;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: #3d4945;
}
.fsteps li.on::before { background: #f0d27a; }
.fsteps li.done::before { background: #7ee0c5; }
.fnote { color: #9aa8a2; font-size: 0.88rem; }
.fmodal-foot { display: flex; justify-content: flex-end; margin-top: 0.95rem; }
.fmodal-close {
  background: #1f8fbf;
  color: #fff;
  border: 0;
  border-radius: 6px;
  padding: 0.4rem 0.95rem;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
}
@media (max-width: 800px) {
  .faucet-grid { grid-template-columns: 1fr; }
  .faucet-stage { padding: 1rem 0.8rem 1.2rem; }
  .faucet-txs { max-height: 12rem; }
  .faucet-balance { font-size: 1.35rem; }
  body.faucet-page h1 { font-size: 1.2rem; }
}
