/*
 * "Meine Jufa" (meine-jufa/index.html, meine-jufa.js): header, navigation, area cards, dialogs. Loaded after style.css, only by this page, and
 * uses its design-system tokens (--jf-*), so light/dark and the association's colour keep working. Cards are flat with a 1px line; no stripes.
 * Classes start with "mj-".
 *
 * Widths: a phone below 720 px (the account is a sheet behind the initial, also on a wider screen: Datenschutz and Angemeldete Geräte are in it). Five tabs
 * (Übersicht, News, Familie, Termine, Post): a bar at the bottom below 600 px, under the header up to 1023 px, a side menu from 1024 px; one column of at
 * most --mj-page-w. Everything a finger taps is at least 44 px high.
 */
:root { --mj-bar-h: 60px; --mj-page-w: 960px; --mj-gap: 16px; --mj-measure: 68ch; }

/* Meine Jufa: every target 44 px on every screen (touch laptops too), fields as well as buttons. */
:root:has(.mj-shell) { --jf-control: var(--jf-touch-target); }

/* The signed-in page is outside .page: it stays hidden while the profile loads, too. */
.loading .mj-shell { visibility: hidden; }
.mj-skip { position: absolute; left: -999px; }
.mj-skip:focus { left: 8px; top: 8px; z-index: 50; background: var(--jf-surface-raised); padding: 8px 12px; display: inline-flex; align-items: center; min-height: var(--jf-touch-target, 44px); box-sizing: border-box; }

/* The sign-in page (link, passkey) keeps the centred layout of the forms. */
.my-jufa-passkey { margin-top: 16px; border-top: 1px solid var(--jf-border); padding-top: 12px; text-align: center; }

