:root {
  --ink: #25324a;
  --cream: #fff9e9;
  --yellow: #ffd96a;
  --pink: #ffb7c9;
  --blue: #a9ddff;
  --mint: #bfe8ce;
  --purple: #d5c2ff;
  --white: #fff;
  --shadow: 0 8px 24px #3947601a;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: linear-gradient(180deg, #fff4c9, #fffaf0 42%, #eaf8ff);
  color: var(--ink);
  font-family: ui-rounded, "SF Pro Rounded", system-ui, sans-serif;
  min-height: 100vh;
  padding-bottom: 92px;
}
button,
input,
select {
  font: inherit;
}
button {
  color: inherit;
}
header {
  height: 74px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  font-size: 22px;
  display: flex;
  gap: 8px;
  align-items: center;
}
.icon-btn {
  border: 0;
  background: #fff;
  border-radius: 18px;
  font-size: 28px;
  width: 52px;
  height: 52px;
  box-shadow: var(--shadow);
}
main {
  max-width: 850px;
  margin: auto;
  padding: 0 18px;
}
.view {
  display: none;
}
.view.active {
  display: block;
}
.hero {
  text-align: center;
  background: #fff;
  border-radius: 34px;
  padding: 26px 15px 24px;
  box-shadow: var(--shadow);
  border: 4px solid #fff;
}
.tiny {
  font-weight: 800;
  letter-spacing: 2px;
  font-size: 13px;
  opacity: 0.55;
}
.balance {
  font-size: clamp(56px, 12vw, 92px);
  font-weight: 950;
  line-height: 1.1;
  margin: 7px 0 16px;
}
.pill {
  display: inline-block;
  background: #fff3bd;
  border-radius: 99px;
  padding: 9px 15px;
  font-weight: 750;
}
h1,
h2 {
  text-align: center;
}
h2 {
  margin: 27px 0 13px;
  font-size: 25px;
}
.value-choices {
  display: flex;
  overflow: auto;
  gap: 10px;
  padding: 5px 3px 13px;
  scrollbar-width: none;
}
.value-choice {
  min-width: 86px;
  border: 0;
  border-radius: 22px;
  background: #fff;
  padding: 12px 7px;
  box-shadow: var(--shadow);
  font-weight: 800;
}
.value-choice .emoji {
  font-size: 38px;
  display: block;
}
.value-choice.active {
  outline: 5px solid var(--yellow);
}
.value-result {
  min-height: 125px;
  background: var(--blue);
  border-radius: 30px;
  padding: 19px;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.value-result .big {
  font-size: 45px;
  font-weight: 950;
}
.progress {
  height: 20px;
  background: #ffffffa0;
  border-radius: 99px;
  overflow: hidden;
  margin: 10px auto;
  width: min(430px, 90%);
}
.progress i {
  display: block;
  height: 100%;
  background: #628bd8;
  border-radius: 99px;
}
.quick {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 16px;
}
.quick button {
  border: 0;
  border-radius: 25px;
  padding: 17px;
  background: #fff;
  box-shadow: var(--shadow);
  font-size: 32px;
  font-weight: 900;
}
.quick span {
  display: block;
  font-size: 15px;
  margin-top: 4px;
}
.sun {
  text-align: center;
  font-size: 82px;
}
.sunday-card {
  background: #fff;
  border-radius: 32px;
  padding: 24px;
  text-align: center;
  box-shadow: var(--shadow);
}
.sunday-card .huge {
  font-size: 55px;
  font-weight: 950;
}
.primary {
  border: 0;
  border-radius: 24px;
  background: var(--yellow);
  padding: 18px 24px;
  font-size: 22px;
  font-weight: 900;
  box-shadow: var(--shadow);
  width: 100%;
}
.coins {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin: 20px 0;
  flex-wrap: wrap;
}
.coin {
  width: 82px;
  height: 82px;
  border-radius: 50%;
  border: 5px solid #f4b72f;
  background: #ffe783;
  font-size: 26px;
  font-weight: 950;
  box-shadow:
    inset 0 0 0 4px #fff4a8,
    0 5px 12px #0001;
}
.coin.saved {
  background: var(--mint);
  border-color: #69b686;
  transform: translateY(-8px);
}
.book-head {
  font-size: 30px;
  text-align: center;
  margin: 5px 0 18px;
}
.ledger {
  background: #fff8dc;
  border: 5px solid #d85358;
  border-radius: 16px;
  padding: 8px;
  box-shadow: var(--shadow);
}
.entry {
  display: grid;
  grid-template-columns: 75px 1fr auto;
  gap: 8px;
  padding: 14px 8px;
  border-bottom: 2px dashed #d8cda8;
  align-items: center;
}
.entry:last-child {
  border-bottom: 0;
}
.entry .amount {
  font-weight: 950;
  font-size: 19px;
}
.entry .after {
  grid-column: 2/4;
  font-size: 13px;
  opacity: 0.6;
}
.interest-total {
  background: var(--purple);
  border-radius: 28px;
  padding: 20px;
  text-align: center;
  margin-bottom: 16px;
}
.interest-total span {
  display: block;
  font-weight: 800;
}
.interest-total b {
  font-size: 42px;
}
.chart-wrap {
  background: #fff;
  border-radius: 28px;
  padding: 12px;
  box-shadow: var(--shadow);
}
canvas {
  width: 100%;
  height: auto;
}
nav {
  position: fixed;
  z-index: 5;
  bottom: 0;
  left: 0;
  right: 0;
  background: #fffdf7dd;
  backdrop-filter: blur(16px);
  display: flex;
  justify-content: center;
  gap: 3px;
  padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
  box-shadow: 0 -4px 20px #00000012;
}
nav button {
  border: 0;
  background: transparent;
  border-radius: 18px;
  padding: 7px 15px;
  font-size: 28px;
  min-width: 78px;
}
nav button.active {
  background: #fff0ad;
}
nav span {
  font-size: 11px;
  font-weight: 850;
  display: block;
}
dialog {
  border: 0;
  background: transparent;
  padding: 15px;
  max-width: 620px;
  width: 100%;
}
dialog::backdrop {
  background: #26344a88;
  backdrop-filter: blur(4px);
}
.dialog-card {
  position: relative;
  background: var(--cream);
  border-radius: 30px;
  padding: 26px;
  box-shadow: 0 20px 70px #0004;
}
.close {
  position: absolute;
  right: 13px;
  top: 10px;
  border: 0;
  background: #fff;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  font-size: 28px;
}
.dialog-card h2 {
  margin-top: 5px;
}
.amount-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.amount-grid button {
  border: 0;
  border-radius: 20px;
  background: #fff;
  padding: 18px 5px;
  font-size: 22px;
  font-weight: 900;
}
.field {
  margin: 14px 0;
}
.field label {
  font-weight: 850;
  display: block;
  margin-bottom: 6px;
}
.field input,
.field select {
  width: 100%;
  padding: 14px;
  border: 2px solid #d8d9df;
  border-radius: 15px;
  background: #fff;
  font-size: 18px;
}
.parent-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.danger {
  background: #ffd6d6 !important;
}
/* Unauffällige Sicherung unter dem Buch – ohne PIN, funktioniert auch ohne HTTPS */
.backup {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin: 22px 0 6px;
}
.backup button {
  border: 0;
  background: none;
  padding: 6px;
  font-size: 13px;
  opacity: 0.5;
  text-decoration: underline;
}
.muted {
  text-align: center;
  opacity: 0.65;
  font-size: 14px;
}
.confetti {
  font-size: 45px;
  animation: pop 0.5s ease;
}
@keyframes pop {
  50% {
    transform: scale(1.25);
  }
}
@media (max-width: 500px) {
  .balance {
    font-size: 58px;
  }
  .entry {
    grid-template-columns: 63px 1fr auto;
  }
  .parent-grid {
    grid-template-columns: 1fr;
  }
}
.brand > div {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}
.brand small {
  font-size: 0.72rem;
  font-weight: 700;
  opacity: 0.65;
  margin-top: 0.18rem;
}

.money-places {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 10px;
  align-items: center;
  margin: 18px 0 8px;
}
.place-card {
  background: #fff;
  border-radius: 26px;
  padding: 15px 8px;
  text-align: center;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.place-card.active-place {
  background: var(--mint);
}
.place-emoji {
  font-size: 42px;
}
.place-card b {
  font-size: 18px;
}
.place-card small {
  font-size: 12px;
  opacity: 0.65;
}
.place-arrow {
  font-size: 28px;
  font-weight: 900;
}
.choice-hint {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  background: #f5f8ff;
  border-radius: 18px;
  padding: 10px 14px;
  font-weight: 800;
  margin-top: 12px;
}
@media (max-width: 430px) {
  .money-places {
    grid-template-columns: 1fr auto 1fr;
  }
  .place-card small {
    display: none;
  }
  .place-arrow {
    font-size: 22px;
  }
}
