/*
 * The shared app shell: sidebar, navigation, page header, wordmark. These are
 * what a user sees in every product, so they must be identical everywhere.
 * Origin: senjara-crm globals.css + styles/senjara-glass.css (crm-* classes
 * renamed to senjara-*). Recipe and porting guide: docs/liquid-glass.md.
 */

@layer components {
  .senjara-shell {
    background-image:
      radial-gradient(circle at 20% 0%, rgb(184 147 85 / 7%) 0%, transparent 36%),
      radial-gradient(circle at 100% 40%, rgb(235 220 203 / 30%) 0%, transparent 42%);
  }
  .senjara-sidebar {
    box-shadow: 0 14px 36px -10px rgb(25 57 46 / 18%);
  }

  /*
   * The dot of the "j" in the wordmark carries the colour of the hand logo.
   * The circle sits over the original dot and is set font-metrically: DM Sans
   * wght 600 (upm 1000) draws it as an ellipse centred at x .1353em and
   * y .6546em above the baseline, .1514 x .1409em large. ``vertical-align``
   * measures from the baseline, not the line box, so the position does not
   * depend on browser or OS line metrics. The two margins cancel out; the
   * wordmark's advance stays unchanged. Different font or weight: re-measure.
   */
  .senjara-j-dot {
    position: relative;
    display: inline-block;
    width: 0.18em;
    height: 0.175em;
    margin-left: 0.0453em;
    margin-right: -0.2253em;
    vertical-align: 0.567em;
    border-radius: 50%;
    background: var(--logo-tan);
  }

  .senjara-page-header {
    display: flex;
    min-height: 5rem;
    flex-shrink: 0;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    border-bottom: 1px solid color-mix(in oklab, var(--border) 70%, transparent);
    border-top-left-radius: inherit;
    border-top-right-radius: inherit;
    background-color: color-mix(in oklab, var(--card) 80%, transparent);
    padding: 1rem 1.25rem;
  }
  @media (min-width: 40rem) {
    .senjara-page-header {
      padding-inline: 2rem;
    }
  }
  .senjara-page-title {
    font-size: 1.25rem;
    line-height: 1.75rem;
    font-weight: 600;
    letter-spacing: -0.025em;
  }

  .senjara-nav-link {
    display: flex;
    min-height: 2.75rem;
    align-items: center;
    gap: 0.75rem;
    border-radius: var(--radius);
    padding-inline: 0.75rem;
    font-size: 0.875rem;
    line-height: 1.25rem;
    font-weight: 500;
    color: var(--sidebar-foreground);
    transition:
      background-color var(--motion-fast) ease,
      color var(--motion-fast) ease;
  }
  .senjara-nav-link[data-active] {
    background-color: var(--sidebar-accent);
    color: var(--sidebar-accent-foreground);
  }
  .senjara-nav-link:focus-visible {
    outline: 2px solid var(--ring);
    outline-offset: -2px;
  }
  @media (hover: hover) {
    .senjara-nav-link:hover {
      background-color: color-mix(in oklab, var(--sidebar-accent) 70%, transparent);
      color: var(--sidebar-accent-foreground);
    }
  }

  /* Sidebar footer: "Home" and the account row stand identically in every
     product. */
  .senjara-foot {
    flex-shrink: 0;
    margin: 12px 12px 0;
    padding: 10px 0 12px;
    border-top: 1px solid color-mix(in srgb, var(--forest) 12%, transparent);
  }
  .senjara-home-link {
    display: flex;
    min-height: 44px;
    align-items: center;
    gap: 12px;
    padding: 0 12px;
    border-radius: 22px;
    font-size: 15px;
    font-weight: 500;
    color: var(--muted-foreground);
    text-decoration: none;
    transition:
      transform var(--motion-base) var(--ease-out),
      background-color var(--motion-base) var(--ease-out);
  }
  .senjara-home-link:focus-visible {
    outline: 1px solid var(--forest-deep);
    outline-offset: -3px;
  }
  .senjara-home-link:active {
    transform: scale(0.97);
  }
  @media (hover: hover) and (pointer: fine) {
    .senjara-home-link:hover {
      background: color-mix(in srgb, var(--sand) 55%, transparent);
      color: var(--forest);
    }
  }

  .senjara-shortcut {
    border: 1px solid var(--border);
    border-radius: 0.25rem;
    background-color: var(--card);
    padding: 0.125rem 0.375rem;
    font-family: var(--font-sans);
    font-size: 11px;
    color: var(--muted-foreground);
  }

  .senjara-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 3.5rem 1.5rem;
    text-align: center;
  }
  .senjara-state p {
    max-width: 24rem;
    font-size: 0.875rem;
    line-height: 1.625;
    color: var(--muted-foreground);
  }
}

