/* ---------- Theme: warm paper + ink + Guggu green (whole app) ---------- */
:root {
  --bg: #ece9e1;
  --card: #fdfcf9;
  --ink: #2b2926;
  --muted: #9a958c;
  --border: #e6e1d5;
  --accent: #2f6b4f;
  --accent-ink: #f3f7f2;
  --accent-soft: #e0ebe3;
  --good: #2f6b4f;
  --bad: #c0473f;
  --warn: #b58a3c;
  --warn-bg: #f4efe3;
  --shadow: 0 1px 2px rgba(43, 41, 38, 0.04), 0 8px 22px -16px rgba(43, 41, 38, 0.45);
  --shadow-raised: 0 2px 6px rgba(43, 41, 38, 0.08), 0 16px 34px -18px rgba(43, 41, 38, 0.5);
  --radius: 18px;
  --radius-sm: 12px;
  --font-display: 'Newsreader', Georgia, 'Times New Roman', serif;
  --font-body: 'Instrument Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
/* Guggu-Guggi is a warm, paper-toned light experience; the Log screen hardcodes
   light colors, so we keep the whole app light for a consistent feel. */

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  font-size: 15px;
  line-height: 1.45;
}
button { font: inherit; color: inherit; }

#app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding-bottom: calc(68px + env(safe-area-inset-bottom));
}

.screen { padding: 14px 18px 28px; flex: 1; }

/* ---------- Header ---------- */
.top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 12px 2px 16px;
}
.top .family { font-size: 14px; color: var(--muted); font-weight: 600; letter-spacing: 0.01em; }
.top .mtd { text-align: right; }
.top .mtd .label {
  font-size: 10.5px; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.12em; font-weight: 600;
}
.top .mtd .value {
  font-family: var(--font-display);
  font-size: 21px; font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

/* ---------- Typed amount field + voice ---------- */
.amount-row { display: flex; align-items: stretch; gap: 10px; margin: 2px 0 4px; }
.amount-field {
  flex: 1;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 6px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px 16px;
  min-height: 74px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.amount-field:focus-within { border-color: var(--accent); box-shadow: var(--shadow-raised); }
.amount-field .cur {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 500;
  color: var(--muted);
}
.amount-input {
  border: none;
  background: none;
  outline: none;
  width: 100%;
  min-width: 0;
  text-align: center;
  font-family: var(--font-display);
  font-size: 44px;
  font-weight: 600;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  padding: 0;
}
.amount-input::placeholder { color: var(--muted); opacity: 0.45; }
.voice-btn {
  width: 52px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  font-size: 19px;
  cursor: pointer;
  box-shadow: var(--shadow);
  flex: 0 0 auto;
}
.voice-btn:disabled { opacity: 0.35; }
.voice-btn.listening { border-color: var(--accent); background: var(--accent-soft); animation: pulse 1s infinite; }
@keyframes pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.06); } }

/* ---------- Section labels ---------- */
.section-label {
  font-size: 10.5px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin: 18px 2px 8px;
  font-weight: 700;
}

/* ---------- Category carousel ---------- */
.cat-carousel {
  display: flex; gap: 10px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  padding: 2px 2px 12px;
  scrollbar-width: none;
}
.cat-carousel::-webkit-scrollbar { display: none; }
.cat-card {
  flex: 0 0 92px;
  scroll-snap-align: center;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--card);
  box-shadow: var(--shadow);
  padding: 13px 6px 11px;
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  cursor: pointer;
  touch-action: manipulation;
  transition: border-color 0.12s ease, background 0.12s ease, transform 0.12s ease;
}
.cat-card:active { transform: scale(0.97); }
.cat-card .cat-ico {
  width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 19px;
  background: color-mix(in srgb, var(--cc) 14%, transparent);
}
.cat-card .cat-nm { font-size: 12px; font-weight: 600; text-align: center; line-height: 1.15; color: var(--ink); }
.cat-card.sel {
  border-color: var(--cc);
  background: color-mix(in srgb, var(--cc) 8%, var(--card));
  box-shadow: 0 0 0 1px var(--cc), var(--shadow);
}

.cat-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: 0 0 auto; margin-right: 3px; }

