*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: #fff;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  user-select: none;
  -webkit-user-select: none;
}

#app {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  max-width: 520px;
  margin: 0 auto;
  position: relative;
}

/* Balance */
#balance-section {
  flex: 0 0 10%;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
}

#balance-display {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.balance-label {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.coin-icon {
  width: 24px;
  height: 24px;
  object-fit: contain;
  vertical-align: middle;
}

.key-cost .coin-icon {
  width: 30px;
  height: 30px;
}

/* Open button */
#btn-section {
  flex: 0 0 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 24px;
}

#open-btn {
  width: min(280px, 100%);
  height: 48px;
  border: none;
  border-radius: 14px;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  background: linear-gradient(135deg, #6e40c9, #a855f7);
  color: #fff;
  letter-spacing: 0.5px;
  transition: opacity 0.2s, transform 0.1s;
}
#open-btn:active:not(:disabled) { transform: scale(0.97); }
#open-btn:disabled { opacity: 0.35; cursor: not-allowed; }
