body, body.in-game, body.in-settings {
  background: radial-gradient(circle at 18% 8%, rgba(255,255,255,.95), transparent 42%), repeating-linear-gradient(0deg, rgba(120,90,50,.03) 0 1px, transparent 1px 4px), linear-gradient(160deg,#fbf6ea,#f6efdd 55%,#f2e9d4);
}

.level-subtitle {
  color: #6b5a3e;
}

.hud, .hud.light-hud {
  background: linear-gradient(#fffdf7,#f4ecda);
  box-shadow: inset 0 0 0 1.5px rgba(120,90,50,.2), 0 3px 0 rgba(120,90,50,.2);
  border-radius: 12px;
}

.back {
  background: linear-gradient(#fffdf7,#f4ecda);
  box-shadow: inset 0 0 0 1.5px rgba(178,58,46,.45), 0 3px 0 rgba(120,90,50,.2);
  color: #8f2b21;
  border: none;
}

.stat {
  background: #fffdf9;
  box-shadow: inset 0 0 0 1.5px rgba(120,90,50,.2), 0 3px 0 rgba(120,90,50,.2);
}
.stat .k {
  color: #9c8b70;
}
.stat .v {
  color: #b23a2e;
}

.bar {
  background: #e8dfc9;
  box-shadow: none;
}
.bar i {
  background: linear-gradient(90deg,#4c7a2f,#7aa94f);
  box-shadow: none;
}

.card {
  border-radius: 10px;
  background: linear-gradient(#fffdf7,#f4ecda);
  box-shadow: inset 0 0 0 1.3px rgba(120,90,50,.3), 0 3px 0 rgba(120,90,50,.2);
  color: #3d3226;
  text-shadow: none;
}
.card::after {
  display: none;
}
.card span {
  text-shadow: none;
}

.card.expr {
  color: #2f5fa8;
  background: #fdfaf1;
  box-shadow: inset 0 0 0 1.3px rgba(120,90,50,.3), 0 3px 0 rgba(120,90,50,.2);
}
.card.num {
  color: #8f2b21;
  background: #fdf3e2;
  box-shadow: inset 0 0 0 1.3px rgba(120,90,50,.3), 0 3px 0 rgba(120,90,50,.2);
}

.card.selected {
  box-shadow: inset 0 0 0 2.5px #b23a2e, 0 3px 0 rgba(120,90,50,.2);
  background: #fff8ea;
}

.card.error {
  background: #fdecea;
  color: #c2574a;
}

.burst {
  color: #8f2b21;
  text-shadow: 0 3px 0 rgba(120,90,50,.25);
}

.tip {
  background: #f6f2e7;
  border-left: 5px solid #b8a888;
  border-radius: 0 10px 10px 0;
  text-align: left;
  color: #5d5039;
  box-shadow: none;
}

.btn {
  background: linear-gradient(#fffdf7,#f4ecda);
  box-shadow: inset 0 0 0 1.5px rgba(120,90,50,.2), 0 3px 0 rgba(120,90,50,.2);
  color: #3d3226;
  border-radius: 11px;
}
.btn.alt {
  background: linear-gradient(#fdeec4,#f7dfa0);
  color: #8f2b21;
  box-shadow: inset 0 0 0 1.5px rgba(178,58,46,.45), 0 3px 0 rgba(120,90,50,.2);
}
.btn:active {
  box-shadow: inset 0 0 0 1.5px rgba(120,90,50,.2), 0 1px 0 rgba(120,90,50,.2);
}
.btn.alt:active {
  box-shadow: inset 0 0 0 1.5px rgba(178,58,46,.45), 0 1px 0 rgba(120,90,50,.2);
}

.modal, .candy-card {
  background: linear-gradient(#fffdf7,#f4ecda);
  box-shadow: inset 0 0 0 2px rgba(178,58,46,.3), 0 4px 0 rgba(120,90,50,.2);
}
/* Ensure modal overlay is preserved, above rule might override background if modal is wrapper */
.modal {
  background: rgba(0,0,0,0.4) !important;
  box-shadow: none !important;
}

.candy-title {
  font-family: "STKaiti","KaiTi",serif;
  color: #8f2b21;
}

.star-on {
  background-color: #e0a72b;
}

.grid-stats .g-stat {
  background: linear-gradient(#fffdf7,#f4ecda);
  box-shadow: inset 0 0 0 1.5px rgba(120,90,50,.2), 0 3px 0 rgba(120,90,50,.2);
}
.g-stat .k {
  color: #9c8b70;
}
.g-stat .v {
  color: #b23a2e;
}

h3, .section h3 {
  font-family: "STKaiti","KaiTi",serif;
  color: #8f2b21;
}

.table-btn, .grid-btn {
  background: linear-gradient(#fffdf7,#f4ecda);
  border-radius: 12px;
  border: none;
  box-shadow: inset 0 0 0 1.5px rgba(120,90,50,.2), 0 3px 0 rgba(120,90,50,.2);
  font-family: "STKaiti","KaiTi",serif;
  color: #3d3226;
}
.table-btn.active, .grid-btn.active {
  background: linear-gradient(#fdeec4,#f6dc97);
  color: #8f2b21;
  border: none;
  box-shadow: inset 0 0 0 1.5px rgba(178,58,46,.45), 0 3px 0 rgba(120,90,50,.2);
}
.table-btn:active, .grid-btn:active {
  transform: translateY(2px);
  box-shadow: inset 0 0 0 1.5px rgba(120,90,50,.2), 0 1px 0 rgba(120,90,50,.2);
}

.stat-card {
  background: linear-gradient(#fffdf7,#f4ecda);
  border: none;
  box-shadow: inset 0 0 0 1.5px rgba(120,90,50,.2), 0 3px 0 rgba(120,90,50,.2);
}
.stat-label {
  color: #8f2b21;
}
.stat-text {
  color: #5d5039;
}
.top-error-tag {
  background: #b23a2e;
  box-shadow: 0 3px 0 rgba(120,90,50,.2);
}
.stat-bar-bg {
  background: #e8dfc9;
}
.stat-bar-fg {
  background: linear-gradient(90deg,#4c7a2f,#7aa94f);
}
.stat-bar-fg.error-bar {
  background: linear-gradient(90deg,#e0a72b,#b23a2e);
}
