:root {
  --bg: #f3eee6;
  --paper: #fffcf8;
  --ink: #241816;
  --ink-soft: #4e403b;
  --muted: #6b5e58;
  --line: rgba(36, 24, 22, 0.12);
  --burgundy: #8e2430;
  --burgundy-deep: #5c1520;
  --income: #1b6b4a;
  --income-bg: #e5f4ec;
  --expense: #a33b2b;
  --expense-bg: #fdecea;
  --shadow: 0 18px 50px rgba(60, 30, 24, 0.08);
  --serif: "Fraunces", "Iowan Old Style", Palatino, "Palatino Linotype", serif;
  --sans: "Outfit", "Avenir Next", "Segoe UI", sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--sans);
  color: var(--ink);
  background:
    radial-gradient(900px 420px at -10% -10%, rgba(227, 83, 74, 0.16), transparent 50%),
    radial-gradient(700px 380px at 110% 0%, rgba(196, 92, 38, 0.1), transparent 46%),
    var(--bg);
}

p { margin: 0; }

button, input, select, textarea { font: inherit; color: inherit; }

button { cursor: pointer; }

:focus-visible {
  outline: 3px solid #c46a32;
  outline-offset: 2px;
}

.sidebar :focus-visible { outline-color: #f2c9a0; }

::selection { background: #f0c7c4; color: #2c1016; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.app {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: 100dvh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: 22px 16px 16px;
  color: #f8efea;
  background:
    radial-gradient(140px 90px at 18% 0%, rgba(227, 83, 74, 0.38), transparent 70%),
    linear-gradient(180deg, #5a1c26 0%, #2b1016 100%);
}

.brand-block {
  display: grid;
  justify-items: start;
  gap: 8px;
  padding: 4px 8px 18px;
}

.mark-switch { display: flex; gap: 8px; }

.mark-btn {
  width: 52px;
  height: 52px;
  border: 2px solid transparent;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.14);
  display: grid;
  place-items: center;
  padding: 0;
  opacity: 0.55;
}

.mark-btn.is-active {
  background: #f6e7df;
  border-color: #fff;
  opacity: 1;
}

.mark-btn:hover { opacity: 1; }

.brand-copy {
  color: inherit;
  text-decoration: none;
}

.brand-active {
  display: block;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0.62;
}

.brand-mark {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: #f6e7df;
  display: grid;
  place-items: center;
  flex: none;
}

.brand-kicker {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.72;
}

.brand-name {
  display: block;
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 620;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

#side-nav {
  flex: 1;
  overflow: auto;
  padding-right: 4px;
}

#side-foot {
  display: grid;
  gap: 4px;
  padding-top: 12px;
}

.side-label {
  margin: 16px 10px 6px;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.62;
}

.side-link {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  color: inherit;
  text-decoration: none;
  text-align: left;
  border: 0;
  border-radius: 12px;
  padding: 10px;
  background: transparent;
  font-weight: 500;
}

.side-link svg { flex: none; }

.side-link.is-active,
.side-link:hover { background: rgba(255, 255, 255, 0.08); }

.kasse-link {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.kasse-link .label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kasse-link .amount {
  font-variant-numeric: tabular-nums;
  font-size: 0.78rem;
  opacity: 0.82;
}

.side-add {
  margin-top: 4px;
  background: rgba(255, 255, 255, 0.06);
}

.dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex: none;
}

.side-balance {
  padding: 8px 10px 12px;
}

.side-balance span {
  display: block;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.7;
}

.side-balance strong {
  font-family: var(--serif);
  font-size: 1.7rem;
  font-weight: 620;
  letter-spacing: -0.03em;
}

.sidebar .fine { color: rgba(248, 239, 234, 0.72); padding: 4px 10px 0; }

.sidebar .minus { color: #ffd0c8; }

main { padding: 32px 36px 72px; }

.view { max-width: 1120px; }

.topbar { display: none; }

.menu-btn {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 14px;
  background: var(--paper);
  color: var(--ink);
  display: grid;
  place-items: center;
  box-shadow: var(--shadow);
}

.scrim {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 25;
  border: 0;
  background: rgba(28, 14, 16, 0.45);
}

.hero,
.page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 18px 28px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}

