/* ═══════════════════════════════════════════════════════════════════════════
   BoBase v2 — tema "Lindberg" (svensk 60-tal, varm keramik)

   Laddas efter style.css och skriver över dess tokens + utvalda komponenter.
   Allt som skiljer ett tema från ett annat ska ligga i tokens här, så att
   ett andra tema (t.ex. "Eksell") kan läggas till som
   :root[data-theme="eksell"] { … } utan att röra komponenterna.
   Det andra temat finns nu: theme-eksell.css (laddas efter den här filen,
   väljs i Mer → Utseende, se src/ui/theme.js).
═══════════════════════════════════════════════════════════════════════════ */

@font-face {
  font-family: 'Fraunces';
  src: url('assets/fonts/fraunces-wght.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: 'Jost';
  src: url('assets/fonts/jost-400.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Jost';
  src: url('assets/fonts/jost-500.woff2') format('woff2');
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: 'Jost';
  src: url('assets/fonts/jost-600.woff2') format('woff2');
  font-weight: 600 700;
  font-display: swap;
}

/* ── Tokens ── */
:root {
  /* Typografi */
  --font-body: 'Jost', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'Fraunces', Georgia, serif;

  /* Grund */
  --bg: #F3E9D7;
  --surface: #FBF5EA;
  --surface2: #EFE3CC;
  --border: #DCCBAE;
  --ink: #2A1F17;
  --line-w: 2px;

  /* Bränd orange — accent, Bo */
  --brand: #B5451F;
  --brand-d: #8A3214;
  --brand-l: #F4DCCB;
  --brand-grad: linear-gradient(#B5451F, #B5451F);

  /* Oliv */
  --green: #56602A;
  --green-d: #414A1E;
  --green-l: #E4E5CF;
  --green-grad: linear-gradient(#56602A, #56602A);

  /* Petrol */
  --blue: #1D5560;
  --blue-d: #143E46;
  --blue-l: #D6E3E2;
  --blue-grad: linear-gradient(#1D5560, #1D5560);

  /* Senap */
  --amber: #C8901A;
  --amber-d: #8A610E;
  --amber-l: #F4E3BB;
  --amber-grad: linear-gradient(#C8901A, #C8901A);

  /* Rosa lera */
  --pink: #C0705E;
  --pink-d: #9A5546;
  --pink-l: #F3DDD5;
  --pink-grad: linear-gradient(#C0705E, #C0705E);

  /* Plommon */
  --purple: #6E4A63;
  --purple-d: #533748;
  --purple-l: #E9DCE4;
  --purple-grad: linear-gradient(#6E4A63, #6E4A63);

  /* Neutraler — varma, bruna */
  --g100: #EFE3CC;
  --g200: #E2D2B5;
  --g300: #C9B79C;
  --g400: #9C8A73;
  --g500: #7E6D5A;
  --g600: #6B5A49;
  --g700: #4A3C2E;
  --g800: #2A1F17;

  /* Text — alla klarar 4.5:1 mot --bg */
  --text: #2A1F17;
  --text-2: #6B5A49;
  --text-3: #75624F;
  --red: #A93A2A;
  --red-l: #F5DAD3;

  /* Former — runt och mjukt */
  --r-s: 12px;
  --r-m: 16px;
  --r: 18px;
  --r-l: 22px;
  --r-xl: 28px;

  /* Platt: linjer i stället för skuggor */
  --shadow-sm: none;
  --shadow: none;
  --shadow-lg: none;
  --shadow-brand: none;
  --shadow-green: none;
  --shadow-blue: none;
}

/* ── Bas ── */
body {
  font-family: var(--font-body);
  font-weight: 400;
  letter-spacing: 0;
  background: var(--bg);
}
.app-shell { background: var(--bg); }
.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;
}

.modal-title,
.section-title,
.section-title-clean,
.page-title,
.ai-briefing-title,
.mat-hero-label {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.01em;
}

/* ── Topprad ── */
.topbar {
  background: var(--bg);
  border-bottom: none;
  gap: 12px;
  justify-content: flex-start;
}
.topbar-logo {
  margin-left: auto;
  font-family: var(--font-display);
  font-size: 18px;
}
.topbar-date {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-2);
}
.family-btn {
  position: relative;
  height: 44px;
  border-radius: 22px;
  border: var(--line-w) solid var(--ink);
  background: var(--surface);
  color: var(--ink);
  display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 0 14px 0 11px; cursor: pointer; flex-shrink: 0;
  font-family: var(--font-body); font-size: 15px; font-weight: 600;
}
.family-btn .lc { width: 20px; height: 20px; }
.family-btn.active { background: var(--ink); color: var(--surface); }
.family-btn .notif-dot { position: absolute; top: -2px; right: -2px; border-color: var(--bg); }

/* ── Pengar kring tre frågor (src/features/money-page.js) ── */
.money-hero-forecast {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin: 12px 0 0; padding: 10px 12px; min-height: 44px;
  border: none; border-radius: 12px; background: rgba(255, 255, 255, 0.16); color: inherit;
  font-family: var(--font-body); font-size: 15px; font-weight: 600; text-align: left; cursor: pointer;
}
.money-hero-forecast.short { background: rgba(0, 0, 0, 0.22); }
.money-hero-forecast span:last-child { font-size: 20px; opacity: .8; }
.money-todo { background: var(--surface); border-radius: var(--r-l); padding: 12px 8px 6px; margin: 0 0 18px; border: var(--line-w) solid var(--amber-l, var(--border)); }
.money-todo-head { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--text-2); margin: 0 8px 6px; }
.money-todo-bo { width: 26px; height: 26px; border-radius: 50%; background: var(--brand); color: #FFFFFF; display: inline-flex; align-items: center; justify-content: center; font-family: var(--font-display); font-size: 12px; letter-spacing: 0; text-transform: none; }
.money-todo-row {
  width: 100%; display: flex; align-items: center; gap: 12px; min-height: 58px; padding: 8px;
  border: none; border-top: 1px solid var(--border); background: none; color: var(--ink);
  font-family: var(--font-body); text-align: left; cursor: pointer;
}
.money-todo-row:first-of-type { border-top: none; }
.money-todo-ico { width: 38px; height: 38px; border-radius: 50%; background: var(--surface2); display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; }
.money-todo-row.warn .money-todo-ico { background: var(--amber-l); }
.money-todo-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.money-todo-title { font-size: 15px; font-weight: 600; }
.money-todo-sub { font-size: 13px; color: var(--text-2); line-height: 1.35; }
.money-todo-chev { font-size: 22px; color: var(--text-2); }
.section-action-btn { border: none; background: none; font-family: var(--font-body); cursor: pointer; padding: 6px 0; }
.env-card { padding-top: 4px; padding-bottom: 4px; }
.env-row-simple { display: block; width: 100%; border: none; border-bottom: 1px solid var(--border); background: none; color: inherit; font: inherit; text-align: left; padding: 12px 0; }
.env-row-simple:last-child { border-bottom: none; }
.env-row-simple .env-head, .env-row-simple .money-track { display: flex; }
.env-row-simple .money-track > span { display: block; height: 100%; border-radius: inherit; }
.tx-more { display: block; width: 100%; min-height: 44px; margin: 6px 0 0; border: none; background: none; color: var(--brand); font-family: var(--font-body); font-size: 15px; font-weight: 600; cursor: pointer; }
.tx-hint { font-size: 12.5px; color: var(--text-2); text-align: center; margin: 4px 0 2px; }

/* ── Pengar: "Mer om pengarna" ── */
.money-more-toggle {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 64px; margin: 6px 0 16px; padding: 12px 16px;
  border: var(--line-w) solid var(--g300, var(--border)); border-radius: var(--r-l);
  background: var(--surface); color: var(--ink);
  font-family: var(--font-body); text-align: left; cursor: pointer;
}
.money-more-toggle b { display: block; font-size: 16px; font-weight: 600; }
.money-more-toggle small { display: block; font-size: 13px; color: var(--text-2); margin-top: 2px; }
.money-more-toggle > span:last-child { font-size: 18px; color: var(--text-2); }

/* ── Menyn (src/features/menu.js) ── */
.app-menu-backdrop {
  position: fixed; inset: 0; z-index: 9000;
  background: rgba(20, 14, 10, 0);
  transition: background 0.2s ease;
}
.app-menu-backdrop.open { background: rgba(20, 14, 10, 0.45); }
.app-menu-panel {
  position: absolute; top: 0; bottom: 0; left: 0;
  width: min(86vw, 380px);
  background: var(--bg); color: var(--ink);
  overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: calc(env(safe-area-inset-top) + 14px) 16px calc(env(safe-area-inset-bottom) + 24px);
  box-shadow: 8px 0 30px rgba(0, 0, 0, 0.2);
  transform: translateX(-100%);
  transition: transform 0.22s ease;
}
.app-menu-backdrop.open .app-menu-panel { transform: none; }
@media (prefers-reduced-motion: reduce) { .app-menu-backdrop, .app-menu-panel { transition: none; } }
.app-menu-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.app-menu-family { font-family: var(--font-display); font-weight: 700; font-size: 24px; line-height: 1.15; }
.app-menu-members { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.app-menu-member {
  width: 32px; height: 32px; border-radius: 50%; background: var(--surface2);
  display: flex; align-items: center; justify-content: center; font-size: 16px;
}
.app-menu-close {
  width: 44px; height: 44px; border-radius: 50%; border: none; flex-shrink: 0;
  background: var(--surface2); color: var(--ink); font-size: 17px; cursor: pointer;
}
.app-menu-user {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  min-height: 44px; padding: 0 14px; margin-bottom: 18px;
  border: none; border-radius: 14px; background: var(--surface); color: var(--text-2);
  font-family: var(--font-body); font-size: 14px; text-align: left; cursor: pointer;
}
.app-menu-user b { color: var(--ink); font-weight: 600; }
.app-menu-switch { color: var(--brand); font-weight: 600; }
.app-menu-label { font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-2); margin: 0 4px 8px; }
.app-menu-list { background: var(--surface); border-radius: var(--r-l); padding: 4px 6px; margin-bottom: 18px; }
.app-menu-row {
  width: 100%; display: flex; align-items: center; gap: 14px;
  min-height: 62px; padding: 9px 8px;
  border: none; border-bottom: 1px solid var(--border); background: none; color: var(--ink);
  font-family: var(--font-body); text-align: left; cursor: pointer;
}
.app-menu-row:last-child { border-bottom: none; }
.app-menu-icon {
  width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0;
  background: var(--brand-l, var(--surface2)); color: var(--brand);
  display: flex; align-items: center; justify-content: center;
}
.app-menu-icon .lc { width: 20px; height: 20px; }
.app-menu-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.app-menu-title { font-size: 16px; font-weight: 600; }
.app-menu-sub { font-size: 13px; line-height: 1.35; color: var(--text-2); }
.app-menu-chev { font-size: 22px; color: var(--text-3, var(--text-2)); }
.app-menu-row-accent .app-menu-icon { background: var(--brand); color: #FFFFFF; }


/* ── Bottenmeny ── */
.bottom-nav {
  background: var(--surface);
  border-top: var(--line-w) solid var(--ink);
  align-items: flex-start;
  overflow: visible;
}
.nav-item {
  color: var(--text-2);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0;
  min-height: 44px;
}
.nav-item.active { color: var(--brand); font-weight: 600; }
.nav-bo {
  flex: 1;
  max-width: 66px;
  height: 66px;
  margin: -30px auto 0;
  border-radius: 50%;
  border: 3px solid var(--ink);
  background: var(--brand);
  color: #FFFFFF;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  display: flex; align-items: center; justify-content: center;
  padding: 0; cursor: pointer;
  flex-shrink: 0;
}
.nav-bo:active { transform: scale(0.96); }

/* ── Kort, rader, knappar ── */
.card, .card-clean, .card-flat, .soft-card {
  background: var(--surface);
  border: none;
  border-radius: var(--r-l);
  box-shadow: none;
}
.btn-brand { background: var(--brand); box-shadow: none; }
.btn-green { background: var(--green); box-shadow: none; }
.btn-blue { background: var(--blue); box-shadow: none; }
.btn, .btn-sm { border-radius: 999px; font-weight: 600; }
.sq-chk {
  border-radius: 50%;
  border: var(--line-w) solid var(--ink);
}
.sq-chk.done { background: var(--green); border-color: var(--green); color: #FFFFFF; }
input[type="text"], input[type="number"], input[type="tel"], input[type="url"],
input[type="email"], input[type="password"], input[type="date"], input[type="time"],
select, textarea {
  background: var(--surface);
  border: var(--line-w) solid var(--border);
  border-radius: var(--r-m);
}
.modal {
  background: var(--surface);
  border-top: 3px solid var(--ink);
  border-radius: 32px 32px 0 0;
}

/* ── Idag ── */
.idag-hero { position: relative; margin: 4px 0 18px; }
.idag-hero-sun {
  position: absolute; top: -70px; right: -70px;
  width: 200px; height: 200px; pointer-events: none;
}
.page-title {
  position: relative;
  margin: 0;
  font-size: 34px;
  line-height: 1.05;
  color: var(--ink);
  max-width: 260px;
}
.ai-briefing {
  background: var(--blue);
  color: #FFFFFF;
  border: none;
  border-radius: 26px;
  box-shadow: none;
}
.ai-briefing-title { color: #FFFFFF; font-size: 15px; }
.ai-briefing-text { color: #FFFFFF; font-size: 16px; line-height: 1.45; }
.ai-briefing-avatar {
  background: var(--brand);
  color: #FFFFFF;
  font-family: var(--font-display);
  font-weight: 700;
}
.ai-briefing button { color: #FFFFFF !important; border-color: rgba(255, 255, 255, 0.5) !important; }
.ai-briefing .ai-quick-ask { display: none; }
/* Det Bo har koll på: lugna rader i kortets egen färg, appens ikoner */
.ai-briefing .ai-alert {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 14px;
  color: #FFFFFF;
  font-size: 15px;
  padding: 11px 14px;
}
.ai-briefing .ai-alert-ico { width: 18px; height: 18px; flex-shrink: 0; opacity: 0.85; }
.idag-tiles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 16px;
}
.idag-tile {
  text-align: left;
  border: none;
  border-radius: var(--r-l);
  padding: 14px;
  min-height: 92px;
  display: flex; flex-direction: column; gap: 4px;
  cursor: pointer;
  font-family: var(--font-body);
}
.idag-tile-label { font-size: 13px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.idag-tile-value { font-family: var(--font-display); font-size: 26px; font-weight: 700; }
.idag-tile-shop { background: var(--amber); color: var(--ink); }
.idag-tile-bills { background: var(--green); color: #FFFFFF; }

/* ── Listor ── */
.list-tabs {
  display: flex;
  gap: 6px;
  margin: 0 -16px 16px;
  padding: 0 16px;
  overflow-x: auto;
  scrollbar-width: none;
}
.list-tabs::-webkit-scrollbar { display: none; }
.list-tab {
  height: 40px;
  padding: 0 13px;
  border-radius: 20px;
  border: var(--line-w) solid var(--ink);
  background: transparent;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  flex-shrink: 0;
}
.list-tab.active { background: var(--ink); color: var(--surface); font-weight: 600; }
.mat-hero { background: var(--green); box-shadow: none; }

/* ── Familjen ── */
.family-members {
  display: flex; gap: 12px; flex-wrap: wrap;
  margin: 0 0 18px;
}
.family-member { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 13px; }
.family-member-avatar {
  width: 52px; height: 52px; border-radius: 50%;
  border: var(--line-w) solid var(--ink);
  background: var(--surface);
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
}
.hub-list {
  background: var(--surface);
  border-radius: var(--r-l);
  padding: 4px 6px;
  margin: 0 0 16px;
}
.hub-row {
  position: relative;
  display: flex; align-items: center; gap: 14px;
  width: 100%;
  min-height: 56px;
  padding: 8px 10px;
  border: none;
  border-bottom: 1px solid var(--border);
  background: none;
  text-align: left;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  cursor: pointer;
}
.hub-row:last-child { border-bottom: none; }
.hub-row-icon {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--surface2);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.hub-row-text { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.hub-row-sub { font-size: 13px; color: var(--text-2); }
.hub-row .notif-dot { position: static; margin-left: auto; }

/* ── Bo-arket ── */
.bo-sheet { display: flex; flex-direction: column; gap: 16px; }
.bo-sheet .modal-header { margin-bottom: 0; }
.bo-sheet-vision {
  border: none;
  border-radius: 26px;
  background: var(--brand);
  color: #FFFFFF;
  padding: 20px;
  display: flex; align-items: center; gap: 16px;
  text-align: left;
  cursor: pointer;
  font-family: var(--font-body);
}
.bo-sheet-vision-icon {
  width: 60px; height: 60px; border-radius: 50%;
  background: var(--surface);
  color: var(--brand);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.bo-sheet-vision-icon .lc { width: 30px; height: 30px; }
.bo-sheet-vision-text { display: flex; flex-direction: column; gap: 3px; }
.bo-sheet-vision-title { font-family: var(--font-display); font-weight: 700; font-size: 22px; }
.bo-sheet-vision-sub { font-size: 15px; line-height: 1.35; }
.bo-sheet-ask { display: flex; gap: 8px; }
.bo-sheet-ask input[type="text"] {
  flex: 1;
  height: 54px;
  margin: 0;
  border-radius: 27px;
  border-color: var(--ink);
  background: #FFFFFF;
  padding: 0 20px;
  font-size: 16px;
}
.bo-sheet-mic {
  width: 54px; height: 54px; border-radius: 50%;
  border: none;
  background: var(--blue);
  color: #FFFFFF;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; cursor: pointer;
}
.bo-sheet-label {
  font-size: 13px; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text-2);
  margin-bottom: -8px;
}
.bo-sheet-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.bo-sheet-chips button {
  min-height: 40px;
  padding: 0 16px;
  border-radius: 20px;
  border: var(--line-w) solid var(--g300);
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  cursor: pointer;
}

/* ── Bjud in till familjen (src/features/family-id.js) ── */
.fa-box { display: flex; flex-direction: column; gap: 10px; text-align: center; margin-bottom: 18px; }
.fa-box .btn { width: 100%; }
.fa-code {
  font-family: var(--font-display); font-weight: 700; font-size: 34px;
  letter-spacing: 0.08em; color: var(--ink);
  background: var(--surface); border: var(--line-w, 1px) solid var(--g300, #ddd);
  border-radius: 16px; padding: 14px 10px;
  user-select: all; -webkit-user-select: all;
}
.fa-muted { font-size: 14px; line-height: 1.45; color: var(--text-2); margin: 0; }
.fa-err { font-size: 15px; color: var(--red, #c0392b); margin: 0; }
.fa-head { font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-2); margin: 4px 0 8px; }
.fa-list { display: flex; flex-direction: column; gap: 8px; }
.fa-acc { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--surface); }
.fa-acc-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.fa-acc-text b { font-size: 15px; overflow-wrap: anywhere; }
.fa-acc-text small { font-size: 13px; color: var(--text-2); }
.fa-remove {
  min-height: 40px; padding: 0 14px; border-radius: 20px;
  border: 1px solid var(--red, #c0392b); background: transparent; color: var(--red, #c0392b);
  font-family: var(--font-body); font-size: 14px; font-weight: 600; cursor: pointer;
}
.fa-foot { margin-top: 12px; text-align: left; }

/* ── Prata med Bo: knappen i Bo-arket ── */
.bo-sheet-talk {
  border: none;
  border-radius: 26px;
  background: var(--blue);
  color: #FFFFFF;
  padding: 16px 20px;
  display: flex; align-items: center; gap: 16px;
  text-align: left;
  cursor: pointer;
  font-family: var(--font-body);
}
.bo-sheet-talk .bo-sheet-vision-icon { color: var(--blue); }
.bo-chat-talk {
  margin-left: auto; margin-right: 8px;
  height: 36px; padding: 0 14px;
  border-radius: 18px; border: none;
  background: var(--blue); color: #FFFFFF;
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-body); font-size: 14px; font-weight: 600;
  cursor: pointer;
}
.bo-chat-talk .lc { width: 16px; height: 16px; }

/* ── Prata med Bo: samtalsskärmen (src/features/bo-talk.js) ── */
.bo-talk {
  position: fixed; inset: 0;
  z-index: 9500;
  background: var(--blue);
  color: #FFFFFF;
  display: flex; flex-direction: column;
  padding: calc(env(safe-area-inset-top) + 12px) 20px calc(env(safe-area-inset-bottom) + 20px);
  font-family: var(--font-body);
}
.bo-talk-top { display: flex; align-items: center; justify-content: space-between; min-height: 44px; }
.bo-talk-title { font-family: var(--font-display); font-weight: 700; font-size: 20px; }
.bo-talk-x {
  width: 44px; height: 44px; border-radius: 50%;
  border: none; background: rgba(255,255,255,0.14); color: #FFFFFF;
  font-size: 18px; cursor: pointer;
}
.bo-talk-center {
  flex: 1; min-height: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 14px; text-align: center;
  overflow-y: auto;
}
.bo-talk-orb {
  position: relative;
  width: 168px; height: 168px; flex-shrink: 0;
  border: none; background: transparent; padding: 0;
  cursor: pointer;
  margin-bottom: 18px;
  -webkit-tap-highlight-color: transparent;
}
.bo-talk-core {
  position: absolute; inset: 24px;
  border-radius: 50%;
  background: var(--surface);
  color: var(--blue);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 700; font-size: 44px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.25);
  transition: transform 0.3s ease;
}
.bo-talk-ring {
  position: absolute; inset: 24px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.55);
  opacity: 0;
}
.bo-talk[data-state="listening"] .bo-talk-ring { animation: bo-talk-ring 2s ease-out infinite; }
.bo-talk[data-state="listening"] .bo-talk-ring + .bo-talk-ring { animation-delay: 1s; }
.bo-talk[data-state="speaking"] .bo-talk-core { animation: bo-talk-speak 0.9s ease-in-out infinite; }
.bo-talk[data-state="thinking"] .bo-talk-core { animation: bo-talk-think 1.4s ease-in-out infinite; }
.bo-talk[data-state="paused"] .bo-talk-core { transform: scale(0.88); }
@keyframes bo-talk-ring { from { transform: scale(1); opacity: 0.9; } to { transform: scale(1.45); opacity: 0; } }
@keyframes bo-talk-speak { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.07); } }
@keyframes bo-talk-think { 0%, 100% { opacity: 1; } 50% { opacity: 0.6; } }
@media (prefers-reduced-motion: reduce) {
  .bo-talk .bo-talk-ring, .bo-talk .bo-talk-core { animation: none !important; }
}
.bo-talk-status { font-family: var(--font-display); font-weight: 700; font-size: 26px; line-height: 1.2; }
.bo-talk-heard { font-size: 17px; line-height: 1.4; opacity: 0.8; max-width: 34em; }
.bo-talk-heard::before { content: '”'; }
.bo-talk-heard::after { content: '”'; }
.bo-talk-reply {
  font-size: 19px; line-height: 1.45; max-width: 34em;
  background: rgba(255,255,255,0.12);
  border-radius: 20px; padding: 14px 18px;
}
.bo-talk-done { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.bo-talk-done:empty { display: none; }
.bo-talk-chip {
  background: var(--surface); color: var(--ink);
  border-radius: 16px; padding: 8px 14px;
  font-size: 15px; font-weight: 600; max-width: 34em;
}
.bo-talk-chip-fail { color: var(--red, #c0392b); }
.bo-talk-bottom { display: flex; flex-direction: column; align-items: center; gap: 14px; padding-top: 12px; }
.bo-talk-hint { font-size: 15px; line-height: 1.4; opacity: 0.85; text-align: center; min-height: 21px; }
.bo-talk-end {
  width: 100%; max-width: 420px; height: 54px;
  border-radius: 27px; border: 2px solid rgba(255,255,255,0.7);
  background: transparent; color: #FFFFFF;
  font-family: var(--font-body); font-size: 17px; font-weight: 600;
  cursor: pointer;
}

/* ── Gamla Georgia-kursiv-rubriker → Fraunces upprätt ── */
.tonight-title,
.today-greeting,
.things-title,
.thing-modal-title,
.hem-extras-title,
.ob-flow-title {
  font-family: var(--font-display);
  font-style: normal;
  font-weight: 700;
}
.empty-soft,
.today-empty-msg,
.today-more { font-style: normal; }
.ai-briefing-title {
  font-family: var(--font-body);
  font-style: normal;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.ai-briefing-text { font-family: var(--font-body); font-style: normal; }

/* ── Idag: dagskortet och Bos tankar i Lindberg-färger ── */
.today-card {
  background: var(--surface);
  border: none;
  border-radius: var(--r-l);
  box-shadow: none;
}
.today-item { background: var(--bg); border-radius: var(--r-m); }
.today-item:hover { background: var(--surface2); }
.today-dot-event { background: var(--blue); }
.today-dot-event-tomorrow { background: var(--blue); opacity: 0.5; }
.today-dot-urgent { background: var(--brand); }
.today-dot-todo-today { background: var(--amber); }
.today-dot-todo-tomorrow { background: var(--amber); opacity: 0.5; }
.today-dot-reminder { background: var(--green); }
.today-dot-invoice { background: var(--brand); }
.today-dot-birthday { background: var(--pink); }
.today-dot-shop { background: var(--amber); }
.today-dot-default { background: var(--g300); }

.bo-thought-card,
.bo-thought-card.bo-thought-warn,
.bo-thought-card.bo-thought-info {
  background: var(--surface);
  border: var(--line-w) solid var(--brand);
  border-radius: var(--r-l);
}
.bo-thought-avatar {
  border-radius: 50%;
  background: var(--brand);
  color: #FFFFFF;
  box-shadow: none;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
}
.bo-thought-btn-primary { background: var(--brand); box-shadow: none; border-radius: 999px; }
.bo-thought-btn-dismiss { border-radius: 999px; }

.shop-row-text { font-size: 16px; }
.hero::after { display: none; }

/* ── Inloggning & onboarding ── */
.ob-logo,
.ob-title,
.picker-logo {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.01em;
}
.ob-card { border-radius: var(--r-l); box-shadow: none; }
.ob-btn, .ob-btn-outline { border-radius: 999px; }

/* ── Bo-märket (ersätter 🤖 i chatten) ── */
.bo-badge,
.ai-msg-row .ai-avatar:not(.me) {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--brand); color: #FFFFFF;
  font-family: var(--font-display); font-weight: 700; font-size: 13px;
  vertical-align: middle;
}
.bo-badge-lg { display: flex; width: 56px; height: 56px; font-size: 22px; }

/* ── Listor: korgen (avbockade varor, hopfälld) ── */
.basket { margin-top: 12px; }
.basket-toggle {
  display: flex; justify-content: space-between; align-items: center;
  width: 100%; min-height: 44px; padding: 0 14px;
  border: var(--line-w) dashed var(--g300); border-radius: var(--r-m);
  background: transparent; color: var(--text-2);
  font-family: var(--font-body); font-size: 15px; cursor: pointer;
}
.basket .card-clean { margin-top: 8px; }

/* ── Pengar: bankkortet (v2.2) ── */
.bank-card {
  display: flex; align-items: center; gap: 14px;
  width: 100%; padding: 14px 16px; margin: 0 0 16px;
  border: none; border-radius: var(--r-l);
  background: var(--blue); color: #FFFFFF;
  text-align: left; font-family: var(--font-body);
}
.bank-card-empty { cursor: pointer; }
.bank-card-icon {
  width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0;
  background: var(--surface); color: var(--blue);
  display: flex; align-items: center; justify-content: center;
}
.bank-card-text { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.bank-card-title { font-family: var(--font-display); font-weight: 700; font-size: 18px; }
.bank-card-sub { font-size: 13px; line-height: 1.4; opacity: 0.9; }
.bank-card-warn { color: var(--amber-l); font-weight: 600; }
.bank-card-link { margin-top: 4px; padding: 0; border: none; background: none; color: var(--amber-l); text-decoration: underline; font: inherit; font-size: 13px; text-align: left; cursor: pointer; }
.bank-card-actions { display: flex; flex-direction: column; gap: 6px; flex-shrink: 0; }
.bank-card-actions .btn-sm { background: rgba(255,255,255,0.15); color: #FFFFFF; }
.nobank-card { align-items: flex-start; }
.nobank-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.nobank-actions .btn-sm { background: rgba(255,255,255,0.15); color: #FFFFFF; }

/* ── Pengar: kuvert ovanpå banken (v2.3) ── */
.kuvert-card {
  display: block; width: 100%; padding: 14px 16px; margin: 0 0 12px;
  border: 1px solid var(--border); border-left: 4px solid var(--amber);
  border-radius: var(--r-l); background: var(--surface); color: var(--text);
  text-align: left; font-family: var(--font-body);
}
.kuvert-card-cta { cursor: pointer; display: flex; flex-direction: column; gap: 4px; border-left-color: var(--brand); }
.kuvert-card-title { display: block; font-family: var(--font-display); font-weight: 700; font-size: 17px; margin-bottom: 2px; }
.kuvert-card-sub { font-size: 13px; line-height: 1.45; color: var(--text-2); }
.kuvert-tx { padding: 10px 0; border-top: 1px solid var(--border); }
.kuvert-tx:first-of-type { margin-top: 8px; }
.kuvert-tx-main { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; font-weight: 600; }
.kuvert-tx-amt { white-space: nowrap; }
.kuvert-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.kuvert-chips button {
  padding: 6px 12px; border: 1px solid var(--border); border-radius: 999px;
  background: var(--bg); color: var(--text); font: inherit; font-size: 13px; cursor: pointer;
}
.kuvert-chips button:active { background: var(--amber); color: #FFFFFF; }
.kuvert-owed { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; border-top: 1px solid var(--border); font-size: 14px; }
.kuvert-owed:first-of-type { margin-top: 8px; }
.kuvert-owed .btn-sm { flex-shrink: 0; }
.kuvert-role-row { padding: 12px 0; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 8px; }
.kuvert-role-name { font-weight: 600; font-size: 15px; }

/* ── Betalväggen (v2.5) ── */
.paywall-hero { text-align: center; padding: 8px 4px 14px; }
.paywall-kicker { font-size: 12px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--brand); }
.paywall-title { font-family: var(--font-display); font-weight: 700; font-size: 26px; line-height: 1.15; margin-top: 6px; color: var(--text); }
.paywall-lead { margin-top: 8px; font-size: 14px; color: var(--text-2); }
.paywall-list { list-style: none; margin: 0 0 14px; padding: 0; }
.paywall-list li { display: flex; flex-direction: column; gap: 2px; padding: 10px 0 10px 18px; border-top: 1px solid var(--border); position: relative; font-size: 15px; }
.paywall-list li::before { content: ''; position: absolute; left: 0; top: 17px; width: 8px; height: 8px; border-radius: 50%; background: var(--amber); }
.paywall-list li span { font-size: 13px; color: var(--text-2); line-height: 1.4; }
.paywall-pkg {
  position: relative; display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 2px 10px;
  width: 100%; margin: 0 0 10px; padding: 14px 16px; text-align: left; cursor: pointer;
  border: 2px solid var(--border); border-radius: var(--r-l); background: var(--surface); color: var(--text); font-family: var(--font-body);
}
.paywall-pkg-best { border-color: var(--brand); }
.paywall-pkg-name { font-weight: 600; font-size: 16px; }
.paywall-pkg-price { font-family: var(--font-display); font-weight: 700; font-size: 20px; color: var(--brand); }
.paywall-pkg-sub { grid-column: 1 / -1; font-size: 13px; color: var(--text-2); }
.paywall-badge { position: absolute; top: -10px; right: 14px; padding: 2px 10px; border-radius: 999px; background: var(--brand); color: #FFFFFF; font-size: 11px; font-weight: 600; }
.paywall-legal, .paywall-free { font-size: 12px; line-height: 1.5; color: var(--text-2); margin: 4px 0 12px; }
.paywall-links { text-align: center; font-size: 13px; margin-bottom: 8px; color: var(--text-2); }
.paywall-links a { color: var(--text-2); }
.paywall-note, .paywall-wait { padding: 14px 16px; margin-bottom: 12px; border-radius: var(--r-l); background: var(--bg); font-size: 14px; line-height: 1.5; }
.paywall-wait { text-align: center; color: var(--text-2); }
.premium-lock { padding: 22px 20px; border-radius: var(--r-l); background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--brand); }
.premium-lock-title { font-family: var(--font-display); font-weight: 700; font-size: 22px; line-height: 1.2; margin-bottom: 8px; }
.premium-lock p { font-size: 14px; line-height: 1.5; color: var(--text-2); margin: 0 0 10px; }
.premium-lock .btn { width: 100%; margin-top: 6px; }

/* ── Kom igång + välkomst (v2.2) ── */
.gs-card { margin: 0 0 16px; padding: 18px 18px 10px; border-radius: var(--r-l); background: var(--surface); border: 2px solid var(--ink); }
.gs-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.gs-kicker { font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--brand); }
.gs-heading { font-family: var(--font-display); font-weight: 700; font-size: 21px; margin-top: 2px; }
.gs-hide { border: none; background: none; color: var(--text-2); font: 500 14px var(--font-body); padding: 4px; cursor: pointer; }
.gs-bar { height: 6px; border-radius: 999px; background: var(--surface2); margin: 12px 0 6px; overflow: hidden; }
.gs-bar span { display: block; height: 100%; background: var(--amber); border-radius: 999px; transition: width .4s ease; }
.gs-step { display: flex; gap: 12px; align-items: flex-start; width: 100%; padding: 12px 0; border: none; border-top: 1px solid var(--border); background: none; text-align: left; font-family: var(--font-body); color: var(--text); cursor: pointer; }
.gs-step:first-of-type { border-top: none; }
.gs-check { flex: none; width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--ink); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; margin-top: 1px; }
.gs-done .gs-check { background: var(--green); border-color: var(--green); color: #FFFFFF; }
.gs-done .gs-title { color: var(--text-2); text-decoration: line-through; }
.gs-text { display: flex; flex-direction: column; gap: 2px; }
.gs-title { font-weight: 600; font-size: 16px; }
.gs-sub { font-size: 14px; color: var(--text-2); line-height: 1.4; }
.welcome { text-align: center; }
.welcome-bo { width: 64px; height: 64px; margin: 6px auto 12px; border-radius: 50%; background: var(--brand); color: #FFFFFF; font: 700 24px/64px var(--font-display); }
.welcome-title { font-family: var(--font-display); font-weight: 700; font-size: 26px; line-height: 1.15; }
.welcome-lead { color: var(--text-2); font-size: 15px; line-height: 1.5; margin: 10px 0 16px; }
.welcome textarea { width: 100%; resize: none; text-align: left; }
.welcome-chips { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 10px 0 14px; }
.welcome-chips button { padding: 7px 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--bg); color: var(--text); font: 500 13px var(--font-body); cursor: pointer; }
.welcome-send { width: 100%; }
.welcome-alt { display: flex; justify-content: center; gap: 18px; margin-top: 12px; }
.welcome-alt button { border: none; background: none; color: var(--text-2); font: 500 14px var(--font-body); text-decoration: underline; cursor: pointer; padding: 6px; }
.welcome-fine { font-size: 13px; color: var(--text-2); margin: 12px 0 4px; }
/* ── Kalendern: annat som händer (deadlines, räkningar, aktiviteter, meny) ── */
.kal-other { display: flex; align-items: center; gap: 10px; padding: 6px 10px; min-height: 32px; font-size: 13px; color: var(--text-2); }
.kal-other span:first-child { width: 20px; text-align: center; flex: none; }
.kal-event-repeat { color: var(--text-2); font-weight: 700; }

/* ── Utseende-väljaren i Mer (gäller båda teman; Eksell skriver över formen) ── */
.theme-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
@media (max-width: 340px) { .theme-choices { grid-template-columns: 1fr; } }
.theme-choice {
  display: flex; flex-direction: column; align-items: flex-start; gap: 10px;
  position: relative; min-height: 44px; padding: 12px;
  border: var(--line-w) solid var(--border); border-radius: var(--r-l);
  background: var(--surface); color: var(--text);
  text-align: left; font-family: var(--font-body); cursor: pointer;
}
.theme-choice.active { border-color: var(--ink); }
.theme-choice-text { display: flex; flex-direction: column; gap: 1px; }
.theme-choice-name { font-size: 16px; font-weight: 600; }
.theme-choice-sub { font-size: 13px; color: var(--text-2); }
.theme-choice-mark {
  position: absolute; top: 10px; right: 10px;
  width: 24px; height: 24px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700;
}
.theme-choice.active .theme-choice-mark { background: var(--ink); color: var(--surface); }
/* Färgprov: visar respektive temas egna färger, oavsett vilket tema som är på */
.theme-swatch { display: flex; height: 28px; width: 72px; }
.theme-swatch span { flex: 1; }
.theme-swatch-lindberg { border-radius: 14px; overflow: hidden; }
.theme-swatch-lindberg span:nth-child(1) { background: #B5451F; }
.theme-swatch-lindberg span:nth-child(2) { background: #C8901A; }
.theme-swatch-lindberg span:nth-child(3) { background: #1D5560; }
.theme-swatch-eksell { border-radius: 0; }
.theme-swatch-eksell span:nth-child(1) { background: #C7341A; }
.theme-swatch-eksell span:nth-child(2) { background: #E2A62B; }
.theme-swatch-eksell span:nth-child(3) { background: #141414; }

/* ── Familjens mejladress (src/features/family-mail.js) ── */
.fmail-actions { display: flex; gap: 8px; margin: 10px 0 4px; }
.fmail-actions .btn { flex: 1; margin: 0; }
.fmail-log { display: flex; flex-direction: column; gap: 2px; }
.fmail-row { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--border); }
.fmail-row:last-child { border-bottom: none; }
.fmail-ico { font-size: 20px; line-height: 1.2; flex: 0 0 auto; }
.fmail-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.fmail-title { font-size: 15px; font-weight: 700; color: var(--text); line-height: 1.35; }
.fmail-sub { font-size: 13px; color: var(--text); line-height: 1.4; }
.fmail-meta { font-size: 12px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fmail-confirm { margin-top: 6px; padding: 8px 10px; background: var(--brand-l); border-radius: var(--r-s); font-size: 14px; color: var(--text); }
.fmail-confirm a { color: var(--brand); font-weight: 700; text-decoration: underline; }
.fmail-code { font-family: ui-monospace, Menlo, monospace; font-size: 16px; letter-spacing: 1px; user-select: all; }
.fmail-new { margin-top: 4px; }

/* ── Dela till BoBase (src/features/share-in.js): bara Bos svar, ingen fotoknapp ── */
#modal-magic-photo.magic-shared .file-upload-btn,
#modal-magic-photo.magic-shared .form-group > div:first-child:not(#magic-result) { display: none; }
#modal-magic-photo.magic-shared #magic-result { margin-top: 0 !important; }

/* ── Barnvyn (src/features/kid-view.js): samma kort, knappar och bredd som resten av appen ── */
#kid-view.active { background: var(--bg); }
.kid-topbar {
  background: var(--bg);
  border-bottom: none;
  padding: calc(14px + env(safe-area-inset-top)) 16px 8px;
}
.kid-greeting {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-display); font-weight: 700;
  font-size: 26px; line-height: 1.1; color: var(--ink);
}
.kid-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--kid, var(--brand)); font-size: 22px; flex-shrink: 0;
}
.kid-switch {
  height: 44px; border-radius: 22px; padding: 0 16px;
  border: var(--line-w) solid var(--ink); background: var(--surface); color: var(--ink);
  font-family: var(--font-body); font-size: 15px; font-weight: 600;
}
.kid-content { padding: 8px 16px calc(96px + env(safe-area-inset-bottom)); }

.kid-stars {
  display: block; gap: 0; font-size: inherit;
  background: var(--kid, var(--brand)); color: #FFFFFF;
  border-radius: var(--r-xl); padding: 18px 20px 16px; margin: 0 0 12px;
  text-align: center;
}
.kid-stars-label, .kid-stars-sub { font-size: 14px; font-weight: 600; opacity: .9; }
.kid-stars-big {
  font-family: var(--font-display); font-size: 68px; font-weight: 700; line-height: 1;
  margin: 2px 0; font-variant-numeric: tabular-nums;
}
.kid-stars-star { font-size: 40px; margin-left: 6px; vertical-align: 12px; }
.kid-stars-today {
  display: flex; align-items: center; gap: 10px; margin-top: 14px;
  font-size: 13px; font-weight: 600; text-align: left;
}
.kid-stars-bar { flex: 1; height: 10px; border-radius: 999px; background: rgba(255,255,255,.3); overflow: hidden; }
.kid-stars-bar > span { display: block; height: 100%; border-radius: 999px; background: #FFFFFF; transition: width .5s; }
.kid-stars-streak { margin-top: 10px; font-size: 13px; font-weight: 600; opacity: .9; }
#kid-view .pts-card { margin: 0 0 12px; }

.kid-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 22px 0 10px; }
.kid-title {
  margin: 22px 0 10px; font-family: var(--font-display); font-weight: 700;
  font-size: 22px; line-height: 1.15; color: var(--ink);
}
.kid-head .kid-title { margin: 0; }
.kid-title-top { margin-top: 4px; font-size: 30px; }
.kid-head-actions { display: flex; gap: 6px; }
.kid-mini {
  height: 36px; border-radius: 18px; padding: 0 12px;
  border: var(--line-w) solid var(--ink); background: transparent; color: var(--ink);
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-body); font-size: 14px; font-weight: 600; cursor: pointer;
}
.kid-mini .lc { width: 16px; height: 16px; }
.kid-wheel { margin: 0 0 10px; }

.kid-list { background: var(--surface); border-radius: var(--r-l); overflow: hidden; }
.kid-chore, .kid-reward, .kid-wish {
  width: 100%; display: flex; align-items: center; gap: 14px;
  padding: 14px 16px; margin: 0;
  background: transparent; border: none; border-bottom: 1px solid var(--border);
  border-radius: 0; box-shadow: none; text-align: left;
  font-family: var(--font-body); color: var(--text);
}
.kid-chore { cursor: pointer; min-height: 64px; }
.kid-list > :last-child { border-bottom: none; }
.kid-chore.done { background: transparent; }
.kid-chore.done .kid-chore-name { text-decoration: line-through; color: var(--text-2); }
.kid-chore-ico { font-size: 28px; line-height: 1; flex-shrink: 0; width: 34px; text-align: center; }
.kid-chore-text { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.kid-chore-name { font-size: 17px; font-weight: 600; color: var(--text); }
.kid-chore-pts { font-size: 13px; font-weight: 600; color: var(--text-2); }
.kid-check {
  width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
  border: var(--line-w) solid var(--ink); background: transparent;
  display: inline-flex; align-items: center; justify-content: center;
}
.kid-chore.done .kid-check { background: var(--green); border-color: var(--green); color: #FFFFFF; }
.kid-check .lc { width: 18px; height: 18px; stroke-width: 3; }
.kid-note { margin: 10px 2px 0; font-size: 14px; color: var(--text-2); }
.kid-note-top { margin: -4px 0 14px; }
.kid-empty { margin: 0; padding: 18px 16px; background: var(--surface); border-radius: var(--r-l); color: var(--text-2); font-size: 15px; }

.kid-buy {
  height: 40px; border-radius: 20px; padding: 0 16px; flex-shrink: 0;
  border: none; background: var(--brand); color: #FFFFFF;
  font-family: var(--font-body); font-size: 15px; font-weight: 600; cursor: pointer;
}
.kid-left { font-size: 14px; font-weight: 600; color: var(--text-2); flex-shrink: 0; }
.kid-reward:not(.can) .kid-chore-ico { opacity: .55; }
.kid-badges { display: flex; flex-wrap: wrap; gap: 8px; }
.kid-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 12px; border-radius: 999px; background: var(--surface);
  font-size: 14px; font-weight: 600; color: var(--text);
}
.kid-wish .kid-chore-name { flex: 1; }
.kid-wish.done .kid-chore-name { color: var(--text-2); }
.kid-wish-add { display: flex; gap: 8px; margin: 0 0 12px; }
.kid-wish-add input, .kid-bo textarea {
  flex: 1; min-width: 0; margin: 0;
  border: var(--line-w) solid var(--border); border-radius: var(--r-m);
  background: var(--surface); color: var(--text);
  font-family: var(--font-body); font-size: 16px; padding: 10px 14px;
}
.kid-bo { display: flex; flex-direction: column; gap: 10px; }
.kid-bo textarea { resize: vertical; min-height: 88px; }
.kid-bo-btn { align-self: flex-start; }
.kid-bo-answer { background: var(--surface); border-radius: var(--r-l); padding: 14px 16px; font-size: 15px; line-height: 1.55; color: var(--text); }

.kid-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; justify-content: space-around;
  background: var(--surface); border-top: var(--line-w) solid var(--ink);
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
}
.kid-nav-item {
  flex: 1; min-height: 52px; background: none; border: none; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--text-2); font-family: var(--font-body); font-size: 12px; font-weight: 500;
}
.kid-nav-item .lc { width: 24px; height: 24px; }
.kid-nav-item.active { color: var(--brand); font-weight: 600; }
@media (min-width: 900px) {
  .kid-topbar, .kid-content { max-width: 720px; margin: 0 auto; }
  .kid-content { background: transparent; border-radius: 0; }
  .kid-nav { left: 50%; transform: translateX(-50%); max-width: 720px; border-radius: 20px 20px 0 0; }
}

/* ── Barnen, föräldrarnas sida (src/views/kids.js): samma listor som resten av appen ── */
.kids-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin: 4px 0 16px; }
.kids-add, .kids-mini {
  display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0;
  border: var(--line-w) solid var(--ink); background: transparent; color: var(--ink);
  font-family: var(--font-body); font-weight: 600; cursor: pointer;
}
.kids-add { height: 40px; border-radius: 20px; padding: 0 14px; font-size: 15px; }
.kids-mini { height: 34px; border-radius: 17px; padding: 0 12px; font-size: 14px; }
.kids-add .lc, .kids-mini .lc { width: 16px; height: 16px; }
.kids-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 22px 0 10px; }
.kids-title { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: 22px; line-height: 1.15; color: var(--ink); }
.kids-row { min-height: 68px; }
.kids-avatar {
  width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--kid, var(--brand)); font-size: 24px;
}
.kids-name { font-size: 17px; font-weight: 600; }
.kids-pts {
  display: flex; flex-direction: column; align-items: flex-end; flex-shrink: 0;
  font-family: var(--font-display); font-size: 26px; font-weight: 700; line-height: 1; color: var(--ink);
}
.kids-pts small { font-family: var(--font-body); font-size: 12px; font-weight: 500; color: var(--text-2); margin-top: 3px; }
.kids-ico { width: 36px; text-align: center; font-size: 24px; line-height: 1; flex-shrink: 0; }
.kids-day { width: 36px; text-align: center; font-size: 13px; font-weight: 600; color: var(--text-2); flex-shrink: 0; }
.kids-list .hub-row .kid-check { margin-left: auto; cursor: pointer; }
.kids-empty { margin: 0 0 16px; padding: 16px; background: var(--surface); border-radius: var(--r-l); color: var(--text-2); font-size: 15px; }
.kids-empty-in { margin: 0; padding: 12px 10px; background: none; }
#page-barn .pts-card { margin: 0 0 16px; }

/* ── Föräldrakoden (src/features/parent-pin.js) ── */
.pin-pad {
  position: fixed; inset: 0; z-index: 10000;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg); padding: env(safe-area-inset-top) 16px env(safe-area-inset-bottom);
}
.pin-box { width: 100%; max-width: 320px; text-align: center; }
.pin-title { margin: 0 0 8px; font-family: var(--font-display); font-weight: 700; font-size: 28px; color: var(--ink); }
.pin-sub { margin: 0 0 24px; min-height: 40px; font-size: 15px; line-height: 1.35; color: var(--text-2); }
.pin-sub.pin-err { color: var(--brand); font-weight: 600; }
.pin-dots { display: flex; justify-content: center; gap: 18px; margin-bottom: 32px; }
.pin-dots span { width: 16px; height: 16px; border-radius: 50%; border: var(--line-w, 2px) solid var(--ink); }
.pin-dots span.on { background: var(--ink); }
.pin-dots.shake { animation: pin-shake .35s; }
@keyframes pin-shake { 25% { transform: translateX(-8px); } 75% { transform: translateX(8px); } }
.pin-keys { display: grid; grid-template-columns: repeat(3, 76px); gap: 14px 22px; justify-content: center; }
.pin-key {
  width: 76px; height: 76px; border-radius: 50%; border: none; cursor: pointer;
  background: var(--surface); color: var(--ink);
  font-family: var(--font-display); font-size: 30px; font-weight: 600;
}
.pin-key:active { background: var(--brand-l, var(--surface)); }
.pin-del { background: transparent; }
.pin-del .lc { width: 26px; height: 26px; }
.pin-foot { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 22px; margin-top: 28px; }
.pin-link { background: none; border: none; padding: 8px 4px; cursor: pointer; font-family: var(--font-body); font-size: 15px; font-weight: 600; color: var(--text-2); }

/* ── Rapportera ett svar från Bo (src/ai/report-answer.js) ── */
.ai-report {
  display: inline-flex; align-items: center; gap: 4px; margin-left: 10px;
  background: none; border: none; padding: 2px 0; cursor: pointer;
  font-family: var(--font-body); font-size: 11px; font-weight: 600; color: var(--text-3, var(--text-2));
}
.ai-report .lc { width: 12px; height: 12px; }
.ai-report-row { margin-top: 8px; }
.ai-report-row .ai-report { margin-left: 0; font-size: 12px; }

/* Bo frågar om notiser (src/features/notif-ask.js) */
.notif-ask { display: flex; flex-direction: column; gap: 10px; }
.notif-ask-bo { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 6px; }
.notif-ask-bo p { margin: 0; font-size: 15px; line-height: 1.5; color: var(--ink); }
.notif-ask-yes, .notif-ask-no { width: 100%; }

/* Låset med Face ID / fingeravtryck (src/features/app-lock.js) */
#app-lock { position: fixed; inset: 0; z-index: 20000; background: var(--bg); display: none; align-items: center; justify-content: center; padding: 32px; }
#app-lock.show { display: flex; }
.applock-inner { text-align: center; width: 100%; max-width: 320px; }
.applock-logo { font-family: var(--font-display); font-weight: 700; font-size: 40px; color: var(--ink); letter-spacing: -0.01em; }
.applock-logo span { color: var(--brand); }
.applock-sub { color: var(--text-2); font-size: 15px; margin: 6px 0 36px; }
.applock-btn { width: 100%; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
