body {
  font-family: Arial, sans-serif;
  margin: 20px;
}

header h1 {
  margin: 0;
}

header h2 {
  margin: 0;
  font-size: 1rem;
  color: #555;
}

table.denoms {
  border-collapse: collapse;
  width: 100%;
  max-width: 600px;
}

table.denoms th,
table.denoms td {
  border: 1px solid #ccc;
  padding: 4px 6px;
  text-align: right;
}

table.denoms th:first-child,
table.denoms td:first-child {
  text-align: left;
}

.total-row td {
  font-weight: bold;
}

section {
  margin-top: 12px;
}

section > div {
  margin-bottom: 8px;
}

button {
  margin-top: 16px;
  padding: 6px 12px;
}

.tile-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 12px;
}

/* iPad mini friendly: 2 columns in landscape, 1 in portrait */
.tile {
  flex: 1 1 calc(50% - 12px);
  min-width: 140px;
  max-width: 240px;
  background: #f5f5f5;
  border-radius: 8px;
  padding: 12px;
  text-decoration: none;
  color: #222;
  box-shadow: 0 1px 3px rgba(0,0,0,0.12);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.tile:hover {
  background: #e8f0ff;
}

.tile-title {
  font-size: 1.1rem;
  font-weight: bold;
  margin-bottom: 6px;
}

.tile-desc {
  font-size: 0.9rem;
  color: #555;
}

.tile-disabled {
  opacity: 0.5;
  cursor: default;
}

@media (max-width: 800px) {
  /* portrait iPad / small width: single column tiles */
  .tile {
    flex: 1 1 100%;
    max-width: none;
  }
}
