[hidden] { display: none !important; }
/* Layout: svjs26-stijl. Wit papier, zwarte inkt, lichtgrijze vlakken, Effra, grote zware cijfers. Eén kolom; formulieren openen als vel van onderen. */
@font-face { font-family: "Effra"; font-weight: 400; font-display: swap; src: local("Effra Regular"), url('fonts/effra-Rg.woff') format("woff"); }
@font-face { font-family: "Effra"; font-weight: 600; font-display: swap; src: local("Effra SemiBold"), url('fonts/effra-SBd.woff') format("woff"); }
@font-face { font-family: "Effra"; font-weight: 800; font-display: swap; src: local("Effra XBold"), url('fonts/effra-XBd.woff') format("woff"); }
:root {
  color-scheme: light;
  --ink: #000; --paper: #fff; --cream: #F5F5F5; --muted: #6B6B6B; --line: #E2E2E2; --soft: #CFCFCF;
  --ok: #1E6B34; --ok-bg: #E6F4EA; --bad: #B42318; --bad-bg: #FDEEEC; --warm: #9A4A00; --warm-bg: #FFF1E3;
  --f: "Effra", "Inter", Arial, Helvetica, sans-serif;
}
* { box-sizing: border-box; }
html, body { background: var(--paper); color: var(--ink); }
body { margin: 0; font-family: var(--f); font-size: 15px; line-height: 1.5; font-weight: 400; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.wrap { max-width: 860px; margin: 0 auto; padding-block: 0 120px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); display: grid; gap: 14px; }
.label { font-size: 13px; font-weight: 600; color: var(--muted); }
.num { font-variant-numeric: tabular-nums; }

/* kop */
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 68px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 15px; letter-spacing: .2px; }
.ball { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--ink); position: relative; overflow: hidden; }
.ball::before { content: ""; position: absolute; inset: 0 0 50% 0; background: var(--ink); }
.ball::after { content: ""; position: absolute; left: 50%; top: 50%; width: 7px; height: 7px; margin: -3.5px 0 0 -3.5px; border-radius: 50%; background: var(--paper); border: 2px solid var(--ink); }
.ghost { cursor: pointer; border: 1px solid var(--ink); background: var(--paper); color: var(--ink); border-radius: 999px; padding: 8px 18px; min-height: 40px; font-weight: 700; font-size: 14px; }
.ghost:hover { background: var(--cream); }

