/* =========================================================
   better together — modern, soft couples app UI
   Mobile-first, single-column.
   Class names + CSS variable names are kept stable because
   they're referenced from inline styles in the JS/templates.
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
  /* ── Neon-love palette: red · pink · grey · white · neon ── */
  --bg-1: #ece5e9;          /* warm light grey edge */
  --bg-2: #fbe5ed;          /* pale rose mid        */
  --bg-3: #ffffff;          /* white center         */

  --paper: #ffffff;         /* cards                */
  --paper-dark: #f4edf0;    /* soft grey-pink fill  */
  --border: #ebe1e6;        /* hairline borders     */

  --ink: #1a1217;           /* near-black, warm     */
  --ink-soft: #756b73;      /* readable warm grey   */

  --accent:   #ff3d77;      /* primary pink-rose    */
  --accent-2: #ff7ba2;      /* lighter pink         */
  --accent-3: #e11436;      /* strong red / danger  */
  --neon:     #ff1f8f;      /* neon hot pink (glow) */

  /* legacy slots remapped on-brand — no green/blue/yellow anywhere */
  --leaf:      #ff6a97;     /* (success) → pink         */
  --leaf-dark: #ff2d6f;     /* (gain / positive) → pink */
  --water:     #6f6772;     /* (secondary) → grey       */
  --gold:      #ff2d6f;     /* (krumpli / coins) → pink */
  --shadow:    rgba(26, 19, 24, 0.13);

  --radius:    20px;
  --radius-sm: 13px;
  --radius-pill: 999px;

  /* All three legacy font slots now map to one modern family.
     (Inline styles still reference these variable names.) */
  --pixel-font: 'Plus Jakarta Sans', system-ui, sans-serif;
  --body-font:  'Plus Jakarta Sans', system-ui, sans-serif;
  --ui-font:    'Plus Jakarta Sans', system-ui, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  height: 100%;
  overscroll-behavior: none;
}

body {
  font-family: var(--body-font);
  font-size: 16px;
  line-height: 1.45;
  color: var(--ink);
  background:
    radial-gradient(120% 80% at 50% 0%, var(--bg-3) 0%, var(--bg-2) 45%, var(--bg-1) 100%) fixed;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

#app {
  position: relative;
  z-index: 1;
  max-width: 480px;
  margin: 0 auto;
  /* App shell: fixed viewport height, header on top, #screen scrolls inside.
     The bottom padding reserves the floating menubar's full footprint so the
     scroll area ends ABOVE the bar — content can never slide under it. */
  height: 100vh;
  height: 100dvh;          /* track the real viewport (mobile address bar) */
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding-bottom: calc(104px + env(safe-area-inset-bottom));
}

#app > .header { flex: 0 0 auto; }

#screen {
  flex: 1 1 auto;
  min-height: 0;            /* let it shrink so the inner scroll engages */
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* ---------- Card / panel ---------- */
.panel {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 10px 30px -12px var(--shadow);
  padding: 18px;
  margin: 14px;
}

.panel-title {
  font-weight: 700;
  font-size: 15px;
  color: var(--ink);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.panel-title::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--neon));
  box-shadow: 0 0 8px var(--neon);
}

/* ---------- Buttons ---------- */
.btn {
  font-family: var(--ui-font);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.2px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 12px 18px;
  cursor: pointer;
  box-shadow: 0 6px 16px -6px var(--accent);
  transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
}

.btn:hover { filter: brightness(1.03); }
.btn:active { transform: translateY(1px) scale(0.99); box-shadow: 0 3px 10px -6px var(--accent); }

.btn.secondary { background: var(--water); box-shadow: 0 6px 16px -6px var(--water); }
.btn.success   { background: linear-gradient(135deg, var(--accent) 0%, var(--neon) 100%); box-shadow: 0 8px 20px -8px var(--neon); }
.btn.danger    { background: var(--accent-3); box-shadow: 0 6px 16px -6px var(--accent-3); }