.eyebrow,
.kicker {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--burgundy);
}

.kicker { color: var(--muted); margin-bottom: 0; }

.spot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #e3534a;
  box-shadow: inset -3px -2px 0 #241816;
  flex: none;
}

h1, h2, .balance, .card-title {
  font-family: var(--serif);
  font-weight: 620;
  letter-spacing: -0.03em;
}

h1 {
  margin: 0;
  font-size: clamp(2.1rem, 4vw, 3.4rem);
  line-height: 0.96;
}

h2 { margin: 0; font-size: 1.45rem; }

.balance {
  margin: 10px 0 8px;
  font-size: clamp(3rem, 6vw, 4.8rem);
  line-height: 0.92;
  letter-spacing: -0.045em;
  font-variant-numeric: tabular-nums;
}

.balance.compact {
  margin: 0;
  font-size: clamp(2.2rem, 4vw, 3.3rem);
}

.lead { max-width: 46rem; color: var(--ink-soft); font-size: 1.05rem; }

.hero-actions,
.page-actions,
.composer-actions,
.dialog-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.stats article,
.sheet,
.card {
  background: var(--paper);
  border: 1px solid rgba(36, 24, 22, 0.06);
  border-radius: 22px;
  box-shadow: var(--shadow);
}

.stats article { padding: 14px 16px 16px; }

.stat-label { color: var(--muted); font-size: 0.85rem; }

.stat-value {
  margin-top: 4px;
  font-family: var(--serif);
  font-size: 1.7rem;
  font-weight: 620;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.income { color: var(--income); }
.expense { color: var(--expense); }
.minus { color: var(--expense); }

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(260px, 0.85fr);
  gap: 16px;
}

.stack { display: grid; gap: 16px; }

.sheet { position: relative; padding: 22px 22px 22px 28px; overflow: hidden; }

.sheet::before,
.card .spine {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 7px;
  background: linear-gradient(#c14b55, #6e1c28);
}

.card .spine { content: none; }

.card { position: relative; overflow: hidden; }

.sheet-head { margin-bottom: 14px; }

.sheet-head p,
.hint,
.fine { color: var(--muted); }

.hint, .fine { font-size: 0.86rem; font-weight: 400; }

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin: 22px 0 12px;
}

.flow { display: grid; gap: 10px; margin-bottom: 18px; }

.flow-bar {
  display: flex;
  height: 54px;
  border-radius: 999px;
  overflow: hidden;
  background: #efe6dc;
}

