/* Hivio web app. Colours of Palette A (Hivio.Desktop/Resources/Theme/Palette.*.xaml), light and dark; dark follows the device
   unless chosen in the menu (data-theme). No inline styles anywhere (Content-Security-Policy). */
:root {
  --window: #F3EEE3;
  --surface: #FFFFFF;
  --surface-alt: #FAF7F1;
  --sunken: #EFE8DA;
  --hover: #F5F0E6;
  --line: #E5DDCE;
  --line-strong: #CFC5B3;
  --text: #2B2218;
  --muted: #6F6556;
  --accent: #8A5600;
  --honey: #F2B134;
  --honey-tint: #FFF1D0;
  --honey-ink: #3A2A12;
  --on-tone: #FFFFFF;
  --holiday: #50753B;
  --holiday-tint: #E6F3DF;
  --holiday-deep: #35581E;
  --members: #9D5037;
  --camps: #386E99;
  --camps-tint: #DFF1FF;
  --camps-deep: #19517B;
  --warn: #8A4B00;
  --warn-tint: #FFF1D0;
  --danger: #B3261E;
  --danger-tint: #FDE7E5;
  --focus: #1D6FD6;
  --shadow: rgba(43, 34, 24, 0.12);
  --radius: 12px;
  --tabs: 64px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --window: #16120D; --surface: #241D15; --surface-alt: #1C1711; --sunken: #2F271C; --hover: #2A231A; --line: #3A3127; --line-strong: #4A3F31;
    --text: #F2EBDF; --muted: #B3A793; --accent: #F2C866; --honey-tint: #3D2F12;
    --holiday-tint: #2B3A22; --holiday-deep: #A9C998; --camps-tint: #1E3142; --camps-deep: #97C3EA;
    --warn: #F2C866; --warn-tint: #3D2F12; --danger: #FF8A80; --danger-tint: #3A1E1C; --focus: #7CB2FF; --shadow: rgba(0, 0, 0, 0.45);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --window: #16120D; --surface: #241D15; --surface-alt: #1C1711; --sunken: #2F271C; --hover: #2A231A; --line: #3A3127; --line-strong: #4A3F31;
  --text: #F2EBDF; --muted: #B3A793; --accent: #F2C866; --honey-tint: #3D2F12;
  --holiday-tint: #2B3A22; --holiday-deep: #A9C998; --camps-tint: #1E3142; --camps-deep: #97C3EA;
  --warn: #F2C866; --warn-tint: #3D2F12; --danger: #FF8A80; --danger-tint: #3A1E1C; --focus: #7CB2FF; --shadow: rgba(0, 0, 0, 0.45);
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; background: var(--window); color: var(--text);
  font: 16px/1.45 "Segoe UI", system-ui, -apple-system, "Noto Sans", sans-serif;
}
a { color: var(--accent); }
h1, h2, h3 { margin: 0; line-height: 1.2; }
p { margin: 0; }
.icon { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

.muted { color: var(--muted); }
.small { font-size: 0.875rem; }
.block { display: block; }
.strong { font-weight: 700; }
.grow { flex: 1 1 auto; min-width: 0; }
.pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.hint { color: var(--muted); font-size: 0.875rem; display: flex; gap: 6px; align-items: center; }

/* ---------- Buttons ---------- */
button, .button {
  font: inherit; font-weight: 600; min-height: 44px; padding: 8px 16px; border-radius: 10px; cursor: pointer;
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--text);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none;
}
button:hover, .button:hover { background: var(--hover); }
button.primary, .button.primary { background: var(--honey); border-color: var(--honey); color: var(--honey-ink); }
button.primary:hover, .button.primary:hover { filter: brightness(0.96); }
button.big { min-height: 52px; padding: 12px 24px; font-size: 1.05rem; width: 100%; max-width: 360px; }
button.danger { color: var(--danger); border-color: var(--danger); background: transparent; width: 100%; margin-top: 8px; }
button[disabled] { opacity: 0.6; cursor: progress; }
.button.block { width: 100%; margin: 8px 0 4px; }
.icon-button { min-width: 44px; padding: 0; border: 0; background: transparent; font-size: 1.6rem; line-height: 1; }

/* ---------- Sign-in and messages ---------- */
.signin {
  min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px;
  padding: 32px 24px; text-align: center; max-width: 520px; margin: 0 auto;
}

/* ---------- Start (assets/boot.js) and waiting ---------- */
.boot {
  position: fixed; inset: 0; z-index: 50; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 14px; padding: 32px 24px; text-align: center; background: var(--window); transition: opacity 0.2s ease;
}
/* Going: its texts disappear at once, only the plain background fades (no splash text lying over the first page). */
.boot.done { opacity: 0; pointer-events: none; }
.boot.done > * { visibility: hidden; }
.boot-name { font-weight: 700; font-size: 1.4rem; margin: 0; }
.boot-bar { width: min(220px, 70vw); height: 6px; border-radius: 99px; background: var(--sunken); overflow: hidden; }
.boot-bar span { display: block; width: 4%; height: 100%; border-radius: inherit; background: var(--honey); transition: width 0.5s ease; }
.boot-step { margin: 0; min-height: 1.4em; font-weight: 600; }
.boot-fun { margin: 0; min-height: 2.8em; max-width: 320px; color: var(--muted); font-size: 0.9rem; opacity: 0; transition: opacity 0.18s ease; }
.boot-fun.show { opacity: 1; }

