/* "Spend it": the pot, the tiles and the year summary (shared/spend.js). */
.spend .group { margin: 18px 0 8px; }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
/* One column on narrow screens or very large text. */
@media (max-width: 340px) { .tiles { grid-template-columns: 1fr; } }

/* A tile is one big "add" button with a + always showing; picked tiles turn to the chosen colour. */
.tile { position: relative; }
.tile button { -webkit-tap-highlight-color: transparent; }
.tile .add { display: grid; align-content: start; justify-items: start; gap: 2px; width: 100%; height: 100%; min-height: 128px; padding: 14px 14px 72px; border: 0; border-radius: 18px; background: var(--well); box-shadow: var(--well-shadow); color: var(--ink); text-align: left; transition: transform .12s, background .15s; }
.tile .add:active { transform: scale(.97); }
.tile .add:disabled { opacity: .4; cursor: default; }
.tile .sq { font-size: 32px; line-height: 1.1; margin-bottom: 4px; }
.tile b { font: 700 16px/1.2 var(--bold); }
/* The price sits under the name, not beside the buttons, so big text or a narrow screen can't make them overlap. */
.tile small { font: 700 15px var(--bold); opacity: .75; }
.tile .plus, .tile .less { position: absolute; bottom: 12px; display: grid; place-items: center; width: 48px; height: 48px; border: 0; border-radius: 50%; background: #fff; color: var(--ink); font: 700 28px/1 var(--bold); }
.tile .plus { right: 12px; background: var(--ink); color: #fff; }
.tile .less { right: 70px; }
.tile.on .add { background: var(--chosen); color: var(--chosen-ink); box-shadow: none; }
.tile.on .plus { background: #fff; color: var(--ink); }
/* How many: the accent dot, lined up with the tile's padding and the picture's top. */
.tile .count { position: absolute; top: 14px; right: 14px; min-width: 36px; height: 36px; padding: 0 9px; border-radius: 18px; background: var(--accent); color: #fff; font: var(--hw) calc(26px * var(--hs))/36px var(--head); letter-spacing: var(--ht); text-align: center; pointer-events: none; }
.tile:not(.on) .count, .tile:not(.on) .less { display: none; }
/* Nudge the first + a few times so it's clear the tiles are for tapping. */
[data-group="easier"] .tile:first-child:not(.on) .plus { animation: nudge 1.4s .8s 3; }
@keyframes nudge { 0%, 60%, 100% { transform: scale(1); } 30% { transform: scale(1.22); } }
.pop { animation: pop .25s; }
@keyframes pop { 50% { transform: scale(1.25); } }

/* The pot: sticks to the top of the screen while they pick. */
.pot { position: sticky; top: 8px; z-index: 2; padding: 12px 18px 16px; background: var(--ink); color: #fff; border-radius: 18px; }
.pot p { display: flex; justify-content: space-between; align-items: baseline; margin: 0 0 8px; }
.pot strong { font: var(--hw) calc(40px * var(--hs))/1 var(--head); letter-spacing: var(--ht); font-variant-numeric: tabular-nums; }
.pot .track { height: 12px; border-radius: 6px; background: #444; overflow: hidden; }
.pot .track i { display: block; width: calc((1 - var(--spent, 0)) * 100%); height: 100%; background: var(--green); transition: width .25s; }

.yours { display: grid; gap: 16px; }
.yours .row { display: grid; gap: 6px; }
.yours .row b { font: 700 17px var(--bold); }
.yours .pics { display: flex; flex-wrap: wrap; gap: 3px; font-size: 26px; line-height: 1.15; }
.yours .empty { margin: 0; color: var(--muted); }