.flow-in, .flow-out {
  display: grid;
  place-items: center;
  min-width: 0;
  color: white;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.flow-in { background: var(--income); }
.flow-out { background: var(--expense); }

.flow-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 18px;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.flow-legend span, .hbar-name, .kicker {
  display: flex;
  align-items: center;
  gap: 8px;
}

.swatch {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.swatch.in { background: var(--income); }
.swatch.out { background: var(--expense); }

.chart svg {
  width: 100%;
  height: auto;
  display: block;
  font-family: var(--sans);
}

.hbar {
  display: grid;
  grid-template-columns: minmax(88px, 0.9fr) minmax(0, 1.4fr) auto;
  gap: 8px;
  align-items: center;
  text-decoration: none;
  color: inherit;
  padding: 8px 0;
}

.hbar-name { min-width: 0; }
.hbar-name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.hbar-track {
  height: 10px;
  border-radius: 999px;
  background: #f0e7de;
  overflow: hidden;
}

.hbar-fill { display: block; height: 100%; border-radius: inherit; }
.hbar-val { font-variant-numeric: tabular-nums; font-weight: 600; }

.kasse-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 14px;
}

.kasse-card {
  display: block;
  padding: 16px 16px 16px 22px;
  text-decoration: none;
  color: inherit;
}

.kasse-card .spine {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 7px;
}

.card-title {
  display: block;
  margin: 8px 0 4px;
  font-size: 1.5rem;
}

.card-desc {
  display: block;
  margin-bottom: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-balance {
  display: block;
  margin-bottom: 4px;
  font-size: 1.35rem;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.activity { display: grid; gap: 4px; }

.activity-item {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 16px;
  text-decoration: none;
  color: inherit;
}

.activity-item:hover,
.kasse-card:hover { background: #fbf6f1; }

.activity-line { display: block; }

.pill {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 650;
}

.pill.income { background: var(--income-bg); color: var(--income); }
.pill.expense { background: var(--expense-bg); color: var(--expense); }

.back {
  display: inline-block;
  margin-bottom: 8px;
  color: var(--muted);
  text-decoration: none;
}

.back:hover { color: var(--ink); }

.composer { display: grid; gap: 14px; }

.composer[data-kind="income"] { box-shadow: inset 0 0 0 1.5px rgba(27, 107, 74, 0.28), var(--shadow); }
.composer[data-kind="expense"] { box-shadow: inset 0 0 0 1.5px rgba(163, 59, 43, 0.28), var(--shadow); }
.composer:not(.sheet) { box-shadow: none; }

.type-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: #f3ebe3;
}

.type-btn {
  min-height: 44px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-soft);
  font-weight: 600;
}

.type-btn.is-on { background: white; box-shadow: 0 4px 14px rgba(36, 24, 22, 0.06); }
.type-btn.is-on[data-type="income"] { color: var(--income); }
.type-btn.is-on[data-type="expense"] { color: var(--expense); }

.fields {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) 150px;
  gap: 12px;
}

.fields.two { grid-template-columns: minmax(0, 1.5fr) minmax(110px, 0.55fr) minmax(110px, 0.5fr); }

label {
  display: grid;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink-soft);
}

input, select, textarea {
  width: 100%;
  border: 1px solid rgba(36, 24, 22, 0.14);
  border-radius: 12px;
  background: white;
  padding: 11px 12px;
  font-weight: 500;
  color: var(--ink);
}

textarea { min-height: 76px; resize: vertical; }

.sentence {
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--income-bg);
  color: #145239;
}

.composer[data-kind="expense"] .sentence {
  background: var(--expense-bg);
  color: #8e2e24;
}

.note summary { cursor: pointer; color: var(--ink-soft); font-weight: 600; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: white;
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}

.btn-primary { background: var(--burgundy); color: white; }
.btn-income { background: var(--income); color: white; }
.btn-expense, .btn-danger { background: var(--expense); color: white; }
.btn-ghost { background: transparent; border-color: var(--line); }
.btn:hover { filter: brightness(0.98); }
button:disabled { opacity: 0.6; cursor: wait; }

.btn-tiny {
  min-height: 32px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  font-size: 0.78rem;
  font-weight: 600;
}

