:root {
  color-scheme: light;
  --fb-paper: light-dark(#fffefa,#1b2420);
  --fb-ink: light-dark(#202e26,#eff4ee);
  --fb-muted: light-dark(#53645a,#b8c6ba);
  --fb-line: light-dark(#dbe2d9,#394a3e);
  --fb-herb: light-dark(#1a5743,#a7dab8);
  --fb-tint: light-dark(#e8f1e9,#263c31);
  --fb-panel: light-dark(#204e3c,#213e30);
  --fb-onpanel: light-dark(#f6fff2,#eff9ee);
}
:root[data-theme="dark"] { color-scheme: dark; }
:root[data-theme="system"] { color-scheme: light dark; }
.app-shell {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  margin-inline: auto;
  background: var(--fb-paper);
}
.app-shell > :not(.screen-scroll) { flex: none; }
.app-shell .screen-scroll {
  flex: 1 1 0%;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  scroll-padding-block: .75rem;
}
:is(#vmeste-family,.account-shell) .fb-link:where(:not([hidden])) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  max-width: 100%;
  padding: 8px 12px;
  border: 0;
  border-radius: 10px;
  background: var(--fb-tint);
  color: var(--fb-herb);
  font: 600 14px/1.3 system-ui,sans-serif;
  text-align: center;
  text-decoration: none;
  overflow-wrap: anywhere;
}
.fb-back::before {
  content: "";
  flex: none;
  width: 8px;
  height: 8px;
  border: solid currentColor;
  border-width: 0 0 2px 2px;
  transform: rotate(45deg);
}
:is(#vmeste-family,.account-shell) .fb-link:active {
  background: var(--fb-line);
}
.fb-link:focus-visible {
  outline: 3px solid var(--fb-herb);
  outline-offset: 2px;
}
.fb-nav {
  display: grid;
  grid-template-columns: 1fr 1fr 48px 1fr 1fr;
  align-items: center;
  gap: 2px;
  padding: 6px max(4px, env(safe-area-inset-right)) calc(8px + env(safe-area-inset-bottom)) max(4px, env(safe-area-inset-left));
  border-top: 1px solid var(--fb-line);
  background: var(--fb-paper);
}
:is(#vmeste-family,.account-shell) .fb-nav :is(a,button) {
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 3px;
  min-height: 48px;
  padding: 0;
  text-align: center;
  text-decoration: none;
  color: var(--fb-muted);
  font: 550 12px/1.2 system-ui,sans-serif;
}
.fb-nav .navmark { display: grid; place-items: center; height: 28px; width: 48px; border-radius: 14px; }
.fb-nav .nav-icon {
  display: block;
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}
:is(#vmeste-family,.account-shell) .fb-nav [aria-current="page"] { color: var(--fb-herb); font-weight: 700; }
.fb-nav [aria-current="page"] .navmark { background: var(--fb-tint); }
:is(#vmeste-family,.account-shell) .fb-nav .fb-add {
  margin: auto;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: var(--fb-herb);
  color: var(--fb-paper);
}
.fb-nav .fb-add .nav-icon { width: 26px; height: 26px; stroke-width: 2.2; }
.fb-nav :focus-visible {
  outline: 2px solid var(--fb-herb);
  outline-offset: 1px;
}
