body {
  background: #E3C3C6;
  font-family: 'Courier', monospace;
  font-smooth: never;
  -webkit-font-smoothing: none;
  text-align: center;
  padding: 40px 16px;
}
.game {
  background: #C3E3D0;
  max-width: 400px;
  margin: auto;
  padding: 30px;
  border-radius: 20px;
  box-shadow: 0 4px 15px #0002;
  position: relative; /* lets the settings gear sit in the corner */
}
h1 {
  color: #87634c;
}
.bar {
  background: #eee;
  height: 15px;
  border-radius: 20px;
  overflow: hidden;
  margin-bottom: 20px;
}
.hunger {
  background: #d69a43;
  height: 100%;
}
.happy {
  background: #329b72;
  height: 100%;
}
.energy {
  background: #4A8AA1;
  height: 100%;
}
.bar > div {
  transition: width 0.3s;
}
img {
  max-width: 100%;
}
button {
  background: #b58b70;
  color: white;
  border: none;
  padding: 12px;
  margin: 5px;
  border-radius: 10px;
  cursor: pointer;
  font-family: inherit;
}
button:hover {
  background: #87634c;
}
.message {
  color: #87634c;
  font-weight: bold;
}
.game-over {
  color: #b83232;
  font-size: 30px;
  font-weight: bold;
}

/* Cat Settings: one setting per line, all fields look the same */
.setting {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  text-align: left;
}
.setting label {
  flex: 0 0 9em;
}
.setting input,
.setting select {
  flex: 1;
  min-width: 0;
  box-sizing: border-box;
  height: 2.2em;
  padding: 0 8px;
  font-family: inherit;
  font-size: 1em;
  color: inherit;
  background: white;
  border: 2px solid #b58b70;
  border-radius: 8px;
}
.setting input:focus,
.setting select:focus {
  outline: none;
  border-color: #87634c;
}

/* Small round icon buttons: the settings gear and the close cross */
.icon-button {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 40px;
  height: 40px;
  padding: 0;
  margin: 0;
  font-size: 22px;
  line-height: 40px;
  color: #87634c;
  background: transparent;
  border-radius: 50%;
}
.icon-button:hover {
  background: #0001;
}

/* Cat Settings pop-up */
#settings-dialog {
  position: fixed; /* keep it centered on the screen, not inside the card */
  width: calc(100% - 32px);
  max-width: 360px;
  box-sizing: border-box;
  padding: 30px 24px 20px;
  background: #C3E3D0;
  border: none;
  border-radius: 20px;
  box-shadow: 0 4px 15px #0003;
  font-family: inherit;
  color: inherit;
  text-align: center;
}
#settings-dialog::backdrop {
  background: #0005;
}
#settings-dialog h2 {
  margin-top: 0;
}
#settings-error:empty {
  display: none;
}