.ledger-tools {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: end;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.search { min-width: min(100%, 280px); }

.ledger-wrap { overflow: auto; max-height: min(70vh, 820px); }

.ledger {
  width: 100%;
  min-width: 880px;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

.ledger th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  text-align: left;
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}

.ledger td {
  padding: 12px;
  border-bottom: 1px solid rgba(36, 24, 22, 0.06);
  vertical-align: top;
}

.ledger td.num, .ledger th.num { text-align: right; }
.ledger td.date, .ledger td.receipt, .ledger td.num { white-space: nowrap; }
.ledger tbody tr:hover { background: #fbf7f2; }
.ledger tr.opening td { color: var(--ink-soft); background: #fbf7f2; }
.ledger tr.void td { color: var(--muted); }
.struck { text-decoration: line-through; }
.dash { color: #b3a8a2; }
.purpose { display: block; }
.money-in { color: var(--income); font-weight: 650; }
.money-out { color: var(--expense); font-weight: 650; }

.row-actions { display: flex; gap: 6px; justify-content: flex-end; }

.ledger-cards { display: none; }

.entry-card {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid rgba(36, 24, 22, 0.06);
}

.entry-card header, .equation div, .split div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.entry-card.void { opacity: 0.6; }
.entry-card.opening { background: #fbf7f2; }

.empty-cell, .empty-note { color: var(--muted); padding: 16px 4px; }

.recon {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

.equation, .split { display: grid; gap: 8px; align-content: start; }

.equation div, .split div {
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
  font-variant-numeric: tabular-nums;
}

.equation .result {
  border-bottom: 0;
  padding-top: 4px;
  font-family: var(--serif);
  font-size: 1.35rem;
}

.count-form {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 10px;
  align-items: end;
  margin-top: 8px;
}

.count-note { margin-top: 10px; font-weight: 600; }
.count-note.ok { color: var(--income); }
.count-note.off { color: var(--expense); }

.banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
  padding: 12px 14px;
  border-radius: 16px;
  background: #f8e7c8;
  color: #4a3018;
}

.banner.bad { background: #f8dcd8; color: #6e241c; }

.form-error {
  margin: 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--expense-bg);
  color: var(--expense);
}

.report-top { margin-bottom: 18px; }
.report-book { margin-top: 18px; }
.report-total { margin: 8px 0 18px; }

.report .ledger-wrap { max-height: none; overflow: auto; }
.report .ledger { width: max-content; max-width: 100%; min-width: 0; }
.report .ledger th,
.report .ledger td { padding: 8px 10px; }
.report .who { max-width: 16rem; }
.report .who strong,
.report .purpose { display: block; }
.report .purpose {
  margin-top: 2px;
  color: var(--ink-soft);
  font-weight: 500;
  line-height: 1.35;
  white-space: normal;
}

.signs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  margin-top: 8px;
}

.sign p {
  min-height: 2.4rem;
  margin: 28px 0 6px;
  border-bottom: 1px solid var(--ink);
}

.sign span { color: var(--muted); font-size: 0.85rem; }

.backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(28, 12, 14, 0.46);
}

.dialog {
  width: min(680px, 100%);
  max-height: min(92dvh, 920px);
  overflow: auto;
  padding: 22px;
  border-radius: 24px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 30px 80px rgba(30, 10, 12, 0.28);
}

.dialog-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 8px;
}

.icon-btn {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: #f3eee6;
  font-size: 1.3rem;
  line-height: 1;
}

.presets, .colors { display: flex; flex-wrap: wrap; gap: 8px; }

.chip {
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: white;
}

.swatch-pick { position: relative; width: auto; }
.swatch-pick input { position: absolute; opacity: 0; pointer-events: none; }
.swatch-pick span {
  display: block;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.35);
}
.swatch-pick input:checked + span,
.swatch-pick input:focus-visible + span {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.dialog-actions { justify-content: flex-end; margin-top: 8px; }
.danger-zone { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); }

.toasts {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 70;
  display: grid;
  gap: 8px;
}

.toast {
  max-width: min(360px, calc(100vw - 32px));
  padding: 12px 14px;
  border-radius: 14px;
  background: #2b1016;
  color: #f8efea;
  box-shadow: var(--shadow);
}

tr.flash, .entry-card.flash { animation: flash 1.6s ease; }

@keyframes flash {
  from { background: #f8e3c4; }
  to { background: transparent; }
}

@media (max-width: 980px) {
  .layout, .recon, .signs { grid-template-columns: 1fr; }
}

@media (max-width: 920px) {
  .app { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed;
    z-index: 30;
    width: min(86vw, 320px);
    transform: translateX(-105%);
    transition: transform 0.2s ease;
  }
  body.menu-open .sidebar { transform: none; }
  body.menu-open .scrim { display: block; }
  .topbar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: -6px 0 16px;
  }
  #top-title {
    font-family: var(--serif);
    font-size: 1.35rem;
    font-weight: 620;
  }
  main { padding: 18px 16px 48px; }
}