/* The cells of the logo fill one after the other, like honey. */
.honeycomb { display: inline-flex; color: var(--honey); }
.honeycomb polygon { fill: currentColor; opacity: 0.2; animation: cell 1.2s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.honeycomb polygon:nth-child(2) { animation-delay: 0.2s; }
.honeycomb polygon:nth-child(3) { animation-delay: 0.4s; }
@keyframes cell { 0%, 100% { opacity: 0.2; transform: scale(0.86); } 40% { opacity: 1; transform: scale(1); } }

/* A page that takes a moment: the honeycomb after a short wait (quick pages don't show it at all). */
.page-loader { display: flex; justify-content: center; padding: 48px 0; animation: appear 0.2s ease 0.25s both; }
@keyframes appear { from { opacity: 0; } to { opacity: 1; } }

/* Going to another page: the old one stays until the new one is there; after a moment a bar runs under the header and it fades. */
.shell.navigating .topbar::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -3px; height: 3px;
  background: linear-gradient(90deg, transparent, var(--honey), transparent); background-size: 40% 100%; background-repeat: no-repeat;
  animation: appear 0.15s ease 0.2s both, run 1s linear 0.2s infinite;
}
@keyframes run { from { background-position: -40% 0; } to { background-position: 140% 0; } }
.shell.navigating #view > .content[aria-busy] { animation: dim 0.2s ease 0.3s both; pointer-events: none; }
@keyframes dim { to { opacity: 0.5; } }

