* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: transparent;
  color: #202124;
}

.panel {
  width: 100%;
  max-width: 300px;
  padding: 16px;
  text-align: center;
}

h1 {
  margin: 0 0 8px;
  font-size: 20px;
}

.status {
  min-height: 20px;
  margin: 0 0 16px;
  font-size: 12px;
  color: #5f6368;
}

.die {
  width: 104px;
  height: 104px;
  margin: 18px auto;
  border: 3px solid #202124;
  border-radius: 18px;
  display: grid;
  place-items: center;
  font-size: 48px;
  font-weight: 700;
  background: white;
}

.die.rolling {
  animation: bump 180ms ease-in-out 2 alternate;
}

@keyframes bump {
  from { transform: rotate(-5deg) scale(0.96); }
  to   { transform: rotate(5deg) scale(1.04); }
}

button {
  width: 100%;
  min-height: 44px;
  margin: 6px 0;
  border: 0;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  background: #1a73e8;
  color: white;
}

button.secondary {
  background: #eef0f2;
  color: #202124;
}

button:focus-visible {
  outline: 3px solid #8ab4f8;
  outline-offset: 2px;
}

.hint {
  margin-top: 16px;
  font-size: 12px;
  line-height: 1.4;
  color: #5f6368;
}

@media (prefers-color-scheme: dark) {
  html, body { color: #e8eaed; }
  .status, .hint { color: #bdc1c6; }
  .die {
    border-color: #e8eaed;
    background: #202124;
  }
  button.secondary {
    background: #3c4043;
    color: #e8eaed;
  }
}