/* geld */
.tile { background: var(--cream); border-radius: 24px; padding: 18px 22px; min-width: 0; }
.hero { display: grid; gap: 6px; padding: 22px 26px; }
.big { font-size: clamp(56px, 13vw, 104px); font-weight: 800; letter-spacing: -3px; line-height: .9; margin-top: 6px; }
.big.neg { color: var(--bad); }
.hero p { margin: 8px 0 0; font-size: clamp(16px, 1.6vw, 19px); line-height: 1.4; max-width: 46ch; text-wrap: pretty; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.stat { display: grid; gap: 2px; padding: 16px 18px; border-radius: 20px; }
.stat b { font-size: 26px; font-weight: 800; letter-spacing: -.5px; line-height: 1.15; }
.stat small { color: var(--muted); font-size: 13px; }

/* acties */
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.act { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 60px; border-radius: 999px; border: 1px solid var(--ink); cursor: pointer; font-weight: 800; font-size: 17px; }
.act svg { width: 20px; height: 20px; flex: none; }
.act.buy { background: var(--paper); color: var(--ink); }
.act.buy:hover { background: var(--cream); }
.act.sell { background: var(--ink); color: var(--paper); }
.act.sell:hover { background: #222; }

/* tabs en lijst */
.bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 6px; }
.tabs { display: inline-flex; gap: 4px; padding: 4px; background: var(--cream); border-radius: 999px; }
.tabs button { border: 0; background: none; padding: 7px 16px; min-height: 36px; border-radius: 999px; font-weight: 600; font-size: 14px; color: var(--muted); cursor: pointer; }
.tabs button:hover { color: var(--ink); }
.tabs button.on { background: var(--ink); color: var(--paper); }
.tabs button span { margin-left: 6px; font-weight: 700; opacity: .7; }
.search { flex: 1 1 180px; min-width: 0; height: 42px; border-radius: 999px; border: 1px solid var(--line); background: var(--paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='17' height='17' viewBox='0 0 256 256'%3E%3Cpath fill='%236B6B6B' d='M229.66,218.34l-50.07-50.06a88.11,88.11,0,1,0-11.31,11.31l50.06,50.07a8,8,0,0,0,11.32-11.32ZM40,112a72,72,0,1,1,72,72A72.08,72.08,0,0,1,40,112Z'/%3E%3C/svg%3E") no-repeat 14px 50%; padding: 0 16px 0 38px; font-size: 15px; }
.search::placeholder { color: var(--muted); opacity: 1; }
.search:focus { border-color: var(--ink); outline: none; }
.sort { height: 42px; border-radius: 999px; border: 1px solid var(--line); background: var(--paper); padding: 0 14px; font-size: 14px; font-weight: 600; color: var(--ink); cursor: pointer; }
.sort:focus { border-color: var(--ink); outline: none; }

.list { display: grid; gap: 6px; padding: 6px; background: var(--cream); border-radius: 24px; }
.row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 14px; align-items: center; padding: 12px 14px; border-radius: 16px; background: var(--paper); }
.row.out { opacity: .55; }
.row .name { font-weight: 700; font-size: 15px; line-height: 1.3; overflow-wrap: anywhere; background: none; border: 0; padding: 0; text-align: left; cursor: pointer; color: var(--ink); }
.row .name:hover { text-decoration: underline; text-underline-offset: 3px; }
.row .meta { grid-column: 1; display: flex; flex-wrap: wrap; gap: 4px 12px; color: var(--muted); font-size: 13px; }
.meta .nodate { color: var(--soft); }
.row .right { grid-row: 1 / span 2; grid-column: 2; display: grid; justify-items: end; gap: 6px; }
.pill { display: inline-block; padding: 2px 10px; border-radius: 999px; background: var(--cream); font-weight: 700; font-size: 12.5px; white-space: nowrap; }
.pill.have { background: var(--ink); color: var(--paper); }
.pill.gone { color: var(--muted); }
.pill.warn { background: var(--warm-bg); color: var(--warm); }
.mini { cursor: pointer; border: 1px solid var(--ink); background: var(--paper); border-radius: 999px; padding: 6px 14px; min-height: 34px; font-weight: 700; font-size: 13px; }
.mini:hover { background: var(--ink); color: var(--paper); }
.profit { font-weight: 800; font-size: 17px; }
.profit.pos { color: var(--ok); }
.profit.neg { color: var(--bad); }
.toggle { display: flex; justify-content: center; }
.link { border: 0; background: none; padding: 8px; cursor: pointer; font-weight: 600; font-size: 14px; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.empty { text-align: center; color: var(--muted); padding: 32px 16px; background: var(--paper); border-radius: 16px; }
.empty b { display: block; color: var(--ink); font-size: 16px; margin-bottom: 4px; }
.banner { background: var(--bad-bg); color: var(--bad); border-radius: 16px; padding: 12px 16px; font-size: 14px; font-weight: 600; }
.banner.soft { background: var(--cream); color: var(--ink); }

/* vel */
.scrim { position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 20; display: flex; align-items: flex-end; justify-content: center; }
.sheet { width: 100%; max-width: 560px; max-height: calc(100% - 24px); overflow-y: auto; background: var(--paper); border-radius: 24px 24px 0 0; padding: 24px 22px calc(22px + env(safe-area-inset-bottom, 0px)); padding-left: max(22px, env(safe-area-inset-left, 0px)); padding-right: max(22px, env(safe-area-inset-right, 0px)); display: grid; gap: 16px; animation: up .2s ease-out; box-shadow: 0 -10px 40px rgba(0,0,0,.12); }
@media (min-width: 640px) { .scrim { align-items: center; } .sheet { border-radius: 24px; } }
@keyframes up { from { transform: translateY(20px); opacity: .5; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .sheet { animation: none; } }
.sheet h2 { margin: 0; font-size: 22px; font-weight: 800; letter-spacing: -.3px; text-wrap: balance; }
.sheet-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.x { width: 38px; height: 38px; flex: none; border-radius: 50%; border: 1px solid var(--line); background: var(--paper); cursor: pointer; font-size: 20px; line-height: 1; color: var(--ink); }
.x:hover { border-color: var(--ink); }
.field { display: grid; gap: 6px; }
.field > span { font-size: 14px; font-weight: 600; }
.field > span em { font-style: normal; color: var(--muted); font-weight: 400; }
.in { width: 100%; height: 50px; border-radius: 14px; border: 1px solid var(--line); background: var(--paper); padding: 0 14px; font-size: 17px; font-weight: 600; }
.in:focus { outline: none; border-color: var(--ink); }
.in::placeholder { color: var(--soft); font-weight: 400; }
.money { position: relative; }
.money::before { content: "€"; position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); font-weight: 600; font-size: 17px; }
.money .in { padding-left: 32px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.step { display: grid; grid-template-columns: 50px minmax(0, 1fr) 50px; gap: 6px; }
.step button { height: 50px; border-radius: 14px; border: 1px solid var(--line); background: var(--cream); font-size: 22px; font-weight: 800; cursor: pointer; }
.step button:hover { border-color: var(--ink); }
.step button:disabled { opacity: .35; cursor: default; }
.step .in { text-align: center; }
.pick { display: grid; gap: 4px; max-height: 240px; overflow-y: auto; padding: 4px; background: var(--cream); border-radius: 16px; }
.pick button { display: flex; justify-content: space-between; gap: 10px; align-items: center; text-align: left; padding: 10px 14px; border-radius: 12px; border: 1px solid transparent; background: var(--paper); cursor: pointer; font-weight: 600; font-size: 14.5px; }
.pick button:hover { border-color: var(--ink); }
.pick button small { color: var(--muted); white-space: nowrap; font-weight: 600; }
.chosen { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 12px 14px; border-radius: 16px; background: var(--cream); }
.chosen b { font-weight: 800; overflow-wrap: anywhere; }
.chosen small { color: var(--muted); display: block; font-size: 13px; }
.preview { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 14px 18px; border-radius: 16px; background: var(--cream); }
.preview b { font-size: 28px; font-weight: 800; letter-spacing: -.5px; }
.save { height: 56px; border-radius: 999px; border: 0; background: var(--ink); color: var(--paper); font-weight: 800; font-size: 17px; cursor: pointer; }
.save:hover { background: #222; }
.save:disabled { opacity: .3; cursor: default; }
.danger { background: var(--paper); border: 1px solid var(--bad); color: var(--bad); border-radius: 999px; height: 46px; font-weight: 700; cursor: pointer; }
.danger.sure { background: var(--bad); color: var(--paper); }
.hint { color: var(--muted); font-size: 13px; margin: 0; }
.err { color: var(--bad); font-size: 14px; margin: 0; font-weight: 600; }
.hist { display: grid; font-size: 14px; }
.hist div { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; border-top: 1px solid var(--cream); }
.hist div:first-child { border-top: 0; }
.buys { display: grid; gap: 6px; padding: 6px; background: var(--cream); border-radius: 16px; }
.buyrow { display: grid; grid-template-columns: 1.3fr 1.3fr .7fr .9fr 38px; gap: 8px; align-items: end; padding: 10px; background: var(--paper); border-radius: 12px; }
.buyrow label { display: grid; gap: 4px; min-width: 0; }
.buyrow small { color: var(--muted); font-size: 12px; font-weight: 600; }
.in.sm { height: 42px; font-size: 15px; padding: 0 10px; border-radius: 10px; min-width: 0; }
.buyrow .rm { height: 42px; border-radius: 10px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); font-size: 18px; cursor: pointer; }
.buyrow .rm:hover { border-color: var(--ink); }
.buyrow.gone { opacity: .45; }
.buyrow.gone label { text-decoration: line-through; pointer-events: none; }
@media (max-width: 560px) { .buyrow { grid-template-columns: 1fr 1fr 38px; } .buyrow label:nth-child(1) { grid-column: 1 / 3; grid-row: 1; } .buyrow label:nth-child(2) { grid-column: 1 / -1; } .buyrow .rm { grid-column: 3; grid-row: 1; } }

/* inloggen */
.login { min-height: 100vh; display: grid; place-items: center; padding-block: 24px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.login-box { width: 100%; max-width: 400px; display: grid; gap: 16px; padding: 28px 24px; background: var(--cream); border-radius: 24px; }
.login-box h1 { margin: 8px 0 0; font-size: 34px; font-weight: 800; letter-spacing: -1px; }
.top-end { display: flex; align-items: center; gap: 8px; }
.shops { display: flex; flex-wrap: wrap; gap: 6px; }
.shops button { border: 1px solid var(--line); background: var(--paper); border-radius: 999px; padding: 5px 12px; font-size: 13px; font-weight: 600; cursor: pointer; }
.shops button:hover, .shops button.on { border-color: var(--ink); }
.shops button.on { background: var(--ink); color: var(--paper); }
.meta .shop { color: var(--ink); font-weight: 600; }

/* melding */
.toast { position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 30; display: flex; align-items: center; gap: 14px; padding: 12px 12px 12px 20px; border-radius: 999px; background: var(--ink); color: var(--paper); font-weight: 700; box-shadow: 0 10px 30px rgba(0,0,0,.2); max-width: calc(100% - 32px); }
.toast button { border: 0; background: var(--paper); color: var(--ink); border-radius: 999px; padding: 6px 14px; font-weight: 700; cursor: pointer; }

@media (max-width: 640px) {
  .stats { grid-template-columns: 1fr 1fr; }
  .act { font-size: 16px; }
  .hero { padding: 20px; }
  .tile { padding: 16px 18px; }
}

/* gedeeld: terug-link en rozen */
a.brand { color: var(--ink); text-decoration: none; }
a.brand.back::before { content: "‹"; font-size: 22px; line-height: 1; margin-right: 2px; color: var(--muted); }
a.brand.back:hover { text-decoration: underline; text-underline-offset: 3px; }
.actions.three { grid-template-columns: 1fr 1fr; }
.actions.three .act.toss { grid-column: 1 / -1; min-height: 48px; font-size: 15px; background: var(--paper); color: var(--bad); border-color: var(--bad); }
.actions.three .act.toss:hover { background: var(--bad-bg); }
.quick { display: flex; flex-wrap: wrap; gap: 6px; }
.quick button { border: 1px solid var(--line); background: var(--paper); border-radius: 999px; padding: 7px 14px; font-size: 14px; font-weight: 700; cursor: pointer; }
.quick button:hover { border-color: var(--ink); }
.quick button.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.nudge { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 14px 18px; border-radius: 20px; background: var(--warm-bg); color: var(--warm); font-weight: 600; }
.nudge button { border: 1px solid var(--warm); background: var(--paper); color: var(--warm); border-radius: 999px; padding: 6px 14px; font-weight: 700; cursor: pointer; }
.kind { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 700; background: var(--cream); color: var(--ink); white-space: nowrap; }
.kind.boeket { background: var(--ok-bg); color: var(--ok); }
.kind.weg { background: var(--bad-bg); color: var(--bad); }
.big-in { height: 64px; font-size: 28px; font-weight: 800; text-align: center; }
.brand.dy { gap: 10px; font-size: 16px; }
.brand.dy img { height: 24px; width: auto; display: block; }
.brand.dy span { color: var(--muted); font-weight: 600; }