@media (min-width: 768px) {
  .senjara-shell {
    gap: 12px;
    padding: 12px;
  }
  .senjara-sidebar {
    border-radius: 1.75rem;
  }
  .senjara-main {
    overflow: hidden;
    border-radius: 1.75rem;
  }
}

/*
 * Liquid glass material. Opt-in: set data-design="liquid-glass" on <body>;
 * without the attribute nothing below applies. Unlayered on purpose: the
 * material must override bg-sidebar/bg-popover utilities.
 */
:where([data-design="liquid-glass"]) .senjara-sidebar {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: rgb(250 250 248 / 48%);
  -webkit-backdrop-filter: blur(26px) saturate(1.25);
  backdrop-filter: blur(26px) saturate(1.25);
  box-shadow:
    inset 0 0 0 1px rgb(255 255 255 / 72%),
    inset 2px 2px 1px rgb(255 255 255 / 90%),
    inset -1px -1px 1px rgb(184 147 85 / 16%),
    0 2px 4px -2px rgb(25 57 46 / 12%),
    0 24px 48px -24px rgb(25 57 46 / 30%);
}
:where([data-design="liquid-glass"]) .senjara-sidebar::before,
:where([data-design="liquid-glass"]) .senjara-mobile-drawer::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  content: "";
  pointer-events: none;
  border-radius: inherit;
  background:
    radial-gradient(ellipse at 0% 0%, rgb(255 255 255 / 80%), transparent 52%),
    linear-gradient(155deg, transparent 30%, rgb(255 255 255 / 30%) 46%, transparent 60%),
    radial-gradient(ellipse at 100% 100%, rgb(235 220 203 / 42%), transparent 55%);
}
:where([data-design="liquid-glass"]) .senjara-mobile-header {
  background: rgb(250 250 248 / 62%);
  -webkit-backdrop-filter: blur(18px) saturate(1.08);
  backdrop-filter: blur(18px) saturate(1.08);
}
/* Title slot of the mobile header: the current place instead of the product
   name (17 px like an iOS navigation title, one line). Layout stays with the
   app, like the header itself. */
:where([data-design="liquid-glass"]) .senjara-mobile-title {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: var(--foreground);
  font-size: 17px;
  font-weight: var(--weight-strong);
  line-height: 22px;
  letter-spacing: -0.01em;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* 0.4.0: the way back in the mobile header ("‹ Zusatzleistungen"), before
   the title like an iOS back button: chevron and the parent's name, up to
   176 px or half the header before it truncates. It keeps its width, the
   title gives way (min-width 0). A 44 px target, an <a> or a <button>. */
:where([data-design="liquid-glass"]) .senjara-mobile-back {
  display: inline-flex;
  min-width: 44px;
  max-width: min(176px, 50%);
  height: 44px;
  flex: none;
  align-items: center;
  gap: 2px;
  padding: 0 8px 0 2px;
  border: 0;
  border-radius: var(--radius-small);
  background: transparent;
  color: var(--forest);
  font: inherit;
  font-size: 15px;
  font-weight: var(--weight-medium);
  line-height: 20px;
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: opacity var(--motion-fast) ease-out;
}
:where([data-design="liquid-glass"]) .senjara-mobile-back[hidden] {
  display: none;
}
:where([data-design="liquid-glass"]) .senjara-mobile-back > svg {
  width: 24px;
  height: 24px;
  flex: none;
}
:where([data-design="liquid-glass"]) .senjara-mobile-back > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
:where([data-design="liquid-glass"]) .senjara-mobile-back:focus-visible {
  outline: 2px solid var(--forest);
  outline-offset: -2px;
}
:where([data-design="liquid-glass"]) .senjara-mobile-back:active {
  opacity: 0.55;
}
@media (hover: hover) and (pointer: fine) {
  :where([data-design="liquid-glass"]) .senjara-mobile-back:hover {
    background: var(--muted);
  }
}
:where([data-design="liquid-glass"]) .senjara-mobile-drawer {
  isolation: isolate;
  overflow: hidden;
  background: rgb(250 250 248 / 62%);
  -webkit-backdrop-filter: blur(24px) saturate(1.12);
  backdrop-filter: blur(24px) saturate(1.12);
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 92%),
    inset 0 -1px 0 rgb(25 57 46 / 10%),
    0 18px 42px -22px rgb(25 57 46 / 36%);
}