/* ---------- Sticky header: brand, who is signed in, language and colours, Abmelden ---------- */
/* Focus and anchors scroll clear of the sticky header (bar and, up to 1023 px, the tabs); the phone rule below adds the tab bar at the bottom. */
html:has(.mj-shell:not([hidden])) { scroll-padding-top: 128px; }
@media (min-width: 1024px) { html:has(.mj-shell:not([hidden])) { scroll-padding-top: calc(var(--mj-bar-h) + 16px); } }
.mj-header { position: sticky; top: 0; z-index: 20; background: var(--jf-surface-raised); border-bottom: 1px solid var(--jf-border); }
.mj-bar { display: flex; align-items: center; gap: 12px; max-width: var(--mj-page-w); margin: 0 auto; padding: 0 16px; min-height: var(--mj-bar-h); }
.mj-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; min-width: 0; margin-right: auto; color: var(--jf-text-heading); }
.mj-brand img { height: 40px; width: auto; max-width: 140px; object-fit: contain; flex: none; }
.mj-brand span { font-weight: 700; font-size: 20px; line-height: 28px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.mj-account-menu { display: flex; align-items: center; gap: 12px; min-width: 0; flex: 0 1 auto; }
.mj-who { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.25; min-width: 0; }
.mj-who strong { font-size: 0.92rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.mj-who span { font-size: 0.8rem; color: var(--jf-text); white-space: nowrap; }
/* Not wide enough for everything in one row (a phone held sideways, a narrow window): the bar wraps and the e-mail address and the session
   line take a row of their own under the brand and the buttons; nothing lies over anything else. */
@media (max-width: 1023px) {
  .mj-bar { flex-wrap: wrap; row-gap: 0; padding-top: 6px; padding-bottom: 6px; }
  .mj-account-menu { display: contents; }
  .mj-who { order: 9; flex: 1 0 100%; flex-direction: row; align-items: baseline; justify-content: flex-end; gap: 4px 12px; flex-wrap: wrap; padding: 0 0 2px; }
  .mj-who strong { flex: 0 1 auto; min-width: 0; }
}
@media (min-width: 1024px) { .mj-who strong { max-width: 260px; } }
/* A short screen (a phone held sideways): the header scrolls away instead of taking a third of the height. */
@media (max-height: 500px) { .mj-header { position: static; } }
.mj-avatar {
  display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; min-height: 44px; padding: 0; border-radius: 50%;
  /* Initials on a logo colour (design system). */
  background: var(--jf-jufa-yellow); color: var(--jf-ink-strong); border: 0; font-weight: 700;
}
.mj-avatar:hover { background: var(--jf-jufa-yellow); box-shadow: 0 0 0 2px var(--jf-text-heading); }
/* The language and colour switches of i18n.js live here instead of floating over the page. */
.mj-header .top-switches, .mj-account-sheet .top-switches { position: static; gap: 6px; }
.mj-header .lang-switch, .mj-header .theme-switch, .mj-account-sheet .lang-switch, .mj-account-sheet .theme-switch { box-shadow: none; }
@media (pointer: coarse) {
  .mj-header .theme-switch button, .mj-account-sheet .theme-switch button { min-height: 44px; min-width: 44px; }
  .mj-header .lang-switch button, .mj-account-sheet .lang-switch button { min-height: 44px; min-width: 44px; }
}
/* In the account sheet there is room: 44 px on every phone, not only on touch screens. */
@media (max-width: 599px) {
  .mj-account-sheet .theme-switch button, .mj-account-sheet .lang-switch button { min-height: 44px; min-width: 44px; }
}
/*
 * The banners of the announcements marked "Als Banner zeigen": at the top of the main area on every page (they scroll away with it, never sticky), dismissible.
 * Notices of the design system (style.css .notice): a closure (data-closed) is a warning, every other banner an info notice; the text runs on in one line.
 */
.mj-banners { display: grid; gap: 8px; margin: 0 0 var(--mj-gap); }
.mj-banners:empty { display: none; }
.mj-banner { display: flex; align-items: flex-start; gap: 4px; margin: 0; padding: 6px 4px 6px 44px; }
.mj-banner-text { flex: 1 1 auto; min-width: 0; padding: 6px 0; }
.mj-banner-text > * { display: inline; margin: 0 6px 0 0; }
.mj-banner-text p { white-space: pre-line; overflow-wrap: anywhere; }
.mj-banner-close { flex: none; display: grid; place-items: center; min-width: 44px; min-height: 44px; padding: 0; background: none; border: 0; color: var(--jf-text-heading); cursor: pointer; }
.mj-banner-close:hover { background: color-mix(in srgb, var(--jf-text-heading) 12%, transparent); }
.mj-banner-close svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
/* The logo of the sign-in header keeps its box while it is hidden (the profile has not arrived yet): the page does not jump when it appears. Once the profile has settled without a logo, the box goes. */
html:not(.profile-settled) .myJufa header.site #logo[hidden] { display: inline-block !important; visibility: hidden; width: 220px; aspect-ratio: 507 / 224; }
.mj-demo { background: var(--jf-orange-tint); color: var(--jf-orange-strong); text-align: center; font-size: 0.85rem; font-weight: 600; padding: 4px 16px; }

/* ---------- Navigation: five tabs under the header (a bottom bar on phones, a side menu on desktop) ---------- */
.mj-tabs { display: block; max-width: var(--mj-page-w); margin: 0 auto; padding: 0 12px; }
.mj-tabs-row { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 2px; }
.mj-nav-item {
  position: relative; display: flex; align-items: center; justify-content: center; gap: 6px; min-width: 0; min-height: 48px; padding: 8px 6px; border: 0; border-radius: 0;
  background: transparent; color: var(--jf-text-strong); font-weight: 600; text-align: center; text-decoration: none; cursor: pointer;
}
.mj-nav-item:hover { background: var(--jf-surface-alt); color: var(--jf-text-heading); }
/* The selected tab: a red bar under it. */
.mj-nav-item[aria-current="page"] { color: var(--jf-text-heading); box-shadow: inset 0 -3px 0 var(--jf-red); }
.mj-nav-item[aria-current="page"] svg { color: var(--jf-text-heading); }
.mj-nav-item svg { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.mj-nav-item .mj-nav-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.mj-dot { font-size: 13px; line-height: 20px; font-weight: 600; padding: 0 8px; border-radius: var(--jf-radius); background: var(--jf-orange-tint); color: var(--jf-orange-strong); white-space: nowrap; flex: none; }
/*
 * Phone (below 600 px): only the compact top bar (logo, title, bell, avatar) stays at the top; the five tabs move into a bar at the bottom, the same
 * as in the app: line icon above the label, the chosen tab as an ink pill. The demo strip and the banners scroll with the page. Safe-area insets
 * keep the bars clear of the notch and the home indicator; the page gets room above the tab bar.
 */
@media (max-width: 599px) {
  :root { --mj-tabbar-h: calc(67px + env(safe-area-inset-bottom)); }
  /* Scrolling to something (focus, a link to a card) keeps it clear of the sticky top bar, the tab bar. */
  html:has(.mj-shell:not([hidden])) { scroll-padding: 64px 0 var(--mj-tabbar-h); }
  .mj-shell:not([hidden]) { padding-bottom: var(--mj-tabbar-h); }
  .mj-header { display: contents; }
  .mj-bar {
    position: sticky; top: 0; z-index: 20; background: var(--jf-surface-raised); border-bottom: 1px solid var(--jf-border);
    padding: max(6px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) 6px max(12px, env(safe-area-inset-left));
  }
  .mj-tabs {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; max-width: none; margin: 0;
    padding: 6px max(4px, env(safe-area-inset-right)) max(8px, env(safe-area-inset-bottom)) max(4px, env(safe-area-inset-left));
    background: var(--jf-surface-raised); border-top: 1px solid var(--jf-border); box-shadow: var(--jf-shadow-raised);
  }
  .mj-tabs-row { gap: 0; }
  .mj-nav-item { flex-direction: column; gap: 2px; min-height: 52px; padding: 0 2px; font-size: 12px; line-height: 16px; font-weight: 600; }
  .mj-nav-item:hover { background: transparent; }
  .mj-nav-item[aria-current="page"] { box-shadow: none; }
  /* The icon in a pill; the chosen tab: ink fill, light icon (the design system's selected state). */
  .mj-nav-item svg { box-sizing: border-box; width: 56px; height: 30px; padding: 5px 18px; border-radius: var(--jf-radius-pill); }
  .mj-nav-item:hover svg { background: var(--jf-surface-alt); }
  .mj-nav-item[aria-current="page"] svg, .mj-nav-item[aria-current="page"]:hover svg { background: var(--jf-text-heading); color: var(--jf-surface-raised); stroke-width: 2.1; }
  .mj-nav-item .mj-nav-label { max-width: 100%; }
  /* The count on Post: a small yellow badge with ink text (the words stay in the button's name). */
  .mj-nav-item .mj-dot {
    position: absolute; top: 0; left: calc(50% + 8px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: var(--jf-radius-pill);
    background: var(--jf-jufa-yellow); color: var(--jf-ink-strong); font-size: 0; line-height: 18px; text-align: center;
  }
  .mj-nav-item .mj-dot::after { content: attr(data-count); font-size: 11px; font-weight: 700; }
}
@media (max-width: 599px) and (max-height: 500px) { .mj-bar { position: static; } }

/* ---------- Desktop (from 1024 px): the same nav becomes a side menu on the left, sticky under the header ----------
   The header's children (bar, nav, demo strip) become grid items of the shell, so the bar stays sticky and full width while the nav sits in the left column. */
@media (min-width: 1024px) {
  .mj-shell:not([hidden]) {
    --mj-side-w: 220px; --mj-wide-w: calc(var(--mj-page-w) + var(--mj-side-w)); --mj-edge: max(16px, calc((100% - var(--mj-wide-w)) / 2));
    display: grid; grid-template-columns: var(--mj-edge) var(--mj-side-w) minmax(0, var(--mj-page-w)) var(--mj-edge); grid-template-rows: auto auto 1fr auto; column-gap: 0;
  }
  .mj-header { display: contents; }
  .mj-bar { position: sticky; top: 0; z-index: 20; grid-column: 1 / -1; grid-row: 1; max-width: none; margin: 0; padding-inline: var(--mj-edge); background: var(--jf-surface-raised); border-bottom: 1px solid var(--jf-border); }
  .mj-strips { grid-column: 1 / -1; grid-row: 2; }
  .mj-tabs { grid-column: 2; grid-row: 3; align-self: start; position: sticky; top: calc(var(--mj-bar-h) + 24px); max-width: none; margin: 24px 0 0; padding: 0 16px 0 0; }
  .mj-tabs-row { display: flex; flex-direction: column; gap: 4px; }
  .mj-nav-item { justify-content: flex-start; gap: 12px; padding: 8px 12px; border-radius: var(--jf-radius); text-align: left; }
  .mj-nav-item .mj-nav-label { flex: 1 1 auto; }
  /* The selected entry: the red line under it, as on the tabs (no side stripe). */
  .mj-nav-item[aria-current="page"] { box-shadow: inset 0 -3px 0 var(--jf-red); }
  .mj-layout { grid-column: 3; grid-row: 3; max-width: none; margin: 0; width: 100%; }
  .mj-footer { grid-column: 1 / -1; grid-row: 4; }
}

.mj-layout { max-width: var(--mj-page-w); margin: 0 auto; padding: 24px 16px 48px; }
main.mj-main { min-width: 0; }
.mj-main #message { scroll-margin-top: 140px; }
@media (max-width: 767px) { .mj-layout { padding-top: 20px; } }

/* The way back above a person's page or an area page. */
.mj-back { display: inline-flex; align-items: center; gap: 6px; min-height: var(--jf-touch-target); margin: -8px 0 4px -8px; padding: 4px 10px; border: 0; background: none; border-radius: var(--jf-radius); color: var(--jf-text-strong); font-weight: 600; }
.mj-back:hover { background: var(--jf-surface-alt); }
.mj-back svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transform: rotate(180deg); }

/* Phone: the account goes into a small sheet behind the initial. */
@media (max-width: 719px) {
  :root { --mj-bar-h: 56px; }
  .mj-brand img { height: 34px; max-width: 110px; }
  .mj-account-menu { display: none; }
  .mj-layout { padding: 16px 12px 40px; }
}

/* ---------- Head of a brand page (the greeting on Übersicht, News): a farm photo with the h1 in white Amatic over it ----------
   Square, no frame; a scrim under the word keeps it at 4.5:1 or more on any part of the photo. On a phone it runs from edge to edge. */
.mj-hero { position: relative; height: 220px; margin: 0 0 24px; overflow: hidden; background: var(--jf-surface-alt); }
.mj-hero-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 55%; }
/* The start photo (header-start) has the children's faces in a band at 31-47 % of its height: keep that band in the upper middle of every header height. */
.mj-hero-photo[src*="header-start"] { object-position: 50% 36%; }
.mj-hero::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(0, 0, 0, 0) 10%, rgba(0, 0, 0, 0.6) 50%, rgba(0, 0, 0, 0.85) 100%); }
.mj-hero-word {
  position: absolute; z-index: 1; left: 20px; right: 20px; bottom: 16px; margin: 0; color: #fff; font-family: var(--font-brand); font-weight: 700;
  font-size: 64px; line-height: 1; letter-spacing: 0.01em; text-transform: uppercase; text-wrap: balance; text-shadow: 0 1px 12px rgba(0, 0, 0, 0.45);
}
.heading-own .mj-hero-word { font-family: var(--font-heading); font-size: 36px; line-height: 1.15; text-transform: none; }
@media (max-width: 719px) {
  .mj-hero { height: 180px; margin: 0 -12px 20px; }
  .mj-hero-word { left: 16px; right: 16px; font-size: 52px; }
  .heading-own .mj-hero-word { font-size: 30px; }
}
/* The low head of the Übersicht: 128 px, the greeting on one line (shrunk to fit by meine-jufa-ui.js), clear photo at the top, 62 % black from 40 % of the height down (DESIGN.md "Brand page header"). */
.mj-hero.is-low { height: 128px; margin-bottom: 16px; }
.mj-hero.is-low::after { background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0, rgba(0, 0, 0, 0.62) 40%, rgba(0, 0, 0, 0.62) 100%); }
.mj-hero.is-low .mj-hero-word { left: 16px; right: 16px; bottom: 14px; font-size: 48px; line-height: 1.05; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.heading-own .mj-hero.is-low .mj-hero-word { font-size: 34px; }
/* The section starts of a brand page: the website's green Amatic h2 over a card without a head. */
.mj-brand-h2 { margin: 28px 0 10px; }
@media (max-width: 599px) { .mj-brand-h2 { font-size: 36px; line-height: 42px; } }

/* ---------- Page head of an area ---------- */
.mj-head { margin: 0 0 16px; }
/* The page head of an area: a Gantari title (an h1 that only repeats the tab name is not hand-lettered; DESIGN.md "Brand Moments Only"). */
.mj-head h1 {
  margin: 0; font-family: var(--font-text); font-size: 24px; line-height: 32px; font-weight: 700; letter-spacing: normal; text-transform: none; color: var(--jf-text-heading);
}
.mj-head p { margin: 4px 0 0; color: var(--jf-text); max-width: var(--mj-measure); }
/* A short info line (the info notice of the design system, with its own icon). */
.mj-note {
  display: flex; gap: 10px; align-items: flex-start; margin: 0 0 16px; padding: 10px 14px; border-radius: var(--jf-radius);
  background: var(--jf-surface-alt); color: var(--jf-text-strong); font-size: 0.9rem;
}
.mj-note svg { width: 18px; height: 18px; flex: none; margin-top: 2px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.mj-note p { margin: 0; flex: 1 1 auto; min-width: 0; }

/* After the sign-in link of a form page ("Weiter zur Ferienbetreuung", meine-jufa-continue.js). */
.mj-continue {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 0 0 var(--mj-gap); padding: 16px 20px; background: var(--jf-surface-raised);
  border: 1px solid var(--jf-border); border-radius: var(--jf-radius);
}
.mj-continue > svg { width: 32px; height: 32px; flex: none; fill: none; stroke: var(--jf-text-strong); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.mj-continue-text { flex: 1 1 14rem; min-width: 0; }
.mj-continue-text p { margin: 4px 0 0; color: var(--jf-text); }
.mj-continue .mj-btn { flex: 0 0 auto; }
@media (max-width: 599px) { .mj-continue .mj-btn { width: 100%; } }

/* Headings inside cards and dialogs: section-title (style.css h2). */
h2.mj-h2 { margin: 0; }
/* The person's name is the h1 of a person page: it looks like the card title, not like the page head. */
h1.mj-h2 { margin: 0; font-family: inherit; font-size: 20px; line-height: 28px; font-weight: 700; letter-spacing: normal; text-transform: none; color: var(--jf-text-heading); }
/* A heading that gets focus on a page change (tabindex -1) shows no ring: it is not a control. */
h1[tabindex="-1"]:focus { outline: none; }

/* ---------- Cards ---------- */
.mj-card {
  background: var(--jf-surface-raised); border: 1px solid var(--jf-border); border-radius: var(--jf-radius); margin: 0 0 var(--mj-gap);
 overflow: hidden;
}
/* A group of cards (meine-jufa-ui.js cardGroup): the header card with the photo and name, its topic cards below with a small gap; the next child starts further down. */
.mj-group { margin: 0 0 calc(var(--mj-gap) * 2); }
.mj-group > .mj-card { margin-bottom: 8px; }
.mj-group > .mj-card.is-head { background: var(--jf-surface-alt); }
.mj-group > .mj-card.is-head .mj-sub { color: var(--jf-text-strong); }
.mj-group > .mj-card.is-head .mj-card-head { border-bottom: 0; }
/* Group headings (h2): title style, sentence case, no uppercase label. */
.mj-group-label { font-family: var(--font-text); font-size: 18px; line-height: 26px; font-weight: 700; text-transform: none; letter-spacing: normal; color: var(--jf-text-heading); margin: 16px 4px 8px; }
.mj-topic .mj-section { border-top: 0; }
.mj-card-head { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--jf-border); flex-wrap: wrap; }
.mj-card-head .mj-sub { color: var(--jf-text); font-size: 0.9rem; flex-basis: 100%; margin-top: -8px; }
.mj-card-head .mj-chips { margin-left: auto; }
.mj-initial {
  width: 40px; height: 40px; border-radius: 50%; flex: none; display: inline-flex; align-items: center; justify-content: center;
  background: var(--jf-jufa-yellow); color: var(--jf-ink-strong); font-weight: 700; font-size: 0.9rem;
}
.mj-section { padding: 14px 20px; }
.mj-section + .mj-section { border-top: 1px solid var(--jf-border); }
.mj-section > h3, .mj-section > h2.mj-section-title { font-size: 14px; line-height: 20px; font-weight: 600; color: var(--jf-text-strong); margin: 0 0 6px; }
.mj-section > p { margin: 0 0 8px; max-width: var(--mj-measure); }
.mj-section.is-label { padding-bottom: 0; }
.mj-section.is-label + .mj-person { border-top: 0; padding-top: 8px; }
.mj-card-foot { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 20px; background: var(--jf-surface-alt); border-top: 1px solid var(--jf-border); }
.mj-card-foot .mj-btn.danger { margin-left: auto; }

/* Rows of a list: text left, status and action right; on a phone the action goes below. */
.mj-rows { list-style: none; margin: 0; padding: 0; }
.mj-row { display: flex; align-items: center; gap: 8px 16px; padding: 10px 0; border-bottom: 1px solid var(--jf-border); flex-wrap: wrap; }
.mj-row:last-child { border-bottom: 0; }
.mj-row-main { flex: 1 1 200px; min-width: 0; }
.mj-row-title { font-weight: 600; color: var(--jf-text-heading); overflow-wrap: anywhere; }
.mj-row-meta { display: block; color: var(--jf-text); font-size: 0.9rem; }
.mj-row-warn { color: var(--jf-orange-strong); font-weight: 600; }
.mj-row-end { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mj-row-end.has-switch { margin-left: auto; flex-wrap: nowrap; }
.mj-row-main .mj-row-state { margin-top: 4px; }
.mj-row-state { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; min-width: 0; }

/* Switch (design system "Switch"): a 52 x 44 button with a 40 x 24 track and a knob drawn by ::before and ::after. */
.mj-switch { position: relative; flex: none; width: 52px; height: var(--jf-touch-target); padding: 0; border: 0; background: none; border-radius: var(--jf-radius); cursor: pointer; }
.mj-switch::before {
  content: ""; position: absolute; left: 6px; top: 50%; width: 36px; height: 20px; margin-top: -12px; border-radius: var(--jf-radius-pill);
  background: var(--jf-surface-raised); border: 2px solid var(--jf-control-border); transition: background-color 150ms, border-color 150ms;
}
.mj-switch::after {
  content: ""; position: absolute; left: 12px; top: 50%; width: 12px; height: 12px; margin-top: -6px; border-radius: 50%;
  background: var(--jf-control-border); transition: transform 150ms, background-color 150ms;
}
.mj-switch[aria-checked="true"]::before { background: var(--jf-green-strong); border-color: var(--jf-green-strong); }
.mj-switch[aria-checked="true"]::after { background: var(--jf-on-green-strong); transform: translateX(16px) scale(1.3333); }
.mj-switch-check { position: absolute; left: 11px; top: 50%; width: 13px; height: 13px; margin-top: -6.5px; fill: none; stroke: var(--jf-on-green-strong); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; display: none; }
.mj-switch[aria-checked="true"] .mj-switch-check { display: block; }
.mj-switch:hover:not(:disabled)::before { border-color: var(--jf-text-strong); }
.mj-switch[aria-checked="true"]:hover:not(:disabled)::before { border-color: var(--jf-text-heading); }
/* A consent that can't be changed here: a lock and one line of reason instead of a switch that only looks off (DESIGN.md "Switch"). */
.mj-switch-locked { display: inline-flex; align-items: center; gap: 6px; min-height: var(--jf-touch-target); max-width: 14rem; color: var(--jf-text-strong); font-size: 0.85rem; line-height: 1.3; }
.mj-switch-locked svg { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.mj-switch:focus-visible { outline: 2px solid var(--jf-focus); outline-offset: 2px; }
/* Beats the forms' grey fill of button[disabled] (style.css): only the track shows the disabled state. */
.mj-switch:disabled, .mj-switch:disabled:hover { cursor: default; background: none; }
.mj-switch:disabled::before, .mj-switch[aria-checked="true"]:disabled::before { background: var(--jf-surface-alt); border-color: var(--jf-border); }
.mj-switch:disabled::after, .mj-switch[aria-checked="true"]:disabled::after { background: var(--jf-text-muted); }
@media (prefers-reduced-motion: reduce) { .mj-switch::before, .mj-switch::after { transition: none; } }
.mj-row.is-past { color: var(--jf-text); }
.mj-row.is-past .mj-row-title { font-weight: 500; color: var(--jf-text); }

/* Payment details: the QR code (always black on white, also in dark mode) next to the account; below it on a phone. */
.mj-pay { display: flex; gap: 16px 20px; align-items: flex-start; flex-wrap: wrap; }
.mj-pay-qr { width: 156px; height: 156px; flex: none; background: #fff; border-radius: var(--jf-radius); border: 1px solid var(--jf-border); }
.mj-pay-text { flex: 1 1 240px; min-width: 0; }
/* The child's one-time QR code for the app: big enough to scan from a screen, black on white also in dark mode, never wider than the card. */
.mj-invite { margin: 8px 0; }
.mj-invite-qr { display: block; width: 220px; max-width: 100%; height: auto; aspect-ratio: 1; background: #fff; padding: 8px; border-radius: var(--jf-radius); border: 1px solid var(--jf-border); }
/* "Auf dem Handy anmelden": the code centred and big enough for a phone camera across a desk, the run-down bar and clock under it. */
.mj-phone-slot { display: flex; justify-content: center; min-height: 8px; margin-bottom: 8px; }
.mj-phone-qr { width: 240px; }
.mj-phone-bar { height: 6px; border-radius: var(--jf-radius-pill); background: var(--jf-surface-alt); overflow: hidden; margin: 0 0 8px; }
.mj-phone-bar span { display: block; height: 100%; background: var(--jf-green-strong); }
.mj-dialog-body > .mj-phone-status { text-align: center; font-weight: 600; font-variant-numeric: tabular-nums; }
.mj-access-option h3 { margin: 0 0 8px; font-size: 18px; line-height: 26px; }
.mj-access-option .mj-chip { margin-left: 6px; vertical-align: middle; }
.mj-phone-dialog .mj-dialog-foot .mj-btn { min-width: var(--mj-btn-w); }
.mj-pay-facts { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 12px; margin: 0 0 8px; }
.mj-pay-facts dt { color: var(--jf-text); }
.mj-pay-facts dd { margin: 0; overflow-wrap: anywhere; user-select: all; }

/* Documents and the files of a family pass upload. */
.mj-doc-link { display: inline-flex; align-items: center; gap: 8px; min-height: var(--jf-touch-target); font-weight: 600; }
.mj-doc-link svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.mj-pass-files { margin: 0; padding-left: 20px; overflow-wrap: anywhere; }

/* Facts: what is stored, never the content. */
.mj-facts { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.mj-fact { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: var(--jf-radius-pill); border: 1px solid var(--jf-border); font-size: 0.9rem; background: var(--jf-surface-raised); }
.mj-fact svg { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.mj-fact.is-absent { color: var(--jf-text); background: var(--jf-surface-alt); }

/* Status chips. */
.mj-chips { display: flex; flex-wrap: wrap; gap: 6px; }
/* Status chips: label 14/20, pills. */
.mj-chip { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; line-height: 20px; font-weight: 600; padding: 2px 10px; border-radius: var(--jf-radius-pill); }
.mj-chip.ok { background: var(--jf-green-tint); color: var(--jf-text-heading); }
.mj-chip.warn { background: var(--jf-orange-tint); color: var(--jf-text-heading); }
.mj-chip.ok::before, .mj-chip.warn::before { content: ""; flex: none; width: 14px; height: 14px; background: var(--jf-green-strong); -webkit-mask: var(--jf-icon-check) center / contain no-repeat; mask: var(--jf-icon-check) center / contain no-repeat; }
.mj-chip.warn::before { background: var(--jf-orange-strong); -webkit-mask-image: var(--jf-icon-alert); mask-image: var(--jf-icon-alert); }
.mj-chip.info, .mj-chip.neutral, .mj-chip.accent { background: var(--jf-surface-alt); color: var(--jf-text-strong); }
/* "Neu" in the Post: the Jufa yellow (design-system token jufa-yellow) with ink text, so a new item stands out from the grey tags. */
.mj-entry .mj-chip.accent { background: #ffd500; color: var(--jf-ink-strong, #2d2d2d); }

/* People inside a membership. */
.mj-person { padding: 14px 20px; }
.mj-person + .mj-person { border-top: 1px solid var(--jf-border); }
.mj-person-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.mj-person-head strong { font-size: 1.05rem; }
.mj-person-head .mj-text-btn { margin-left: auto; }
.mj-person .mj-rows { margin-top: 6px; }
.mj-child-link { margin-top: 8px; }

/* ---------- Buttons: primary (filled), secondary (tonal: button-tonal fill, ink text, no visible border; 2026-11-18), danger (red tint), text; 44 px targets on every screen (touch laptops too) ---------- */
.mj-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: var(--jf-touch-target); padding: 8px 16px; border-radius: var(--jf-radius);
  font-weight: 600; font-size: 16px; line-height: 22px; width: auto; border: 1px solid transparent; background: var(--jf-button-tonal); color: var(--jf-text-heading);
}
.mj-btn:hover { background: var(--jf-button-tonal-hover); border-color: transparent; color: var(--jf-text-heading); }
a.mj-btn { text-decoration: none; }
/* style.css makes every button.primary full width and big (the forms' "Weiter"): not here. */
.mj-btn.primary { background: var(--jf-red); border-color: var(--jf-red); color: var(--jf-on-red); width: auto; font-size: 1rem; padding: 8px 16px; }
.mj-btn.primary:hover { background: var(--jf-red-hover); border-color: var(--jf-red-hover); color: var(--jf-on-red); }
/* The main button of a decision pair (Termine: "OK geben"): ink with the page colour as text, never red (a view keeps one red button at most). */
.mj-btn.ink { background: var(--jf-text-heading); border-color: var(--jf-text-heading); color: var(--jf-surface); }
.mj-btn.ink:hover { background: var(--jf-text-strong); border-color: var(--jf-text-strong); color: var(--jf-surface); }
/* What deletes or cancels (2026-11-19, user): the tonal button in the red tint with error-text, never a red link; it always asks first, and the dialog confirms
   with the one red primary button. Hover: a 1px error-text line (style.css button.danger, DESIGN.md "Buttons"). */
.mj-btn.danger { background: var(--jf-red-tint); border-color: transparent; color: var(--jf-error-text); }
.mj-btn.danger:hover { background: var(--jf-red-tint); border-color: var(--jf-error-text); color: var(--jf-error-text); }
.mj-btn:disabled, .mj-btn:disabled:hover { background: var(--jf-surface-alt); border-color: transparent; color: var(--jf-text-muted); cursor: default; }
.mj-btn.small { padding: 4px 12px; font-size: 0.9rem; }
.mj-btn.ghost { border-color: transparent; background: transparent; }
.mj-btn.ghost:hover { background: var(--jf-surface-alt); border-color: transparent; }
.mj-btn svg, .mj-text-btn svg { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
/* Quiet actions are ink links, never red: with a red brand colour the accent can't also mean "danger". */
.mj-text-btn {
  display: inline-flex; align-items: center; gap: 6px; min-height: var(--jf-touch-target); padding: 4px 8px; border: 0; background: none; border-radius: var(--jf-radius);
  color: var(--jf-text-heading); font-weight: 600; text-decoration: underline; text-decoration-color: currentColor; text-underline-offset: 3px; text-decoration-thickness: 1px;
}
.mj-text-btn:hover { background: var(--jf-surface-alt); color: var(--jf-text-heading); }
a.mj-text-btn { color: var(--jf-text-heading); }

/* ---------- Buttons of the areas: one height; on a phone as wide as the card, otherwise one width in a row of actions ---------- */
:root { --mj-btn-w: 14.5rem; }
.mj-main .mj-btn { min-height: var(--jf-touch-target); padding: 8px 16px; font-size: 16px; }
.mj-main .mj-row-end .mj-btn { min-width: var(--mj-btn-w); }
/* Buttons of a card (card foot, inline form, single button of a section) share one width, wide enough for the longest label. */
:root { --mj-card-btn-w: 20rem; }
.mj-main .mj-card-foot .mj-btn, .mj-main .mj-inline-form .mj-btn, .mj-main .mj-section > .mj-btn { min-width: var(--mj-card-btn-w); }
@media (max-width: 599px) {
  .mj-main .mj-row-end .mj-btn, .mj-main .mj-inline-form .mj-btn, .mj-main .mj-section > .mj-btn, .mj-main .mj-action-tile .mj-btn { width: 100%; }
  .mj-main .mj-card-foot .mj-btn, .mj-main .mj-inline-form .mj-btn, .mj-main .mj-section > .mj-btn { min-width: 0; }
}

/* ---------- A booked week (holiday care): title + status, dates + amount, actions ---------- */
.mj-row.mj-week { display: block; padding: 10px 0 12px; }
.mj-week-head { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 10px; }
.mj-week-head .mj-row-title { flex: 0 1 auto; min-width: 0; }
/* The status takes the rest of the line, right-aligned; its text may use two lines, and it drops below a long title. */
.mj-week-head .mj-chips { flex: 1 1 auto; justify-content: flex-end; min-width: 0; }
.mj-week-head .mj-chip { max-width: 100%; white-space: nowrap; }
.mj-week-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0 12px; }
.mj-week > .mj-row-meta, .mj-week-meta .mj-row-meta { margin-top: 1px; }
.mj-week-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.mj-main .mj-week-actions .mj-btn { flex: 0 0 var(--mj-btn-w); }
@media (max-width: 599px) {
  .mj-week-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mj-main .mj-week-actions .mj-btn { width: auto; min-width: 0; padding: 6px 6px; font-size: 0.9rem; line-height: 1.2; text-align: center; }
  .mj-week-actions .mj-btn svg { display: none; }
  .mj-week-actions .mj-btn:only-child { grid-column: 1 / -1; }
  .mj-week-head .mj-chip { font-size: 0.72rem; padding: 2px 8px; }
}

/* ---------- Übersicht and Familie: tile groups, what needs you, people ---------- */
/* The cards flow in columns (as many as fit, each as high as its content, no holes under a short one). */
.mj-tile-group { margin: 0 0 var(--mj-gap); }
.mj-tile-group > .mj-group-label { margin-top: 8px; }
.mj-tiles { columns: 250px; column-gap: var(--mj-gap); }
.mj-tile { position: relative; display: block; background: var(--jf-surface-raised); border: 1px solid var(--jf-border); border-radius: var(--jf-radius); padding: 14px 16px; min-width: 0; margin: 0 0 var(--mj-gap); break-inside: avoid; -webkit-column-break-inside: avoid; }
.mj-tile:hover { background: var(--jf-surface-alt); }
.mj-tile-title { margin: 0 0 6px; font-size: inherit; }
/* The title is the button; its box covers the whole card, so the whole card is the tap target. */
.mj-tile-link { display: flex; align-items: center; gap: 10px; width: 100%; min-height: var(--jf-touch-target); padding: 0; border: 0; background: none; color: var(--jf-text-heading); font-weight: 700; font-size: 1.1rem; text-align: left; }
.mj-tile-link::after { content: ""; position: absolute; inset: 0; border-radius: var(--jf-radius); }
.mj-tile-link span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.mj-tile-link svg { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.mj-tile-link svg:first-child { color: var(--jf-text-strong); }
.mj-tile-link svg:last-child { width: 18px; height: 18px; color: var(--jf-text); }
.mj-lines { list-style: none; margin: 0; padding: 0; }
.mj-line { position: relative; padding: 2px 0 2px 24px; font-size: 0.95rem; color: var(--jf-text-strong); overflow-wrap: anywhere; }
.mj-line + .mj-line { margin-top: 4px; }
.mj-line::before { content: ""; position: absolute; left: 0; top: 5px; width: 16px; height: 16px; background: var(--jf-control-border); -webkit-mask: var(--jf-icon-info) center / contain no-repeat; mask: var(--jf-icon-info) center / contain no-repeat; }
.mj-line.ok::before { background: var(--jf-green-strong); -webkit-mask-image: var(--jf-icon-check); mask-image: var(--jf-icon-check); }
.mj-line.warn { color: var(--jf-text-heading); font-weight: 600; }
.mj-line.warn::before { background: var(--jf-orange-strong); -webkit-mask-image: var(--jf-icon-alert); mask-image: var(--jf-icon-alert); }
.mj-line.info::before { background: var(--jf-text-strong); }


/* Round avatars of the Übersicht (the family row 56 px, the first to-do 48 px, the rows 40 px): the photo, or initials on yellow, or the icon of an area. */
.mj-face { display: inline-flex; flex: none; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; overflow: hidden; }
.mj-face.is-48 { width: 48px; height: 48px; }
.mj-face.is-56 { width: 56px; height: 56px; }
.mj-face .mj-initial { width: 100%; height: 100%; font-size: 0.9rem; }
.mj-face.is-48 .mj-initial { font-size: 1rem; }
.mj-face.is-56 .mj-initial { font-size: 1.15rem; }
.mj-face img { width: 100%; height: 100%; object-fit: cover; }
.mj-face.is-area { background: var(--jf-surface-alt); color: var(--jf-text-strong); }
.mj-face.is-area svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.mj-face.is-add { border: 1.5px dashed var(--jf-control-border); color: var(--jf-text-strong); }
.mj-face.is-add svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }

/* The status of the opening hours under the photo: ink words, a green dot while open, a grey one otherwise. */
.mj-home-status:empty, .mj-home-slot:empty { display: none; }
.mj-opening { display: flex; align-items: center; gap: 10px; min-height: 28px; margin: 0 0 var(--mj-gap); color: var(--jf-text-heading); }
.mj-opening-dot { flex: none; width: 20px; height: 20px; border-radius: 50%; background: var(--jf-surface-alt); display: inline-flex; align-items: center; justify-content: center; }
.mj-opening-dot::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--jf-text-strong); }
.mj-opening[data-state="open"] .mj-opening-dot { background: var(--jf-green-tint); }
.mj-opening[data-state="open"] .mj-opening-dot::after { background: var(--jf-green-strong); }
.mj-opening-rest { color: var(--jf-text); font-size: 0.9rem; }

/* The family row: round faces, children first, four to a row on a phone; a bigger family wraps. Name and one detail, no status. */
.mj-family { margin: 0 0 var(--mj-gap); }
.mj-family-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 14px 4px; }
@media (min-width: 720px) { .mj-family-list { grid-template-columns: repeat(auto-fill, 112px); gap: 14px 8px; } }
.mj-family-person { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 100%; min-height: var(--jf-touch-target); padding: 4px 0; border: 0; background: none; border-radius: var(--jf-radius);
  color: inherit; font: inherit; text-align: center; text-decoration: none; cursor: pointer; }
.mj-family-person:hover { background: var(--jf-surface-alt); }
.mj-family-name { max-width: 100%; font-size: 15px; line-height: 20px; color: var(--jf-text-heading); overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mj-family-detail { font-size: 13px; line-height: 18px; color: var(--jf-text); overflow-wrap: break-word; hyphens: auto; }


/* ---------- The Übersicht (meine-jufa-home.js; mock-up docs/design-review/mockups/uebersicht.html) ---------- */
.mj-sec { margin: 28px 0 0; }
.mj-sec-head { display: flex; align-items: center; gap: 8px; min-height: var(--jf-touch-target); margin: 0 0 4px; }
.mj-sec-title { margin: 0; font-family: var(--font-text); font-size: 20px; line-height: 28px; font-weight: 700; color: var(--jf-text-heading); }
.mj-count {
  display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; min-width: 24px; height: 24px; padding: 0 8px; border-radius: var(--jf-radius-pill);
  background: var(--jf-surface-alt); color: var(--jf-text-strong); font-size: 14px; line-height: 20px; font-weight: 600;
}
.mj-sec-link {
  margin-left: auto; min-height: var(--jf-touch-target); padding: 0 4px; border: 0; background: none; border-radius: var(--jf-radius); color: var(--jf-link); font: inherit;
  font-size: 15px; font-weight: 600; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; cursor: pointer; white-space: nowrap;
}
.mj-sec-link:hover { color: var(--jf-link-hover); text-decoration-thickness: 2px; }

/* The first to-do: a card with the page's one red button. */
.mj-todo-first { border: 1px solid var(--jf-border); border-radius: var(--jf-radius); padding: 16px; background: var(--jf-surface-raised); }
.mj-todo-first-top { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 12px; align-items: start; }
.mj-todo-first h3 { margin: 0; font-size: 18px; line-height: 24px; font-weight: 700; color: var(--jf-text-heading); overflow-wrap: anywhere; }
.mj-todo-where { margin: 2px 0 0; font-size: 14px; line-height: 20px; color: var(--jf-text); overflow-wrap: anywhere; }
.mj-todo-first .mj-deadline { margin-top: 6px; }
.mj-main .mj-todo-go, .mj-main .mj-offer-card .mj-btn { display: flex; justify-content: center; width: 100%; min-height: 48px; margin-top: 16px; }

/* Rows of the Übersicht (to-dos, new items, dates, first steps): avatar or date, two lines, chevron; the whole row opens the place. */
.mj-todo-rows { list-style: none; margin: 0; padding: 0; }
.mj-todo-rows > li + li { border-top: 1px solid var(--jf-border); }
.mj-todo-first + .mj-todo-rows, .mj-offer-card + .mj-todo-rows { margin-top: 4px; }
.mj-todo-row {
  display: grid; grid-template-columns: 40px minmax(0, 1fr) 18px; gap: 12px; align-items: center; box-sizing: border-box; width: 100%; min-height: 64px; padding: 10px 4px;
  border: 0; border-radius: var(--jf-radius); background: none; color: inherit; font: inherit; text-align: left; text-decoration: none; cursor: pointer;
}
.mj-todo-row:hover { background: var(--jf-surface-alt); color: inherit; }
.mj-todo-row > svg { width: 18px; height: 18px; color: var(--jf-text-strong); fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.mj-todo-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mj-todo-title { font-size: 16px; line-height: 22px; font-weight: 700; color: var(--jf-text-heading); overflow-wrap: anywhere; }
.mj-todo-meta { font-size: 14px; line-height: 20px; color: var(--jf-text); overflow-wrap: anywhere; }
.mj-todo-row:hover .mj-todo-meta { color: var(--jf-text-strong); }
.mj-todo-main .mj-chips { margin-top: 4px; }
.mj-deadline { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; line-height: 20px; font-weight: 600; }
.mj-deadline svg { width: 14px; height: 14px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.mj-deadline.is-soon { color: var(--jf-orange-strong); }
.mj-deadline.is-late { color: var(--mj-error-text); }
/* The payment on a person's page: one line that opens the details. */
.mj-pay-fold > summary {
  display: flex; align-items: center; min-height: 48px; list-style: none; cursor: pointer; color: var(--jf-link); font-weight: 600;
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px;
}
.mj-pay-fold > summary::-webkit-details-marker { display: none; }
.mj-pay-fold > summary:hover { color: var(--jf-link-hover); text-decoration-thickness: 2px; }
.mj-pay-fold[open] > summary { margin-bottom: 8px; }
.mj-more-rows { border-top: 1px solid var(--jf-border); }
.mj-more-rows > summary {
  display: flex; align-items: center; min-height: 48px; list-style: none; cursor: pointer; color: var(--jf-link); font-weight: 600;
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px;
}
.mj-more-rows > summary::-webkit-details-marker { display: none; }
.mj-more-rows > summary:hover { color: var(--jf-link-hover); text-decoration-thickness: 2px; }
.mj-more-rows[open] > summary .is-closed, .mj-more-rows:not([open]) > summary .is-opened { display: none; }
.mj-more-rows > .mj-todo-rows { border-top: 1px solid var(--jf-border); }

/* Nothing to do: a calm green line; the open registration as a card with the red button. */
.mj-done { display: flex; align-items: center; gap: 12px; margin: 0; padding: 14px 16px; border-radius: var(--jf-radius); background: var(--jf-green-tint); color: var(--jf-text-heading); font-weight: 600; }
.mj-done svg { width: 24px; height: 24px; flex: none; color: var(--jf-green-strong); fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.mj-offer-card { margin: 12px 0 0; padding: 16px; border: 1px solid var(--jf-border); border-radius: var(--jf-radius); background: var(--jf-surface-raised); }
.mj-sec > .mj-offer-card:first-of-type { margin-top: 0; }
.mj-done + .mj-offer-card { margin-top: 12px; }
.mj-offer-card h3 { margin: 0 0 4px; font-size: 18px; line-height: 24px; font-weight: 700; color: var(--jf-text-heading); }
.mj-offer-card p { margin: 0; color: var(--jf-text); }

/* "Demnächst": the date first (weekday and day), that is how a date is recognised. */
.mj-date { width: 40px; text-align: center; line-height: 1; }
.mj-date small { display: block; font-size: 12px; line-height: 16px; font-weight: 600; color: var(--jf-text); }
.mj-date b, .mj-date strong { display: block; font-size: 20px; line-height: 24px; font-weight: 700; color: var(--jf-text-heading); }

/* "Direkt zu": places without a to-do as outline buttons, two per row. */
.mj-jump { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.mj-jump button, .mj-jump a {
  display: flex; align-items: center; gap: 10px; box-sizing: border-box; width: 100%; height: 100%; min-height: 52px; padding: 6px 12px; border: 1px solid var(--jf-control-border);
  border-radius: var(--jf-radius); background: none; color: var(--jf-text-heading); font: inherit; font-size: 15px; line-height: 20px; font-weight: 700; text-align: left;
  text-decoration: none; cursor: pointer;
}
.mj-jump button:hover, .mj-jump a:hover { background: var(--jf-surface-alt); color: var(--jf-text-heading); }
.mj-jump svg { width: 20px; height: 20px; flex: none; color: var(--jf-text-strong); fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.mj-jump span { min-width: 0; overflow-wrap: anywhere; }
.mj-jump small { display: block; font-size: 13px; line-height: 16px; font-weight: 500; color: var(--jf-text); }
.mj-jump-forms { grid-template-columns: minmax(0, 1fr); }

/* From 1,024 px: "Zu erledigen" and "Neu für Sie" left, "Demnächst" and "Direkt zu" right. */
@media (min-width: 1024px) {
  .mj-home-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 32px; align-items: start; }
}

/* Familie: a card per person. */
.mj-people { list-style: none; margin: 0 0 var(--mj-gap); padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: var(--mj-gap); }
.mj-person-card {
  display: flex; align-items: center; gap: 14px; width: 100%; min-height: 72px; padding: 12px 14px; text-align: left; color: var(--jf-text);
  background: var(--jf-surface-raised); border: 1px solid var(--jf-border); border-radius: var(--jf-radius);
}
.mj-person-card:hover { background: var(--jf-surface-alt); }
.mj-person-card-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.mj-person-card-name { color: var(--jf-text-heading); font-size: 1.05rem; overflow-wrap: anywhere; }
.mj-person-card > svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.mj-card-photo { display: inline-flex; width: 56px; height: 56px; flex: none; border-radius: 50%; overflow: hidden; }
.mj-card-photo .mj-initial { width: 56px; height: 56px; font-size: 1.1rem; }
.mj-card-photo-img { width: 56px; height: 56px; object-fit: cover; }

/* Termine and Post: filter chips and a list of entries. */
.mj-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 var(--mj-gap); }
.mj-filter { display: inline-flex; align-items: center; gap: 6px; min-height: var(--jf-touch-target); padding: 4px 14px; border-radius: var(--jf-radius-pill); border: 1px solid var(--jf-control-border); background: var(--jf-surface-raised); color: var(--jf-text-strong); font-weight: 600; }
.mj-filter:hover { background: var(--jf-surface-alt); }
.mj-filter[aria-pressed="true"] { background: var(--jf-text-heading); border-color: var(--jf-text-heading); color: var(--jf-surface); }
.mj-filter[aria-pressed="true"]::before, .mj-seg.is-selected::before {
  content: ""; display: inline-block; flex: none; width: 14px; height: 14px; background: currentColor; vertical-align: -2px; -webkit-mask: var(--jf-icon-check) center / contain no-repeat; mask: var(--jf-icon-check) center / contain no-repeat;
}
.mj-entries { list-style: none; margin: 0 0 var(--mj-gap); padding: 0; display: grid; gap: 8px; }
.mj-entry {
  display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 8px 12px; width: 100%; min-height: 56px; padding: 8px 14px; text-align: left; color: var(--jf-text);
  background: var(--jf-surface-raised); border: 1px solid var(--jf-border); border-radius: var(--jf-radius);
}
.mj-entry:hover { background: var(--jf-surface-alt); }
.mj-entry-main { min-width: 0; display: flex; flex-direction: column; }
.mj-entry > .mj-chips { justify-content: flex-end; }
.mj-entry > .mj-chips:empty { display: none; }
.mj-entry > svg { grid-column: 3; }
/* On a phone the chips go under the text and the arrow stays at the right edge, centred on the whole row. */
@media (max-width: 560px) {
  .mj-entry { grid-template-columns: minmax(0, 1fr) auto; }
  .mj-entry > .mj-chips { grid-column: 1; grid-row: 2; justify-content: flex-start; }
  .mj-entry > svg { grid-column: 2; grid-row: 1 / span 2; }
}

.mj-entry > svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* Termine der Jufa: the dates of the association below the personal agenda, a month heading and one card per date (the picture as a small thumbnail on the left). */
.mj-termine-section { margin-top: var(--mj-gap); }
.mj-termine-section > .mj-group-label, .mj-tile-group > .mj-group-label { margin-inline: 0; }
.mj-termine-body { display: grid; gap: var(--mj-gap); }
.mj-termine-month { display: grid; gap: 8px; }
.mj-month { margin: 0; font-size: 1.1rem; color: var(--jf-text-heading); }
.mj-termine { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.mj-termin { display: grid; gap: 0; padding: 0; overflow: hidden; background: var(--jf-surface-raised); border: 1px solid var(--jf-border); border-radius: var(--jf-radius); }
/* Styles of the Ankündigungen (meine-jufa-styles.js): the card or banner holds the colours of its style as custom properties, light (--sl-*) and dark (--sd-*), set from the
   API's `styles` list; the rules below pick the set of the theme. Bar and tint, a small first line with an icon and the label of the API: the label and icon carry the meaning, the
   colour supports it. A card or banner without a style has none of this. */
.mj-styled { --mj-bar: var(--sl-bar); --mj-tint: var(--sl-bg); --mj-text: var(--sl-text); --mj-ink: var(--sl-label); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .mj-styled { --mj-bar: var(--sd-bar); --mj-tint: var(--sd-bg); --mj-text: var(--sd-text); --mj-ink: var(--sd-label); }
}
:root[data-theme="dark"] .mj-styled { --mj-bar: var(--sd-bar); --mj-tint: var(--sd-bg); --mj-text: var(--sd-text); --mj-ink: var(--sd-label); }
.mj-termin.mj-styled { background: var(--mj-tint); color: var(--mj-text); }
.mj-termin.mj-styled .mj-termin-title, .mj-termin.mj-styled .mj-termin-when strong, .mj-termin.mj-styled .mj-row-meta { color: var(--mj-text); }
.mj-news-item.mj-styled { display: grid; gap: 4px; background: var(--mj-tint); color: var(--mj-text); padding: 8px 12px; border-bottom: 0; border-radius: var(--jf-radius); }
.mj-news-item.mj-styled .mj-news-item-title, .mj-news-item.mj-styled .mj-row-meta { color: var(--mj-text); }
.mj-banner-flag { display: inline-block; padding: 0 8px; border: 1px solid currentColor; border-radius: var(--jf-radius-pill); color: var(--jf-text-strong); font-size: 0.85rem; font-weight: 700; line-height: 1.4; overflow-wrap: anywhere; vertical-align: 1px; }
.mj-banner-countdown { font-weight: 600; }
/* The countdown on its own line: "Betriebsausflug" and "Noch 23 Stunden" never run together. */
.mj-banner-text > .mj-banner-countdown { display: block; margin: 2px 0 0; }
/* The label colour comes from the team's style; in the light theme it is taken one step darker so that it passes AA on its own tint. */
.mj-termin-flag { display: inline-flex; align-items: center; gap: 6px; justify-self: start; color: color-mix(in srgb, var(--mj-ink) 78%, #000); font-size: 0.9rem; font-weight: 700; overflow-wrap: anywhere; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .mj-termin-flag { color: var(--mj-ink); } }
:root[data-theme="dark"] .mj-termin-flag { color: var(--mj-ink); }
.mj-termin-flag svg { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.mj-termin-when strong { color: var(--jf-text-heading); font-weight: 700; }
.mj-termin-head { display: flex; gap: 12px; align-items: flex-start; min-width: 0; }
.mj-termin-info { display: grid; justify-items: start; gap: 2px; min-width: 0; flex: 1 1 auto; }
.mj-termin-thumb { flex: none; width: 72px; height: 72px; padding: 0; border: 0; border-radius: var(--jf-radius); overflow: hidden; background: var(--jf-surface-alt); cursor: zoom-in; }
.mj-termin-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.mj-termin-title { font-weight: 600; color: var(--jf-text-heading); overflow-wrap: anywhere; }
.mj-termin[data-cancelled="true"] .mj-termin-title { text-decoration: line-through; }
.mj-termin-text { margin: 2px 0 0; white-space: pre-line; max-width: var(--mj-measure); overflow-wrap: anywhere; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden; }
.mj-termin-text.is-open { display: block; overflow: visible; }
.mj-termin-detail .mj-chips, .mj-termin-detail .mj-btn { margin-top: 4px; }
.mj-termin-detail { display: grid; gap: 8px; margin: 0 0 12px; }
.mj-signup { display: grid; gap: 4px; }
.mj-answers { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 10px; }
.mj-answer-slot { display: block; }
/* On the card: who answered what in one line, and one button under it (the rows are in the dialog). */
.mj-answer { display: grid; gap: 8px; padding: 10px 12px; border: 1px solid var(--jf-border); border-radius: var(--jf-radius); background: var(--jf-surface-raised); }
.mj-answer-name { font-weight: 600; color: var(--jf-text-heading); overflow-wrap: anywhere; }
.mj-answer-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.mj-answer .mj-btn { margin-top: 0; }
/* One choice: one frame with an outline (control-border, at least 3:1) and equal segments, no colour; the chosen one in ink with a check (the selected state), a disabled one flat and grey. */
.mj-segmented { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.mj-seg {
  min-height: var(--jf-touch-target); padding: 6px 8px; border: 1px solid var(--jf-control-border); background: var(--jf-surface-raised); color: var(--jf-text-strong);
  font: inherit; font-size: 0.95rem; font-weight: 600; line-height: 1.2; text-align: center; cursor: pointer; overflow-wrap: anywhere;
}
.mj-seg + .mj-seg { margin-left: -1px; }
.mj-seg:first-child { border-radius: var(--jf-radius) 0 0 var(--jf-radius); }
.mj-seg:last-child { border-radius: 0 var(--jf-radius) var(--jf-radius) 0; }
.mj-seg:hover:not(:disabled):not(.is-selected) { background: var(--jf-surface-alt); }
.mj-seg.is-selected { display: inline-flex; align-items: center; justify-content: center; gap: 6px; background: var(--jf-text-heading); border-color: var(--jf-text-heading); color: var(--jf-surface); cursor: default; position: relative; }
.mj-seg:disabled { background: var(--jf-surface-alt); border-color: var(--jf-border); color: var(--jf-text-muted); cursor: not-allowed; }
.mj-seg.is-selected:disabled { background: var(--jf-text-heading); border-color: var(--jf-text-heading); color: var(--jf-surface); opacity: 0.55; }
.mj-seg:focus-visible { position: relative; z-index: 1; }
/* An answered row folds to one line on surface-alt: a green check, the answer in words and a quiet "Ändern". */
.mj-answer-fold { display: flex; align-items: center; gap: 8px; min-height: var(--jf-touch-target); padding: 0 4px 0 12px; border-radius: var(--jf-radius); background: var(--jf-surface-alt); }
.mj-answer-fold-text { flex: 1 1 auto; min-width: 0; display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--jf-text-heading); overflow-wrap: anywhere; }
.mj-answer-fold-text::before { content: ""; flex: none; width: 16px; height: 16px; background: var(--jf-green-strong); -webkit-mask: var(--jf-icon-check) center / contain no-repeat; mask: var(--jf-icon-check) center / contain no-repeat; }
.mj-answer-fold .mj-text-btn { flex: none; }
/* The parents' pair: ink main button and outlined quiet one, equal width, under the row. */
.mj-answer-decide .mj-btn:not(.ink) { color: var(--jf-text-heading); }
.mj-answer-decide { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.mj-answer-decide .mj-btn { width: 100%; min-width: 0; }
.mj-answer-decide .mj-btn:only-child { grid-column: 1 / -1; }

/* The picture of a Termin at full size. */
.mj-lightbox { width: 100%; height: 100%; max-width: 100vw; max-height: 100dvh; margin: 0; padding: 0; border: 0; background: transparent; overflow: auto; }
.mj-lightbox[open] { display: grid; place-items: center; }
.mj-lightbox::backdrop { background: rgba(0, 0, 0, 0.88); }
.mj-lightbox img { display: block; max-width: 100%; max-height: 100dvh; object-fit: contain; cursor: zoom-out; }
.mj-lightbox .dialog-x { background: color-mix(in srgb, var(--jf-surface-raised) 85%, transparent); box-shadow: var(--jf-shadow-raised); }
.mj-lightbox .dialog-x:hover { background: var(--jf-surface-alt); }

/* The account sheet: the pages behind the avatar. */
.mj-sheet-links { display: grid; border-top: 1px solid var(--jf-border); }
.mj-sheet-link { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 52px; padding: 8px 4px; border: 0; border-bottom: 1px solid var(--jf-border); border-radius: 0; background: var(--jf-surface-raised); color: var(--jf-text-strong); font-weight: 600; text-align: left; }
.mj-sheet-link:hover { background: var(--jf-surface-alt); }
.mj-sheet-link span { flex: 1; }
.mj-sheet-link svg { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.mj-sheet-link svg:last-child { width: 16px; height: 16px; }
/*
 * A row of action buttons at the top of a page (meine-jufa-ui.js actionRow: the forms opened prefilled, "Anmeldung hinzufügen"): the SAME column grid as the cards
 * below (.mj-tiles: columns of at least 250px with the page's gap), so every button is exactly one card column wide, left-aligned to the columns; more buttons
 * wrap onto the next row of the same grid, on a phone (one column) they are full width and stacked. `.is-single`: the cards below fill the whole width.
 */
.mj-actions { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); column-gap: var(--mj-gap); row-gap: 8px; margin: 0 0 var(--mj-gap); }
.mj-actions.is-single { grid-template-columns: minmax(0, 1fr); }
.mj-actions .mj-btn { width: 100%; min-width: 0; }


/* Datenschutz: two actions side by side with their explanation. */
.mj-actions-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 12px; margin-top: 12px; }
.mj-action-tile { border: 1px solid var(--jf-border); border-radius: var(--jf-radius); padding: 14px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.mj-action-tile p { margin: 0; color: var(--jf-text); font-size: 0.9rem; }
.mj-inline-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-end; margin-top: 8px; }
.mj-inline-form .field { flex: 0 1 280px; }

.mj-footer { text-align: center; color: var(--jf-text); font-size: 0.9rem; padding: 0 16px 32px; }
.mj-footer a { color: var(--jf-text); display: inline-flex; align-items: center; min-height: 44px; }

/* ---------- Dialogs: centred box; on a phone a sheet from the bottom with a fixed title and fixed buttons ---------- */
.mj-dialog {
  border: 0; border-radius: var(--jf-radius); padding: 0; width: min(480px, calc(100% - 32px)); max-width: none; max-height: min(88dvh, 760px);
  background: var(--jf-surface-raised); color: var(--jf-text); box-shadow: var(--jf-shadow-raised); overflow: hidden;
}
.mj-dialog[open] { display: flex; flex-direction: column; }
.mj-dialog::backdrop { background: var(--jf-scrim, rgba(0, 0, 0, 0.5)); }
.mj-dialog > form { display: flex; flex-direction: column; min-height: 0; flex: 1 1 auto; }
.mj-dialog-head { padding: 18px 56px 4px 20px; }
.mj-dialog-head .hint { margin: 4px 0 0; }
.mj-dialog-title { display: flex; align-items: center; gap: 12px; min-width: 0; }
.mj-dialog-title .mj-card-photo, .mj-dialog-title .mj-initial { width: 44px; height: 44px; flex: none; }
.mj-dialog-title .mj-card-photo-img { width: 44px; height: 44px; }
.mj-dialog-body { padding: 8px 20px 4px; overflow-y: auto; flex: 1 1 auto; min-height: 0; }
.mj-dialog-body > p { margin: 0 0 12px; }
.mj-dialog-body textarea { width: 100%; }
.mj-dialog-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 20px 16px; border-top: 1px solid transparent; }
.mj-pdf-dialog .mj-dialog-body { padding: 4px 12px; }
.mj-pdf-count { margin: 0 0 6px; }
.mj-dialog.is-wide { width: min(680px, calc(100% - 32px)); }
.mj-dialog.is-wide .mj-dialog-head { border-bottom: 1px solid var(--jf-border); padding-bottom: 12px; }
.mj-dialog.is-wide .mj-dialog-foot { border-top-color: var(--jf-border); background: var(--jf-surface-alt); }
.mj-group { border: 0; padding: 0; margin: 16px 0 8px; }
.mj-group legend { font-size: 16px; line-height: 24px; font-weight: 700; color: var(--jf-text-heading); margin-bottom: 8px; padding: 0; }
.mj-fields { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.mj-fields .field { grid-column: span 6; }
.mj-fields .field.half { grid-column: span 3; }
.mj-fields .field.zip { grid-column: span 2; }
.mj-fields .field.city { grid-column: span 4; }
.mj-fields input, .mj-fields textarea { width: 100%; }
.mj-field-label { font-weight: 600; display: block; }
.mj-locked { display: flex; gap: 6px; align-items: flex-start; font-size: 0.85rem; color: var(--jf-text); font-weight: 400; }
.mj-locked svg { width: 15px; height: 15px; flex: none; margin-top: 3px; fill: none; stroke: currentColor; stroke-width: 1.8; }

/* The offer to set up a passkey (meine-jufa-offer.js): a card in the page flow at the top of the main area. Never fixed, so it cannot cover what has the focus. */
.mj-offer {
  box-sizing: border-box; margin: 28px 0 16px; padding: 16px 18px; max-width: 640px;
  border-radius: var(--jf-radius); background: var(--jf-surface-raised); color: var(--jf-text); border: 1px solid var(--jf-border); box-shadow: var(--jf-shadow-raised);
}
.mj-offer-head { display: flex; align-items: center; gap: 10px; }
.mj-offer-head h2 { margin: 0; }
.mj-offer-head > svg { width: 26px; height: 26px; flex: none; color: var(--jf-text-heading); fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.mj-offer-text { margin-top: 8px; }
.mj-offer-text p { margin: 0 0 8px; font-size: 0.95rem; line-height: 1.4; }
.mj-offer-text .hint { color: var(--jf-text); font-size: 0.85rem; }
.mj-offer-note { padding: 8px 12px; border-radius: var(--jf-radius); background: var(--jf-surface-alt); border: 1px solid var(--jf-border); }
.mj-offer-note:focus, .mj-offer .hint:focus, .mj-offer-line details p:focus { outline: none; }
/* One line of text with "Weiterlesen" at its end; the rest opens in the soft box below (details.consent-more of style.css). */
.mj-offer-line { margin: 0 0 8px; font-size: 0.95rem; line-height: 1.4; }
.mj-offer-line > p { display: inline; margin: 0; }
.mj-offer-line details.consent-more { font-size: 0.95rem; }
.mj-offer-line details.consent-more::before { content: " "; }
.mj-offer-line details.consent-more > p { margin-top: 8px; font-size: 0.85rem; }
.mj-offer-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 6px; }
.mj-offer .mj-btn { min-height: 44px; }
@media (max-width: 599px) {
  .mj-offer { padding: 12px 14px; }
  .mj-offer-head > svg { width: 22px; height: 22px; }
  .mj-offer-head h2 { font-size: 18px; line-height: 24px; }
  .mj-offer-text { margin-top: 4px; }
  .mj-offer-text p { margin-bottom: 4px; }
  .mj-offer-actions { margin-top: 2px; }
  .mj-offer-actions .mj-btn { flex: 1 1 0; }
}

/* The account sheet of the phone. */
.mj-account-sheet .mj-dialog-body { display: flex; flex-direction: column; gap: 14px; padding-bottom: 12px; }
/* The sign-in QR code of the phone right in the sheet: compact, centred, one hint line under it. */
.mj-sheet-phone { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.mj-sheet-phone-title { margin: 0; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--jf-text); }
.mj-sheet-phone .mj-phone-slot { margin: 0; min-height: 0; }
.mj-sheet-phone .mj-phone-qr { width: 160px; }
.mj-sheet-phone .mj-phone-bar { width: 160px; margin: 0; }
.mj-sheet-phone .mj-phone-status { margin: 0; font-size: 0.9rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.mj-sheet-phone .hint { margin: 0; }
/* "In der App öffnen" next to "QR-Code zeigen" on a phone; under it the note when the app did not open (store links or "kommt bald"). */
.mj-sheet-phone-actions { display: grid; gap: 8px; }
.mj-open-app-note { margin-top: 8px; }
.mj-open-app-note p { margin: 0 0 6px; }
.mj-open-app-stores { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }

@media (max-width: 599px) {
  .mj-head h1 { font-size: 24px; line-height: 32px; }
  .mj-card-head, .mj-section, .mj-person, .mj-card-foot { padding-left: 14px; padding-right: 14px; }
  .mj-row-end { width: 100%; justify-content: space-between; }
  .mj-row-end.has-switch { margin: -4px 0 0; }
  .mj-row-state { flex-direction: column; align-items: flex-start; }
  .mj-row-state .mj-text-btn { padding-left: 0; }
  .mj-card-foot { flex-direction: column; align-items: stretch; }
  .mj-card-foot .mj-btn { width: 100%; }
  .mj-card-foot .mj-btn.danger { margin: 0; }
  .mj-fields .field.half { grid-column: span 6; }
  .mj-dialog, .mj-dialog.is-wide { width: 100%; max-width: 100%; margin: auto 0 0; border-radius: var(--jf-radius) var(--jf-radius) 0 0; max-height: 92dvh; }
  .mj-dialog.is-wide[open] { height: 92dvh; }
  .mj-dialog-foot { flex-direction: column-reverse; padding-bottom: max(16px, env(safe-area-inset-bottom)); }
  .mj-dialog-foot .mj-btn { width: 100%; min-height: var(--jf-control-height-lg); }
  .mj-inline-form .field, .mj-inline-form .mj-btn { flex: 1 1 100%; }
}

/* ---------- Stored data (meine-jufa-data.js): the details, then the spoiler fields ---------- */
.mj-detail-groups { display: grid; gap: 12px; margin-bottom: 12px; }
.mj-detail-group .mj-detail-title { margin: 0 0 4px; font-size: 0.95rem; line-height: inherit; font-weight: 700; color: inherit; }
.mj-details { display: grid; grid-template-columns: minmax(7rem, max-content) minmax(0, 1fr); gap: 2px 14px; margin: 0; }
.mj-details dt { color: var(--jf-text); font-size: 0.9rem; }
.mj-details dd { margin: 0; overflow-wrap: anywhere; }
.mj-details dd.is-empty { color: var(--jf-text); }
@media (max-width: 479px) {
  .mj-details { grid-template-columns: minmax(0, 1fr); }
  .mj-details dd { margin-bottom: 6px; }
}

/* A spoiler field: the box has its size before and after it is opened, so nothing moves. The cover is a button (tap, Enter, Space). */
.mj-spoilers { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px 16px; align-items: start; }
@media (max-width: 479px) { .mj-spoilers { grid-template-columns: minmax(0, 1fr); } }
.mj-spoiler-label { display: flex; align-items: center; gap: 6px; font-size: 0.9rem; color: var(--jf-text); margin-bottom: 4px; }
.mj-spoiler-label svg, .mj-spoiler-cover svg { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.mj-spoiler-box { position: relative; height: 96px; border-radius: var(--jf-radius); border: 1px solid var(--jf-border); background: var(--jf-surface-raised); overflow: hidden; }
.mj-spoiler-box.is-field { height: 120px; }
.mj-spoiler-content { position: absolute; inset: 0; overflow: auto; padding: 8px 12px; }
.mj-spoiler-content:focus { outline: none; }
.mj-spoiler-content:focus-visible { outline: 2px solid var(--jf-focus); outline-offset: -2px; }
.mj-spoiler-content p { margin: 0; white-space: pre-line; }
.mj-spoiler-content p.is-empty { color: var(--jf-text); }
.mj-spoiler-cover {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; width: 100%; padding: 8px;
  border: 0; border-radius: 0; background: var(--jf-surface-alt);
  color: var(--jf-text-strong); font: inherit; text-align: center; cursor: pointer;
}
.mj-spoiler-cover:hover { background: var(--jf-button-tonal); }
.mj-spoiler-cover strong { font-size: 0.9rem; }
.mj-spoiler-cover .mj-spoiler-state { font-size: 0.85rem; color: var(--jf-link); font-weight: 600; }
.mj-spoiler-cover .mj-spoiler-state.is-absent { color: var(--jf-text); font-weight: 400; }
.mj-spoiler-cover:focus-visible { outline: 2px solid var(--jf-focus); outline-offset: -3px; }
.mj-spoiler-cover:disabled { cursor: progress; }
.mj-spoiler-box.is-field textarea { position: absolute; inset: 0; width: 100%; height: 100%; resize: none; box-sizing: border-box; }
/*
 * The photo opens a person's block (identify first) and shows at once, like the desktop's photo control: three round buttons lie on the photo (44 px each) –
 * delete top right, zoom bottom left, change bottom right. Photos have square corners (design system). Without a photo an empty tile with "Foto hinzufügen".
 */
.mj-photo-avatar { flex: none; width: 128px; }
.mj-photo-frame { position: relative; width: 128px; height: 128px; overflow: hidden; border: 1px solid var(--jf-border); background: var(--jf-surface-alt); }
.mj-photo-frame.is-empty { border-style: dashed; border-color: var(--jf-control-border); display: flex; align-items: center; justify-content: center; }
.mj-photo-frame svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.mj-photo-placeholder { position: absolute; inset: 0; margin: auto; width: 40px; height: 40px; color: var(--jf-text); }
.mj-photo-frame.is-empty .mj-photo-placeholder { position: static; margin: 0 0 4px; }
.mj-photo-none { position: absolute; inset: auto 0 10px 0; text-align: center; font-size: 0.85rem; color: var(--jf-text); }
.mj-photo-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.mj-photo-add {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; width: 100%; padding: 8px;
  border: 0; background: none; color: var(--jf-text-heading); font: inherit; font-size: 0.9rem; font-weight: 600; text-align: center; cursor: pointer;
}
.mj-photo-add svg { width: 28px; height: 28px; }
.mj-photo-add:hover { background: var(--jf-surface-alt); }
.mj-photo-add:focus-visible { outline: 2px solid var(--jf-focus); outline-offset: -4px; }
.mj-photo-btn {
  position: absolute; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; min-height: 44px; padding: 0; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.6); background: rgba(20, 20, 20, 0.62); color: #ffffff; cursor: pointer;
}
.mj-photo-btn svg { width: 22px; height: 22px; }
.mj-photo-btn:hover { background: rgba(0, 0, 0, 0.82); }
.mj-photo-btn:focus-visible { outline: 2px solid var(--jf-focus); outline-offset: 1px; box-shadow: 0 0 0 4px #ffffff; }
.mj-photo-btn:disabled { opacity: 0.5; cursor: default; }
.mj-photo-btn.is-delete { top: 4px; right: 4px; }
.mj-photo-btn.is-delete:hover, .mj-photo-btn.is-delete:focus-visible { background: var(--jf-red-hover); color: var(--jf-on-red); }
.mj-photo-btn.is-zoom { bottom: 4px; left: 4px; }
.mj-photo-btn.is-change { bottom: 4px; right: 4px; }
.mj-photo-view { min-width: 120px; min-height: 120px; max-width: min(92vw, 720px); max-height: 92vh; padding: 12px; border: 0; border-radius: var(--jf-radius); background: var(--jf-surface-raised); color: var(--jf-text); text-align: center; }
.mj-photo-view::backdrop { background: var(--jf-scrim, rgba(0, 0, 0, 0.6)); }
.mj-photo-view[open] { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.mj-photo-view .dialog-x { background: color-mix(in srgb, var(--jf-surface-raised) 85%, transparent); box-shadow: var(--jf-shadow-raised); }
.mj-photo-view .dialog-x:hover { background: var(--jf-surface-alt); }
.mj-photo-view img { display: block; max-width: 100%; max-height: calc(92vh - 24px); object-fit: contain; }

/* The consent ticks of "Angaben ändern" and the photo, and the photo's preview. */
.mj-consent { display: flex; gap: 10px; align-items: flex-start; margin-top: 8px; font-size: 0.9rem; font-weight: 400; }
.mj-consent input { margin-top: 3px; flex: none; width: 20px; height: 20px; }
.mj-photo-preview { display: block; width: 160px; height: 160px; object-fit: cover; border-radius: 0; border: 1px solid var(--jf-border); margin: 8px 0; }

/* "Kind hinzufügen" / "Partner/in hinzufügen" (meine-jufa-people.js): the photo first, then the names; the photo question folds the channels. */
.mj-add-photo { margin-bottom: 12px; }
.mj-add-photo > .consent-row { margin-top: 8px; font-size: 0.9rem; font-weight: 400; }
.mj-gate-block { margin-top: 8px; }
.mj-dialog .photo-gate { margin: 0; padding: 0; border: 0; }
.mj-dialog .photo-gate > legend { padding: 0; font-weight: 600; }
/* An error told inside an open dialog (meine-jufa.js message()), above the buttons, which stay in view. */
.mj-dialog-alert { margin: 0 20px 4px; }
/* A part that is saved stays locked but reads as done, not as gone: the text keeps its colour (no dimming), "Gespeichert" carries a green check. */
.mj-saved { margin: 4px 0 0; color: var(--jf-green-strong); font-weight: 600; }
.mj-saved::before { content: "\2713\00a0"; }
.is-saved .choice:has(input:disabled) { opacity: 1; cursor: default; }
.is-saved textarea:disabled, .is-saved input:disabled { opacity: 1; color: var(--jf-text-strong); -webkit-text-fill-color: var(--jf-text-strong); cursor: default; }
.is-saved .photo-tile:disabled { opacity: 1; cursor: default; }
.is-saved .segments > label.choice:has(input:disabled) { background: var(--jf-surface-raised); border-color: var(--jf-control-border); color: var(--jf-text-strong); cursor: default; }
.is-saved .segments > label.choice:has(input:disabled:checked) { background: var(--jf-text-heading); border-color: var(--jf-text-heading); color: var(--jf-surface); }

/* ---------- Main membership hand-over (meine-jufa-transfer.js) and rights inside a membership ---------- */
.mj-transfer {
  display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; padding: 12px 14px; border-radius: var(--jf-radius);
  background: var(--jf-surface-alt); border: 1px solid var(--jf-border); color: var(--jf-text-strong);
}
.mj-transfer.is-action { background: var(--jf-orange-tint); border-color: transparent; color: var(--jf-text-heading); }
.mj-transfer > svg { width: 22px; height: 22px; flex: none; color: var(--jf-text-strong); fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.mj-transfer.is-action > svg { color: var(--jf-orange-strong); }
.mj-transfer-text { flex: 1 1 240px; min-width: 0; }
.mj-transfer-text p { margin: 0; overflow-wrap: anywhere; }
.mj-transfer-text p + p { margin-top: 2px; color: var(--jf-text-strong); font-size: 0.9rem; }
.mj-transfer-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.mj-group-label { scroll-margin-top: 16px; }
.mj-change-part + .mj-change-part { margin-top: 16px; }
.mj-change-part-title { margin: 0 0 8px; font-size: 18px; line-height: 26px; font-weight: 700; color: var(--jf-text-heading); }
.mj-person-foot { margin-top: 8px; }
.mj-person-foot .mj-row-meta { margin: 0; }
.mj-person-foot .mj-text-btn { margin-left: -8px; }
.mj-note.mj-readonly { margin-bottom: 10px; }
@media (max-width: 599px) {
  .mj-transfer-actions, .mj-transfer-actions .mj-btn { width: 100%; }
}

/* Choices in dialogs (radio buttons and ticks): the whole line is the target, at least 44 px high. */
.mj-choices { border: 0; padding: 0; margin: 0 0 8px; }
.mj-choices legend { font-weight: 600; padding: 0; margin-bottom: 2px; }
.mj-choice { display: flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 400; cursor: pointer; }
.mj-choice input { flex: none; width: 20px; height: 20px; margin: 0; }
.mj-dialog-body .hint { margin: 0 0 12px; }
.mj-transfer-bank { margin-top: 4px; }
.mj-transfer-bank .field { margin-bottom: 12px; }
.mj-transfer-bank input[type=text] { width: 100%; }
.mj-mini-title { font-size: 14px; line-height: 20px; font-weight: 600; color: var(--jf-text-strong); margin: 4px 0 6px; }
.mj-mandate { margin: 0 0 4px; white-space: pre-line; font-size: 0.9rem; color: var(--jf-text); overflow-wrap: anywhere; }

/* ---------- Adding people (meine-jufa-people.js): the note at a partner who has not confirmed their address ---------- */
.mj-note.mj-pending { flex-wrap: wrap; align-items: center; margin-bottom: 10px; }
.mj-note.mj-pending > span { flex: 1 1 220px; min-width: 0; }
@media (max-width: 599px) {
  .mj-note.mj-pending .mj-btn { width: 100%; }
}

/* ---------- Absence dialog: one tile per day of the week, in one row ---------- */
.mj-absence-days { border: 0; padding: 0; margin: 0 0 12px; min-width: 0; }
.mj-absence-days legend { font-weight: 600; padding: 0; margin-bottom: 6px; }
.mj-day-tools { margin-bottom: 8px; }
.mj-day-tools .mj-btn[aria-pressed="true"] { background: var(--jf-text-heading); border-color: var(--jf-text-heading); color: var(--jf-surface); }
.mj-day-grid { display: grid; grid-template-columns: repeat(var(--mj-days, 5), minmax(0, 1fr)); gap: 6px; }
.mj-day { position: relative; display: block; cursor: pointer; margin: 0; }
/* The real checkbox lies invisibly over the tile: a tap, the keyboard and screen readers work as for any checkbox. */
.mj-day input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.mj-day-box {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; min-height: 76px; padding: 6px 2px;
  border: 1px solid var(--jf-control-border); border-radius: var(--jf-radius); background: var(--jf-surface-raised); color: var(--jf-text); text-align: center; line-height: 1.2;
}
.mj-day-name { font-weight: 700; font-size: 1rem; }
.mj-day-date { font-size: 0.85rem; font-variant-numeric: tabular-nums; }
.mj-day-mark { display: flex; align-items: center; justify-content: center; height: 16px; font-size: 0.7rem; font-weight: 700; color: var(--jf-text); }
.mj-day-check { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; display: none; }
/* Chosen: ink with the check (the selected state). */
.mj-day input:checked + .mj-day-box { background: var(--jf-text-heading); border-color: var(--jf-text-heading); color: var(--jf-surface); }
.mj-day input:checked + .mj-day-box .mj-day-mark { color: var(--jf-surface); }
.mj-day input:checked + .mj-day-box .mj-day-check { display: block; }
.mj-day input:checked + .mj-day-box .mj-day-today { display: none; }
.mj-day input:focus-visible + .mj-day-box { outline: 2px solid var(--jf-focus); outline-offset: 2px; }
.mj-day input:disabled { cursor: not-allowed; }
.mj-day input:disabled + .mj-day-box { opacity: 0.45; background: var(--jf-surface-alt); }
@media (max-width: 359px) {
  .mj-day-grid { gap: 4px; }
  .mj-day-box { min-height: 68px; padding: 4px 1px; }
  .mj-day-name { font-size: 0.9rem; }
  .mj-day-date { font-size: 0.75rem; }
}

/* A week in a card of its own: the card gives the space, the row keeps its layout. */
.mj-topic > .mj-section > .mj-rows > .mj-row.mj-week { padding: 2px 0 4px; }

/* "Erteilen": the wording as shown, the tick; the two buttons of the foot are equally wide. */
.mj-consent-text { margin: 0 0 4px; line-height: 1.5; }
.mj-grant-dialog .hint { margin: 10px 0 0; }
@media (min-width: 600px) { .mj-grant-dialog .mj-dialog-foot .mj-btn { flex: 1 1 0; min-width: 0; } }

/* The toast (meine-jufa-ui.js toast()): design system "Toast": dark surface, white text, action in yellow capitals, bottom centre. */
.mj-toast {
  position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 30; box-sizing: border-box; width: max-content; max-width: min(520px, calc(100% - 32px));
  display: flex; align-items: center; gap: 16px; padding: 12px 16px; background: var(--jf-menu-dark); color: #fff; border-radius: var(--jf-radius);
  box-shadow: var(--jf-shadow-raised); font-size: 0.95rem; line-height: 1.4; opacity: 0; transform: translate(-50%, calc(100% + 24px));
  transition: transform 180ms ease-in, opacity 180ms ease-in;
}
.mj-toast.is-shown { opacity: 1; transform: translate(-50%, 0); transition: transform 220ms ease-out, opacity 220ms ease-out; }
.mj-toast[hidden] { display: none; }
@media (prefers-reduced-motion: reduce) { .mj-toast, .mj-toast.is-shown { transform: translate(-50%, 0); } }

/* The toast has one line per item. */
.mj-toast-line { display: block; }
.mj-toast-line + .mj-toast-line { margin-top: 4px; }

/* ---------- Newsletter: the issues (meine-jufa-newsletter.js) ---------- */
.mj-nl-latest { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding-bottom: 12px; border-bottom: 1px solid var(--jf-border); }
.mj-nl-latest + .mj-rows { margin-top: 4px; }
.mj-nl-title { margin: 0; font-size: 1.25rem; color: var(--jf-text-heading); overflow-wrap: anywhere; }
.mj-nl-preview { margin: 0; }
.mj-nl-line { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mj-nl-dialog .mj-dialog-body { padding: 0; }
.mj-nl-dialog .mj-dialog-body > .hint { padding: 12px 20px; margin: 0; }
.mj-nl-frame { display: block; width: 100%; min-height: 300px; border: 0; background: #ffffff; }
.mj-nl-dialog .mj-dialog-foot .mj-btn.ghost { margin-right: auto; }

/* The News tab: today's status, announcements, Instagram posts. */
.mj-news-today { padding: 18px 20px; }
.mj-news-today .mj-news-big::before {
  content: ""; display: inline-block; width: 12px; height: 12px; margin-right: 10px; border-radius: 50%; vertical-align: 3px;
  background: var(--jf-green-strong); box-shadow: 0 0 0 4px var(--jf-green-tint);
}
.mj-news-today.is-closed .mj-news-big::before { background: var(--jf-orange-strong); box-shadow: 0 0 0 4px var(--jf-orange-tint); }
.mj-news-big { margin: 0; font-size: 1.5rem; font-weight: 700; color: var(--jf-text-heading); overflow-wrap: anywhere; }
.mj-news-reason { margin: 4px 0 0; color: var(--jf-text); overflow-wrap: anywhere; }
.mj-news-hours { color: var(--jf-text-strong); font-weight: 600; text-align: right; }
.mj-news-items, .mj-news-posts { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.mj-news-item { padding-bottom: 14px; border-bottom: 1px solid var(--jf-border); }
.mj-news-item:last-child, .mj-news-post:last-child { padding-bottom: 0; border-bottom: 0; }
.mj-news-item-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.mj-news-item-title { margin: 0; font-size: 1.1rem; color: var(--jf-text-heading); overflow-wrap: anywhere; }
.mj-news-text { margin: 6px 0 0; white-space: pre-line; max-width: var(--mj-measure); overflow-wrap: anywhere; }
.mj-news-post { display: grid; gap: 6px; padding-bottom: 14px; border-bottom: 1px solid var(--jf-border); }
.mj-news-pics { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; border-radius: var(--jf-radius); }
/* The pictures keep their own shape, side by side at one height like in the app (at most 300 px), never cropped. */
.mj-news-pic { flex: 0 0 auto; max-width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; scroll-snap-align: start; border-radius: var(--jf-radius); }
.mj-news-pics img, .mj-news-pics video { display: block; height: 300px; width: auto; max-width: 100%; object-fit: contain; border-radius: var(--jf-radius); background: var(--jf-surface-alt); }
.mj-news-pics video { flex: 0 0 auto; scroll-snap-align: start; background: #000; }
.mj-news-viewer { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; display: none; place-items: center; }
.mj-news-viewer[open] { display: grid; }
.mj-news-viewer::backdrop { background: rgba(0, 0, 0, 0.85); }
.mj-news-viewer img { max-width: 100vw; max-height: 100vh; object-fit: contain; }
.mj-news-viewer > .dialog-x { position: fixed; top: 12px; right: 12px; background: rgba(0, 0, 0, 0.6); color: #fff; border-radius: 50%; }
.mj-news-viewer > .dialog-x:hover { background: rgba(0, 0, 0, 0.8); color: #fff; }
.mj-news-caption { margin: 0; max-width: var(--mj-measure); overflow-wrap: anywhere; }
/* A cut caption: the paragraph stays text; only the cue after it is the button (link ink, chevron like "Weiterlesen", 44px target); open keeps the line breaks. */
.mj-news-caption.is-open { white-space: pre-line; }
.mj-news-caption-toggle, .mj-news-caption-toggle:hover, .mj-news-caption-toggle:active {
  display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding: 0 2px; border: 0; border-radius: var(--jf-radius); background: none;
  color: var(--jf-link); font: inherit; font-weight: 600; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; cursor: pointer;
}
.mj-news-caption-toggle:hover { color: var(--jf-link-hover); text-decoration-thickness: 2px; }
.mj-news-caption-toggle::after {
  content: ""; width: 14px; height: 14px; background: currentColor; transform: rotate(90deg); transition: transform 0.15s;
  -webkit-mask: url("icons/chevron.svg") center / contain no-repeat; mask: url("icons/chevron.svg") center / contain no-repeat;
}
.mj-news-caption-toggle[aria-expanded="true"]::after { transform: rotate(-90deg); }
@media (prefers-reduced-motion: reduce) { .mj-news-caption-toggle::after { transition: none; } }

/* ---------- News: the buttons under the Instagram posts in one row, one height, top-aligned; stacked full width on a phone ---------- */
.mj-news-actions { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 8px 12px; margin-top: 14px; }
.mj-news-actions > [hidden] { display: none; }
.mj-main .mj-news-actions .mj-btn { min-width: var(--mj-card-btn-w); width: auto; }
@media (max-width: 599px) {
  .mj-news-actions { flex-direction: column; align-items: stretch; }
  .mj-main .mj-news-actions .mj-btn { width: 100%; min-width: 0; }
}

/* ---------- Sign-in: the error at the e-mail field (error text token, with a fallback until the token exists) ---------- */
.myJufa { --mj-error-text: var(--jf-error-text, #a32a14); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .myJufa { --mj-error-text: var(--jf-error-text, #ff9a82); } }
:root[data-theme="dark"] .myJufa { --mj-error-text: var(--jf-error-text, #ff9a82); }
.mj-ask-error { display: flex; align-items: flex-start; gap: 8px; margin: 6px 0 0; padding: 8px 12px; border-radius: var(--jf-radius); background: var(--jf-red-tint); color: var(--mj-error-text); font-size: 0.95rem; font-weight: 600; }
.mj-ask-error[hidden] { display: none; }
.mj-ask-error svg { flex: none; width: 20px; height: 20px; margin-top: 1px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
#ask-email[aria-invalid="true"] { border-color: var(--mj-error-text) !important; }
/* Sign-in text lines stay readable. */
#ask p, #sent p { max-width: 65ch; }

/* ---------- Termine as compact rows: the day tile, title, time and place, one state per person; a tap opens the dialog of the date ---------- */
.mj-termin > .mj-termin-flag { padding: 8px 14px 0; }
.mj-termin-open {
  display: grid; grid-template-columns: 40px minmax(0, 1fr) 18px; gap: 12px; align-items: center; box-sizing: border-box; width: 100%; min-height: 56px; padding: 8px 14px;
  border: 0; border-radius: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer;
}
.mj-termin-open.is-static { grid-template-columns: 40px minmax(0, 1fr); cursor: default; }
.mj-termin-open:not(.is-static):hover { background: var(--jf-surface-alt); }
.mj-termin-open:focus-visible { outline: 2px solid var(--jf-focus); outline-offset: -2px; }
.mj-termin-open > svg { width: 18px; height: 18px; color: var(--jf-text-strong); fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.mj-termin-main { display: flex; flex-direction: column; gap: 0; min-width: 0; }
.mj-termin-main > .mj-termin-title, .mj-termin-main > .mj-termin-when { line-height: 22px; }
.mj-termin-status { font-size: 14px; line-height: 18px; color: var(--jf-text-strong); overflow-wrap: anywhere; }
.mj-termin-status .is-warn { display: inline-block; color: var(--jf-text-heading); font-weight: 600; }
.mj-termin-status .is-warn::before { content: ""; display: inline-block; width: 14px; height: 14px; margin-right: 4px; vertical-align: -2px; background: var(--jf-orange-strong); -webkit-mask: var(--jf-icon-alert) center / contain no-repeat; mask: var(--jf-icon-alert) center / contain no-repeat; }
.mj-termin.mj-styled .mj-termin-status, .mj-termin.mj-styled .mj-termin-status .is-warn { color: var(--mj-text); }
.mj-termin.mj-styled .mj-date small, .mj-termin.mj-styled .mj-date strong { color: var(--mj-text); }
.mj-termin-decide { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 14px 6px 66px; }
.mj-termin:has(> .mj-termin-decide) > .mj-termin-open { padding-bottom: 2px; }
.mj-termin-decide .mj-btn { margin: 0; }
.mj-termine-month > .mj-fold { margin: 0; }

/* ---------- Folded parts (meine-jufa-fold.js): the person page and the past weeks and dates ---------- */
.mj-folds { display: grid; gap: 8px; margin: 0 0 var(--mj-gap); }
.mj-fold { background: var(--jf-surface-raised); border: 1px solid var(--jf-border); border-radius: var(--jf-radius); overflow: hidden; }
.mj-fold-head { margin: 0; font: inherit; }
.mj-fold-line {
  display: flex; align-items: center; gap: 12px; box-sizing: border-box; width: 100%; min-height: var(--jf-touch-target); padding: 12px 16px; border: 0; border-radius: 0;
  background: none; color: var(--jf-text-strong); font: inherit; font-size: 16px; line-height: 24px; font-weight: 400; text-align: left; cursor: pointer;
}
.mj-fold-line:hover { background: var(--jf-surface-alt); }
.mj-fold-line:hover .fold-change { text-decoration-thickness: 2px; color: var(--jf-link-hover); }
.mj-fold-line:focus-visible { outline: 2px solid var(--jf-focus); outline-offset: -2px; }
.mj-fold-summary { color: var(--jf-text); }
.mj-fold-warn, .mj-fold-none { flex: none; width: 24px; height: 24px; border-radius: var(--jf-radius-pill); display: grid; place-items: center; }
.mj-fold-warn { background: var(--jf-orange-tint); color: var(--jf-orange-strong); }
.mj-fold-warn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.mj-fold-none { background: var(--jf-surface-alt); }
.mj-fold-none::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--jf-control-border); }
.mj-fold-body { border-top: 1px solid var(--jf-border); }
/* The cards inside a part lose their own frame: the part is the frame. */
.mj-fold-body .mj-card, .mj-fold-body .mj-group > .mj-card { border: 0; border-radius: 0; margin: 0; background: none; }
.mj-fold-body .mj-card + .mj-card, .mj-fold-body .mj-group > .mj-card + .mj-card, .mj-fold-body .mj-note + .mj-group { border-top: 1px solid var(--jf-border); }
.mj-fold-body .mj-group { margin: 0; }
.mj-fold-body > .mj-record + .mj-record { border-top: 1px solid var(--jf-border); }
.mj-fold-body .mj-card-foot { background: none; border-top: 0; }
.mj-record-title { margin: 0; padding: 12px 20px 0; font-size: 18px; line-height: 26px; font-weight: 700; color: var(--jf-text-heading); }
.mj-consent-block { padding: 4px 20px; }
.mj-fold-quiet { border: 0; border-top: 1px solid var(--jf-border); border-radius: 0; background: none; }
.mj-fold-quiet .mj-fold-none { display: none; }
.mj-fold-quiet .mj-fold-line { padding-left: 20px; font-size: 14px; line-height: 20px; }
.mj-fold-quiet .fold-title { font-weight: 600; }
.mj-fold-quiet .mj-fold-body { border-top: 0; }
.mj-line-sub { display: block; font-weight: 400; color: var(--jf-text); }
.mj-fold-body .mj-pay-fold { padding: 12px 20px; }