.btn.ghost {
  background: var(--paper-dark);
  color: var(--ink);
  box-shadow: none;
}
.btn.ghost:hover { background: #ebe7f3; }

.btn:disabled {
  background: #d9d5e4;
  color: #fff;
  cursor: not-allowed;
  box-shadow: none;
}

.btn-block { width: 100%; }

.btn-sm {
  font-size: 12.5px;
  padding: 8px 13px;
  border-radius: 10px;
}

/* ---------- Forms ---------- */
.field { margin-bottom: 14px; }

.label {
  display: block;
  font-weight: 600;
  font-size: 13px;
  margin-bottom: 7px;
  color: var(--ink-soft);
  letter-spacing: 0.2px;
}

input[type=text], input[type=password], input[type=number],
input[type=date], select, textarea {
  width: 100%;
  font-family: var(--body-font);
  font-size: 16px;
  padding: 12px 14px;
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--ink);
  transition: border-color 0.15s, box-shadow 0.15s;
}

input::placeholder, textarea::placeholder { color: #b6b0c4; }

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(251, 111, 146, 0.15);
}

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

/* ---------- Header ---------- */
.header {
  padding: 18px 16px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--ink);
}

.brand {
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.3px;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 8px;
}
.brand .brand-mark {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.coin-pill {
  background: #fff;
  border: 1.5px solid #ffcfe0;
  color: var(--gold);
  font-weight: 800;
  padding: 8px 13px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 8px 20px -12px var(--gold);
}

.notif-btn {
  position: relative;
  background: #fff;
  border: 1.5px solid var(--border);
  color: var(--ink);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 8px 20px -14px var(--shadow);
  font-size: 19px;
  transition: transform 0.12s;
}
.notif-btn:active { transform: scale(0.94); }

.notif-dot {
  position: absolute;
  top: -4px; right: -4px;
  background: var(--accent-3);
  color: #fff;
  font-weight: 700;
  font-size: 11px;
  min-width: 19px; height: 19px;
  padding: 0 4px;
  border-radius: var(--radius-pill);
  display: grid; place-items: center;
  border: 2px solid #fff;
}

/* ---------- Home / avatar scene ---------- */
.stage {
  margin: 16px 14px;
  border-radius: var(--radius);
  position: relative;
  height: 220px;
  overflow: hidden;
  box-shadow: 0 18px 40px -18px var(--shadow);
  background: linear-gradient(180deg, #ffe2ec 0%, #fdf3f6 100%);
}

.stage-sky {
  position: absolute; inset: 0 0 38% 0;
  background: linear-gradient(180deg, #ffd0e2 0%, #ffe6ee 70%, transparent 100%);
}

/* soft rolling ground */
.stage::after {
  content: '';
  position: absolute;
  left: -10%; right: -10%; bottom: -40%;
  height: 70%;
  background: linear-gradient(180deg, #ffd2e1 0%, #ff9ec1 100%);
  border-radius: 50% 50% 0 0;
}

.stage-sun {
  position: absolute;
  top: 26px; right: 32px;
  width: 46px; height: 46px;
  background: radial-gradient(circle, #ff8fb6 0%, #ff5e96 100%);
  border-radius: 50%;
  box-shadow: 0 0 0 12px rgba(255, 95, 150, 0.22);
}

.stage-cloud {
  position: absolute;
  background: rgba(255, 255, 255, 0.85);
  border-radius: var(--radius-pill);
  height: 16px;
  filter: blur(0.3px);
}

.stage-tree {
  position: absolute;
  bottom: 34%;
  width: 34px; height: 54px;
}
.stage-tree::before {
  content: '';
  position: absolute;
  bottom: 0; left: 50%; transform: translateX(-50%);
  width: 8px; height: 22px;
  background: #b0939c;
  border-radius: 4px;
}
.stage-tree::after {
  content: '';
  position: absolute;
  bottom: 16px; left: 50%; transform: translateX(-50%);
  width: 34px; height: 34px;
  background: radial-gradient(circle at 35% 30%, #ffa6c8 0%, #ff5e96 100%);
  border-radius: 50%;
}

.stage-dog {
  position: absolute;
  z-index: 1;
  cursor: pointer;
  filter: drop-shadow(0 4px 3px rgba(44, 39, 64, 0.18));
}
/* Widen the tap target well beyond the drawn dog (invisible, captures taps) */
.stage-dog::before {
  content: '';
  position: absolute;
  inset: -26px;
  /* transparent — only there to enlarge the clickable surface */
}
.stage-dog:active { filter: drop-shadow(0 2px 2px rgba(44, 39, 64, 0.22)) brightness(1.04); }
.stage-dog.jump { animation: dog-jump 0.5s ease; }

@keyframes dog-jump {
  0%   { transform: translateY(0); }
  35%  { transform: translateY(-22px); }
  55%  { transform: translateY(-22px); }
  100% { transform: translateY(0); }
}

.dog-heart {
  position: absolute;
  top: -4px; left: 50%;
  font-size: 20px;
  pointer-events: none;
  z-index: 5;
  animation: heart-pop 0.9s ease-out forwards;
}

/* Tap-partner heart shower */
.heart-rain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 9000;
}
.hr-heart {
  position: absolute;
  top: -10%;
  will-change: transform, opacity;
  animation-name: heart-fall;
  animation-timing-function: linear;
  animation-fill-mode: forwards;
}
@keyframes heart-fall {
  0%   { transform: translateY(-12vh) rotate(0deg);   opacity: 0; }
  12%  { opacity: 1; }
  88%  { opacity: 1; }
  100% { transform: translateY(112vh) rotate(45deg);  opacity: 0; }
}

@keyframes heart-pop {
  0%   { opacity: 0; transform: translate(-50%, 0) scale(0.4); }
  25%  { opacity: 1; transform: translate(-50%, -12px) scale(1.15); }
  100% { opacity: 0; transform: translate(-50%, -40px) scale(0.9); }
}

.avatars {
  position: absolute;
  bottom: 22px;
  left: 0; right: 0;
  z-index: 2;
  display: flex;
  justify-content: center;
  gap: 22px;
  align-items: flex-end;
}

.avatar-slot {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  animation: bob 3s ease-in-out infinite;
}

/* Floating action buttons next to the characters */
.stage-actions {
  position: absolute;
  top: 8px;
  right: 12px;
  z-index: 6;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-end;
}
.stage-fab {
  display: grid;
  place-items: center;
  width: 46px; height: 46px;
  background: #fff;
  border: 2px solid var(--ink);
  border-radius: 50%;
  color: var(--ink);
  box-shadow: 0 8px 18px -10px var(--shadow);
  cursor: pointer;
}
.stage-fab .fab-ico { font-size: 22px; line-height: 1; }
.stage-fab:active { transform: scale(0.94); }

/* Red badges above the partner's head:
   "?" = they did something to value, "!" = they have an offer for you. */
.avatar-badges {
  position: absolute;
  top: -16px; left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 7;
}
.head-badge {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--accent-3);
  color: #fff;
  font-weight: 900;
  font-size: 18px;
  display: grid;
  place-items: center;
  border: 2px solid #fff;
  box-shadow: 0 6px 14px -4px rgba(44, 39, 64, 0.4);
  cursor: pointer;
  animation: badge-bounce 1.2s ease-in-out infinite;
}
.avatar-badges .head-badge:nth-child(2) { animation-delay: -0.6s; }
@keyframes badge-bounce {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-5px); }
}
.avatar-slot:nth-child(2) { animation-delay: -1.5s; }

.avatar-slot svg {
  filter: drop-shadow(0 10px 14px rgba(44, 39, 64, 0.18));
  border-radius: 50%;
}

@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.avatar-name {
  font-weight: 700;
  font-size: 13px;
  background: #fff;
  color: var(--ink);
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  box-shadow: 0 6px 14px -8px var(--shadow);
}

.avatar-coins {
  font-weight: 800;
  font-size: 13px;
  background: #fff;
  border: 1.5px solid #ffcfe0;
  color: var(--gold);
  padding: 3px 11px;
  border-radius: var(--radius-pill);
  box-shadow: 0 6px 14px -8px var(--gold);
}

.home-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 0 14px;
}

.stat-card {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: 0 10px 26px -16px var(--shadow);
  padding: 16px;
  text-align: center;
}

.stat-label {
  font-weight: 600;
  font-size: 12.5px;
  color: var(--ink-soft);
  margin-bottom: 6px;
}

.stat-value {
  font-weight: 800;
  font-size: 26px;
  color: var(--ink);
}

/* ---------- Bottom menu ---------- */
.menubar {
  position: fixed;
  left: 50%;
  bottom: calc(10px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  width: calc(100% - 24px);
  max-width: 456px;
  z-index: 50;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: saturate(160%) blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 12px 30px -12px var(--shadow);
  padding: 9px 6px;
  display: flex;
  justify-content: space-around;
}

.menu-item {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--ink-soft);
  font-family: var(--ui-font);
  font-weight: 600;
  font-size: 11px;
  padding: 4px 2px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.menu-item .icon {
  width: 46px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-pill);
  font-size: 19px;
  /* inactive: a clearly-visible flat grey (not a washed-out emoji) */
  filter: grayscale(1) contrast(0.85) opacity(0.85);
  transition: filter 0.2s ease, transform 0.18s ease, color 0.2s ease;
}

/* active or hovered: one pastel-pink tone with a neon-pink glow */
.menu-item.active,
.menu-item:hover { color: var(--accent); }
.menu-item.active .icon,
.menu-item:hover .icon {
  filter:
    grayscale(1) sepia(1) hue-rotate(300deg) saturate(5) brightness(1.12)
    drop-shadow(0 0 5px #ff4da6) drop-shadow(0 0 11px #ff66b3);
  transform: translateY(-1px);
}

/* ---------- Task filter buttons ---------- */
.task-filters {
  display: flex;
  gap: 8px;
  margin: 10px 12px 0;
}
.filter-btn {
  flex: 1;
  padding: 8px 6px;
  border: 1.5px solid var(--border);
  background: var(--paper);
  color: var(--ink-soft);
  border-radius: var(--radius-pill);
  font-family: var(--ui-font);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.filter-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 6px 14px -6px var(--accent);
}

/* ---------- Task history (revocable completion events) ---------- */
.th-title { font-weight: 800; color: var(--ink); margin: 12px 0 6px; }
.th-title:first-child { margin-top: 0; }
.th-event {
  position: relative;
  padding: 9px 32px 9px 0;
  border-bottom: 1px solid var(--border);
}
.th-event .th-when { font-size: 13px; color: var(--ink-soft); margin-top: 2px; }
.th-revoke {
  position: absolute;
  top: 7px; right: 0;
  width: 24px; height: 24px;
  border: none;
  border-radius: 50%;
  background: var(--accent-3);
  color: #fff;
  font-weight: 900;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
}

/* ---------- Reward affordability bar ---------- */
.reward-bar {
  position: relative;
  height: 19px;
  margin-top: 4px;
  border-radius: var(--radius-pill);
  background: var(--paper-dark);
  border: 1px solid var(--border);
  overflow: hidden;
}
.reward-bar-fill {
  position: absolute;
  top: 0; left: 0; bottom: 0;
  background: linear-gradient(90deg, var(--accent-2), var(--accent));
  border-radius: var(--radius-pill);
  transition: width 0.35s ease;
}
.reward-bar-fill.full {
  background: linear-gradient(90deg, var(--accent), var(--neon));
  box-shadow: 0 0 12px var(--neon);
}
.reward-bar-label {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 800;
  color: var(--ink);
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.6);
}

/* ---------- Lists ---------- */
.list { display: flex; flex-direction: column; gap: 12px; }

.list-item {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: 0 10px 26px -18px var(--shadow);
  padding: 15px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
/* a task that has hit its period cap reads as "done" — grey instead of white */
.list-item.done {
  background: var(--paper-dark);
}

.li-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.li-title {
  font-weight: 700;
  font-size: 16.5px;
  color: var(--ink);
  line-height: 1.25;
}

.li-meta {
  font-size: 14px;
  color: var(--ink-soft);
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.chip {
  font-weight: 700;
  font-size: 11.5px;
  background: var(--paper-dark);
  color: var(--ink-soft);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  letter-spacing: 0.2px;
}

.chip.accent { background: rgba(255,61,119,0.13);  color: #d81b60; }
.chip.green  { background: var(--paper-dark);       color: var(--ink-soft); }
.chip.gold   { background: rgba(255,31,143,0.13);   color: var(--neon); }
.chip.pink   { background: rgba(225,20,54,0.11);    color: var(--accent-3); }

.li-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 4px;
}

/* ---------- Tabs ---------- */
.tabs {
  display: flex;
  gap: 4px;
  margin: 14px;
  background: var(--paper-dark);
  padding: 5px;
  border-radius: var(--radius-pill);
}

.tab {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--ink-soft);
  font-family: var(--ui-font);
  font-weight: 700;
  font-size: 13.5px;
  padding: 9px 4px;
  cursor: pointer;
  border-radius: var(--radius-pill);
  transition: background 0.18s, color 0.18s;
}

.tab.active {
  background: #fff;
  color: var(--accent);
  box-shadow: 0 6px 16px -10px var(--shadow);
}

/* ---------- Modal ---------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(31, 24, 48, 0.45);
  backdrop-filter: blur(3px);
  display: grid;
  place-items: center;
  z-index: 100;
  padding: 14px;
  animation: fade-in 0.18s ease-out;
}

@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

.modal {
  width: 100%;
  max-width: 440px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--paper);
  border-radius: var(--radius);
  box-shadow: 0 30px 60px -20px rgba(31, 24, 48, 0.5);
  padding: 20px;
  animation: modal-in 0.2s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}

@keyframes modal-in {
  from { transform: translateY(14px) scale(0.98); opacity: 0; }
  to   { transform: translateY(0) scale(1); opacity: 1; }
}

.modal-title {
  font-weight: 800;
  font-size: 19px;
  margin-bottom: 16px;
  color: var(--ink);
}

/* ---------- History block ---------- */
.history {
  margin-top: 8px;
  padding: 12px;
  background: var(--paper-dark);
  border-radius: var(--radius-sm);
  font-size: 14px;
  max-height: 160px;
  overflow-y: auto;
}

/* Home: this-week completion history, scrolls to fit the viewport */
.week-history {
  margin-top: 10px;
  max-height: 200px;
  min-height: 110px;
  overflow-y: auto;
}
.week-history .wh-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 2px;
  border-bottom: 1px solid var(--border);
}
.week-history .wh-row:last-child { border-bottom: none; }
.week-history .wh-text {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 14px;
}
.wh-like {
  flex: 0 0 auto;
  border: none;
  background: none;
  padding: 2px;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  filter: grayscale(1) opacity(0.4);
  transition: filter 0.15s ease, transform 0.12s ease;
}
.wh-like.liked { filter: none; }
.wh-like:active { transform: scale(1.25); }
.wh-likers { display: inline-flex; gap: 2px; align-items: center; flex: 0 0 auto; }
.wh-liker svg { width: 20px; height: 20px; border-radius: 50%; display: block; }

.history-row {
  padding: 7px 0;
  border-bottom: 1px solid var(--border);
  color: var(--ink-soft);
}
.history-row:last-child { border-bottom: none; }
.history-row strong { color: var(--ink); }

/* ---------- Notification panel ---------- */
.notif-panel {
  position: fixed;
  top: 72px;
  left: 14px; right: 14px;
  max-width: 452px;
  margin: 0 auto;
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 24px 50px -18px rgba(31, 24, 48, 0.4);
  z-index: 80;
  max-height: 60vh;
  overflow-y: auto;
  animation: modal-in 0.18s ease-out;
}

.notif-row {
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 15px;
}
.notif-row:last-child { border-bottom: none; }
.notif-row.unread { background: rgba(251, 111, 146, 0.08); }
.notif-row time {
  font-size: 12px;
  color: var(--ink-soft);
  display: block;
  margin-top: 4px;
}

/* ---------- Avatar builder ---------- */
.avatar-preview {
  display: grid;
  place-items: center;
  margin: 4px 0 18px;
  padding: 18px;
  background: linear-gradient(180deg, #fff4f8 0%, #ffe6ef 100%);
  border-radius: var(--radius);
}

.builder-row { margin-bottom: 16px; }

.swatches, .choices {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.swatch {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 2px solid #fff;
  cursor: pointer;
  box-shadow: 0 0 0 1.5px var(--border);
  transition: transform 0.12s;
}
.swatch:active { transform: scale(0.92); }
.swatch.active {
  box-shadow: 0 0 0 3px var(--accent);
}

.choice {
  font-weight: 600;
  font-size: 13px;
  background: var(--paper-dark);
  color: var(--ink-soft);
  border: 1.5px solid transparent;
  border-radius: var(--radius-pill);
  padding: 8px 14px;
  cursor: pointer;
  transition: all 0.12s;
}
.choice.active {
  background: rgba(251, 111, 146, 0.14);
  color: var(--accent);
  border-color: var(--accent);
}

/* ---------- Login ---------- */
.login-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 18px;
  position: relative;
  z-index: 1;
}

.login-card {
  width: 100%;
  max-width: 380px;
  background: var(--paper);
  border-radius: 24px;
  box-shadow: 0 30px 60px -24px rgba(31, 24, 48, 0.35);
  padding: 32px 26px 26px;
  text-align: center;
}

.login-logo {
  font-weight: 800;
  font-size: 28px;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 6px;
}

.login-sub {
  font-size: 15px;
  color: var(--ink-soft);
  margin-bottom: 26px;
}

.login-potato {
  font-size: 56px;
  margin-bottom: 10px;
  filter: drop-shadow(0 8px 12px rgba(44, 39, 64, 0.18));
}

/* Settings sections */
.section {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 10px 26px -18px var(--shadow);
  margin: 14px;
  overflow: hidden;
}

.section-header {
  color: var(--ink);
  font-weight: 700;
  padding: 16px;
  font-size: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  user-select: none;
}

.section-body {
  padding: 0 16px 16px;
  display: none;
}

.section.open .section-body { display: block; }

.section-header::after {
  content: '⌄';
  font-size: 20px;
  line-height: 1;
  color: var(--ink-soft);
  transition: transform 0.2s;
}
.section.open .section-header::after { transform: rotate(180deg); }

/* Toast */
.toast {
  position: fixed;
  bottom: 108px; left: 14px; right: 14px;
  max-width: 452px;
  margin: 0 auto;
  background: var(--ink);
  color: #fff;
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-weight: 600;
  font-size: 14.5px;
  text-align: center;
  z-index: 200;
  animation: toast-in 0.3s ease-out;
  box-shadow: 0 18px 40px -14px rgba(31, 24, 48, 0.5);
}
.toast.error { background: var(--accent-3); }

@keyframes toast-in {
  from { transform: translateY(20px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

/* Empty state */
.empty {
  text-align: center;
  padding: 36px 16px;
  color: var(--ink-soft);
  font-size: 15px;
}
.empty .big-emoji {
  font-size: 48px;
  margin-bottom: 10px;
  display: block;
}

/* scrollbars */
.modal::-webkit-scrollbar,
.notif-panel::-webkit-scrollbar,
.history::-webkit-scrollbar { width: 7px; }
.modal::-webkit-scrollbar-thumb,
.notif-panel::-webkit-scrollbar-thumb,
.history::-webkit-scrollbar-thumb { background: #ddd7e8; border-radius: 999px; }

/* heart for couple decoration */
.coupleline {
  font-weight: 700;
  font-size: 13px;
  text-align: center;
  color: var(--accent);
  letter-spacing: 1px;
  margin: -4px 0 8px;
}