:where([data-design="liquid-glass"]) :is(.senjara-sidebar, .senjara-mobile-drawer) .senjara-nav-link {
  position: relative;
  isolation: isolate;
  background: transparent;
  transition:
    transform var(--motion-base) var(--ease-out),
    background-color var(--motion-base) var(--ease-out),
    box-shadow var(--motion-base) var(--ease-out),
    color var(--motion-base) var(--ease-out);
}
:where([data-design="liquid-glass"]) :is(.senjara-sidebar, .senjara-mobile-drawer) .senjara-nav-link[data-active] {
  color: var(--forest-deep);
  background: linear-gradient(160deg, rgb(255 255 255 / 92%), rgb(235 220 203 / 78%) 65%, rgb(235 220 203 / 48%));
  box-shadow:
    inset 0 0 0 1px rgb(255 255 255 / 88%),
    inset 0 -2px 2px rgb(184 147 85 / 12%),
    0 3px 5px -3px rgb(25 57 46 / 22%),
    0 9px 18px -12px rgb(25 57 46 / 34%);
}
:where([data-design="liquid-glass"]) :is(.senjara-sidebar, .senjara-mobile-drawer) .senjara-nav-link[data-active] > svg {
  box-sizing: content-box;
  padding: 5px;
  margin: -5px;
  border-radius: 9px;
  background: rgb(46 74 63 / 7%);
}
:where([data-design="liquid-glass"]) :is(.senjara-sidebar, .senjara-mobile-drawer) .senjara-nav-link:focus-visible {
  outline-color: var(--forest);
  outline-offset: -2px;
}
:where([data-design="liquid-glass"]) :is(.senjara-sidebar, .senjara-mobile-drawer) .senjara-nav-link:active {
  transform: scale(0.985);
}
:where([data-design="liquid-glass"]) :is(.senjara-sidebar, .senjara-mobile-drawer) .senjara-foot {
  border-top-color: color-mix(in srgb, var(--forest) 14%, transparent);
}

@media (hover: hover) and (pointer: fine) {
  :where([data-design="liquid-glass"]) :is(.senjara-sidebar, .senjara-mobile-drawer) .senjara-nav-link:hover {
    background: rgb(235 220 203 / 44%);
    box-shadow: inset 0 1px 0 rgb(255 255 255 / 48%);
  }
  :where([data-design="liquid-glass"]) :is(.senjara-sidebar, .senjara-mobile-drawer) .senjara-nav-link[data-active]:hover {
    background: linear-gradient(160deg, rgb(255 255 255 / 98%), rgb(235 220 203 / 86%) 65%, rgb(235 220 203 / 56%));
  }
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  :where([data-design="liquid-glass"]) .senjara-sidebar,
  :where([data-design="liquid-glass"]) .senjara-mobile-header,
  :where([data-design="liquid-glass"]) .senjara-mobile-drawer,
  :where([data-design="liquid-glass"]) .senjara-tabbar {
    background: rgb(250 250 248 / 96%);
  }
}