/* ---------- Payer toggle ---------- */
.payer-row { display: flex; gap: 10px; }
.payer-row button {
  flex: 1;
  height: 48px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--card);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--shadow);
  touch-action: manipulation;
  transition: border-color 0.12s ease, background 0.12s ease;
}
.payer-row button.sel {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), var(--shadow);
}
@media (prefers-color-scheme: dark) {
  .payer-row button.sel { color: var(--ink); }
}

/* ---------- Note ---------- */
.note-toggle {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  padding: 12px 2px 2px;
  cursor: pointer;
}
.note-input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--card);
  padding: 11px 13px;
  font: inherit;
  color: var(--ink);
  margin-top: 8px;
}
.note-input:focus { outline: none; border-color: var(--accent); }

/* ---------- Save ---------- */
.save-wrap {
  position: sticky;
  bottom: calc(68px + env(safe-area-inset-bottom) + 10px);
  padding-top: 14px;
  background: linear-gradient(to top, var(--bg) 65%, transparent);
}
.save-btn {
  width: 100%;
  height: 54px;
  border: none;
  border-radius: 14px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  box-shadow: var(--shadow-raised);
  touch-action: manipulation;
  transition: transform 0.1s ease, opacity 0.15s ease;
}
.save-btn:active { transform: scale(0.985); }
.save-btn:disabled { opacity: 0.35; cursor: default; box-shadow: var(--shadow); }

