.dice-hero {
  text-align: center;
}

.treasury-stats {
  max-width: 520px;
  margin: 1rem auto 0;
  padding: 0.75rem 1rem;
  text-align: center;
}

.treasury-stats .stats-line {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.treasury-stats .stats-line strong {
  color: var(--accent);
}

.treasury-stats a {
  color: var(--accent);
}

.dice-main {
  padding-bottom: 2rem;
}

.challenge-banner {
  max-width: 520px;
  margin: 0 auto 1rem;
  padding: 1rem 1.25rem;
  text-align: center;
  border-color: var(--accent);
}

.challenge-banner p {
  margin: 0;
}

.challenge-hint {
  margin-top: 0.5rem !important;
  font-size: 0.85rem;
  color: var(--muted);
}

.challenge-cta {
  margin-top: 0.75rem;
}

.wallet-hint {
  max-width: 520px;
  margin: 0 auto 1rem;
  padding: 1rem 1.25rem;
  text-align: left;
}

.wallet-hint p {
  margin: 0 0 0.75rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.wallet-hint-links {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.dice-hero {
  padding: 2.5rem 0 1.5rem;
  text-align: center;
}

.dice-panel {
  max-width: 520px;
  margin: 0 auto 2.5rem;
  padding: 2rem;
  text-align: center;
}

.dice-status {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 1.25rem;
}

.dice-display {
  width: 120px;
  height: 120px;
  margin: 0 auto 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 4rem;
  font-weight: 700;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent 55%),
    var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: 22px;
  color: var(--accent);
  box-shadow: var(--shadow-md), inset 0 0 30px -10px rgba(20, 241, 149, 0.45);
  transition: transform 0.25s;
}

.dice-display.rolling {
  animation: dice-shake 0.4s ease-in-out;
}

@keyframes dice-shake {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-8deg) scale(1.05); }
  75% { transform: rotate(8deg) scale(1.05); }
}

.commit-box {
  margin-bottom: 1.25rem;
  text-align: left;
}

.commit-label {
  margin: 0 0 0.35rem;
  font-size: 0.75rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.commit-hash {
  display: block;
  padding: 0.65rem 0.75rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--mono);
  font-size: 0.72rem;
  word-break: break-all;
  color: var(--muted);
}

.demo-roll-btn {
  margin-top: 0.75rem;
  width: 100%;
}

.demo-hint {
  margin: 0.5rem 0 0;
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.4;
}

.demo-result {
  border-color: var(--purple-dim);
}

.demo-tx-link {
  pointer-events: none;
  opacity: 0.7;
}

.demo-convert {
  margin: 1rem 0 0.75rem;
  padding: 1rem;
  border-radius: 8px;
  background: rgba(20, 241, 149, 0.08);
  border: 1px solid var(--accent);
  text-align: center;
}

.demo-convert-msg {
  margin: 0 0 0.75rem;
  font-size: 0.9rem;
  line-height: 1.45;
}

.dice-controls.convert-highlight,
.commit-box.convert-highlight,
.demo-roll-btn.convert-highlight {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 8px;
  transition: outline 0.2s ease;
}

.dice-controls {
  text-align: left;
}

.field-label {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
  margin: 0.75rem 0 0.35rem;
}

.dice-select,
.dice-input {
  width: 100%;
  padding: 0.65rem 0.85rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font);
  font-size: 0.95rem;
}

.dice-select:focus,
.dice-input:focus {
  outline: none;
  border-color: var(--accent);
}

.pay-mode-tabs {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
  padding: 0.25rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.pay-tab {
  flex: 1;
  padding: 0.5rem 0.75rem;
  border: none;
  border-radius: calc(var(--radius) - 2px);
  background: transparent;
  color: var(--muted);
  font-family: var(--font);
  font-size: 0.82rem;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.pay-tab.active {
  background: var(--surface-3);
  color: var(--text);
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}

.pay-panel {
  margin-top: 1rem;
}

.solana-pay-hint {
  margin: 0 0 1rem;
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.45;
}

.qr-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 0.75rem;
}

.qr-wrap canvas {
  border-radius: 12px;
  border: 1px solid var(--border);
}

#pay-deeplink {
  display: inline-flex;
  margin-bottom: 0.5rem;
}

.verify-roll-btn {
  width: 100%;
  margin-top: 0.75rem;
}

.dice-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.dice-actions .btn {
  flex: 1;
  min-width: 140px;
}

.result-box {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  text-align: left;
}

.result-box p {
  margin: 0 0 0.5rem;
}

.result-meta {
  font-size: 0.82rem;
  color: var(--muted);
}

.result-meta code {
  font-family: var(--mono);
  font-size: 0.75rem;
  word-break: break-all;
  color: var(--accent);
}

.result-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.75rem;
}

.dice-info {
  margin-bottom: 2rem;
}

.logo {
  text-decoration: none;
  color: inherit;
}

button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none !important;
}