/* The new page comes in: deeper from the right, back from the left, another tab fades in. */
.content.enter-forward { animation: enter-forward 0.24s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.content.enter-back { animation: enter-back 0.24s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.content.enter-fade { animation: enter-fade 0.2s ease-out both; }
@keyframes enter-forward { from { opacity: 0; transform: translateX(28px); } }
@keyframes enter-back { from { opacity: 0; transform: translateX(-28px); } }
@keyframes enter-fade { from { opacity: 0; transform: translateY(6px); } }

@media (prefers-reduced-motion: reduce) {
  .boot, .boot-bar span, .boot-fun { transition: none; }
  .honeycomb polygon { animation: none; opacity: 1; transform: none; }
  .content.enter-forward, .content.enter-back, .content.enter-fade, .shell.navigating #view > .content[aria-busy] { animation: none; }
  .shell.navigating .topbar::after { animation: appear 0.15s ease 0.2s both; background: var(--honey); }
}
.signin h1 { font-size: 1.6rem; }
.signin .notice { background: var(--honey-tint); color: var(--text); padding: 10px 14px; border-radius: var(--radius); }

/* ---------- Shell ---------- */
.shell { min-height: 100vh; }
.topbar {
  position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 10px;
  padding: max(8px, env(safe-area-inset-top)) 12px 8px; background: var(--window); border-bottom: 1px solid var(--line);
}
.topbar .logo { border-radius: 7px; }
.topbar .title { flex: 1 1 auto; min-width: 0; font-size: 1.15rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar {
  min-width: 40px; min-height: 40px; width: 40px; height: 40px; padding: 0; border-radius: 50%;
  background: var(--honey); border: 0; color: var(--honey-ink); font-weight: 700; font-size: 0.9rem;
}
.tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; display: flex; justify-content: space-around;
  background: var(--surface); border-top: 1px solid var(--line); padding: 4px 4px max(4px, env(safe-area-inset-bottom));
}
.tab {
  flex: 1 1 0; min-height: 52px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  color: var(--muted); text-decoration: none; font-size: 0.75rem; font-weight: 600; border-radius: 10px;
}
.tab[aria-current="page"] { color: var(--text); }
/* Only at the side on a computer (see the media query): further sections and what "Mehr" holds; the breadcrumb only there too. */
.tabs .side, .tabs .side-divider, .crumbs { display: none; }
.tab[aria-current="page"] .icon { color: var(--accent); stroke-width: 2.2; }
.view { padding: 16px 16px calc(var(--tabs) + 32px + env(safe-area-inset-bottom)); max-width: 760px; margin: 0 auto; overflow-x: clip; }
.content { display: flex; flex-direction: column; gap: 12px; width: 100%; max-width: 880px; margin-inline: auto; }
/* An overview: week cards and link cards side by side as far as they fit (one column on a phone), everything else across. */
.content.wide { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); align-items: stretch; max-width: none; }
.content.wide > * { grid-column: 1 / -1; min-width: 0; }
.content.wide > .card.week:not(.big), .content.wide > .link-card { grid-column: auto; }
.content.wide > .link-more { justify-self: end; }
.content.wide > .segmented { justify-self: start; width: min(100%, 520px); }
.loading { color: var(--muted); padding: 24px 0; text-align: center; }

@media (min-width: 900px) {
  .shell { display: grid; grid-template-columns: 220px 1fr; grid-template-rows: auto 1fr; }
  .topbar { grid-column: 1 / -1; }
  .tabs {
    position: sticky; top: 57px; align-self: start; flex-direction: column; justify-content: flex-start; gap: 4px;
    height: calc(100vh - 57px); border-top: 0; border-right: 1px solid var(--line); padding: 12px 8px; background: var(--window);
  }
  .tab, .tabs .side {
    flex: 0 0 auto; display: flex; flex-direction: row; align-items: center; justify-content: flex-start; gap: 12px; padding: 10px 14px;
    min-height: 44px; font-size: 0.95rem; font-weight: 600; color: var(--muted); text-decoration: none; border-radius: 10px;
  }
  .tab[aria-current="page"], .tabs .side[aria-current="page"] { background: var(--hover); color: var(--text); }
  .tabs .side[aria-current="page"] .icon { color: var(--accent); stroke-width: 2.2; }
  .tabs .side-divider { display: block; width: 100%; border: 0; border-top: 1px solid var(--line); margin: 6px 0; }
  /* Everything stands at the side; only what doesn't fit the height goes behind "Mehr" at the end (app.js fitSideNav). */
  .tabs { overflow: hidden; }
  .tabs:not(.show-more) .more-tab { display: none; }
  .tabs .overflowed { display: none !important; }
  /* The breadcrumb instead of the plain title. */
  .topbar .title { display: none; }
  .crumbs { display: flex; align-items: center; gap: 4px; flex: 1 1 auto; min-width: 0; font-size: 1.05rem; }
  .crumb { color: var(--muted); text-decoration: none; font-weight: 600; white-space: nowrap; padding: 4px 6px; border-radius: 8px; }
  a.crumb:hover { background: var(--hover); color: var(--text); }
  .crumb.home { color: var(--text); font-weight: 700; }
  .crumb.current { color: var(--text); font-weight: 700; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
  .crumb-separator { display: inline-flex; color: var(--line-strong); }
  /* Keeps its place, so the breadcrumb doesn't move from page to page. */
  .topbar .icon-button.phone-only { visibility: hidden; }
  /* The page takes the space next to the navigation (it shrank to its content before), up to a width that still reads well. */
  .view { width: 100%; max-width: 1280px; padding: 24px 32px 40px; margin: 0; }
  /* Every page starts at the same edge next to the navigation (no jump between an overview and a detail page). */
  .content { margin-inline: 0; }
}

/* ---------- Cards and lists ---------- */
.card {
  display: block; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px;
  color: var(--text); text-decoration: none;
}
a.card:hover { border-color: var(--line-strong); }
.card.error { border-color: var(--danger); background: var(--danger-tint); display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.card-row { display: flex; align-items: center; gap: 10px; }
.card-icon { width: 40px; height: 40px; border-radius: 10px; background: var(--honey-tint); color: var(--accent); display: grid; place-items: center; }
.link-card { display: flex; align-items: center; gap: 12px; }
.count { min-width: 32px; padding: 2px 10px; border-radius: 99px; background: var(--sunken); font-weight: 700; text-align: center; }
.count.hot { background: var(--honey); color: var(--honey-ink); }
.section { font-size: 0.8rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin-top: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
/* The request that comes next after a decision. */
.up-next > .link-row { background: var(--honey-tint); box-shadow: inset 4px 0 0 var(--honey); }
.chip.up-next-chip { display: block; width: fit-content; margin: 4px 0 2px; background: var(--honey); color: var(--honey-ink); font-size: 0.72rem; }
.requests-filter { flex-wrap: wrap; }
.requests-filter .segment { flex: 1 1 auto; flex-direction: column; gap: 0; padding: 4px 8px; font-size: 0.85rem; line-height: 1.25; min-height: 48px; }
.rank { min-width: 2.2em; font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; }
.way-line { display: flex; align-items: center; gap: 6px; margin: 4px 0 0; }
.chip { display: inline-block; padding: 2px 10px; border-radius: 99px; background: var(--honey-tint); color: var(--accent); font-size: 0.8rem; font-weight: 700; }
.hello { display: flex; flex-direction: column; gap: 8px; padding: 4px 0 4px; }
.hello h2 { font-size: 1.5rem; }
/* Start: the open requests right below the greeting, per kind into the list of that kind. */
.requests-start { padding: 0; overflow: hidden; border-color: var(--honey); }
.requests-total { display: flex; align-items: center; gap: 12px; padding: 14px 16px; color: var(--text); text-decoration: none; }
.request-kinds { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.request-kinds li + li { border-top: 1px solid var(--line); }
.request-kind { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 6px 16px 6px 68px; color: var(--text); text-decoration: none; font-weight: 600; }
.request-kind .icon { color: var(--muted); }
.requests-total:hover, .request-kind:hover { background: var(--hover); }
.requests-calm { display: flex; align-items: center; gap: 8px; margin: 0; }
.requests-calm .icon { color: var(--holiday); }
.link-more { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; align-self: flex-end; min-height: 44px; }

.hex { width: 14px; height: 16px; clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); flex: none; }
.hex.holiday { background: var(--holiday); }
.hex.camp { background: var(--camps); }
.week strong { font-size: 1.05rem; }
.week.big { border-color: var(--holiday); border-width: 2px; }
.badge { padding: 2px 8px; border-radius: 99px; font-size: 0.75rem; font-weight: 700; white-space: nowrap; }
.badge.now { background: var(--holiday); color: var(--on-tone); }
.badge.mine { background: var(--honey-tint); color: var(--accent); }
.progress { height: 6px; border-radius: 99px; background: var(--sunken); margin: 10px 0 6px; overflow: hidden; }
.progress span { display: block; height: 100%; width: 0; background: var(--holiday); border-radius: 99px; }
.week .card-row.small { justify-content: space-between; }

.list { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.list > li + li { border-top: 1px solid var(--line); }
.list.plain { background: transparent; border: 0; }
.list.plain > li + li { border-top-color: var(--line); }
.list .empty { padding: 16px; color: var(--muted); }
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; min-height: 52px; }
.list.plain .row { padding: 10px 2px; }
.link-row { color: var(--text); text-decoration: none; }
.link-row:hover { background: var(--hover); }

/* ---------- Week ---------- */
.week-head { display: flex; flex-direction: column; gap: 2px; }
.days { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; }
.day {
  flex: 0 0 auto; min-height: 40px; padding: 8px 12px; border-radius: 99px; border: 1px solid var(--line-strong); background: var(--surface);
  color: var(--text); text-decoration: none; font-size: 0.9rem; font-weight: 600; display: inline-flex; align-items: center;
}
.day[aria-current="date"] { background: var(--holiday); border-color: var(--holiday); color: var(--on-tone); }
.counts { display: flex; flex-wrap: wrap; gap: 6px; }
.count-pill { padding: 4px 10px; border-radius: 99px; font-size: 0.85rem; background: var(--sunken); }
.count-pill.da, .state-pill.da { background: var(--holiday-tint); color: var(--holiday-deep); }
.count-pill.abgeholt, .state-pill.abgeholt { background: var(--camps-tint); color: var(--camps-deep); }
.count-pill.fehlt, .state-pill.fehlt { background: var(--danger-tint); color: var(--danger); }
.search {
  width: 100%; min-height: 46px; padding: 10px 14px; border-radius: 10px; border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--text); font: inherit;
}
.child-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 12px 10px 16px; }
.child-main { flex: 1 1 200px; min-width: 0; display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; color: var(--text); text-decoration: none; min-height: 44px; align-content: center; }
.child-main .name { font-weight: 700; }
.flags { display: flex; gap: 4px; color: var(--muted); }
.flag.warn { color: var(--warn); }
.important-line { grid-column: 1 / -1; color: var(--warn); font-size: 0.85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.state-pill { justify-self: start; padding: 1px 8px; border-radius: 99px; font-size: 0.8rem; font-weight: 600; background: var(--sunken); }
.attendance { display: flex; gap: 4px; flex: 0 0 auto; }
.attendance .state { min-height: 40px; padding: 6px 10px; font-size: 0.85rem; border-radius: 99px; background: transparent; color: var(--muted); }
.attendance .state[aria-pressed="true"].da { background: var(--holiday); border-color: var(--holiday); color: var(--on-tone); }
.attendance .state[aria-pressed="true"].abgeholt { background: var(--camps); border-color: var(--camps); color: var(--on-tone); }
.attendance .state[aria-pressed="true"].fehlt { background: var(--danger); border-color: var(--danger); color: var(--on-tone); }
details.card summary { cursor: pointer; font-weight: 700; min-height: 32px; }
details.card ol { margin-top: 8px; }

/* ---------- Child and member ---------- */
.child-head { display: flex; flex-direction: column; gap: 4px; }
.ok-line, .warn-line { display: flex; align-items: center; gap: 6px; font-weight: 600; font-size: 0.95rem; }
.warn-line { color: var(--danger); }
.important { border-left: 4px solid var(--line-strong); }
.important.has { border-left-color: var(--honey); background: var(--honey-tint); }
.important h3 { display: flex; align-items: center; gap: 6px; font-size: 1rem; margin-bottom: 6px; }
.contact { display: flex; flex-direction: column; gap: 6px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.button.call { border-color: var(--holiday); color: var(--holiday-deep); }
.status { font-size: 0.85rem; font-weight: 600; color: var(--muted); }
.status.bezahlt, .status.unbezahlt, .status.teilbezahlt, .status.untervorbehalt { color: var(--holiday-deep); }
.status.warteliste { color: var(--warn); }
.stars { font-size: 1.3rem; letter-spacing: 1px; }
.stars .on { color: var(--honey); }
.stars .half { color: var(--honey); opacity: 0.55; }
.stars .off { color: var(--line-strong); }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 10px 0 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }
.note-form { display: flex; flex-direction: column; gap: 8px; }
.note-form textarea {
  width: 100%; min-height: 84px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line-strong);
  background: var(--surface-alt); color: var(--text); font: inherit; resize: vertical;
}
.form-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.check { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-size: 0.95rem; }
.check input { width: 20px; height: 20px; accent-color: var(--accent); }
.notes-section { display: flex; flex-direction: column; gap: 10px; }
.notes-section .section { display: flex; align-items: center; gap: 6px; }
.notes .note { padding: 12px 16px; display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.notes .note.internal { background: var(--surface-alt); }
.chip.internal { display: inline-flex; align-items: center; gap: 4px; background: var(--sunken); color: var(--muted); }
.note-actions { display: flex; gap: 6px; margin-top: 4px; }
.small-button { min-height: 36px; padding: 4px 12px; font-size: 0.85rem; }
.danger-text { color: var(--danger); }
.consents { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.badge.open { background: var(--warn-tint); color: var(--warn); }
.mono { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; letter-spacing: 0.02em; }

/* ---------- Menu sheet, toast ---------- */
.sheet {
  border: 0; border-radius: 16px 16px 0 0; padding: 16px 20px max(20px, env(safe-area-inset-bottom)); margin: auto auto 0;
  width: 100%; max-width: 520px; background: var(--surface); color: var(--text); display: flex; flex-direction: column; gap: 8px;
}
.sheet::backdrop { background: rgba(0, 0, 0, 0.4); }
.sheet h3 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin-top: 10px; }
.sheet-head { display: flex; justify-content: space-between; align-items: center; }
@media (min-width: 900px) { .sheet { border-radius: 16px; margin: auto; } }
.segmented { display: flex; gap: 4px; padding: 3px; border-radius: 12px; background: var(--sunken); }
.segmented button { flex: 1 1 0; border: 0; background: transparent; color: var(--muted); min-height: 40px; }
.segmented button[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px var(--shadow); }
.segmented .segment {
  flex: 1 1 0; min-height: 40px; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px;
  color: var(--muted); text-decoration: none; font-weight: 600;
}
.segmented .segment[aria-current="true"] { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px var(--shadow); }
.signin .segmented { width: 100%; max-width: 280px; }
.toast {
  position: fixed; left: 50%; bottom: calc(var(--tabs) + 24px); transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: var(--text); color: var(--window); padding: 10px 16px; border-radius: 10px; font-weight: 600; transition: all 0.2s; z-index: 20;
  width: max-content; max-width: calc(100vw - 32px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { background: var(--danger); color: #fff; }
/* With a way to what was just made: tappable, the link a big target at the end. */
/* On a phone the text takes the width and the link stands below it at the right. */
.toast.with-link { display: flex; flex-wrap: wrap; align-items: center; column-gap: 4px; padding: 10px 4px 2px 16px; }
.toast-text { flex: 1 1 220px; padding: 0 12px 0 0; }
.toast.show.with-link { pointer-events: auto; }
.toast-link {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; margin-left: auto; border-radius: 8px; white-space: nowrap; color: inherit;
  text-decoration: underline; text-decoration-color: var(--honey); text-decoration-thickness: 2px; text-underline-offset: 4px;
}
.toast.error .toast-link { text-decoration-color: currentColor; }
.toast:not(.show) .toast-link { visibility: hidden; }
@media (prefers-reduced-motion: reduce) { .toast { transition: none; } }

/* ---------- Changes (Team, Admin) ---------- */
.notice-card { display: flex; align-items: center; gap: 8px; background: var(--honey-tint); border-color: var(--honey); }
.warn-card { border-left: 4px solid var(--warn); background: var(--warn-tint); display: flex; flex-direction: column; gap: 6px; }
.warn-card h3 { display: flex; align-items: center; gap: 6px; font-size: 1rem; color: var(--warn); }
.important-line.wrap { white-space: normal; }
.skills { display: flex; flex-direction: column; gap: 2px; }
.skills > span, .skill-hit { display: flex; align-items: center; gap: 6px; }
/* A search hit shows the matching lines of what the person entered, at most three lines on the screen. */
.skill-hit { min-width: 0; margin-top: 2px; align-items: flex-start; }
.skill-hit .icon { margin-top: 2px; }
.skill-hit > span { min-width: 0; overflow: hidden; overflow-wrap: anywhere; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; }
.skill-hit .icon, .skills .icon { flex: 0 0 auto; color: var(--muted); }
.member-number { flex: 0 0 auto; white-space: nowrap; }
.event-line { display: flex; flex-direction: column; }
.inline-edit { padding: 0 2px 10px; }
.inline-edit summary { cursor: pointer; color: var(--accent); font-weight: 600; font-size: 0.9rem; min-height: 36px; display: flex; align-items: center; }
details.card summary { display: flex; align-items: center; gap: 6px; }
.edit-form { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.edit-form fieldset { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px 12px; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.edit-form legend { font-weight: 700; padding: 0 4px; }
.field { display: flex; flex-direction: column; gap: 4px; font-size: 0.875rem; color: var(--muted); }
.field input, .field textarea {
  width: 100%; min-height: 44px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line-strong);
  background: var(--surface-alt); color: var(--text); font: inherit; font-size: 1rem;
}
.field textarea { min-height: 72px; resize: vertical; }
/* Date and time fields: Safari (iPhone) gives them a width of their own that doesn't shrink, so two side by side ran out of the
   form, and centres the value. Like every other field: as wide as their column, the value on the left. */
.field input[type="date"], .field input[type="time"] { -webkit-appearance: none; appearance: none; display: block; min-width: 0; max-width: 100%; text-align: left; }
.field input[type="date"]::-webkit-date-and-time-value, .field input[type="time"]::-webkit-date-and-time-value { text-align: left; }
/* Fields side by side share the width and stand on one line, also when one label needs two lines. */
.edit-form .form-row { align-items: flex-end; }
.field input:invalid:not(:placeholder-shown):not(:focus) { border-color: var(--danger); }
.decision { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.decision button { width: 100%; min-height: 48px; margin: 0; }

/* ---------- Merge dialog ---------- */
.sheet.merge { max-height: 92vh; overflow-y: auto; }
.merge-item { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px 12px; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.merge-item legend { font-weight: 700; padding: 0 4px; }
.merge-item .choice { display: flex; align-items: flex-start; gap: 10px; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); cursor: pointer; }
.merge-item .choice input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--accent); flex: none; }
.merge-item .choice:has(input:checked) { border-color: var(--accent); background: var(--honey-tint); }
.merge-item textarea, .merge-item input[type=text] {
  width: 100%; min-height: 44px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line-strong);
  background: var(--surface-alt); color: var(--text); font: inherit; font-size: 1rem;
}

/* ---------- Photos ---------- */
.avatar-photo {
  width: 40px; height: 40px; border-radius: 50%; flex: none; display: inline-grid; place-items: center; overflow: hidden;
  background: var(--honey-tint); color: var(--accent); font-weight: 700; font-size: 0.85rem;
}
.avatar-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar-photo.big { width: 112px; height: 112px; font-size: 2rem; border: 3px solid var(--surface); box-shadow: 0 1px 4px var(--shadow); }
.child-main.with-photo { grid-template-columns: auto 1fr auto; }
.child-main.with-photo .avatar-photo { grid-row: span 2; }
.child-main.with-photo .important-line { grid-column: 2 / -1; }
.photo-row { display: flex; align-items: center; gap: 14px; }
.photo-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.photo-actions .small-button { display: inline-flex; align-items: center; gap: 6px; }
.photo-preview { width: 100%; max-height: 50vh; object-fit: contain; border-radius: 12px; background: var(--sunken); }

/* ---------- Kinderkartei ---------- */
.kartei-tools { flex-wrap: wrap; }
.card > h3:has(> svg.icon) { display: flex; align-items: center; gap: 6px; }
.kartei-row { gap: 12px; }
.kartei-row .badges { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.badge.warn { background: var(--warn-tint); color: var(--warn); display: inline-flex; align-items: center; gap: 3px; }
.badge:not(.now):not(.mine):not(.open):not(.warn) { background: var(--sunken); color: var(--muted); }
.ok-card { display: flex; align-items: center; gap: 8px; border-left: 4px solid var(--ok, var(--accent)); }
.check.strong { font-weight: 700; color: var(--text); align-items: flex-start; }
.check.strong input { margin-top: 2px; flex: none; }
.field-problem { color: var(--danger); font-size: 0.8rem; font-weight: 600; min-height: 0; }
.field-problem:empty { display: none; }
.field.uncertain input, .field.uncertain textarea { border-color: var(--warn); background: var(--warn-tint); }
.field.uncertain .field-problem { color: var(--warn); }
.edit-form .form-row .field { flex: 1; min-width: 0; }
.contact-editor { display: flex; flex-direction: column; gap: 10px; }
.contact-block .actions { flex-wrap: wrap; }
.scan-layout { display: flex; flex-direction: column; gap: 14px; margin-top: 12px; }
.scan-preview { margin: 0; }
.scan-preview img { width: 100%; max-height: 70vh; object-fit: contain; border-radius: 12px; background: var(--sunken); }
.scan-photo { display: flex; gap: 14px; align-items: flex-start; }
.scan-photo img { width: 96px; height: 120px; flex: none; object-fit: cover; border-radius: 12px; background: var(--sunken); }
.scan-photo .hint { margin: 4px 0 0; }
@media (min-width: 900px) {
  .scan-layout { flex-direction: row; align-items: flex-start; }
  .scan-preview { position: sticky; top: 72px; flex: 1 1 45%; }
  .scan-layout > form { flex: 1 1 55%; }
}

/* ---------- Tool desk (Werkzeugausleihe): big targets, states in colour and in words ---------- */
.tool-child, .tool-admin { display: flex; flex-direction: column; gap: 12px; }
.search.tool-search { min-height: 56px; font-size: 1.2rem; padding: 12px 16px; border-width: 2px; }
.tool-hit { min-height: 64px; border-left: 6px solid transparent; }
.tool-hit.warned { border-left-color: var(--honey); }
.tool-hit.banned { border-left-color: var(--danger); }
.hit-name { display: block; font-size: 1.1rem; }
.badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.badge { display: inline-flex; align-items: center; gap: 4px; background: var(--sunken); color: var(--muted); }
.badge.tool { background: var(--camps-tint); color: var(--camps-deep); }
.badge.warned { background: var(--warn-tint); color: var(--warn); }
.badge.banned { background: var(--danger); color: var(--window); }
.tool-hits .empty { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.add-child { max-width: none; }

.tool-state { display: inline-flex; align-items: center; gap: 8px; align-self: flex-start; padding: 8px 16px; border-radius: 99px; font-weight: 700; font-size: 1.05rem; }
.tool-state.free { background: var(--holiday-tint); color: var(--holiday-deep); }
.tool-state.out { background: var(--camps-tint); color: var(--camps-deep); }
.tool-state.warned { background: var(--warn-tint); color: var(--warn); }
.tool-state.banned { background: var(--danger); color: var(--window); }
.tool-state.inactive { background: var(--sunken); color: var(--muted); }

.ban-card { border: 3px solid var(--danger); background: var(--danger-tint); display: flex; flex-direction: column; gap: 8px; }
.ban-card h2 { color: var(--danger); font-size: 1.35rem; font-weight: 800; }
.ban-not-told { color: var(--danger); font-weight: 700; font-size: 1.1rem; }
.warning-card { border: 2px solid var(--honey); background: var(--warn-tint); display: flex; flex-direction: column; gap: 6px; }
.warning-line { color: var(--warn); font-weight: 800; font-size: 1.15rem; }
/* Team, Admin: lift a warning or a ban, change how long a ban lasts. */
.warning-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.warning-remove { margin-left: auto; font-size: 0.9rem; font-weight: 600; padding: 4px 12px; }
.ban-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.days-field { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.days-input { width: 8rem; font-size: 1.25rem; }
.days-hint { margin-top: 4px; }
.loan-card { display: flex; flex-direction: column; gap: 4px; border: 2px solid var(--camps); }
.loan-tool { font-size: 1.8rem; font-weight: 800; line-height: 1.15; }
.loan-since { font-size: 1.1rem; }

/* Side by side where they fit (tablet), one below the other on a phone. */
.big-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin-top: 10px; }
.tool-child button.big, .confirm-sheet button.big, .tool-hits button.big { min-height: 64px; max-width: none; font-size: 1.15rem; padding: 10px 12px; }
.tool-child .lend-start { min-height: 72px; font-size: 1.25rem; }
button.give-back { background: var(--holiday); border-color: var(--holiday); color: var(--on-tone); }
button.warn { background: var(--honey); border-color: var(--honey); color: var(--honey-ink); }
button.danger-fill, button.ban-tell { background: var(--danger); border-color: var(--danger); color: var(--window); }
button.give-back:hover, button.warn:hover, button.danger-fill:hover, button.ban-tell:hover { filter: brightness(0.95); }

.lend-panel { display: flex; flex-direction: column; gap: 12px; }
.lend-panel h3 { font-size: 1.1rem; }
.choice-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(136px, 1fr)); gap: 10px; }
.choice { min-height: 72px; flex-direction: column; gap: 2px; font-size: 1.1rem; border-width: 2px; }
.choice .small { font-weight: 600; color: var(--muted); }
button.choice[disabled] { opacity: 0.45; cursor: not-allowed; }
.confirm-question { font-size: 1.3rem; font-weight: 800; }
.link-button { border: 0; background: transparent; color: var(--accent); padding: 8px 4px; min-height: 44px; }
.confirm-sheet h2 { font-size: 1.3rem; }

.tool-history .list { font-size: 0.95rem; }
.history-line { padding: 10px 16px; overflow-wrap: anywhere; }
.history-line.active { background: var(--camps-tint); }
.history-line .warned-text { color: var(--warn); font-weight: 700; }
.history-line.ban { color: var(--danger); }
.history-line.event { padding: 0; }
.event-row { align-items: flex-start; gap: 12px; padding: 10px 16px; }
.event-time { min-width: 3.2em; font-variant-numeric: tabular-nums; }
.event-ban { color: var(--danger); font-weight: 700; }
.event-day-title { margin: 14px 0 6px; font-size: 0.95rem; color: var(--muted); }

.ban-days { display: flex; gap: 8px; align-items: flex-start; }
.add-form { display: flex; gap: 8px; margin-top: 10px; }
.add-form input {
  flex: 1 1 auto; min-width: 0; min-height: 48px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line-strong);
  background: var(--surface-alt); color: var(--text); font: inherit;
}
.add-form button { flex: none; }
.icon-action { min-width: 44px; padding: 0; flex: none; }
.admin-row { width: 100%; border: 0; border-radius: 0; background: transparent; font-weight: 600; text-align: left; justify-content: space-between; }
.admin-tools .row { padding: 6px 2px; gap: 6px; }
.admin-category { display: flex; flex-direction: column; gap: 8px; }
.inactive { opacity: 0.65; }
.edit-sheet select {
  width: 100%; min-height: 44px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line-strong);
  background: var(--surface-alt); color: var(--text); font: inherit;
}
.edit-sheet > button { width: 100%; }

/* ---------- Verleih: loans of the association's machines and items ---------- */
.lending-filter button { flex-direction: column; gap: 0; padding: 4px 2px; font-size: 0.85rem; line-height: 1.25; min-height: 48px; }
.filter-count { font-size: 0.75rem; font-weight: 700; padding: 0 6px; border-radius: 99px; background: var(--sunken); }
.lending-row { border-left: 6px solid transparent; }
.lending-row.overdue { border-left-color: var(--danger); }
.lending-row.partlyreturned { border-left-color: var(--honey); }
.lending-row .badges { align-items: center; }
.lending-row > .muted { white-space: nowrap; }
.lend-state { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 99px; font-size: 0.75rem; font-weight: 700; white-space: nowrap; }
.lend-state.lent { background: var(--camps-tint); color: var(--camps-deep); }
.lend-state.partlyreturned { background: var(--warn-tint); color: var(--warn); }
.lend-state.returned { background: var(--holiday-tint); color: var(--holiday-deep); }
.lend-state.overdue { background: var(--danger); color: var(--window); }
.lending-head { display: flex; flex-direction: column; gap: 4px; }
.lending-head .lend-state { font-size: 0.9rem; padding: 4px 12px; }
.lending-loan { display: flex; flex-direction: column; gap: 12px; }
.lending-item { display: flex; flex-direction: column; gap: 6px; border-left: 4px solid var(--camps); }
.lending-item.back { border-left-color: var(--holiday); }
.item-title { font-size: 1.1rem; overflow-wrap: anywhere; }
.item-return { display: flex; flex-direction: column; gap: 6px; padding-top: 6px; border-top: 1px solid var(--line); }
.lending-item button.big, .return-all { max-width: none; margin-top: 4px; }
.thumbs { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.thumb {
  width: 72px; height: 72px; min-height: 0; padding: 0; border-radius: 10px; overflow: hidden; flex: none; position: relative;
  background: var(--sunken); border: 1px solid var(--line);
}
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb.broken { opacity: 0.4; }
.thumb-remove {
  position: absolute; top: 2px; right: 2px; min-height: 0; width: 26px; height: 26px; padding: 0; border-radius: 50%;
  background: var(--surface); font-size: 1rem; line-height: 1;
}
.add-photo, .add-item { display: inline-flex; align-items: center; gap: 6px; }
.add-photo-box { display: inline-flex; }
.member-picker { display: flex; flex-direction: column; gap: 6px; }
.person-hit { width: 100%; border: 0; border-radius: 0; background: transparent; text-align: left; font-weight: 400; }
.linked-card { flex-direction: column; align-items: flex-start; gap: 8px; }
.item-editor { display: flex; flex-direction: column; gap: 10px; }
.item-block .form-row .field:last-child { flex: 0 0 96px; }
.item-block.is-back input, .item-block.is-back textarea { background: var(--sunken); color: var(--muted); }
.return-sheet textarea {
  width: 100%; min-height: 72px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line-strong);
  background: var(--surface-alt); color: var(--text); font: inherit; resize: vertical;
}
.photo-sheet { max-height: 94vh; overflow-y: auto; }
.photo-sheet .photo-preview { max-height: 70vh; }
.return-sheet .big-actions { grid-template-columns: 1fr; }
a.chip { text-decoration: none; }

/* ---------- Session: the end of the sign-in comes near ---------- */
.session-banner {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 0 0 12px; padding: 10px 14px; border-radius: var(--radius);
  background: var(--honey-tint); border: 1px solid var(--honey); color: var(--text); font-weight: 600;
}
.session-banner .grow { min-width: 12rem; }
.session-banner .icon { color: var(--accent); }
.session-banner .small { font-weight: 400; color: var(--muted); }
.session-banner .small-button { flex: none; }

/* „E-Mail-Versand“ off or only to the test address: a slim bar above every page. */
.mail-banner {
  display: flex; align-items: center; gap: 8px; margin: 0 0 12px; padding: 6px 14px; border-radius: var(--radius); font-size: 0.9rem; font-weight: 600;
  background: var(--warn-tint); color: var(--warn); border: 1px solid var(--warn);
}
.mail-banner.off { background: var(--danger-tint); color: var(--danger); border-color: var(--danger); }
.mail-banner .icon { flex: none; }

/* ---------- Zugänge: people, permissions, times, extra days, sign-ins ---------- */
.badge.online, .badge.status-active { background: var(--holiday-tint); color: var(--holiday-deep); }
.badge.status-requested { background: var(--warn-tint); color: var(--warn); }
.badge.status-disabled { background: var(--danger-tint); color: var(--danger); }
.access-person { display: flex; flex-direction: column; gap: 12px; }
.access-form .segmented { max-width: 360px; }
.preset-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
button.preset {
  flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 2px; text-align: left; min-height: 64px;
  padding: 10px 12px; font-weight: 400;
}
button.preset strong { font-weight: 700; }
button.preset .small { color: var(--muted); line-height: 1.3; }
button.preset[aria-pressed="true"] { border-color: var(--accent); background: var(--honey-tint); box-shadow: inset 0 0 0 1px var(--accent); }
button.preset[disabled] { cursor: not-allowed; }
.perm-group { gap: 2px; }
.perm-group.module-off { background: var(--sunken); }
.perm-group.module-off .perm { opacity: 0.6; }
.check.perm { align-items: flex-start; padding: 6px 0; color: var(--text); }
.check.perm input { margin-top: 2px; flex: none; }
.check.perm input:disabled + span { color: var(--muted); }
.perm-name { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; font-weight: 600; }
.badge.sensitive { background: var(--danger-tint); color: var(--danger); font-size: 0.7rem; }
.access-times input[type="time"], .access-times input[type="number"] { max-width: 220px; }
.access-section { display: flex; flex-direction: column; gap: 8px; }
.access-section h3 { font-size: 1rem; }
.access-section .list.plain .row { gap: 8px; flex-wrap: wrap; }
.grant-form { display: flex; flex-direction: column; gap: 8px; border-top: 1px solid var(--line); padding-top: 10px; }
.grant-form select, .grant-form input {
  width: 100%; min-height: 44px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line-strong);
  background: var(--surface-alt); color: var(--text); font: inherit;
}
.grant-form .form-row .field.days { flex: 0 0 96px; }
.reauth-card { flex-wrap: wrap; }

/* ---------- Admin-PIN for deleting ---------- */
.pin-form { display: flex; flex-direction: column; gap: 8px; }
.pin-input { letter-spacing: 0.3em; font-size: 1.2rem; }

/* ---------- Veranstaltungen: the plan of an event with its helpers ---------- */
.hex.fest { background: var(--honey); }
.fest-events { display: flex; flex-direction: column; gap: 10px; }
.fest-event { display: flex; flex-direction: column; gap: 8px; }
.count-pill.missing { background: var(--danger-tint); color: var(--danger); font-weight: 700; }
.count-pill.ok { background: var(--holiday-tint); color: var(--holiday-deep); }
.count-pill.waiting { background: var(--warn-tint); color: var(--warn); }
.fest-plan, .fest-lists { display: flex; flex-direction: column; gap: 12px; }
.fest-head { display: flex; flex-direction: column; gap: 6px; }
/* Five filters: on a narrow phone they take two rows instead of being cut off. */
.fest-filter { flex-wrap: wrap; }
.fest-filter button { flex: 1 1 auto; flex-direction: column; gap: 0; padding: 4px 8px; font-size: 0.85rem; line-height: 1.25; min-height: 48px; }
.filter-count.hot { background: var(--honey); color: var(--honey-ink); }
.fest-day { display: flex; align-items: center; gap: 8px; font-size: 1.15rem; margin-top: 8px; scroll-margin-top: 72px; }
.fest-time { display: flex; align-items: center; gap: 6px; margin-top: 4px; }
.fest-shift { display: flex; flex-direction: column; gap: 6px; border-left: 6px solid var(--station, var(--line-strong)); }
.fest-shift.missing { border-color: var(--danger); border-left-color: var(--station, var(--danger)); box-shadow: inset 0 0 0 1px var(--danger); }
.fest-shift .station-name { font-size: 1.05rem; overflow-wrap: anywhere; }
.fest-state { display: inline-flex; align-items: center; gap: 3px; padding: 2px 8px; border-radius: 99px; font-size: 0.75rem; font-weight: 700; white-space: nowrap; background: var(--sunken); color: var(--muted); }
.fest-state.confirmed, .fest-state.ok, .fest-state.came { background: var(--holiday-tint); color: var(--holiday-deep); }
.fest-state.pending { background: var(--warn-tint); color: var(--warn); }
.fest-state.standby { background: var(--camps-tint); color: var(--camps-deep); }
.fest-state.declined, .fest-state.cancelled { background: var(--danger-tint); color: var(--danger); }
.fest-signups > li { padding: 10px 0; display: flex; flex-direction: column; gap: 4px; }
.fest-signup .signup-main { display: flex; align-items: center; gap: 10px; }
.fest-signup .helper-name { overflow-wrap: anywhere; }
.fest-signup .actions .button, .fest-pool .actions .button, .fest-request .actions .button { min-height: 40px; overflow-wrap: anywhere; }
.fest-comment { border-left: 3px solid var(--line-strong); padding-left: 8px; color: var(--muted); }
button.checkin { flex: none; min-width: 64px; min-height: 44px; padding: 6px 12px; border-radius: 99px; color: var(--muted); background: transparent; }
button.checkin.today { min-width: 96px; min-height: 56px; font-size: 1.05rem; border-width: 2px; }
button.checkin[aria-pressed="true"] { background: var(--holiday); border-color: var(--holiday); color: var(--on-tone); }
.fest-gone summary { cursor: pointer; color: var(--muted); font-size: 0.85rem; min-height: 36px; display: flex; align-items: center; }
.fest-pool, .fest-request, .fest-list { display: flex; flex-direction: column; gap: 6px; }
.fest-request .big-actions button { width: 100%; min-height: 48px; }
.empty-card { text-align: center; }
.fest-sheet { max-height: 92vh; overflow-y: auto; }
.fest-sheet select {
  width: 100%; min-height: 44px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line-strong);
  background: var(--surface-alt); color: var(--text); font: inherit;
}
.fest-sheet textarea {
  width: 100%; min-height: 84px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line-strong);
  background: var(--surface-alt); color: var(--text); font: inherit; resize: vertical;
}
button.fest-pick { width: 100%; justify-content: flex-start; text-align: left; font-weight: 400; gap: 8px; flex-wrap: wrap; }
button.fest-pick[aria-pressed="true"] { border-color: var(--accent); background: var(--honey-tint); box-shadow: inset 0 0 0 1px var(--accent); }
button.fest-pick[disabled] { opacity: 0.5; cursor: not-allowed; }
.fest-entry { gap: 8px; }
.fest-entry strong { overflow-wrap: anywhere; }

