/* Rempart — thème sombre « jeu », pensé pour iPhone */
:root {
  color-scheme: dark;
  --bg: #0b0e1a;
  --bg2: #11152b;
  --card: #161b34;
  --card2: #1e2446;
  --line: #2a3163;
  --text: #eef0ff;
  --muted: #a1a8d4;
  --dim: #6c74a0;
  --gold: #ffcb52;
  --gold2: #ff9f1c;
  --green: #3ee07f;
  --yellow: #ffd23f;
  --orange: #ff9f43;
  --red: #ff4d6d;
  --violet: #8b6cff;
  --blue: #4cc9f0;
  --radius: 18px;
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  font-family: ui-rounded, 'SF Pro Rounded', -apple-system, BlinkMacSystemFont, system-ui, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { background: var(--bg); }
body {
  margin: 0;
  min-height: 100dvh;
  color: var(--text);
  background: radial-gradient(900px 520px at 50% -180px, #232a6b 0%, rgba(11, 14, 26, 0) 70%) no-repeat, var(--bg);
  padding: calc(var(--sat) + 10px) 16px calc(var(--sab) + 104px);
  overscroll-behavior-y: none;
  -webkit-font-smoothing: antialiased;
  -webkit-user-select: none;
  user-select: none;
  line-height: 1.35;
}
body.locked { overflow: hidden; }
input, select, textarea { -webkit-user-select: text; user-select: text; }
#app { max-width: 520px; margin: 0 auto; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a { color: var(--blue); text-decoration: none; }
h1, h2, h3 { margin: 0; line-height: 1.2; }
h3 { font-size: 16px; }
small { font-size: 12px; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.sub { color: var(--muted); font-size: 13px; margin-top: 6px; }
.center { text-align: center; display: block; margin-left: auto; margin-right: auto; }
.good { color: var(--green); }
.bad { color: var(--red); }
.empty { color: var(--dim); font-size: 14px; margin: 10px 0 4px; }
.page-title { font-size: 24px; margin: 6px 2px 12px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.hello { color: var(--muted); font-size: 15px; margin: 2px 2px 10px; }

/* --- Champs ----------------------------------------------------------------- */
input, select, textarea {
  font: inherit;
  font-size: 16px; /* évite le zoom iOS */
  color: var(--text);
  background: var(--bg2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  width: 100%;
  min-width: 0;
  outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--violet); }
textarea { resize: none; }
select { -webkit-appearance: none; appearance: none; }
input[type='month'] { min-height: 42px; }
.field { display: block; margin-top: 10px; }
.field > span { display: block; color: var(--muted); font-size: 13px; margin-bottom: 4px; }
.field small { color: var(--dim); display: block; margin-top: 4px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* --- Cartes ---------------------------------------------------------------- */
.card {
  background: linear-gradient(180deg, var(--card2), var(--card));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}
.card h3 { margin-bottom: 4px; }
.pill {
  font-size: 12px;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted);
  white-space: nowrap;
}
.label { color: var(--muted); font-size: 14px; }
.big { font-size: 44px; font-weight: 800; letter-spacing: -1px; margin: 4px 0 8px; }

/* --- HUD (niveau, XP, série) ----------------------------------------------- */
.hud { display: flex; align-items: center; gap: 12px; margin: 4px 0 14px; }
.lvl {
  width: 46px; height: 46px; flex: none;
  display: grid; place-items: center;
  font-weight: 800; font-size: 20px; color: #1a1300;
  background: radial-gradient(circle at 30% 25%, #fff3c4, var(--gold) 45%, var(--gold2));
  border-radius: 14px;
  box-shadow: 0 0 0 2px rgba(255, 203, 82, 0.25), 0 6px 18px rgba(255, 159, 28, 0.35);
}
.hud-main { flex: 1; min-width: 0; }
.hud-title { font-weight: 700; font-size: 15px; }
.hud-sub { color: var(--dim); font-size: 11px; margin-top: 3px; }
.xpbar { height: 7px; border-radius: 99px; background: rgba(139, 108, 255, 0.18); overflow: hidden; margin-top: 5px; }
.xpbar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--violet), #c4b5ff); transition: width 0.6s ease; }
.streak {
  display: flex; align-items: center; gap: 3px;
  padding: 6px 10px; border-radius: 12px;
  background: rgba(255, 255, 255, 0.05); color: var(--dim);
  filter: grayscale(1);
}
.streak.on { filter: none; color: var(--text); background: rgba(255, 120, 50, 0.14); }
.icon-btn { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: rgba(255, 255, 255, 0.05); flex: none; }
.icon-btn.on { background: rgba(139, 108, 255, 0.25); }
.demo-banner {
  display: block; width: 100%; text-align: center; font-size: 13px;
  background: rgba(76, 201, 240, 0.12); color: var(--blue);
  border-radius: 12px; padding: 8px; margin-bottom: 8px;
}

/* --- Barres ------------------------------------------------------------------ */
.bar, .hpbar { height: 10px; border-radius: 99px; background: rgba(255, 255, 255, 0.07); overflow: hidden; margin-top: 8px; }
.bar i, .hpbar i { display: block; height: 100%; border-radius: inherit; transition: width 0.6s ease; }
.bar i { background: linear-gradient(90deg, var(--blue), #9ee8ff); }
.bar.gold i { background: linear-gradient(90deg, var(--gold2), var(--gold)); }
.bar.over i, .bar.limit i { background: linear-gradient(90deg, var(--orange), var(--red)); }
.bar.limit { background: rgba(62, 224, 127, 0.12); }
.hpbar { height: 16px; border: 1px solid rgba(255, 255, 255, 0.08); }
.hp.green .hpbar i { background: linear-gradient(90deg, #1fbf63, var(--green)); }
.hp.yellow .hpbar i { background: linear-gradient(90deg, #e0b000, var(--yellow)); }
.hp.orange .hpbar i { background: linear-gradient(90deg, #e07000, var(--orange)); }
.hp.red .hpbar i { background: var(--red); }
.hp.green { box-shadow: 0 8px 30px rgba(62, 224, 127, 0.12); }
.hp.red { border-color: rgba(255, 77, 109, 0.5); }
.hp.red .big { color: var(--red); }
.note { background: rgba(255, 77, 109, 0.1); color: #ffb3c1; border-radius: 12px; padding: 8px 10px; font-size: 13px; margin: 10px 0 0; }
.twin .bar { height: 8px; margin-top: 6px; }
.twin .bar.money i { background: linear-gradient(90deg, #1fbf63, var(--green)); }
.twin .bar.time i { background: linear-gradient(90deg, #6c74a0, #a1a8d4); }

/* --- Bannière de paie ----------------------------------------------------- */
.banner { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-color: rgba(255, 203, 82, 0.5); background: linear-gradient(180deg, #3a2f12, #241d0d); }

/* --- Lignes (dépenses, historique) ---------------------------------------- */
.row {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  padding: 10px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.row:last-child { border-bottom: 0; }
.row .emo, .tier .emo, .offer .emo { font-size: 22px; width: 36px; height: 36px; display: grid; place-items: center; background: rgba(255, 255, 255, 0.05); border-radius: 11px; flex: none; }
.row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.row-main small { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.amt { font-weight: 700; white-space: nowrap; }
.amt.plus { color: var(--green); }
.day-head { display: flex; justify-content: space-between; color: var(--muted); font-size: 13px; margin-top: 12px; padding-bottom: 4px; border-bottom: 1px solid var(--line); }

/* --- Boutons ---------------------------------------------------------------- */
.btn {
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 12px 16px; border-radius: 14px; font-weight: 700;
  background: rgba(255, 255, 255, 0.07); border: 1px solid var(--line);
  transition: transform 0.08s ease;
}
.btn:active, .row:active, .cat:active, .key:active, .offer:active, .tab:active { transform: scale(0.97); }
.btn.block { width: 100%; }
.btn.gold { background: linear-gradient(180deg, var(--gold), var(--gold2)); color: #221600; border: 0; box-shadow: 0 6px 18px rgba(255, 159, 28, 0.3); }
.btn.primary { background: linear-gradient(180deg, #8b6cff, #6447e6); border: 0; box-shadow: 0 6px 18px rgba(100, 71, 230, 0.35); }
.btn.danger { color: var(--red); border-color: rgba(255, 77, 109, 0.35); background: rgba(255, 77, 109, 0.08); }
.btn.tall { padding: 14px 16px; font-size: 17px; margin-bottom: 6px; }
.btn small { font-weight: 500; opacity: 0.85; margin-top: 3px; }
.link { color: var(--blue); padding: 10px 0; font-size: 14px; }
.stack { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.closed-ok { text-align: center; color: var(--green); font-weight: 700; padding: 14px; border: 1px dashed rgba(62, 224, 127, 0.4); border-radius: 14px; margin-bottom: 6px; }

/* --- Quêtes ---------------------------------------------------------------- */
.quest.done { border-color: rgba(62, 224, 127, 0.55); }
.quest.failed { opacity: 0.75; }
.offers { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.offer { display: flex; align-items: center; gap: 12px; text-align: left; padding: 10px; border-radius: 14px; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line); }
.offer .xp { color: var(--violet); font-weight: 800; font-size: 13px; }

/* --- Boss ------------------------------------------------------------------- */
.intro p { margin: 0; }
.boss .dmg { color: var(--red); font-weight: 700; font-size: 14px; }
.boss-hp i { background: linear-gradient(90deg, #b3123a, var(--red)) !important; }
.boss-hp.unknown i { background: repeating-linear-gradient(45deg, #444b7a 0 8px, #353b66 8px 16px) !important; }
.boss.defeated { border-color: rgba(62, 224, 127, 0.55); }
.edit-dates { margin-top: 10px; }
.edit-dates summary { color: var(--blue); font-size: 13px; cursor: pointer; }
.edit-line { display: flex; gap: 8px; align-items: center; margin-top: 8px; }
.edit-line.small { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.edit-line.small label { min-width: 0; font-size: 12px; color: var(--muted); display: flex; flex-direction: column; gap: 4px; }
.edit-line.small input { min-width: 0; padding: 8px; }

.missions { border-color: rgba(255, 203, 82, 0.35); }
.mission { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.05); }
.mission:last-child { border-bottom: 0; }
.mission .emo { font-size: 22px; width: 36px; height: 36px; display: grid; place-items: center; background: rgba(255, 255, 255, 0.05); border-radius: 11px; flex: none; }
.mission small { white-space: normal !important; }
.mission em { font-style: normal; color: var(--green); font-size: 12px; margin-top: 2px; }
.mission.done { opacity: 0.6; }
.mission.done b { text-decoration: line-through; }
.btn.mini { padding: 8px 12px; font-size: 13px; flex: none; }

/* --- Coffre ----------------------------------------------------------------- */
.vault { text-align: center; padding: 20px 16px; background: radial-gradient(400px 200px at 50% 0, rgba(255, 203, 82, 0.18), transparent), linear-gradient(180deg, var(--card2), var(--card)); }
.vault-icon { font-size: 46px; }
.vault .big { color: var(--gold); }
.actions3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 6px; }
.actions3 .btn { padding: 12px 6px; font-size: 14px; }
.tier { display: flex; align-items: center; gap: 12px; padding: 8px 0; opacity: 0.55; }
.tier.done { opacity: 1; }

/* --- Bilan ------------------------------------------------------------------ */
.stats3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; text-align: center; }
.stats3 div { background: rgba(255, 255, 255, 0.04); border-radius: 12px; padding: 10px 4px; }
.stats3 b { display: block; font-size: 18px; }
.stats3 small { color: var(--muted); }
.cat-row { margin-top: 12px; }
.cat-row small { margin-left: 4px; }
.badges { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 10px; }
.badge { text-align: center; padding: 8px 2px; border-radius: 12px; background: rgba(255, 255, 255, 0.03); opacity: 0.45; }
.badge.on { opacity: 1; background: rgba(255, 203, 82, 0.1); }
.badge span { font-size: 24px; display: block; }
.badge small { font-size: 10px; color: var(--muted); display: block; line-height: 1.15; margin-top: 3px; }

/* --- Réglages --------------------------------------------------------------- */
.edit-row { padding: 10px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.06); }
.edit-row .amt-in { flex: 1; }
.edit-row select { flex: 1.2; }
.total { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 8px; font-size: 17px; }
.card .row-between + .row-between { margin-top: 6px; }
.steps { padding-left: 20px; margin: 8px 0 0; color: var(--muted); font-size: 14px; }
.steps li { margin-bottom: 6px; }
.foot { text-align: center; color: var(--dim); font-size: 12px; }

/* --- Onglets internes (Jeu) ------------------------------------------------- */
.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px; background: rgba(255, 255, 255, 0.05); border-radius: 14px; margin-bottom: 12px; }
.seg button { padding: 9px 4px; border-radius: 11px; font-weight: 700; font-size: 14px; color: var(--muted); }
.seg button.on { background: var(--card2); color: var(--text); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3); }

/* --- Mois ------------------------------------------------------------------- */
.month-nav { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 4px 0 12px; }
.month-nav h2 { font-size: 22px; }
.month-nav small { display: block; margin-top: 2px; }
.month-nav .icon-btn { font-size: 26px; }
.icon-btn:disabled { opacity: 0.3; }
.stack-bar { position: relative; display: flex; height: 14px; margin-top: 10px; }
.stack-bar i { display: block; height: 100%; min-width: 2px; }
.stack-bar i + i { border-left: 2px solid var(--card); }
.stack-bar i:first-child { border-radius: 4px 0 0 4px; }
.stack-bar i:last-of-type { border-radius: 0 4px 4px 0; }
.stack-bar i:only-of-type { border-radius: 4px; }
.stack-bar .marker { position: absolute; top: -4px; bottom: -4px; width: 2px; margin-left: -1px; background: var(--text); border-radius: 1px; }
.legend-rows { margin-top: 10px; }
.lrow { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.05); }
.lrow:last-child { border-bottom: 0; }
.lrow small { color: var(--muted); }
.sw { width: 12px; height: 12px; border-radius: 3px; flex: none; display: inline-block; }
.lrow .pc { width: 44px; text-align: right; font-size: 13px; }
.legend-inline { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 12px; color: var(--muted); margin: 6px 0 4px; }
.legend-inline span { display: inline-flex; align-items: center; gap: 5px; }
.legend-inline .tick { display: inline-block; width: 2px; height: 12px; background: var(--text); border-radius: 1px; }
.mrow { display: grid; grid-template-columns: 62px 1fr 56px; align-items: center; gap: 8px; width: 100%; padding: 7px 4px; border-radius: 10px; text-align: left; }
.mrow .stack-bar { margin-top: 0; height: 12px; }
.mrow.on { background: rgba(255, 255, 255, 0.07); }
.mlabel { font-size: 13px; color: var(--muted); }
.mval { text-align: right; font-size: 13px; }

/* --- Foyer ------------------------------------------------------------------ */
.players { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.player { background: linear-gradient(180deg, var(--card2), var(--card)); border: 1px solid var(--line); border-top: 3px solid var(--pc, var(--line)); border-radius: var(--radius); padding: 12px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.player-top { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; min-width: 0; }
.player .avatar { font-size: 26px; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; background: rgba(255, 255, 255, 0.06); flex: none; }
.player small { color: var(--muted); font-size: 11px; }
.kv { display: flex; justify-content: space-between; gap: 6px; font-size: 13px; color: var(--muted); }
.kv b { color: var(--text); }
.kv.total { border-top: 1px solid var(--line); padding-top: 5px; margin-top: 3px; }
.player.waiting { align-items: center; justify-content: center; text-align: center; border-style: dashed; border-top-width: 1px; gap: 8px; }
.fair-row .gap { font-weight: 700; }
.fair-row { padding: 10px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.05); }
.chips.left { justify-content: flex-start; margin: 8px 0 0; }
.code-box { font-family: ui-monospace, Menlo, monospace; font-size: 13px; word-break: break-all; background: var(--bg2); border: 1px dashed var(--gold); border-radius: 12px; padding: 12px; margin: 12px 0; -webkit-user-select: all; user-select: all; }
.hh-toggle { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); margin-top: 8px; }
.hh-toggle input { width: 20px; height: 20px; accent-color: var(--green); }
.duo-intro { text-align: center; }
.duo-avatars { font-size: 44px; display: flex; justify-content: center; align-items: center; gap: 10px; margin: 6px 0 10px; }
.duo-avatars span { font-size: 22px; color: var(--muted); }
h3.mt { margin-top: 16px; }
.row.static .icon-btn { width: 32px; height: 32px; font-size: 14px; }
details summary { cursor: pointer; padding: 2px 0; }
.row-between.muted { color: var(--muted); font-size: 13px; }

/* --- Barre d'onglets -------------------------------------------------------- */
#tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  display: grid; grid-template-columns: repeat(5, 1fr); align-items: center;
  padding: 8px 10px calc(var(--sab) + 8px);
  background: rgba(11, 14, 26, 0.88);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
}
#tabs:empty { display: none; }
.tab { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 4px 0; color: var(--dim); filter: grayscale(0.9); }
.tab span { font-size: 22px; }
.tab small { font-size: 11px; }
.tab.on { color: var(--text); filter: none; }
.fab {
  justify-self: center; width: 60px; height: 60px; margin-top: -26px;
  border-radius: 20px; font-size: 34px; font-weight: 600; color: #221600;
  background: linear-gradient(180deg, var(--gold), var(--gold2));
  box-shadow: 0 8px 24px rgba(255, 159, 28, 0.45), 0 0 0 4px var(--bg);
}
.fab:active { transform: scale(0.94); }

/* --- Feuilles (bottom sheets) ----------------------------------------------- */
#overlay { position: fixed; inset: 0; z-index: 50; display: none; }
#overlay.open { display: block; }
.backdrop { position: absolute; inset: 0; background: rgba(3, 5, 12, 0.6); animation: fade 0.2s ease; }
.sheet {
  position: absolute; left: 0; right: 0; bottom: 0;
  max-width: 560px; margin: 0 auto; max-height: 92dvh; overflow-y: auto;
  background: linear-gradient(180deg, #1c2246, #12162d);
  border: 1px solid var(--line); border-bottom: 0;
  border-radius: 24px 24px 0 0;
  padding: 16px 16px calc(var(--sab) + 16px);
  -webkit-overflow-scrolling: touch;
}
.sheet.enter { animation: up 0.24s cubic-bezier(0.2, 0.9, 0.3, 1.1); }
.sheet h2 { font-size: 20px; }
.sheet p { color: var(--muted); }
.sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.amount { font-size: 42px; font-weight: 800; text-align: center; padding: 0 0 6px; letter-spacing: -1px; }
.amount.shake { animation: shake 0.35s ease; color: var(--red); }
.chips { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-bottom: 8px; }
.chip { padding: 7px 12px; border-radius: 999px; background: rgba(255, 255, 255, 0.06); border: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.chip.on { background: rgba(139, 108, 255, 0.22); border-color: var(--violet); color: var(--text); }
.note-in { margin-bottom: 8px; }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.key { height: 46px; border-radius: 14px; font-size: 24px; font-weight: 600; background: rgba(255, 255, 255, 0.07); }
.cat-hint { text-align: center; color: var(--dim); font-size: 12px; margin: 8px 0 6px; }
.cats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 10px; }
.cat { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 6px 2px; border-radius: 14px; background: rgba(255, 255, 255, 0.05); border: 1px solid transparent; }
.cat span { font-size: 22px; }
.cat small { font-size: 11px; color: var(--muted); line-height: 1.1; text-align: center; white-space: nowrap; }
.cat.on { border-color: var(--violet); background: rgba(139, 108, 255, 0.18); }
.recap { background: rgba(255, 255, 255, 0.04); border-radius: 14px; padding: 12px; margin: 8px 0; }
.recap .row-between { padding: 3px 0; }
.check { display: flex; gap: 10px; align-items: flex-start; margin: 10px 0; }
.check input { width: 22px; height: 22px; flex: none; margin-top: 2px; accent-color: var(--gold); }
.check small { display: block; color: var(--dim); }
.boss-hit { margin: 14px 0; padding: 10px 12px; border-radius: 12px; background: rgba(255, 77, 109, 0.1); color: #ffc2cd; font-size: 14px; }
.sheet.celebrate, .sheet.day { text-align: center; overflow: hidden; }
.celebrate-icon { font-size: 64px; margin: 8px 0 4px; animation: pop 0.5s cubic-bezier(0.2, 1.6, 0.4, 1); }
.xp-lines { list-style: none; padding: 0; margin: 10px 0; color: var(--violet); font-weight: 700; }
.xp-lines li { padding: 3px 0; }
.streak-big { font-size: 18px; font-weight: 800; margin: 8px 0 14px; }
.sheet .btn.block { margin-top: 6px; }
.confetti { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.confetti i { position: absolute; top: -12px; left: var(--x); width: 8px; height: 14px; background: var(--c); border-radius: 2px; animation: fall 1.6s var(--d) ease-in forwards; opacity: 0; }

/* --- Accueil ---------------------------------------------------------------- */
.onboard { text-align: center; padding-top: 12vh; }
.onboard .logo { font-size: 84px; animation: pop 0.6s ease; }
.onboard h1 { font-size: 40px; margin: 6px 0; }
.tagline { color: var(--muted); font-size: 17px; margin: 0 auto 28px; max-width: 320px; }
.privacy { color: var(--dim); font-size: 13px; margin-top: 26px; }

/* --- Toasts ----------------------------------------------------------------- */
#toasts { position: fixed; left: 0; right: 0; bottom: calc(var(--sab) + 96px); z-index: 60; display: flex; justify-content: center; pointer-events: none; }
.toast { background: rgba(30, 36, 70, 0.96); border: 1px solid var(--line); padding: 10px 16px; border-radius: 999px; font-weight: 700; font-size: 14px; animation: toast 0.3s ease; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4); max-width: 92vw; }

@keyframes up { from { transform: translateY(100%); } to { transform: translateY(0); } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { 0% { transform: scale(0.3); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
@keyframes toast { from { transform: translateY(16px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-8px); } 75% { transform: translateX(8px); } }
@keyframes fall { 0% { opacity: 1; transform: translateY(0) rotate(0); } 100% { opacity: 0; transform: translateY(70vh) rotate(540deg); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media (max-height: 700px) {
  .key { height: 42px; }
  .amount { font-size: 38px; padding: 2px 0 4px; }
  .cat { padding: 6px 2px; }
}
