:root { color-scheme: dark; }
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: #0b6b3a;
  color: #f5f5f5;
}
main {
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
h1 { font-size: 1.8rem; margin: 0; text-align: center; }
.hand {
  background: rgba(0, 0, 0, 0.12);
  border-radius: 10px;
  padding: 0.85rem 1rem;
}
.label {
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0 0 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.total { opacity: 0.7; font-weight: 400; }
.cards { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.card {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 2.9rem;
  height: 4rem;
  background: #fff;
  color: #1a1a1a;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  font-weight: 700;
  line-height: 1;
}
.card .rank { font-size: 1.25rem; }
.card .suit { font-size: 1.1rem; margin-top: 0.15rem; }
.card.red { color: #c0392b; }
.card.back {
  background: #15407a;
  background-image: repeating-linear-gradient(
    45deg, rgba(255, 255, 255, 0.08) 0 6px, transparent 6px 12px);
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.25), 0 1px 3px rgba(0, 0, 0, 0.3);
}
.result { text-align: center; font-size: 1.2rem; font-weight: 600; margin: 0; }
form { margin: 0; }
.actions { display: flex; gap: 0.6rem; }
.actions form { flex: 1; }
button {
  width: 100%;
  font: inherit;
  font-size: 1.05rem;
  font-weight: 600;
  padding: 0.7rem 1rem;
  border: none;
  border-radius: 8px;
  background: #f5f5f5;
  color: #0b3d22;
  cursor: pointer;
}
button:hover { background: #fff; }
