/* Sums: apricot. Soft flat number tiles you merge, a big target in a warm
   panel, and four little squares that fill in green/yellow/gray as you go. */

.sums { --game: #f8b77a; --tint: #fdf0e3; --tile: #f0eeeb; gap: 18px; }

.rounds { list-style: none; margin: 0; padding: 0; display: flex; justify-content: center; gap: 6px; }
.rounds li {
  display: grid; place-items: center; width: 38px; height: 38px;
  border: 2px solid var(--rule); font-size: 15px; font-weight: 700; color: #9a9a9a;
}
.rounds li.now { border-color: var(--ink); color: var(--ink); }
.rounds li.star, .rounds li.hit { background: var(--green); border-color: var(--green); color: #fff; }
.rounds li.close { background: var(--yellow); border-color: var(--yellow); color: #fff; }
.rounds li.miss { background: var(--gray); border-color: var(--gray); color: #fff; }

.target-box { padding: 16px 12px 14px; border-radius: 12px; background: var(--tint); text-align: center; }
.target-box p { margin: 0; }
.label { font-size: 14px; font-weight: 600; color: #8a5a2b; }
.target-box .target { margin: 2px 0 4px; font: 800 clamp(64px, 21vw, 96px)/1 var(--ui); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.meta { display: flex; justify-content: center; gap: 16px; font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }
.meta span:empty { display: none; }

.msg { min-height: 20px; margin: -6px 0; text-align: center; font-size: 15px; font-weight: 700; }
.msg.good { color: #3d7a37; }
.msg.meh { color: #8a7425; }
.msg.bad { color: var(--muted); }

.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; justify-items: center; min-height: 200px; align-content: start; }
.tile {
  width: 100%; max-width: 96px; aspect-ratio: 1; border: 0; border-radius: 50%;
  background: var(--tile); cursor: pointer; touch-action: manipulation;
  font: 700 clamp(26px, 8vw, 32px) var(--ui); font-variant-numeric: tabular-nums; letter-spacing: -0.02em;
  transition: background 0.12s, transform 0.12s var(--ease);
}
.tile:hover { background: #e7e4df; }
.tile:active { transform: scale(0.95); }
.tile.made { background: var(--tint); box-shadow: inset 0 0 0 2px #f3d2b0; }
.tile.sel { background: var(--game); box-shadow: none; }
.tile.hit { background: var(--green); color: #fff; box-shadow: none; }
.tile.long { font-size: clamp(20px, 6vw, 25px); }
.tile:disabled { cursor: default; }
.tile.pop { animation: pop 0.22s var(--ease); }
.tile.shake { animation: shake 0.3s; }
@keyframes pop { from { transform: scale(0.8); } }
@keyframes shake { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }

.ops { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.op {
  height: 56px; border: 0; border-radius: 8px; background: var(--tile); cursor: pointer; touch-action: manipulation;
  font: 500 28px/1 var(--ui);
}
.op:hover { background: #e7e4df; }
.op.sel { background: var(--ink); color: var(--paper); }
.op:disabled { opacity: 0.4; cursor: default; }

.actions { display: grid; grid-template-columns: 1fr 1fr 1.5fr; gap: 10px; }
.actions .btn { width: 100%; padding: 0 10px; }

/* results */
.res-squares { display: flex; justify-content: center; gap: 6px; margin: 4px 0 8px; }
.res-squares i { display: grid; place-items: center; width: 40px; height: 40px; font-style: normal; font-weight: 700; color: #fff; }
.res-squares .star, .res-squares .hit { background: var(--green); }
.res-squares .close { background: var(--yellow); }
.res-squares .miss { background: var(--gray); }
.res-rounds { margin: 6px 0 18px; border-top: 1px solid var(--rule); }
.res-rounds > div { padding: 10px 0; border-bottom: 1px solid var(--rule); font-size: 15px; }
.res-rounds .row { display: flex; justify-content: space-between; gap: 12px; }
.res-rounds small { color: var(--muted); font-size: 14px; white-space: nowrap; }
.d-body .sol { margin: 4px 0 0; font-size: 13px; color: var(--muted); }
.legend { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; align-items: center; font-size: 15px; }
.legend i { width: 22px; height: 22px; display: grid; place-items: center; font-style: normal; font-size: 12px; font-weight: 700; color: #fff; }
.legend .g { background: var(--green); }
.legend .y { background: var(--yellow); }
.legend .x { background: var(--gray); }

@media (prefers-reduced-motion: reduce) {
  .tile, .op { transition: none; }
  .tile.pop, .tile.shake { animation: none; }
}
