* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body {
  height: 100%;
  background: #0f1115;
  color: #e8eaed;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  overflow: hidden;
}
body {
  display: flex;
  flex-direction: column;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}
header {
  padding: 18px 20px 10px;
  text-align: center;
}
h1 {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: #b8bcc4;
}
main {
  flex: 1;
  display: flex;
  gap: 14px;
  padding: 10px 14px 20px;
  min-height: 0;
}
.player {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: #1a1d24;
  border-radius: 18px;
  padding: 14px 12px;
  min-width: 0;
}
.player-label {
  font-size: 14px;
  text-align: center;
  color: #c5c9d2;
  margin-bottom: 8px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 8px;
  cursor: pointer;
  border: 1px dashed transparent;
  transition: border-color 0.15s ease, background 0.15s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.player-label:active {
  background: #232730;
  border-color: #3a3f4a;
}
.player-name-input {
  width: 100%;
  background: #0f1115;
  color: #fff;
  border: 1px solid #74256c;
  border-radius: 8px;
  padding: 6px 8px;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  font-family: inherit;
  margin-bottom: 8px;
  outline: none;
}
.count {
  font-size: 36px;
  font-weight: 700;
  text-align: center;
  color: #fff;
  margin-bottom: 10px;
  font-variant-numeric: tabular-nums;
}
.bar {
  flex: 1;
  background: #0f1115;
  border-radius: 12px;
  border: 1px solid #2a2e38;
  display: flex;
  flex-direction: column-reverse;
  padding: 4px;
  gap: 3px;
  min-height: 0;
  overflow: hidden;
}
.cell {
  flex: 1;
  border-radius: 4px;
  background: #2a2e38;
  transition: background 0.25s ease;
  min-height: 0;
}
.cell.filled-manual {
  background: linear-gradient(180deg, #c026d3, #74256c);
}
.cell.filled-auto {
  background: linear-gradient(180deg, #4ade80, #16a34a);
}
.regen-info {
  text-align: center;
  font-size: 11px;
  color: #6b7280;
  margin-top: 8px;
  height: 14px;
  font-variant-numeric: tabular-nums;
}
.buttons {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}
button {
  flex: 1;
  height: 52px;
  border: none;
  border-radius: 12px;
  font-size: 24px;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.08s ease, opacity 0.15s ease;
  user-select: none;
}
button:active { transform: scale(0.94); }
button:disabled { opacity: 0.3; cursor: not-allowed; }
.btn-minus { background: #3b3f4a; }
.btn-plus { background: #74256c; }
footer {
  text-align: center;
  padding: 6px 10px 10px;
  font-size: 10px;
  color: #4a4e57;
}