@media (prefers-reduced-transparency: reduce) {
  :where([data-design="liquid-glass"]) .senjara-sidebar,
  :where([data-design="liquid-glass"]) .senjara-mobile-header,
  :where([data-design="liquid-glass"]) .senjara-mobile-drawer,
  :where([data-design="liquid-glass"]) .senjara-tabbar {
    background: var(--paper);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}

/*
 * The Notes look of the glass shell (notes.css, senjara-crm 28c621c), binding
 * for every product: the content area has no frame of its own, the sidebar
 * carries the card edge, navigation items are solid sand when active. Kept as
 * overrides with the original selectors so the cascade stays exactly as it
 * was in Notes (the active icon keeps its tinted square from the recipe
 * above, hover on the active item keeps the gradient).
 */
:where(body[data-design="liquid-glass"]) .senjara-main > main {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
@media (min-width: 768px) {
  :where(body[data-design="liquid-glass"]) .senjara-main {
    border-radius: 0;
  }
}
body[data-design="liquid-glass"] .senjara-sidebar {
  box-shadow: var(--card-shadow);
}
body[data-design="liquid-glass"] .senjara-nav-link {
  /* As an <a> without a preflight (Booking) it would inherit the underline. */
  text-decoration: none;
  transition:
    background-color var(--motion-fast) ease-out,
    box-shadow var(--motion-fast) ease-out,
    color var(--motion-fast) ease-out;
}
body[data-design="liquid-glass"] .senjara-nav-link > svg {
  width: 20px;
  height: 20px;
  padding: 0;
  margin: 0;
  background: none;
  box-shadow: none;
}
body[data-design="liquid-glass"] .senjara-nav-link[aria-current="page"] {
  background: var(--sand);
  box-shadow: var(--raised-shadow);
}
@media (prefers-reduced-transparency: reduce) {
  :where(body[data-design="liquid-glass"]) .senjara-main > main {
    background: var(--paper);
  }
}

/*
 * Collapsible sidebar (rail), the Notes behaviour under "Aufnahmen"
 * (senjara-crm components/app/shell.tsx, prop `collapsed`): from 768 px the
 * sidebar shrinks to a 72 px icon column, labels stay in the accessibility
 * tree (visually hidden, not removed), the content area moves along (no
 * overlay). Two ways to switch it, markup and app checklist in the README:
 *
 *   data-collapsible           CSS only, no JavaScript: collapsed unless the
 *                              pointer is on it (fine pointers only, like
 *                              Notes), keyboard focus is inside, or the
 *                              account menu is open.
 *   data-collapsed="true"      the app decides (React state); "false" keeps
 *                              the attribute, and with it the transition,
 *                              while expanded.
 *
 * Hooks the rules need: .senjara-brand (logo first, wordmark after),
 * .senjara-nav (the link column), icon as the first child of every
 * .senjara-nav-link and .senjara-home-link, every label in an element.
 * The expanded width stays with the app (w-[17rem]); only the collapsed width
 * is set here. Below 768 px nothing applies: the drawer carries the full
 * navigation, and an app whose sidebar appears later (Booking: 861 px) needs
 * no extra rule. The same rules come twice because hover only counts on fine
 * pointers: on touch, a first tap would otherwise just expand the rail.
 */
@media (min-width: 768px) {
  :where(body[data-design="liquid-glass"]) .senjara-sidebar:is([data-collapsible], [data-collapsed]) {
    transition: width 200ms var(--ease-out);
  }
  /* 0.4.0, opt-in: data-collapsible="overlay" opens over the content. */
  :where(body[data-design="liquid-glass"]) .senjara-sidebar[data-collapsible="overlay"] {
    z-index: 30;
    transition:
      width 200ms var(--ease-out),
      margin-inline-end 200ms var(--ease-out);
  }
}
@media (min-width: 768px) and (prefers-reduced-motion: reduce) {
  :where(body[data-design="liquid-glass"]) .senjara-sidebar:is([data-collapsible], [data-collapsed]) {
    transition: none;
  }
}

@media (min-width: 768px) and (hover: hover) and (pointer: fine) {
  :where(body[data-design="liquid-glass"]) :is(.senjara-sidebar[data-collapsed]:not([data-collapsed="false"]), .senjara-sidebar[data-collapsible]:not(:hover, :has(:focus-visible), :has(.senjara-account-trigger:is([data-popup-open], [aria-expanded="true"])))) {
    width: 4.5rem;
  }
  :where(body[data-design="liquid-glass"]) :is(.senjara-sidebar[data-collapsed]:not([data-collapsed="false"]), .senjara-sidebar[data-collapsible]:not(:hover, :has(:focus-visible), :has(.senjara-account-trigger:is([data-popup-open], [aria-expanded="true"])))) :is(.senjara-brand, .senjara-nav-link, .senjara-home-link, .senjara-account-trigger) {
    justify-content: center;
    padding-inline: 0;
  }
  :where(body[data-design="liquid-glass"]) :is(.senjara-sidebar[data-collapsed]:not([data-collapsed="false"]), .senjara-sidebar[data-collapsible]:not(:hover, :has(:focus-visible), :has(.senjara-account-trigger:is([data-popup-open], [aria-expanded="true"])))) .senjara-nav {
    padding-inline: 0.5rem;
  }
  :where(body[data-design="liquid-glass"]) :is(.senjara-sidebar[data-collapsed]:not([data-collapsed="false"]), .senjara-sidebar[data-collapsible]:not(:hover, :has(:focus-visible), :has(.senjara-account-trigger:is([data-popup-open], [aria-expanded="true"])))) .senjara-foot {
    margin-inline: 0.5rem;
  }
  :where(body[data-design="liquid-glass"]) :is(.senjara-sidebar[data-collapsed]:not([data-collapsed="false"]), .senjara-sidebar[data-collapsible]:not(:hover, :has(:focus-visible), :has(.senjara-account-trigger:is([data-popup-open], [aria-expanded="true"])))) :is(:is(.senjara-brand, .senjara-nav-link, .senjara-home-link, .senjara-account-trigger) > :not(:first-child), .senjara-nav-label) {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border-width: 0;
  }
}

@media (min-width: 768px) and (hover: none), (min-width: 768px) and (pointer: coarse) {
  :where(body[data-design="liquid-glass"]) :is(.senjara-sidebar[data-collapsed]:not([data-collapsed="false"]), .senjara-sidebar[data-collapsible]:not(:has(:focus-visible), :has(.senjara-account-trigger:is([data-popup-open], [aria-expanded="true"])))) {
    width: 4.5rem;
  }
  :where(body[data-design="liquid-glass"]) :is(.senjara-sidebar[data-collapsed]:not([data-collapsed="false"]), .senjara-sidebar[data-collapsible]:not(:has(:focus-visible), :has(.senjara-account-trigger:is([data-popup-open], [aria-expanded="true"])))) :is(.senjara-brand, .senjara-nav-link, .senjara-home-link, .senjara-account-trigger) {
    justify-content: center;
    padding-inline: 0;
  }
  :where(body[data-design="liquid-glass"]) :is(.senjara-sidebar[data-collapsed]:not([data-collapsed="false"]), .senjara-sidebar[data-collapsible]:not(:has(:focus-visible), :has(.senjara-account-trigger:is([data-popup-open], [aria-expanded="true"])))) .senjara-nav {
    padding-inline: 0.5rem;
  }
  :where(body[data-design="liquid-glass"]) :is(.senjara-sidebar[data-collapsed]:not([data-collapsed="false"]), .senjara-sidebar[data-collapsible]:not(:has(:focus-visible), :has(.senjara-account-trigger:is([data-popup-open], [aria-expanded="true"])))) .senjara-foot {
    margin-inline: 0.5rem;
  }
  :where(body[data-design="liquid-glass"]) :is(.senjara-sidebar[data-collapsed]:not([data-collapsed="false"]), .senjara-sidebar[data-collapsible]:not(:has(:focus-visible), :has(.senjara-account-trigger:is([data-popup-open], [aria-expanded="true"])))) :is(:is(.senjara-brand, .senjara-nav-link, .senjara-home-link, .senjara-account-trigger) > :not(:first-child), .senjara-nav-label) {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border-width: 0;
  }
}

/*
 * 0.4.0, opt-in: data-collapsible="overlay" opens over the content, without
 * reflow (Booking, senjara-design#13: the content jumped by 176 px on every
 * pass of the pointer). Everything else is data-collapsible. The rail keeps
 * its 72 px in the layout and draws the full width on top of the content:
 * width and a negative end margin move together, so their sum stays 4.5rem
 * in every frame. --sidebar-expanded-width is the open width (the app's
 * w-[17rem]); an app with another width sets the token. Plain
 * data-collapsible still moves the content.
 */
:where([data-design="liquid-glass"]) {
  --sidebar-expanded-width: 17rem;
}
@media (min-width: 768px) and (hover: hover) and (pointer: fine) {
  :where(body[data-design="liquid-glass"]) .senjara-sidebar[data-collapsible="overlay"]:is(:hover, :has(:focus-visible), :has(.senjara-account-trigger:is([data-popup-open], [aria-expanded="true"]))) {
    width: var(--sidebar-expanded-width);
    margin-inline-end: calc(4.5rem - var(--sidebar-expanded-width));
  }
}
@media (min-width: 768px) and (hover: none), (min-width: 768px) and (pointer: coarse) {
  :where(body[data-design="liquid-glass"]) .senjara-sidebar[data-collapsible="overlay"]:is(:has(:focus-visible), :has(.senjara-account-trigger:is([data-popup-open], [aria-expanded="true"]))) {
    width: var(--sidebar-expanded-width);
    margin-inline-end: calc(4.5rem - var(--sidebar-expanded-width));
  }
}

/*
 * Tab bar (0.3.0): the bottom navigation on phones, 3-5 destinations, icon
 * 24 px over an 11 px label, active via aria-current="page". The material of
 * the mobile header; 49 px plus the home indicator. The box sits in the
 * components layer, so the app hides it from its own breakpoint with a
 * utility (md:hidden) or its own media query (Booking: 861 px); the package
 * sets no breakpoint. The app keeps its content clear of it
 * (padding-bottom: var(--tabbar-height)).
 *
 *   <nav class="senjara-tabbar" aria-label="Bereiche">
 *     <a href="/kalender" aria-current="page"><svg aria-hidden="true"/><span>Kalender</span></a>
 *     ...
 *   </nav>
 */
:where([data-design="liquid-glass"]) {
  --tabbar-height: calc(49px + env(safe-area-inset-bottom, 0px));
}
@layer components {
  :where([data-design="liquid-glass"]) .senjara-tabbar {
    position: fixed;
    z-index: 40;
    inset: auto 0 0;
    box-sizing: border-box;
    display: flex;
    height: var(--tabbar-height);
    align-items: stretch;
    padding: 0 max(8px, env(safe-area-inset-right, 0px)) env(safe-area-inset-bottom, 0px) max(8px, env(safe-area-inset-left, 0px));
  }
  :where([data-design="liquid-glass"]) .senjara-tabbar > :is(a, button) {
    display: flex;
    min-width: 0;
    flex: 1 1 0;
    flex-direction: column;
    align-items: center;
    position: relative;
    justify-content: center;
    gap: 1px;
  }
}
:where([data-design="liquid-glass"]) .senjara-tabbar {
  background: rgb(250 250 248 / 62%);
  -webkit-backdrop-filter: blur(18px) saturate(1.08);
  backdrop-filter: blur(18px) saturate(1.08);
  box-shadow: 0 -1px 0 rgb(46 74 63 / 10%);
}
:where([data-design="liquid-glass"]) .senjara-tabbar > :is(a, button) {
  padding: 0 2px;
  border: 0;
  border-radius: var(--radius-small);
  background: transparent;
  color: var(--muted-foreground);
  font: inherit;
  font-size: 11px;
  font-weight: var(--weight-medium);
  line-height: 13px;
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: color var(--motion-fast) ease-out;
}
:where([data-design="liquid-glass"]) .senjara-tabbar > :is(a, button) > span {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* The icon sits on a capsule; active, the capsule turns sand like an active
   nav link. */
:where([data-design="liquid-glass"]) .senjara-tabbar > :is(a, button) > svg {
  box-sizing: content-box;
  width: 24px;
  height: 24px;
  flex: none;
  padding: 2px 14px;
  border-radius: var(--radius-pill);
  transition: background-color var(--motion-fast) ease-out;
}
:where([data-design="liquid-glass"]) .senjara-tabbar > [aria-current="page"] {
  color: var(--forest-deep);
  font-weight: var(--weight-strong);
}
:where([data-design="liquid-glass"]) .senjara-tabbar > [aria-current="page"] > svg {
  background: var(--sand);
  box-shadow: var(--raised-shadow);
}
:where([data-design="liquid-glass"]) .senjara-tabbar > :is(a, button):focus-visible {
  outline: 2px solid var(--forest);
  outline-offset: -2px;
}
:where([data-design="liquid-glass"]) .senjara-tabbar > :is(a, button):active > svg {
  transform: scale(0.94);
}
@media (hover: hover) and (pointer: fine) {
  :where([data-design="liquid-glass"]) .senjara-tabbar > :is(a, button):not([aria-current="page"]):hover {
    color: var(--forest);
  }
}
@media (prefers-reduced-motion: reduce) {
  :where([data-design="liquid-glass"]) .senjara-tabbar > :is(a, button):active > svg {
    transform: none;
  }
}

/*
 * Collapsing title (0.3.1): on a phone the page title (senjara-page-title, in
 * a senjara-page-intro) scrolls under the mobile header and hands over to the
 * header title. No third title: both titles carry data-collapsing; the page
 * title becomes the source of a scroll-driven view timeline, the header title
 * follows it. One pair per page (the timeline has a name; two page titles
 * with data-collapsing make it inactive, then both titles stand). The page's
 * main action lives in the header, so it stays reachable in both states.
 * Layout stays with the app.
 *
 *   <header class="senjara-mobile-header">
 *     <p class="senjara-mobile-title" data-collapsing aria-hidden="true">Rückrufe</p>
 *     <button aria-label="Neuer Rückruf">…</button>
 *   </header>
 *   <main><div class="senjara-page-intro"><h1 class="senjara-page-title" data-collapsing>Rückrufe</h1></div>…</main>
 *
 * --mobile-header-height is the part of the scroller the header covers (the
 * title counts as gone once under it); 0px when the header sits outside the
 * scroller. Without scroll-driven animations or with reduced motion both
 * titles simply stand (static fallback).
 */
:where([data-design="liquid-glass"]) {
  --mobile-header-height: 56px;
}
@keyframes senjara-title-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@supports (animation-timeline: view()) {
  :where([data-design="liquid-glass"]) {
    timeline-scope: --senjara-page-title;
  }
  :where([data-design="liquid-glass"]) .senjara-page-title[data-collapsing] {
    view-timeline: --senjara-page-title block;
    view-timeline-inset: var(--mobile-header-height) 0px;
  }
  /* Hidden while the page title is in view, in as it slides under the
     header. Without a page title the timeline is inactive and the header
     title stays visible. */
  :where([data-design="liquid-glass"]) .senjara-mobile-title[data-collapsing] {
    animation: senjara-title-in linear both;
    animation-timeline: --senjara-page-title;
    animation-range: exit 40% exit 100%;
  }
}
@media (prefers-reduced-motion: reduce) {
  :where([data-design="liquid-glass"]) .senjara-mobile-title[data-collapsing] {
    animation: none;
  }
}