/* "Teilnahmen bearbeiten" (participations.js): every week with its status, the buttons of the desktop editor, one "Aktualisieren". */
.editor-weeks .editor-week { border-bottom: 1px solid var(--line); padding: 10px 0; }
.editor-week.edited { background: var(--holiday-tint); border-radius: 8px; padding: 10px 8px; }
.editor-status { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; text-align: right; }
.editor-week .actions { margin-top: 6px; flex-wrap: wrap; }
.editor-week .small-button { display: inline-flex; align-items: center; gap: 6px; }
.editor-footer { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.editor-footer .button { flex: 1 1 180px; }
.ok-text { color: var(--holiday-deep); }
.warn-text { color: var(--warn); }

/* The child's family pass in a request (requests.js): values, checks, photos. */
.pass-card .notice-line { display: flex; gap: 8px; align-items: flex-start; margin: 4px 0 8px; color: var(--warn); }
.pass-checks { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 6px; }
.pass-checks li { display: flex; gap: 10px; align-items: flex-start; padding: 7px 10px; border-radius: 8px; font-size: 0.92rem; background: var(--sunken); color: var(--muted); }
.pass-checks li.ok { background: var(--holiday-tint); color: var(--holiday-deep); }
.pass-checks li.warning { background: var(--warn-tint); color: var(--warn); }
.pass-checks .check-icon { flex: none; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid currentColor; font-size: 0.78rem; font-weight: 700; line-height: 1; }
.pass-files { margin-top: 12px; }
.pass-pdf { display: inline-flex; align-items: center; gap: 6px; }

/* A photo a family sent with a web form, with "Foto übernehmen" (requests.js): off greys it out. */
.form-photo { display: flex; gap: 12px; align-items: flex-start; padding-top: 10px; margin-top: 2px; border-top: 1px solid var(--line); }
.form-photo .thumb { width: 88px; height: 88px; }
.form-photo-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 auto; }
.form-photo-text p { margin: 0; }
.form-photo .check { min-height: 40px; font-weight: 600; }
.form-photo .thumb img { transition: opacity 0.15s ease, filter 0.15s ease; }
.form-photo.left-out .thumb img { opacity: 0.4; filter: grayscale(1); }