/* ---------- Recent entries ---------- */
.entry-list { display: flex; flex-direction: column; gap: 8px; }
.entry-item { display: flex; flex-direction: column; }
.entry-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 11px 13px;
  cursor: pointer;
}
.entry-row .ico { font-size: 19px; }
.entry-row .mid { flex: 1; min-width: 0; }
.entry-row .mid .nm { font-weight: 600; font-size: 14px; }
.entry-row .mid .meta {
  font-size: 12px; color: var(--muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.entry-row .amt {
  font-family: var(--font-display);
  font-weight: 600; font-size: 16px;
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.entry-row .repeat, .react-btn {
  border: none;
  background: none;
  font-size: 16px;
  color: var(--muted);
  cursor: pointer;
  padding: 6px 5px;
  opacity: 0.75;
}
.reaction-badges { font-size: 14px; white-space: nowrap; }
.react-picker {
  display: flex; gap: 4px; align-self: flex-end;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 12px; box-shadow: var(--shadow-raised);
  padding: 5px 8px; margin: 4px 6px 2px;
}
.react-picker button { border: none; background: none; font-size: 20px; cursor: pointer; padding: 3px 5px; border-radius: 8px; }
.react-picker button.on { background: var(--accent-soft); }
.empty { color: var(--muted); font-size: 14px; text-align: center; padding: 22px 0; }

/* ---------- Streak ---------- */
.streak {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 11.5px; font-weight: 700;
  color: var(--accent); background: var(--accent-soft);
  border-radius: 999px; padding: 2.5px 10px; margin-left: 7px;
  vertical-align: 1px;
}
.streak.risk { color: var(--warn); background: var(--warn-bg); }

/* ---------- Summary ---------- */
.month-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0 14px;
}
.month-nav button {
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: var(--radius-sm);
  width: 42px; height: 38px;
  font-size: 16px;
  cursor: pointer;
  box-shadow: var(--shadow);
  color: var(--muted);
}
.month-nav .label {
  font-family: var(--font-display);
  font-size: 19px; font-weight: 600;
  letter-spacing: -0.01em;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
  margin-bottom: 14px;
}
.card h3 {
  margin: 0 0 12px;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  font-weight: 700;
}

.total-line { display: flex; justify-content: space-between; align-items: baseline; font-size: 14.5px; padding: 3px 0; color: var(--muted); }
.total-line .big {
  font-family: var(--font-display);
  font-size: 26px; font-weight: 600; color: var(--ink);
  font-variant-numeric: tabular-nums; letter-spacing: -0.01em;
}

.budget-row { padding: 10px 0; border-bottom: 1px solid var(--border); }
.budget-row:last-child { border-bottom: none; padding-bottom: 2px; }
.budget-row .line1 { display: flex; justify-content: space-between; align-items: center; font-size: 14px; }
.budget-row .line1 .nm { font-weight: 600; display: inline-flex; align-items: center; }
.budget-row .line1 .nums { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 13px; }
.budget-row .line1 .nums b { color: var(--ink); font-weight: 600; }
.budget-row.over .line1 .nums b { color: var(--bad); }
.bar { height: 5px; border-radius: 3px; background: color-mix(in srgb, var(--border) 60%, transparent); margin-top: 7px; overflow: hidden; }
.bar > div { height: 100%; border-radius: 3px; }
.budget-row .status { font-size: 12px; font-weight: 600; margin-top: 5px; }
.status.cool { color: var(--good); }
.status.warm { color: var(--warn); }
.status.hot { color: var(--bad); }
.status.neutral { color: var(--muted); }

.settle-row {
  display: flex; justify-content: space-between;
  font-size: 13.5px; padding: 4px 0;
  font-variant-numeric: tabular-nums; color: var(--muted);
}
.settle-row span:first-child { color: var(--ink); }
.settle-verdict {
  margin-top: 12px;
  padding: 13px 14px;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
  font-size: 15px;
  text-align: center;
}
@media (prefers-color-scheme: dark) {
  .settle-verdict { color: var(--ink); }
}

.recap-open-btn {
  width: 100%;
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: var(--radius);
  padding: 13px;
  font-weight: 600;
  font-size: 14.5px;
  cursor: pointer;
  box-shadow: var(--shadow);
  margin-bottom: 14px;
}

/* ---------- Monthly recap ---------- */
.recap-backdrop { position: fixed; inset: 0; z-index: 70; background: #101214; display: flex; flex-direction: column; }
.recap-close {
  position: absolute; top: calc(14px + env(safe-area-inset-top)); right: 18px; z-index: 2;
  width: 40px; height: 40px; border-radius: 50%;
  border: none; background: rgba(255,255,255,0.14); color: #fff; font-size: 17px; cursor: pointer;
}
.recap-cards { flex: 1; display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.recap-cards::-webkit-scrollbar { display: none; }
.recap-card {
  flex: 0 0 100%; scroll-snap-align: center;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 16px; padding: 44px 30px; text-align: center; color: #F5F2EC;
  background: linear-gradient(160deg, color-mix(in srgb, var(--rc) 88%, #fff 0%) 0%, color-mix(in srgb, var(--rc) 78%, #000 22%) 100%);
}
.recap-kicker { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.16em; opacity: 0.82; }
.recap-big { font-family: var(--font-display); font-size: 31px; font-weight: 600; line-height: 1.15; letter-spacing: -0.01em; }
.recap-huge { font-family: var(--font-display); font-size: 88px; font-weight: 600; line-height: 1; letter-spacing: -0.02em; }
.recap-huge2 { font-family: var(--font-display); font-size: 54px; font-weight: 600; line-height: 1; letter-spacing: -0.02em; }
.recap-lbl { font-size: 16.5px; font-weight: 500; opacity: 0.92; max-width: 270px; }
.recap-sub { font-size: 13.5px; opacity: 0.75; }

/* ---------- Settings ---------- */
.settings h2 {
  font-family: var(--font-display);
  font-size: 24px; font-weight: 600;
  margin: 6px 2px 16px; letter-spacing: -0.01em;
}
.field-row { display: flex; align-items: center; gap: 10px; padding: 7px 0; }
.field-row label { flex: 1; font-size: 14px; font-weight: 500; }
input[type="text"], input[type="number"], input[type="email"], input[type="password"], input[type="time"], input[type="date"], select {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--ink);
  padding: 10px 11px;
  font: inherit;
  font-size: 14px;
  min-width: 0;
}
input:focus { outline: none; border-color: var(--accent); }
.cat-edit-row { display: flex; gap: 7px; align-items: center; padding: 5px 0; }
.cat-edit-row .icon-in { width: 48px; text-align: center; }
.cat-edit-row .name-in { flex: 1; }
.cat-edit-row .budget-in { width: 86px; text-align: right; }
.color-in {
  width: 34px; height: 36px; padding: 3px;
  border-radius: 9px; border: 1px solid var(--border);
  background: var(--bg); flex: 0 0 auto; cursor: pointer;
}
.icon-btn {
  border: none;
  background: none;
  color: var(--muted);
  font-size: 15px;
  cursor: pointer;
  padding: 6px;
  opacity: 0.8;
}
.add-btn {
  border: 1px dashed var(--border);
  background: none;
  color: var(--muted);
  border-radius: var(--radius-sm);
  width: 100%;
  padding: 11px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  margin-top: 8px;
}
.hint { font-size: 12.5px; color: var(--muted); margin: 8px 0 0; line-height: 1.5; }
.switch { transform: scale(1.25); margin-right: 4px; accent-color: var(--accent); }
.danger-btn {
  border: 1px solid color-mix(in srgb, var(--bad) 45%, var(--border));
  color: var(--bad);
  background: none;
  border-radius: var(--radius-sm);
  padding: 10px 15px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
}

/* ---------- Bottom nav ---------- */
.nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: color-mix(in srgb, var(--card) 88%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-around;
  padding: 8px 0 calc(8px + env(safe-area-inset-bottom));
  z-index: 20;
}
.nav button {
  border: none;
  background: none;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  cursor: pointer;
  padding: 2px 20px;
}
.nav button .g { font-size: 19px; }
.nav button.sel { color: var(--accent); }

/* ---------- Sheet (edit modal) ---------- */
.sheet-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(16, 18, 20, 0.45);
  z-index: 40;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.sheet {
  background: var(--bg);
  border-radius: 20px 20px 0 0;
  width: 100%;
  max-width: 480px;
  padding: 20px 18px calc(22px + env(safe-area-inset-bottom));
  max-height: 88dvh;
  overflow-y: auto;
}
.sheet h3 {
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-size: 19px; font-weight: 600;
}
.sheet .row2 { display: flex; gap: 10px; margin-top: 10px; }
.sheet .row2 > * { flex: 1; }
.sheet-actions { display: flex; gap: 10px; margin-top: 18px; }
.sheet-actions .save-btn { flex: 2; height: 48px; }
.sheet-actions .danger-btn { flex: 1; }

/* ---------- Toast ---------- */
#toast-root {
  position: fixed;
  bottom: calc(80px + env(safe-area-inset-bottom));
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  z-index: 50;
  pointer-events: none;
}
.toast {
  background: var(--ink);
  color: var(--bg);
  border-radius: 12px;
  padding: 12px 17px;
  font-size: 13.5px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 16px;
  pointer-events: auto;
  box-shadow: var(--shadow-raised);
  animation: toast-in 0.18s ease-out;
}
.toast button {
  border: none;
  background: none;
  color: #8FD4B8;
  font-weight: 700;
  cursor: pointer;
  font-size: 13.5px;
  padding: 0;
  letter-spacing: 0.02em;
}
@keyframes toast-in {
  from { transform: translateY(8px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* ---------- Save celebration ---------- */
.celebrate { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; pointer-events: none; }
.celebrate .burst {
  width: 130px; height: 130px; border-radius: 50%;
  background: radial-gradient(circle, var(--cc) 0%, transparent 68%);
  animation: burst 0.7s ease-out forwards;
}
.celebrate .cheer {
  position: absolute;
  font-family: var(--font-display);
  font-size: 23px; font-weight: 600; color: var(--ink);
  animation: cheer 0.9s ease-out forwards;
}
@keyframes burst { 0% { transform: scale(0.2); opacity: 0.55; } 100% { transform: scale(2.4); opacity: 0; } }
@keyframes cheer { 0% { transform: translateY(12px); opacity: 0; } 25% { opacity: 1; } 100% { transform: translateY(-26px); opacity: 0; } }

/* ---------- Guggu-Guggi Log screen (per design spec) ----------
   Warm, light, self-contained palette — deliberately fixed (no dark variant),
   scoped to the home view so the rest of the app keeps the porcelain theme. */
body.gg-home { background: #ece9e1; }
.gg { color: #2b2926; font-family: 'Instrument Sans', var(--font-body); }
.gg ::selection { background: #e7ddca; }
.gg input { font-family: inherit; }
.gg input:focus, .gg [contenteditable]:focus { outline: none; border-color: transparent; }
.gg button { border: none; background: none; cursor: pointer; padding: 0; }
.gg-serif { font-family: 'Newsreader', Georgia, serif; }
.gg-scroll { scrollbar-width: none; }
.gg-scroll::-webkit-scrollbar { display: none; }
/* Defined-but-quiet card: warm hairline outline + soft lift on the bg. */
.gg-panel {
  background: #fdfcf9;
  border: 1px solid #e6e1d5;
  box-shadow: 0 1px 2px rgba(43,41,38,.03), 0 10px 24px -18px rgba(43,41,38,.45);
}
.gg-micro { font-size: 10px; letter-spacing: 0.14em; color: #a7a29a; font-weight: 600; }
.gg-card {
  background: #fff; border-radius: 22px; padding: 16px 18px 14px;
  box-shadow: 0 1px 2px rgba(43,41,38,.05), 0 8px 24px -18px rgba(43,41,38,.4);
}
.gg-soft { background: #faf8f3; box-shadow: 0 1px 2px rgba(43,41,38,.04); }
.gg-add {
  flex: none; width: 128px; padding: 12px; border-radius: 16px;
  font-size: 14px; font-weight: 600; line-height: 1.3; text-align: center;
  transition: all .2s; background: #fff; color: #47433c;
  box-shadow: 0 1px 2px rgba(43,41,38,.05), 0 10px 26px -14px rgba(43,41,38,.5);
}
.gg-add:active { transform: scale(.98); }
.gg-add.saved { background: #eaf3ec; color: #2f6b4f; box-shadow: 0 1px 2px rgba(47,107,79,.08), 0 10px 26px -14px rgba(47,107,79,.55); }
#fx-root { position: fixed; inset: 0; pointer-events: none; z-index: 90; overflow: hidden; }

/* While typing an amount: hide the header to lift the dial up, and float an
   "Add" button just above the keyboard (positioned via visualViewport in JS). */
body.gg-typing .gg-header { display: none; }
body.gg-typing .screen.gg { padding-top: 4px !important; }
#gg-kbd-add {
  position: fixed;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: min(452px, calc(100% - 28px));
  height: 50px;
  display: none;
  z-index: 80;
  border: none;
  border-radius: 14px;
  background: #2f6b4f;
  color: #fff;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 700;
  box-shadow: 0 6px 22px rgba(43, 41, 38, 0.28);
}
#gg-kbd-add.show { display: block; }
#gg-kbd-add:active { background: #285c44; }
@keyframes ggWob { 0%,100%{transform:rotate(0)} 20%{transform:rotate(-9deg)} 40%{transform:rotate(7deg)} 60%{transform:rotate(-5deg)} 80%{transform:rotate(3deg)} }
@keyframes ggRise { 0%{opacity:0;transform:translateY(8px)} 100%{opacity:1;transform:translateY(0)} }
@keyframes ggPulse { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:.25;transform:scale(1.5)} }
@keyframes ggPaper {
  0%{opacity:0;transform:translate(0,0) rotate(0)} 10%{opacity:1}
  45%{transform:translate(calc(var(--dx)*.62),var(--peak)) rotate(calc(var(--rot)*.55))}
  100%{opacity:0;transform:translate(var(--dx),46vh) rotate(var(--rot))}
}
@keyframes ggKiss {
  0%{opacity:0;transform:translate(var(--x1),var(--y1)) scale(.35) rotate(-8deg)}
  16%{opacity:1} 88%{opacity:1}
  100%{opacity:0;transform:translate(var(--x2),calc(var(--y2) - 34px)) scale(1.25) rotate(6deg)}
}
@keyframes ggSpark { 0%{opacity:0;transform:scale(.2)} 30%{opacity:1} 100%{opacity:0;transform:scale(1.4) translateY(-18px)} }

/* ---------- Auth / onboarding ---------- */
.auth-wrap { max-width: 360px; margin: 9dvh auto 0; padding: 0 22px; }
.auth-wrap h1 {
  font-family: var(--font-display);
  font-size: 28px; font-weight: 600; letter-spacing: -0.01em;
}
.auth-wrap form { display: flex; flex-direction: column; gap: 11px; margin-top: 16px; }
.auth-error { color: var(--bad); font-size: 13px; font-weight: 600; }
.google-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 50px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--card);
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--shadow);
}
.google-btn .g-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  color: #4285F4;
  font-weight: 800;
  font-size: 15px;
  border: 1px solid #dadce0;
}
.auth-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
  margin: 4px 0;
}
.auth-divider::before, .auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}