@media (max-width: 800px) {
  .ledger-wrap { display: none; }
  .report .ledger-wrap { display: block; overflow: auto; }
  .ledger-cards { display: grid; gap: 10px; }
  .stats { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .fields, .fields.two, .count-form { grid-template-columns: 1fr; }
  .hbar { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}

@media print {
  @page { margin: 14mm; }
  .sidebar, .topbar, .scrim, .toasts, #modal-root, .no-print { display: none !important; }
  body { background: white; }
  .app { display: block; }
  body.is-locked .app,
  body.is-locked .lock { display: none !important; }
  main, .view { max-width: none; padding: 0; }
  .sheet, .card, .stats article { box-shadow: none; border-color: #ddd; }
  .ledger-wrap { display: block !important; max-height: none; overflow: visible; }
  .ledger { min-width: 0; }
  .ledger-cards { display: none !important; }
  .ledger thead th { position: static; }
  .report-book { break-before: page; }
  .report-book:first-of-type { break-before: auto; }
  .ledger tr, .sign, .recon { break-inside: avoid; }
}

.lock {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(420px 220px at 50% 0%, rgba(227, 83, 74, 0.35), transparent 60%),
    linear-gradient(180deg, #5a1c26 0%, #2b1016 100%);
}

body:not(.is-locked) .lock { display: none; }

body[data-kasse="schildkroeten"] .lock {
  background:
    radial-gradient(420px 220px at 50% 0%, rgba(90, 190, 120, 0.38), transparent 60%),
    linear-gradient(180deg, #1d4a32 0%, #10261a 100%);
}

body[data-kasse="schildkroeten"] .lock-kicker { color: #1f6b4a; }

body[data-kasse="schildkroeten"] .sidebar {
  background:
    radial-gradient(140px 90px at 18% 0%, rgba(90, 190, 120, 0.35), transparent 70%),
    linear-gradient(180deg, #1d4a32 0%, #10261a 100%);
}

body[data-kasse="schildkroeten"] .mark-btn.is-active { background: #e7f6ea; }

body.is-locked .app,
body.is-locked .scrim,
body.is-locked #modal-root,
body.is-locked .toasts { display: none !important; }

.lock-card {
  width: min(520px, 100%);
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 28px 22px 22px;
  border-radius: 28px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 30px 80px rgba(20, 6, 8, 0.35);
}

.lock-card h1 {
  font-size: 2.4rem;
  text-align: center;
}

.lock-kicker {
  margin-top: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--burgundy);
}

.lock-lead {
  margin: 0 0 8px;
  text-align: center;
  color: var(--ink-soft);
}

#pin-step {
  display: grid;
  justify-items: center;
  gap: 8px;
  width: 100%;
}

#pin-step[hidden],
.pick[hidden] { display: none; }

.pick {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  width: 100%;
  margin: 4px 0 8px;
}

.pick-card {
  display: grid;
  justify-items: center;
  gap: 4px;
  min-height: 132px;
  padding: 12px 8px;
  border: 2px solid transparent;
  border-radius: 18px;
  background: #f6efe8;
  text-align: center;
}

.pick-card strong {
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 620;
}

.pick-card span { color: var(--muted); font-size: 0.75rem; }

.pick-card.is-on { background: white; border-color: var(--burgundy); }
.pick-card[data-konto="schildkroeten"].is-on { border-color: #1f6b4a; }

.pick-mark {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  background: #f8e7e4;
  display: grid;
  place-items: center;
}

.pick-mark.turtle { background: #e5f4ea; }

.lock-card #pin {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.pin-dots { display: flex; gap: 12px; margin: 8px 0 4px; }

.pin-dots span {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid rgba(36, 24, 22, 0.28);
}

.pin-dots span.is-on {
  background: var(--burgundy);
  border-color: var(--burgundy);
}

.pin-error {
  min-height: 1.3em;
  margin: 0;
  color: var(--expense);
  font-weight: 600;
  text-align: center;
}

.keypad {
  display: grid;
  grid-template-columns: repeat(3, 72px);
  gap: 10px;
  margin-top: 6px;
}

.keypad button {
  height: 64px;
  border: 0;
  border-radius: 18px;
  background: #f6efe8;
  font-size: 1.45rem;
  font-weight: 600;
}

.keypad button:hover { background: #efe4da; }

.lock-card.is-wrong { animation: shake 0.35s ease; }

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-8px); }
  75% { transform: translateX(8px); }
}
