.savings-play {
  --play-plum: #281737;
  --play-paper: #fbf7ef;
  --play-lilac: #dec8f8;
  --play-lime: #d9f47d;
  --play-apricot: #ffb39e;
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, .87fr) minmax(0, 1.13fr);
  align-items: center;
  gap: clamp(1.75rem, 5.5vw, 5rem);
  margin-block: clamp(3rem, 7vw, 6.5rem);
  padding: clamp(1.5rem, 5vw, 4rem);
  border-radius: clamp(1.5rem, 4vw, 2.75rem);
  overflow: hidden;
  color: var(--play-paper);
  background: var(--play-plum);
}

.savings-play::before {
  content: '';
  position: absolute;
  z-index: -1;
  width: 25rem;
  height: 25rem;
  inset-inline-start: -10rem;
  inset-block-end: -18rem;
  border-radius: 50%;
  border: 1px solid #e8c7ff45;
  box-shadow: 0 0 0 1.5rem #e8c7ff12, 0 0 0 3rem #e8c7ff12, 0 0 0 4.5rem #e8c7ff12;
  pointer-events: none;
}

.savings-play h2 {
  margin: 0 0 .85rem;
  color: var(--play-paper);
  font-size: clamp(2.35rem, 5vw, 5rem);
  font-weight: 850;
  line-height: .96;
  letter-spacing: -.07em;
}

.savings-play-copy > p {
  max-width: 27rem;
  margin: 0 0 1.5rem;
  color: #eadbf4;
  font-size: clamp(1rem, 1.45vw, 1.2rem);
  line-height: 1.6;
}

.savings-play-goal {
  display: grid;
  gap: .4rem;
  max-width: 20rem;
}

.savings-play-goal label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: .75rem;
  color: var(--play-paper);
  font-size: .9rem;
  font-weight: 730;
}

.savings-play-goal label span {
  color: #dbc9e9;
  font-size: .72rem;
  letter-spacing: .09em;
}

.savings-play-goal select {
  width: 100%;
  min-height: 3rem;
  padding: .65rem .85rem;
  border: 1px solid #be9fd0;
  border-radius: .75rem;
  color: var(--play-paper);
  background: #3d2a49;
  font: inherit;
  color-scheme: dark;
}

.savings-play-goal select:disabled { opacity: .65; }

.savings-play .savings-play-plan {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  min-height: 2.75rem;
  margin-top: .7rem;
  color: var(--play-lime);
  font-weight: 740;
  text-decoration: underline;
  text-underline-offset: .22em;
}

.savings-play-plan span { text-decoration: none; }

.savings-play-board {
  min-width: 0;
  padding: clamp(1rem, 3vw, 2rem);
  border: 1px solid #21122c;
  border-radius: 1.5rem;
  box-shadow: .43rem .43rem 0 var(--play-apricot);
  color: var(--play-plum);
  background: var(--play-lilac);
}

.savings-play-board-top,
.savings-play-total,
.savings-play-controls {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  column-gap: .6rem;
  row-gap: .35rem;
}

.savings-play-board-top { align-items: center; }

.savings-play-board-top p {
  margin: 0;
  font-size: clamp(.83rem, 1.35vw, 1rem);
  font-weight: 800;
}

.savings-play-round {
  padding: .34rem .62rem;
  border: 1px solid #644079;
  border-radius: 999px;
  color: var(--play-plum);
  background: #f3e8ff;
  font-size: .76rem;
  font-weight: 740;
  white-space: nowrap;
}

.savings-play-total { justify-content: flex-start; margin-block: .7rem .45rem; }

.savings-play-total strong {
  font-size: clamp(2.65rem, 6vw, 5rem);
  font-weight: 850;
  line-height: 1;
  letter-spacing: -.075em;
  font-variant-numeric: tabular-nums;
}

.savings-play-total span {
  color: #523466;
  font-size: .9rem;
  font-weight: 690;
}

.savings-play-meter {
  display: block;
  appearance: none;
  width: 100%;
  height: .8rem;
  overflow: hidden;
  border: 1px solid #6b4c81;
  border-radius: 99px;
  background: #f1e7fa;
  color: var(--play-plum);
}

.savings-play-meter::-webkit-progress-bar { background: #f1e7fa; }
.savings-play-meter::-webkit-progress-value { background: var(--play-plum); }
.savings-play-meter::-moz-progress-bar { background: var(--play-plum); }
.savings-play-board.is-complete .savings-play-meter::-webkit-progress-value { background: var(--play-lime); }
.savings-play-board.is-complete .savings-play-meter::-moz-progress-bar { background: var(--play-lime); }

.savings-play-weeks {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: .3rem;
  margin: .85rem 0 0;
  padding: 0;
  list-style: none;
}

.savings-play-weeks li {
  display: grid;
  justify-items: center;
  gap: .25rem;
  min-width: 0;
  padding: .45rem .12rem;
  border: 1px dashed #9c77b8;
  border-radius: .48rem;
  color: #523466;
  background: #f4eaff;
}

.savings-play-weeks li.is-filled {
  border-style: solid;
  border-color: #3b4725;
  color: #293917;
  background: var(--play-lime);
}

.savings-play-weeks li span {
  font-size: clamp(.61rem, 1vw, .73rem);
  font-weight: 760;
  white-space: nowrap;
}

.savings-play-weeks li strong { font-size: clamp(.71rem, 1.25vw, .93rem); }

.savings-play-status {
  min-height: 1.35rem;
  margin: .8rem 0 .7rem;
  color: var(--play-plum);
  font-size: .86rem;
  font-weight: 680;
  line-height: 1.45;
}

.savings-play-deposits { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .45rem; }

.savings-play-deposits button {
  min-height: 2.75rem;
  padding: .5rem .2rem;
  border: 1px solid var(--play-plum);
  border-radius: .65rem;
  color: var(--play-plum);
  background: var(--play-paper);
  font: inherit;
  font-size: clamp(.72rem, 1.25vw, .9rem);
  font-weight: 780;
  white-space: nowrap;
  cursor: pointer;
}

.savings-play-deposits button:nth-child(2) { background: var(--play-lime); }
.savings-play-deposits button:nth-child(3) { background: var(--play-apricot); }
.savings-play-deposits button:hover:not(:disabled) { color: var(--play-paper); background: var(--play-plum); }
.savings-play-deposits button:disabled { opacity: .55; cursor: default; }

.savings-play-controls { justify-content: flex-end; }

.savings-play-controls button {
  min-height: 2.75rem;
  padding: .25rem .25rem 0;
  border: 0;
  color: var(--play-plum);
  background: transparent;
  font: inherit;
  font-size: .78rem;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: .17em;
  cursor: pointer;
}

.savings-play-controls button:disabled { opacity: .55; cursor: default; text-decoration: none; }
.savings-play :focus-visible { outline: 2px solid var(--play-lime); outline-offset: 3px; }
.savings-play-board :focus-visible { outline-color: #6d388b; }

@media (max-width: 780px) {
  .savings-play { grid-template-columns: minmax(0, 1fr); }
  .savings-play h2 br { display: none; }
}

@media (max-width: 480px) {
  .savings-play-weeks { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
