:root {
  --bg-0: #080b0f;
  --bg-1: #101820;
  --ink: #f2f5f7;
  --ink-muted: #8fa3b3;
  --brand: #40787f;
  --brand-soft: rgba(64, 120, 127, 0.28);
  --locked: #2a333c;
  --locked-ink: #7d8b97;
  --tile-gap: 12px;
  --radius: 4px;
  --font: "Outfit", sans-serif;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --cols: 2;
  --depth: 0.7;
  --tile-shadow: 0 10px 24px rgba(0, 0, 0, calc(0.28 * var(--depth)));
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font);
  background: var(--bg-0);
  color: var(--ink);
  -webkit-tap-highlight-color: transparent;
  scrollbar-gutter: stable;
  -webkit-overflow-scrolling: touch;
}

body.is-morphing .view-home,
body.is-morphing .view-detail,
body.is-morphing .view-settings,
body.is-morphing .view-settings-panel {
  animation: none !important;
}

body.is-morphing .tile {
  animation: none !important;
}

body.is-morphing {
  overflow: hidden;
}

body.is-morphing-prep .view-home,
body.is-morphing-prep .view-settings {
  opacity: 0 !important;
  pointer-events: none !important;
}

body {
  min-height: 100dvh;
}

.app-shell {
  position: relative;
  min-height: 100dvh;
  overflow-x: hidden;
  /* kein perspective hier — sonst zittert Scrollen auf Mobilgeräten */
}

.ambient {
  pointer-events: none;
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 45% at 8% -5%, #163342 0%, transparent 55%),
    radial-gradient(ellipse 55% 35% at 100% 5%, #2a2214 0%, transparent 50%),
    linear-gradient(165deg, var(--bg-0) 0%, var(--bg-1) 50%, #06090c 100%);
  z-index: 0;
}

.view {
  position: relative;
  z-index: 1;
  min-height: 100dvh;
  padding: calc(20px + var(--safe-top))
    calc(18px + var(--safe-right))
    calc(28px + var(--safe-bottom))
    calc(18px + var(--safe-left));
  max-width: 720px;
  margin: 0 auto;
}

.view[hidden] {
  display: none !important;
}

.view-home.is-entering,
.view-settings.is-entering,
.view-settings-panel.is-entering,
.view-detail.is-entering {
  animation: home-in 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes home-in {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.home-header {
  margin-bottom: 18px;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo {
  width: clamp(42px, 11vw, 58px);
  height: auto;
  flex-shrink: 0;
  display: block;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.35));
}

.brand {
  margin: 0;
  font-size: clamp(2.2rem, 8vw, 3.3rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 0.95;
  color: var(--brand);
}

.brand-sm {
  font-size: 1.1rem;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--brand);
  opacity: 1;
}

.detail-header .brand-lockup {
  gap: 8px;
}

.detail-header .brand-logo {
  width: 28px;
}

.back-btn:active,
.home-cta:active,
.order-btn:active {
  transform: scale(0.97);
}

.user-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  margin-top: 16px;
}

.user-label {
  margin: 0;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--ink-muted);
}

.user-name {
  margin: 2px 0 0;
  font-size: 1.12rem;
  font-weight: 600;
}

.demo-switch {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
}

.demo-switch select,
.field select,
.field input[type="color"] {
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  padding: 8px 10px;
}

/* Grid sizes */
.tile-grid {
  display: grid;
  grid-template-columns: repeat(var(--cols), 1fr);
  gap: var(--tile-gap);
  min-height: 120px;
}

body.size-s {
  --cols: 3;
}
body.size-m {
  --cols: 2;
}
body.size-l {
  --cols: 2;
}

body.size-s .tile:not(.is-wide) {
  aspect-ratio: 1;
}
body.size-m .tile:not(.is-wide) {
  aspect-ratio: 1;
}
body.size-l .tile:not(.is-wide) {
  aspect-ratio: 1;
  min-height: 160px;
}

body.size-s .tile-label {
  font-size: 0.82rem;
  max-width: 9ch;
}
body.size-s .tile-icon {
  width: 26px;
  height: 26px;
}
body.size-l .tile-label {
  font-size: 1.25rem;
}
body.size-l .tile-icon {
  width: 44px;
  height: 44px;
}

.tile {
  position: relative;
  aspect-ratio: 1;
  border: 0;
  border-radius: var(--radius);
  padding: 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  text-align: left;
  color: #fff;
  cursor: pointer;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  touch-action: pan-y;
  /* Keine Dauer-Animation — nur mit .is-animated beim ersten Aufbau */
  transition:
    filter 0.18s ease,
    box-shadow 0.18s ease;
  box-shadow:
    var(--tile-shadow),
    inset 0 1px 0 rgba(255, 255, 255, calc(0.18 * var(--depth))),
    inset 0 -8px 18px rgba(0, 0, 0, calc(0.22 * var(--depth)));
}

.tile::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, calc(0.22 * var(--depth))) 0%,
    transparent 42%,
    rgba(0, 0, 0, calc(0.18 * var(--depth))) 100%
  );
  pointer-events: none;
}

.tile.is-animated {
  animation: tile-in 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.tile.is-animated:nth-child(1) {
  animation-delay: 0.03s;
}
.tile.is-animated:nth-child(2) {
  animation-delay: 0.07s;
}
.tile.is-animated:nth-child(3) {
  animation-delay: 0.11s;
}
.tile.is-animated:nth-child(4) {
  animation-delay: 0.15s;
}
.tile.is-animated:nth-child(5) {
  animation-delay: 0.19s;
}
.tile.is-animated:nth-child(6) {
  animation-delay: 0.23s;
}

@keyframes tile-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (hover: hover) and (pointer: fine) {
  .tile:not(.is-locked):hover {
    filter: brightness(1.06);
  }

  .tile:not(.is-locked):hover .tile-icon {
    animation-duration: 1.4s;
  }
}

.tile.is-wide {
  grid-column: span 2;
  aspect-ratio: 2.1 / 1;
}

body.size-s .tile.is-wide {
  grid-column: span 2;
  aspect-ratio: 2.05 / 1;
}

.tile-icon {
  width: 34px;
  height: 34px;
  opacity: 0.95;
  position: relative;
  z-index: 1;
  transform-origin: center center;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, calc(0.25 * var(--depth))));
  animation: icon-alive 2.6s ease-in-out infinite;
}

.tile:nth-child(1) .tile-icon { animation-delay: 0s; }
.tile:nth-child(2) .tile-icon { animation-delay: 0.15s; }
.tile:nth-child(3) .tile-icon { animation-delay: 0.3s; }
.tile:nth-child(4) .tile-icon { animation-delay: 0.45s; }
.tile:nth-child(5) .tile-icon { animation-delay: 0.6s; }
.tile:nth-child(6) .tile-icon { animation-delay: 0.75s; }
.tile:nth-child(7) .tile-icon { animation-delay: 0.9s; }

@keyframes icon-alive {
  0%,
  100% {
    transform: translateY(0) scale(1) rotate(0deg);
  }
  40% {
    transform: translateY(-3px) scale(1.06) rotate(-4deg);
  }
  70% {
    transform: translateY(-1px) scale(1.02) rotate(3deg);
  }
}

.tile-label {
  position: relative;
  z-index: 1;
  font-size: clamp(0.95rem, 3.6vw, 1.15rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  max-width: 11ch;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}

.tile-lock {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 22px;
  height: 22px;
  opacity: 0.65;
  z-index: 1;
}

.tile.is-locked {
  background: var(--locked) !important;
  color: var(--locked-ink);
  cursor: not-allowed;
  filter: grayscale(0.4);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.tile.is-locked .tile-icon {
  opacity: 0.4;
  animation: none;
}

.tile.is-settings {
  background: linear-gradient(145deg, #5a6570 0%, #3d4650 100%) !important;
}

.hint {
  margin: 18px 2px 0;
  font-size: 0.85rem;
  line-height: 1.45;
  color: var(--ink-muted);
}

.detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 28px;
  padding-left: max(0px, calc(var(--safe-left) - 0px));
  padding-right: max(0px, calc(var(--safe-right) - 0px));
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  padding: 8px 12px 8px 8px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.back-btn svg {
  display: block;
  flex-shrink: 0;
  width: 20px;
  height: 20px;
}

.detail-body {
  max-width: 420px;
}

.detail-tile-accent {
  width: 56px;
  height: 56px;
  border-radius: var(--radius);
  margin-bottom: 18px;
  box-shadow: var(--tile-shadow);
}

.detail-body h1 {
  margin: 0;
  font-size: clamp(1.8rem, 6vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.detail-desc {
  margin: 12px 0 0;
  font-size: 1.05rem;
  line-height: 1.45;
  color: var(--ink-muted);
}

.feature-list {
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.feature-list li {
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--radius);
  font-weight: 500;
}

.home-cta {
  margin-top: 24px;
  width: 100%;
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  padding: 14px 16px;
  cursor: pointer;
}

.prototype-note {
  margin-top: 20px;
  font-size: 0.85rem;
  color: var(--ink-muted);
}

/* Settings */
.settings-title {
  margin: 0;
  font-size: clamp(1.7rem, 5vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.settings-lead {
  margin: 8px 0 22px;
  color: var(--ink-muted);
}

.settings-hub-grid .tile-label {
  max-width: 12ch;
}

.view-settings-panel {
  max-width: 720px;
}

.settings-panel-card {
  padding: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
}

.settings-panel-card[hidden] {
  display: none !important;
}

.mono-cta {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.16);
}

.settings-note {
  margin: 0 0 14px;
  font-size: 0.85rem;
  color: var(--ink-muted);
}

.field {
  display: grid;
  gap: 6px;
  margin-bottom: 14px;
  font-size: 0.9rem;
}

.field.check {
  display: flex;
  align-items: center;
  gap: 10px;
  grid-template-columns: none;
}

.field input[type="range"] {
  width: 100%;
  accent-color: #8b97a3;
}

.field select,
.demo-switch select,
.field input[type="color"] {
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  padding: 8px 10px;
}

.tile-settings {
  display: grid;
  gap: 10px;
}

.tile-setting-row {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 12px;
  background: rgba(0, 0, 0, 0.22);
  border-radius: var(--radius);
}

.tile-setting-row strong {
  font-size: 0.92rem;
  flex: 1;
}

.order-row .order-btns {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.row-preview {
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  color: #fff;
  flex-shrink: 0;
}

.row-icon {
  width: 22px;
  height: 22px;
  animation: icon-alive 2.6s ease-in-out infinite;
}

.color-row input[type="color"] {
  width: 48px;
  height: 36px;
  padding: 2px;
  cursor: pointer;
}

.width-row select {
  min-width: 140px;
}

.tile-setting-row.is-pinned {
  opacity: 0.75;
}

.pinned-note {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--ink-muted);
}

.order-btn {
  width: 34px;
  height: 30px;
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  cursor: pointer;
}

.order-btn:disabled {
  opacity: 0.3;
  cursor: default;
}

.icon-program {
  margin-bottom: 16px;
  padding: 12px;
  background: rgba(0, 0, 0, 0.22);
  border-radius: var(--radius);
}

.icon-program strong {
  display: block;
  margin-bottom: 10px;
  font-size: 0.92rem;
}

.icon-tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(7.5rem, 1fr));
  gap: 0.7rem;
}

.icon-tile-box {
  appearance: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  margin: 0;
  padding: 0.75rem 0.55rem 0.7rem;
  color: var(--ink);
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  cursor: pointer;
  text-align: center;
}

.icon-tile-box:active {
  transform: scale(0.98);
}

.icon-tile-preview {
  width: 3.4rem;
  height: 3.4rem;
  display: grid;
  place-items: center;
  border-radius: calc(var(--radius) - 1px);
  color: #f4f8fc;
}

.icon-tile-svg {
  width: 1.7rem;
  height: 1.7rem;
}

.icon-tile-title {
  font-size: 0.82rem;
  font-weight: 650;
  line-height: 1.2;
  max-width: 100%;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.icon-picker {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(48px, 1fr));
  gap: 8px;
}

.icon-picker-modal {
  padding: 0.15rem 0 0.35rem;
}

.icon-pick {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  cursor: pointer;
  padding: 6px;
}

.icon-pick.is-selected {
  background: rgba(160, 170, 180, 0.28);
  border-color: rgba(200, 210, 220, 0.55);
}

.pick-icon {
  width: 26px;
  height: 26px;
  animation: icon-alive 2.6s ease-in-out infinite;
}

.icon-pick:nth-child(3n) .pick-icon {
  animation-delay: 0.2s;
}

.icon-pick:nth-child(3n + 1) .pick-icon {
  animation-delay: 0.4s;
}

.icon-pick:nth-child(3n + 2) .pick-icon {
  animation-delay: 0.6s;
}

.icon-pick.is-selected .pick-icon {
  animation-duration: 1.6s;
}

/* Eine Kachel wächst zur Seite / schrumpft zurück */
.morph-layer {
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
}

.morph-layer[hidden] {
  display: none !important;
}

.morph-tile {
  position: absolute;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--tile-color, #444);
  box-shadow:
    var(--tile-shadow),
    inset 0 1px 0 rgba(255, 255, 255, calc(0.18 * var(--depth))),
    inset 0 -8px 18px rgba(0, 0, 0, calc(0.22 * var(--depth)));
  transform-origin: center center;
  will-change: left, top, width, height, border-radius;
}

.morph-tile.is-screen {
  box-shadow: none;
}

.morph-face {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  padding: 14px;
  color: #fff;
  transition: opacity 0.35s ease;
}

.morph-face .tile-icon {
  width: 34px;
  height: 34px;
}

.morph-face .tile-label {
  font-size: clamp(0.95rem, 3.6vw, 1.15rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  max-width: 11ch;
}

.morph-tile.is-screen .morph-face {
  opacity: 0;
}

.morph-shade {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0;
  background: var(--tile-color, #888);
}

.morph-shade.is-to-dark {
  animation: color-overblend 0.72s cubic-bezier(0.37, 0.05, 0.2, 1) forwards;
}

.morph-shade.is-to-tile {
  animation: color-overblend-reverse 0.72s cubic-bezier(0.37, 0.05, 0.2, 1) forwards;
}

@keyframes color-overblend {
  0% {
    background-color: var(--tile-color, #888);
    opacity: 0.08;
  }
  28% {
    background-color: color-mix(in srgb, var(--tile-color, #888) 45%, #8a939c 55%);
    opacity: 0.4;
  }
  55% {
    background-color: #6a747e;
    opacity: 0.72;
  }
  78% {
    background-color: #2a323a;
    opacity: 0.9;
  }
  100% {
    background-color: #080b0f;
    opacity: 1;
  }
}

@keyframes color-overblend-reverse {
  0% {
    background-color: #080b0f;
    opacity: 1;
  }
  22% {
    background-color: #2a323a;
    opacity: 0.9;
  }
  45% {
    background-color: #6a747e;
    opacity: 0.72;
  }
  72% {
    background-color: color-mix(in srgb, var(--tile-color, #888) 45%, #8a939c 55%);
    opacity: 0.4;
  }
  100% {
    background-color: var(--tile-color, #888);
    opacity: 0;
  }
}

@media (min-width: 700px) {
  .view {
    max-width: 900px;
    padding-left: 32px;
    padding-right: 32px;
  }

  body.size-m {
    --cols: 3;
  }
  body.size-l {
    --cols: 3;
  }
  body.size-s {
    --cols: 4;
  }

}

@media (min-width: 1000px) {
  .view {
    max-width: 1080px;
  }

  body.size-m {
    --cols: 4;
  }
  body.size-l {
    --cols: 4;
  }
  body.size-s {
    --cols: 5;
  }
}

/* ——— First-login splash (cinematic) ——— */
/* App-Shell bleibt immer sichtbar — Splash liegt als Overlay darüber.
   Kein opacity:0 mehr (Schwarzschirm beim Reload). */
.app-shell {
  opacity: 1;
  pointer-events: auto;
}

body.splash-playing .app-shell,
body.splash-pending .app-shell {
  pointer-events: none;
}

body.splash-playing {
  overflow: hidden;
}

.splash {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: stretch center;
  align-content: stretch;
  background: #070b10;
  color: var(--brand);
  overflow: hidden;
  opacity: 1;
  transition: opacity 0.35s ease;
}

/* WICHTIG: .splash { display:grid } überschreibt sonst [hidden] → Overlay bleibt nach Reload */
.splash[hidden],
.splash.is-gone {
  display: none !important;
  opacity: 0 !important;
  pointer-events: none !important;
  visibility: hidden !important;
}

.splash.is-leaving {
  opacity: 0;
  pointer-events: none;
}

.splash-stage {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.splash-fog {
  position: absolute;
  inset: -20% -10%;
  background:
    radial-gradient(ellipse 50% 40% at 30% 70%, rgba(64, 120, 127, 0.16), transparent 60%),
    radial-gradient(ellipse 45% 35% at 75% 55%, rgba(40, 80, 90, 0.2), transparent 55%);
  filter: blur(28px);
  opacity: 0;
}

.splash.is-playing .splash-fog-a {
  animation: splash-fog-drift 7s ease-in-out both;
}

.splash.is-playing .splash-fog-b {
  animation: splash-fog-drift-b 8s ease-in-out both;
}

.splash-horizon,
.splash-waves {
  display: none;
}

.splash-sparkles {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(1.5px 1.5px at 12% 28%, rgba(242, 245, 247, 0.45), transparent),
    radial-gradient(1.5px 1.5px at 78% 22%, rgba(242, 245, 247, 0.35), transparent),
    radial-gradient(1.2px 1.2px at 62% 48%, rgba(64, 120, 127, 0.65), transparent),
    radial-gradient(1.2px 1.2px at 28% 62%, rgba(242, 245, 247, 0.28), transparent),
    radial-gradient(1px 1px at 88% 68%, rgba(64, 120, 127, 0.45), transparent);
  opacity: 0;
}

.splash.is-playing .splash-sparkles {
  animation: splash-sparkle 4.5s ease-in-out 1.2s both;
}

.splash-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  justify-content: flex-start;
  padding: calc(12px + var(--safe-top))
    calc(20px + var(--safe-right))
    calc(24px + var(--safe-bottom))
    calc(20px + var(--safe-left));
  max-width: 440px;
  width: 100%;
  min-height: 100%;
  box-sizing: border-box;
}

.splash-top {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  margin-top: 0;
  flex-shrink: 0;
  z-index: 3;
}

.splash-mark {
  width: min(36vw, 132px);
  filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.45));
  opacity: 0;
}

.splash.is-playing .splash-mark {
  animation: splash-fade-in 0.9s ease 0.2s both;
}

.splash-logo {
  width: 100%;
  height: auto;
  display: block;
}

.splash-brand {
  margin: 8px 0 0;
  font-size: clamp(1.65rem, 7vw, 2.15rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--brand);
  opacity: 0;
}

.splash.is-playing .splash-brand {
  animation: splash-fade-in 0.75s ease 0.5s both;
}

.splash-scene {
  position: relative;
  flex: 1;
  width: 100%;
  margin-top: 2vh;
  margin-bottom: 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-height: 220px;
}

.splash.is-login {
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  align-content: start;
}

.splash.is-login .splash-content {
  justify-content: flex-start;
  min-height: auto;
  padding-bottom: calc(32px + var(--safe-bottom));
}

.splash.is-login .splash-mark {
  width: min(28vw, 96px);
}

.splash.is-login .splash-brand {
  font-size: clamp(1.35rem, 5.5vw, 1.75rem);
  margin-top: 4px;
}

.splash.is-login .splash-scene {
  justify-content: flex-start;
  min-height: 0;
  margin-top: 10px;
  flex: 0 0 auto;
}

.splash-wall {
  position: relative;
  width: 100%;
  min-height: 110px;
  margin-bottom: -6px;
  border-radius: 8px;
  background: rgba(22, 32, 38, 0.72);
  border: 1px solid rgba(109, 176, 184, 0.35);
  box-shadow: inset 0 0 28px rgba(0, 0, 0, 0.28);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px 16px 36px;
  opacity: 0;
  transition: min-height 0.35s ease, padding 0.35s ease, margin 0.35s ease;
}

.splash.is-playing .splash-wall {
  animation: splash-fade-in 0.7s ease 0.85s both;
}

.splash.is-login .splash-wall {
  min-height: 0;
  height: auto;
  margin-bottom: 0;
  padding: 22px 16px 18px;
  align-items: stretch;
}

.splash.is-login .splash-writer {
  display: none;
}

.splash-chalk-lines {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.splash.is-login .splash-chalk-lines {
  display: none;
}

.chalk-line {
  margin: 0;
  opacity: 0;
  width: 100%;
  text-align: center;
}

.chalk-text {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  white-space: nowrap;
  font-family: "Outfit", sans-serif;
  letter-spacing: 0.02em;
}

.splash-tagline .chalk-text {
  font-size: clamp(1.05rem, 4.4vw, 1.25rem);
  font-weight: 600;
  color: #6db0b8;
}

.splash-welcome .chalk-text {
  font-size: clamp(1.25rem, 5.2vw, 1.55rem);
  font-weight: 700;
  color: #6db0b8;
}

.splash.is-playing .splash-tagline {
  animation: splash-fade-in 0.15s ease 1.45s both;
}

.splash.is-playing .splash-tagline .chalk-text {
  animation: chalk-type-a 1.7s steps(24, end) 1.45s both;
}

.splash.is-playing .splash-welcome {
  animation: splash-fade-in 0.15s ease 3.25s both;
}

.splash.is-playing .splash-welcome .chalk-text {
  animation: chalk-type-b 1.4s steps(20, end) 3.25s both;
}

.splash-writer {
  position: relative;
  z-index: 2;
  width: min(28vw, 108px);
  margin-top: -10px;
  margin-bottom: 4px;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
}

.splash.is-playing:not(.is-login) .splash-writer {
  animation: splash-dog-in 0.7s ease 1.1s both;
}

.splash-dog {
  width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.4));
}

.splash.is-playing:not(.is-login) .splash-dog {
  animation: splash-write-bob 0.45s ease-in-out 1.45s 10 alternate both;
}

.splash-login {
  width: 100%;
  display: none;
  flex-direction: column;
  gap: 12px;
  text-align: left;
  opacity: 0;
}

.splash.is-login .splash-login {
  display: flex;
  animation: splash-fade-in 0.45s ease both;
}

.splash.is-login .splash-login[hidden] {
  display: none !important;
}

.splash-login-title {
  margin: 0 0 2px;
  text-align: center;
  font-size: 1.1rem;
  font-weight: 700;
  color: #6db0b8;
}

.splash-login-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
  padding-bottom: 2px;
}

.splash-enter {
  appearance: none;
  width: 100%;
  margin-top: 0;
  border: 1px solid rgba(109, 176, 184, 0.55);
  border-radius: 4px;
  padding: 12px 18px;
  font: inherit;
  font-weight: 600;
  font-size: 0.98rem;
  color: #6db0b8;
  background: transparent;
  cursor: pointer;
  opacity: 0;
  flex-shrink: 0;
}

.splash.is-ready .splash-enter,
.splash.is-login .splash-enter {
  opacity: 1;
  animation: splash-fade-in 0.45s ease both;
}

.splash-enter:active {
  transform: scale(0.98);
  background: rgba(109, 176, 184, 0.08);
}

.splash-enter:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(109, 176, 184, 0.28);
}

.splash-resend {
  appearance: none;
  display: block;
  width: 100%;
  margin-top: 0;
  border: 1px solid rgba(109, 176, 184, 0.28);
  border-radius: 4px;
  padding: 12px 14px;
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  color: #9ec8ce;
  background: rgba(109, 176, 184, 0.06);
  text-decoration: none;
  cursor: pointer;
}

.splash-resend:disabled {
  opacity: 0.45;
  cursor: wait;
}

.splash-resend:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(109, 176, 184, 0.28);
}

.splash-resend:active:not(:disabled) {
  transform: scale(0.98);
  background: rgba(109, 176, 184, 0.1);
}

.splash-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #8fb8be;
}

.splash-field input {
  appearance: none;
  border: 1px solid rgba(109, 176, 184, 0.35);
  border-radius: 4px;
  background: rgba(7, 11, 16, 0.55);
  color: #e8f3f2;
  font: inherit;
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  padding: 12px 12px;
  outline: none;
}

.splash-field input::placeholder {
  color: #6a8188;
}

.splash-field input:focus {
  border-color: #6db0b8;
  box-shadow: 0 0 0 2px rgba(109, 176, 184, 0.2);
}

.splash-login-note {
  margin: 0;
  text-align: center;
  font-size: 0.78rem;
  color: #7d9199;
}

.splash-login.is-invalid .splash-field input:invalid,
.splash-login.is-invalid .splash-field input:placeholder-shown {
  border-color: #c45c5c;
}

@keyframes splash-fog-drift {
  0% { opacity: 0; transform: translate(-4%, 6%) scale(1.05); }
  35% { opacity: 0.85; }
  100% { opacity: 0.55; transform: translate(3%, -2%) scale(1.12); }
}

@keyframes splash-fog-drift-b {
  0% { opacity: 0; transform: translate(5%, 8%) scale(1.08); }
  40% { opacity: 0.7; }
  100% { opacity: 0.4; transform: translate(-4%, 0%) scale(1.15); }
}

@keyframes splash-horizon-rise {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes splash-sparkle {
  0%, 100% { opacity: 0.12; }
  50% { opacity: 0.4; }
}

@keyframes splash-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes splash-fade-up {
  from { opacity: 0; transform: translate(-50%, 12px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

@keyframes splash-dog-in {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes splash-write-bob {
  from { transform: translate(0, 0) rotate(0deg); }
  to { transform: translate(3px, -4px) rotate(1.2deg); }
}

@keyframes splash-chalk-spark {
  from { opacity: 0.2; transform: translate(0, 0); }
  to { opacity: 0.9; transform: translate(6px, -3px); }
}

@keyframes splash-arm-write {
  from { transform: rotate(-12deg) translateY(2px); }
  to { transform: rotate(8deg) translateY(-4px); }
}

@keyframes chalk-type-a {
  from { max-width: 0; }
  to { max-width: 22ch; }
}

@keyframes chalk-type-b {
  from { max-width: 0; }
  to { max-width: 20ch; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .splash-mark,
  .splash-brand,
  .splash-tagline,
  .splash-welcome,
  .splash-writer,
  .splash-wall,
  .splash-horizon,
  .splash-fog,
  .chalk-text {
    opacity: 1 !important;
    transform: none !important;
    max-width: none !important;
  }
}

/* --- Handy-Kiosk: Auth, Hubs, To-Do --- */
.logout-btn {
  appearance: none;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.06);
  color: #d7dee6;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.55rem 0.85rem;
  border-radius: var(--radius, 4px);
  cursor: pointer;
}
.logout-btn:active { transform: scale(0.97); }

.splash-login-error {
  margin: 0;
  color: #ff8f9a;
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1.35;
  text-transform: none;
  letter-spacing: 0;
}

.splash-login-error.is-hint {
  color: #8ec4ca;
}

.tile.is-soon { position: relative; }
.tile-soon {
  position: absolute;
  right: 0.55rem;
  bottom: 0.45rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  opacity: 0.85;
  text-transform: uppercase;
}

.view-work {
  overflow-x: hidden;
  max-width: 100%;
}
.work-body {
  padding: 0 0.25rem 2rem;
  max-width: 100%;
  min-width: 0;
  overflow-x: hidden;
}
.work-loading, .work-error, .todo-empty {
  color: #9aa7b5;
  padding: 1rem 0.25rem;
}
.work-error { color: #ff8f9a; }

.work-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 0.5rem 0 1rem;
}
.work-stat {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius, 4px);
  padding: 0.9rem 0.7rem;
  text-align: center;
}
.work-stat strong {
  display: block;
  font-size: 1.35rem;
  color: #f2f6fa;
}
.work-stat span {
  color: #93a1b0;
  font-size: 0.78rem;
}

.todo-board { display: grid; gap: 1.1rem; }
.todo-col-title {
  margin: 0 0 0.55rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: #e8eef4;
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
}
.todo-col-title span {
  color: #8b98a6;
  font-weight: 600;
}
.todo-list { display: grid; gap: 0.65rem; }
.todo-card {
  display: grid;
  gap: 0.65rem;
  padding: 0.85rem 0.9rem;
  border-radius: var(--radius, 4px);
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.09);
}
.todo-card strong,
.todo-card .todo-action-label {
  display: block;
  color: #f4f8fc;
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.25;
}
.todo-title-full {
  margin: 0.15rem 0 0;
  color: #b6c2ce;
  font-size: 0.78rem;
  line-height: 1.3;
}
.todo-meta, .todo-status {
  margin: 0.2rem 0 0;
  color: #93a1b0;
  font-size: 0.82rem;
}
.todo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.todo-action {
  appearance: none;
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(255,255,255,0.07);
  color: #dce5ee;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.45rem 0.7rem;
  border-radius: var(--radius, 4px);
  cursor: pointer;
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.25;
  text-align: center;
}
.todo-action.is-active {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.35);
}
.mp-huta-note { display: none !important; }
.settings-lead,
#program-hub-lead,
#work-lead,
#settings-panel-lead,
.hint,
.prototype-note,
.settings-note,
.pinned-note {
  display: none !important;
}

.mp-dog-list.is-compact { gap: 0.55rem; }
.mp-dog-card.is-compact {
  padding: 0.65rem 0.7rem;
  gap: 0.45rem;
}
.mp-dog-card.is-compact .mp-dog-photo {
  width: 56px;
  height: 56px;
}
.mp-dog-card.is-compact h2 {
  font-size: 1rem;
}
.mp-dog-main { flex: 1; min-width: 0; display: grid; gap: 0.35rem; }
.mp-plan-row.is-compact {
  padding: 0.2rem 0;
  border-top: none;
  gap: 0;
}
.mp-plan-row.is-compact + .mp-plan-row.is-compact {
  border-top: 1px solid rgba(255,255,255,0.06);
  padding-top: 0.35rem;
  margin-top: 0.1rem;
}
.mp-note-preview {
  margin: 0;
  color: #cbd5e1;
  font-size: 0.82rem;
  line-height: 1.35;
  white-space: pre-wrap;
}
.mp-actions { margin-top: 0.15rem; }

.mp-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
}
.mp-card-grid.is-stack {
  grid-template-columns: 1fr;
}
.mp-tile-card {
  appearance: none;
  text-align: left;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.05);
  color: inherit;
  border-radius: var(--radius, 4px);
  padding: 0.9rem 0.85rem;
  display: grid;
  gap: 0.25rem;
  cursor: pointer;
  font: inherit;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
  min-height: 4.75rem;
  height: auto;
  align-content: center;
  overflow: hidden;
}
.mp-tile-card.has-photo {
  grid-template-columns: 52px minmax(0, 1fr);
  align-items: center;
  gap: 0.65rem;
}
.mp-tile-card.has-photo > div {
  display: grid;
  grid-template-rows: auto auto;
  gap: 0.15rem;
  min-width: 0;
}
.mp-tile-card strong,
.mp-tile-card span,
.mp-tile-card em {
  min-width: 0;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: break-word;
  word-break: normal;
  hyphens: manual;
}
.mp-tile-card.has-photo strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mp-tile-card strong {
  color: #f4f8fc;
  font-size: 0.95rem;
  line-height: 1.3;
  font-weight: 700;
}
.mp-card-grid.is-stack .mp-tile-card {
  min-height: 3.75rem;
}
.mp-card-grid.is-stack .mp-tile-card strong {
  font-size: clamp(0.78rem, 3.5vw, 0.95rem);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mp-tile-card span, .mp-tile-card em {
  color: #93a1b0;
  font-size: 0.8rem;
  font-style: normal;
  line-height: 1.35;
}
.mp-tile-card.is-new {
  border-style: dashed;
  border-color: rgba(255,255,255,0.28);
  background: rgba(255,255,255,0.03);
  place-items: center;
  text-align: center;
  align-content: center;
}
.mp-tile-card.is-muted { opacity: 0.65; }
.mp-tile-card.is-readonly { cursor: default; opacity: 0.9; }
.mp-tile-photo {
  width: 52px; height: 52px; border-radius: 8px; object-fit: cover;
  border: 1px solid rgba(255,255,255,0.12);
}
.mp-tile-photo.is-empty {
  background: rgba(255,255,255,0.06);
}
.mp-plans-dog { display: grid; gap: 0.75rem; }
.mp-subhead {
  margin: 0.35rem 0 0;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(244,248,252,0.72);
}
.mp-tile-card.is-drawer-apply {
  border-color: rgba(14, 116, 144, 0.55);
  background: rgba(14, 116, 144, 0.18);
}
.dogs-kartei, .dogs-detail { display: grid; gap: 0.75rem; }
.dogs-toolbar { display: grid; gap: 0.55rem; }
.dogs-search {
  width: 100%;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(0,0,0,0.25);
  color: #f4f8fc;
  border-radius: var(--radius, 4px);
  padding: 0.7rem 0.8rem;
  font: inherit;
}
.dogs-filters { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.dogs-actions { display: flex; flex-wrap: wrap; gap: 0.4rem; }

/* Karteikarte (angelehnt an Suite/karteikarte) */
.kk-handy { display: grid; gap: 0.75rem; }
.kk-toolbar { display: grid; gap: 0.55rem; }
.kk-search {
  width: 100%;
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(8, 14, 24, 0.75);
  color: #e8eefc;
  border-radius: 10px;
  padding: 0.75rem 0.9rem;
  font: inherit;
}
.kk-stats { margin: 0; color: #8fa3b3; font-size: 0.82rem; }
.kk-filters { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.kk-abc {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  padding-bottom: 0.15rem;
}
.kk-abc-btn {
  flex: 0 0 auto;
  min-width: 1.85rem;
  height: 1.85rem;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.05);
  color: #d7e2f0;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 700;
}
.kk-abc-btn.is-active { background: rgba(34, 211, 238, 0.22); border-color: rgba(34, 211, 238, 0.5); }
.kk-abc-btn.is-empty { opacity: 0.45; }
.kk-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
}
@media (min-width: 720px) {
  .kk-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.kk-card {
  text-align: left;
  border: 1px solid rgba(255,255,255,0.1);
  background: #121c2e;
  color: inherit;
  border-radius: 14px;
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  font: inherit;
  display: grid;
  box-shadow: 0 10px 22px rgba(0,0,0,0.28);
}
.kk-card-tap { transform: scale(0.98); }
.kk-card.is-inactive { opacity: 0.72; }
.kk-card-photo {
  position: relative;
  aspect-ratio: 4 / 5;
  background: #0b1220;
  overflow: hidden;
}
.kk-card-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.kk-card-photo-placeholder {
  height: 100%;
  display: grid;
  place-items: center;
  font-size: 2rem;
  font-weight: 800;
  color: #6d7f9a;
}
.kk-card-body { padding: 0.65rem 0.7rem 0.8rem; display: grid; gap: 0.2rem; min-width: 0; }
.kk-card-name {
  font-weight: 800;
  color: #f4f8fc;
  font-size: 0.9rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.kk-card-breed {
  color: #8fb8be;
  font-size: 0.76rem;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.kk-card-meta { color: #93a1b0; font-size: 0.72rem; line-height: 1.35; display: grid; gap: 0.15rem; margin-top: 0.2rem; }
.kk-card-badge {
  position: absolute;
  right: 8px; bottom: 8px;
  background: rgba(8,14,24,0.82);
  border: 1px solid rgba(255,255,255,0.18);
  color: #e8eefc;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.2rem 0.4rem;
  border-radius: 999px;
}
.kk-card-new { border-style: dashed; border-color: rgba(34, 211, 238, 0.4); }
.kk-card-photo-new {
  display: grid;
  place-items: center;
  background: linear-gradient(160deg, #163342, #0b1220);
}
.kk-card-new-paw { font-size: 2.4rem; color: #22d3ee; font-weight: 700; }
.kk-rainbow-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(120deg, rgba(255,0,0,.18), rgba(255,165,0,.18), rgba(255,255,0,.16), rgba(0,128,0,.16), rgba(0,0,255,.16), rgba(75,0,130,.18));
  display: grid; place-items: end center;
  padding: 0.5rem;
}
.kk-rainbow-msg {
  background: rgba(8,14,24,0.78);
  color: #ffe4f1;
  font-weight: 700;
  font-size: 0.78rem;
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
}
.kk-dialog-overlay {
  position: fixed;
  inset: 0;
  z-index: 21000;
  background: rgba(2, 6, 23, 0.72);
  display: grid;
  place-items: stretch stretch;
  padding: 0;
}
.kk-dialog {
  width: 100%;
  height: 100%;
  max-height: 100dvh;
  overflow: hidden;
  background: #0f1728;
  border: 0;
  border-radius: 0;
  padding: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}
.kk-dialog-head {
  display: flex;
  justify-content: space-between;
  gap: 0.6rem;
  align-items: flex-start;
  padding: calc(0.75rem + var(--safe-top)) 0.85rem 0.65rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  background: #0f1728;
  position: sticky;
  top: 0;
  z-index: 2;
}
.kk-dialog-head-text { min-width: 0; flex: 1; }
.kk-dialog-head h2 { margin: 0; font-size: 1.1rem; color: #f4f8fc; word-break: break-word; }
.kk-dialog-breed { margin: 0.15rem 0 0; color: #8fb8be; font-size: 0.85rem; }
.mp-card-grid.is-compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
}
.mp-tile-card.is-compact {
  min-height: 3.35rem;
  height: auto;
  padding: 0.7rem 0.75rem;
  place-items: center;
  align-content: center;
  text-align: center;
}
.mp-tile-card.is-compact strong {
  font-size: 0.88rem;
  line-height: 1.2;
  font-weight: 700;
  white-space: nowrap;
}
.mp-tile-card.is-danger {
  border-color: rgba(251,113,133,0.35);
}
.mp-tile-card.is-danger strong { color: #fecdd3; }
.kk-dialog-head-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
  width: auto;
  min-width: 12.5rem;
  max-width: 15rem;
  flex: 0 0 auto;
}
.kk-dialog-section { margin-top: 0.85rem; }
.kk-edit-only { display: grid; gap: 0.25rem; margin-top: 0.5rem; }
.kk-edit-only[hidden] { display: none !important; }
.kk-dialog-body {
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0.85rem;
  padding-bottom: calc(0.85rem + var(--safe-bottom));
  min-height: 0;
}
.kk-empty-docs {
  margin: 0.35rem 0 0;
  color: #8b9bb0;
  font-size: 0.88rem;
  grid-column: 1 / -1;
}
.kk-dialog-hero { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 0.85rem; align-items: start; }
.kk-dialog-hero.is-photo-only { grid-template-columns: 1fr; max-width: 260px; }
.kk-dialog-hero.is-photo-zoomed {
  grid-template-columns: 1fr;
  max-width: none;
}
.kk-dialog-hero.is-photo-zoomed .kk-dialog-facts { display: none; }
.kk-dialog-photo {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: #0b1220;
  aspect-ratio: 4/5;
  transition: aspect-ratio 0.2s ease, max-height 0.2s ease;
}
.kk-dialog-photo.is-zoomable {
  cursor: zoom-in;
  -webkit-tap-highlight-color: transparent;
}
.kk-dialog-photo.is-zoomed {
  cursor: zoom-out;
  aspect-ratio: auto;
  max-height: min(72dvh, 620px);
  width: 100%;
}
.kk-dialog-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.kk-dialog-photo.is-zoomed img { object-fit: contain; max-height: min(72dvh, 620px); background: #000; }
.kk-dialog-facts { margin: 0; display: grid; gap: 0.45rem; }
.kk-dialog-facts dt { color: #7f93a8; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.04em; }
.kk-dialog-facts dd { margin: 0.1rem 0 0; color: #e8eefc; font-size: 0.9rem; }
.kk-dialog-section h3, .kk-acc summary {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(244,248,252,0.72);
}
.kk-docs-list { display: grid; gap: 0.4rem; margin-top: 0.45rem; }
.kk-doc-row {
  text-align: left;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.04);
  color: inherit;
  border-radius: 8px;
  padding: 0.65rem 0.7rem;
  display: grid; gap: 0.15rem;
  font: inherit; cursor: pointer;
}
.kk-doc-row.is-manage { display: flex; justify-content: space-between; gap: 0.5rem; align-items: center; cursor: default; }
.kk-doc-row strong { color: #f4f8fc; font-size: 0.9rem; }
.kk-doc-row span, .kk-doc-row em { color: #93a1b0; font-size: 0.75rem; font-style: normal; }
.kk-doc-hint { color: #a8b4c4 !important; }
.kk-dialog .todo-action.is-active {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.22);
  color: #e8eef8;
}
.kk-abc-btn.is-active {
  background: rgba(255,255,255,0.14);
  border-color: rgba(255,255,255,0.28);
  color: #f4f8fc;
}
.kk-edit-drawer { display: grid; gap: 0.55rem; margin-top: 0.4rem; }
.kk-acc {
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  background: rgba(255,255,255,0.03);
  padding: 0.35rem 0.55rem 0.55rem;
}
.kk-acc summary { cursor: pointer; padding: 0.45rem 0.15rem; }
.kk-acc-body { padding-top: 0.35rem; }
body.kk-dialog-open { overflow: hidden; }

.handy-modal {
  position: fixed;
  inset: 0;
  z-index: 22000;
  background: rgba(0,0,0,0.62);
  display: grid;
  place-items: stretch stretch;
  padding: 0;
}
.handy-modal-card {
  width: 100%;
  height: 100%;
  max-height: 100dvh;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  background: #121820;
  border: 0;
  border-radius: 0;
  padding: calc(0.85rem + var(--safe-top)) 0.9rem calc(1.1rem + var(--safe-bottom));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 0.75rem;
}
.handy-modal-body { overflow: auto; min-height: 0; -webkit-overflow-scrolling: touch; }
.handy-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.handy-modal-head h2 {
  margin: 0;
  font-size: 1.05rem;
  color: #f4f8fc;
}
.handy-modal-x {
  appearance: none;
  border: none;
  background: transparent;
  color: #cbd5e1;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.2rem 0.4rem;
}
.handy-modal-foot {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(6.5rem, 1fr));
  gap: 0.45rem;
  position: sticky;
  bottom: 0;
  background: #121820;
  padding-top: 0.35rem;
}
.handy-modal-foot .mp-tile-card { width: 100%; }
.kk-doc-manage-acts { display: flex; gap: 0.35rem; flex-wrap: wrap; justify-content: flex-end; }
.mp-note-modal,
.mp-form.is-modal textarea,
.mp-form.is-modal input,
.mp-form.is-modal select {
  width: 100%;
  box-sizing: border-box;
}
.mp-note-modal {
  min-height: 7rem;
  border-radius: var(--radius, 4px);
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(0,0,0,0.25);
  color: #e8eef4;
  padding: 0.7rem;
  font: inherit;
}
@media (min-width: 720px) {
  .handy-modal { place-items: center; padding: 1rem; }
  .handy-modal-card {
    width: min(100%, 520px);
    height: auto;
    max-height: min(92dvh, 860px);
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.12);
  }
  .kk-dialog-overlay { place-items: center; padding: 1rem; }
  .kk-dialog {
    width: min(100%, 560px);
    height: auto;
    max-height: min(92dvh, 900px);
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.12);
  }
}

/* --- MediPlan Handy --- */
.mp-slotbar { display:flex; flex-wrap:wrap; gap:0.45rem; margin:0 0 1rem; }
.todo-action.is-active { background: rgba(196,92,38,0.35); border-color: rgba(255,255,255,0.35); }
.todo-action.is-danger { border-color: rgba(251,113,133,0.45); color:#fecdd3; }
.mp-dog-list { display:grid; gap:0.9rem; }
.mp-dog-card {
  padding: 0.9rem;
  border-radius: var(--radius, 4px);
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.09);
  display: grid;
  gap: 0.7rem;
}
.mp-dog-head { display:flex; gap:0.75rem; align-items:flex-start; }
.mp-dog-head h2 { margin:0; font-size:1.15rem; color:#f4f8fc; display:flex; flex-wrap:wrap; gap:0.4rem; align-items:center; }
.mp-dog-photo {
  width: 72px; height: 72px; border-radius: 8px; object-fit: cover;
  border: 1px solid rgba(255,255,255,0.15); flex: 0 0 auto;
}
.mp-dog-photo.is-empty {
  display:flex; align-items:center; justify-content:center;
  background: rgba(255,255,255,0.06); font-size: 1.4rem;
}
.mp-badge {
  font-size: 0.72rem; font-weight: 700; padding: 0.2rem 0.45rem;
  border-radius: 4px; border: 1px solid rgba(255,255,255,0.15);
}
.mp-badge.ok { background: rgba(52,211,153,0.18); color:#a7f3d0; }
.mp-badge.no { background: rgba(251,113,133,0.18); color:#fecdd3; }
.mp-badge.open { background: rgba(148,163,184,0.15); color:#cbd5e1; }
.mp-plan-row {
  display:grid; gap:0.15rem; padding:0.45rem 0;
  border-top: 1px solid rgba(255,255,255,0.07);
}
.mp-plan-row strong { color:#f1f5f9; }
.mp-plan-row span, .mp-plan-row em { color:#93a1b0; font-size:0.85rem; font-style:normal; }
.mp-note-label { display:grid; gap:0.35rem; color:#cbd5e1; font-size:0.85rem; font-weight:600; }
.mp-note {
  width:100%; min-height: 4.2rem; resize: vertical;
  border-radius: var(--radius, 4px);
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(0,0,0,0.25); color:#e8eef4;
  font: inherit; padding: 0.55rem 0.65rem;
}
.mp-form {
  display:grid; gap:0.65rem; margin-bottom:1rem;
  padding:0.9rem; border-radius: var(--radius,4px);
  background: rgba(255,255,255,0.04); border:1px solid rgba(255,255,255,0.08);
}
.mp-form h2 { margin:0; font-size:1rem; color:#f1f5f9; }
.mp-form label { display:grid; gap:0.3rem; color:#cbd5e1; font-size:0.85rem; font-weight:600; }
.mp-form input, .mp-form textarea, .mp-form select {
  border-radius: var(--radius,4px);
  border:1px solid rgba(255,255,255,0.14);
  background: rgba(0,0,0,0.25); color:#e8eef4;
  font: inherit; padding: 0.5rem 0.6rem;
}
.mp-slots { border:none; padding:0; margin:0; display:flex; flex-wrap:wrap; gap:0.6rem; color:#cbd5e1; }
.mp-slots label { display:flex; align-items:center; gap:0.35rem; font-weight:600; }
.pack-days { flex-wrap: wrap; }

/* —— User-Verwaltung —— */
.users-list { display: grid; gap: 0.75rem; }
.users-card {
  display: grid; gap: 0.35rem; text-align: left;
  width: 100%; padding: 0.85rem 0.95rem;
  border-radius: var(--radius, 4px);
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.04);
  color: inherit; font: inherit; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.users-card:active { background: rgba(255,255,255,0.08); }
.users-card-top {
  display: flex; flex-wrap: wrap; align-items: baseline;
  justify-content: space-between; gap: 0.4rem;
}
.users-card-top strong { color: #f1f5f9; font-size: 1.02rem; }
.users-card-user { color: #94a3b8; font-weight: 500; font-size: 0.88rem; }
.users-card-meta { color: #94a3b8; font-size: 0.82rem; }
.users-badges, .users-apps { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.users-pill {
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.02em;
  padding: 0.15rem 0.45rem; border-radius: 999px;
  background: rgba(255,255,255,0.08); color: #cbd5e1;
}
.users-pill.ok { background: rgba(34,197,94,0.18); color: #86efac; }
.users-pill.bad { background: rgba(239,68,68,0.18); color: #fca5a5; }
.users-pill.soft { background: rgba(184,134,11,0.22); color: #f0d78c; }
.users-app {
  font-size: 0.75rem; padding: 0.12rem 0.4rem;
  border-radius: 3px; background: rgba(255,255,255,0.06); color: #a8b4c4;
}
.users-muted { color: #94a3b8; font-size: 0.82rem; margin: 0; overflow-wrap: anywhere; }
.users-form {
  display: grid; gap: 1rem; padding-bottom: 2rem;
  width: 100%; max-width: 100%; min-width: 0;
}
.users-section {
  display: grid; gap: 0.65rem;
  padding: 0.9rem; border-radius: var(--radius, 4px);
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08);
  max-width: 100%; min-width: 0;
}
.users-section h3 {
  margin: 0 0 0.15rem; font-size: 0.95rem; color: #f1f5f9; font-weight: 700;
}
.users-field {
  display: grid; gap: 0.3rem; color: #cbd5e1; font-size: 0.85rem; font-weight: 600;
  min-width: 0; max-width: 100%;
  overflow-wrap: anywhere;
}
.users-field input, .users-field select {
  width: 100%; max-width: 100%; min-width: 0;
  box-sizing: border-box;
  border-radius: var(--radius, 4px);
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(0,0,0,0.25); color: #e8eef4;
  font: inherit; padding: 0.55rem 0.65rem;
}
.users-field input[readonly] { opacity: 0.7; }
.users-check {
  display: flex; align-items: flex-start; gap: 0.45rem;
  color: #cbd5e1; font-size: 0.88rem; font-weight: 600;
  min-width: 0; max-width: 100%;
  overflow-wrap: anywhere; word-break: break-word;
}
.users-check input { margin-top: 0.15rem; flex-shrink: 0; }
.users-checks { display: grid; gap: 0.45rem; min-width: 0; max-width: 100%; }
.users-row2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
  min-width: 0; max-width: 100%;
}
@media (max-width: 380px) {
  .users-row2 { grid-template-columns: 1fr; }
}
.users-form-actions {
  display: flex; flex-wrap: wrap; gap: 0.55rem; position: sticky; bottom: 0;
  max-width: 100%; min-width: 0;
  padding: 0.65rem 0 0.2rem; background: linear-gradient(to top, rgba(12,16,22,0.98), rgba(12,16,22,0.85) 70%, transparent);
}
.users-btn {
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: var(--radius, 4px);
  background: rgba(255,255,255,0.08); color: #e8eef4;
  font: inherit; font-weight: 700; padding: 0.65rem 1rem; cursor: pointer;
  max-width: 100%; box-sizing: border-box;
}
.users-btn.primary { background: #b8860b; border-color: #9a7209; color: #1a1408; }
.users-btn.danger { background: rgba(239,68,68,0.2); border-color: rgba(239,68,68,0.45); color: #fecaca; }
.users-btn.soft { background: rgba(255,255,255,0.06); }
.users-btn:disabled { opacity: 0.55; cursor: default; }
.users-form-msg { margin: 0; font-size: 0.88rem; font-weight: 600; }
.users-form-msg.is-ok { color: #86efac; }
.users-form-msg.is-err { color: #fca5a5; }
.users-certs { display: grid; gap: 0.55rem; }
.users-cert {
  display: grid; gap: 0.3rem; padding: 0.65rem 0.75rem;
  border-radius: var(--radius, 4px);
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(0,0,0,0.2);
  min-width: 0; max-width: 100%;
  overflow-wrap: anywhere; word-break: break-word;
}
.users-cert.is-dim { opacity: 0.65; }
.users-cert-actions { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.2rem; }
.users-cert-actions .users-btn { padding: 0.4rem 0.7rem; font-size: 0.82rem; }

/* —— Buchung Kalender + Aufenthalt Check-in (Handy) —— */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 2.75rem;
  padding: 0.65rem 1rem;
  border-radius: var(--radius, 4px);
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.08);
  color: #e8eef4;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.btn.primary {
  background: #0f7a6c;
  border-color: #0c655a;
  color: #f0fffc;
}
.btn:disabled { opacity: 0.55; cursor: default; }
.buchung-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.55rem;
}
.buchung-card.is-preliminary,
.buchung-chip-card.is-preliminary {
  border-color: rgba(148, 163, 184, 0.45);
  background: rgba(100, 116, 139, 0.12);
}
.buchung-detail-title {
  margin: 0 0 0.35rem;
  font-size: 1.35rem;
  color: #f1f5f9;
}

.buchung-cal { display: grid; gap: 0.75rem; }
.buchung-cal-title { font-size: 1.15rem; color: #f1f5f9; font-weight: 750; letter-spacing: -0.02em; }
.buchung-cal-view {
  min-height: 2.6rem;
  border-radius: 10px;
  border: 0;
  background: transparent;
  color: #94a3b8;
  font: inherit;
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
}
.buchung-cal-view.is-active {
  background: rgba(10, 132, 255, 0.2);
  color: #e8f1ff;
}
.buchung-cal-body { min-height: 12rem; }

/* —— iPhone Calendar Layout (First Impression = Month) —— */
/* FC-Kalender: volle Viewport-Breite (kein .view max-width/padding Box-in-Box) */
.view-work.is-fc-cal {
  max-width: none;
  width: 100%;
  margin: 0;
  padding-left: 0;
  padding-right: 0;
  padding-top: 0;
}
.view-work.is-apple-cal {
  background: #000;
  color: #f5f5f7;
}
.view-work.is-apple-cal .detail-header {
  padding: 0.05rem 0.15rem 0;
  border: 0;
  background: #000;
  min-height: 2.2rem;
}
.view-work.is-apple-cal .back-btn {
  color: #0a84ff;
  font-weight: 650;
  gap: 0;
  padding-left: 0.15rem;
  min-height: 2.2rem;
}
.view-work.is-apple-cal #work-back-label {
  display: none;
}
.view-work.is-apple-cal #work-title {
  display: none !important;
}
.view-work.is-apple-cal .work-body {
  min-height: calc(100dvh - 2.4rem);
}
.view-work.is-fc-cal .work-body.is-cal-mode,
.view-work.is-apple-cal .work-body.is-cal-mode {
  display: flex;
  flex-direction: column;
  min-height: calc(100dvh - 2.4rem);
  padding: 0;
  margin: 0;
  background: #000;
  color: #f5f5f7;
}
.view-work.is-fc-cal .work-body.is-cal-mode .work-lead,
.view-work.is-apple-cal .work-body.is-cal-mode .work-lead { display: none !important; }
.ac-cal {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  gap: 0;
  background: #000;
  padding: 0 0.55rem;
  position: relative;
}
.work-body.is-cal-mode .buchung-cal-view {
  color: #8e8e93;
}
.work-body.is-cal-mode .buchung-cal-view.is-active {
  background: rgba(10, 132, 255, 0.22);
  color: #fff;
}
.ac-cal-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  padding: 0.35rem 0 0.2rem;
  flex-shrink: 0;
}
.ac-cal-title {
  appearance: none;
  border: 0;
  background: transparent;
  color: #fff;
  font: inherit;
  font-size: clamp(1.55rem, 7vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  text-align: left;
  padding: 0.15rem 0;
  cursor: pointer;
  min-height: 2.75rem;
  line-height: 1.05;
  max-width: 58%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ac-cal-bar-right {
  display: flex;
  align-items: center;
  gap: 0.05rem;
  flex-shrink: 0;
}
.ac-cal-icon-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: #0a84ff;
  font-size: 1.15rem;
  font-weight: 700;
  min-height: 2.75rem;
  min-width: 2.35rem;
  border-radius: 10px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.ac-cal-icon-btn svg { display: block; }
.ac-view-pop {
  position: absolute;
  right: 0.75rem;
  top: 4.2rem;
  z-index: 40;
  display: grid;
  gap: 0.15rem;
  min-width: 9.5rem;
  padding: 0.35rem;
  border-radius: 14px;
  background: rgba(44, 44, 46, 0.96);
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 12px 40px rgba(0,0,0,0.45);
}
.ac-view-opt {
  appearance: none;
  border: 0;
  background: transparent;
  color: #f5f5f7;
  font: inherit;
  font-weight: 650;
  text-align: left;
  padding: 0.7rem 0.85rem;
  border-radius: 10px;
  cursor: pointer;
}
.ac-view-opt.is-active {
  background: #0a84ff;
  color: #fff;
}
.ac-search-panel {
  flex-shrink: 0;
  padding: 0.35rem 0 0.55rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.ac-search-results {
  max-height: 40vh;
  overflow-y: auto;
  margin-top: 0.45rem;
}
.ac-cal-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  position: relative;
}
.ac-cal-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.2rem;
  padding: 0.4rem 0 0.25rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  flex-shrink: 0;
  background: #000;
}
.ac-month-layout {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  gap: 0;
}
.ac-cal-pane {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.ac-month-layout.is-list-mode .ac-cal-pane {
  flex: 0 0 46%;
  max-height: 46%;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
.ac-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0;
  color: #8e8e93;
  font-size: 0.68rem;
  font-weight: 700;
  text-align: center;
  padding: 0.2rem 0 0.35rem;
  user-select: none;
  flex-shrink: 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.ac-month-layout.mode-details .ac-day-ev {
  flex-direction: column;
  align-items: stretch;
  padding: 0 0.1rem;
  gap: 0.08rem;
}
.ac-month-vscroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  touch-action: pan-y;
  scrollbar-width: none;
}
.ac-month-vscroll::-webkit-scrollbar { display: none; }

/* Apple-Monat: jeder Monat = eigener Block mit Überschrift + Raster */
.ac-month-block {
  display: block;
  padding: 0 0 1.15rem;
  margin: 0 0 0.35rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.ac-month-block:last-child {
  border-bottom: 0;
  margin-bottom: 0;
  padding-bottom: 1.5rem;
}
.ac-month-block-title {
  position: sticky;
  top: 0;
  z-index: 3;
  margin: 0;
  padding: 0.7rem 0.4rem 0.5rem;
  font-size: 1.42rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.2;
  color: #f5f5f7;
  background: linear-gradient(#000 70%, rgba(0, 0, 0, 0.92));
  pointer-events: none;
}
.ac-month-block-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.ac-week-row {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0;
  min-height: var(--ac-week-h, 3.55rem);
}
.ac-month-layout.mode-stacked {
  --ac-week-h: 4.15rem;
}
.ac-month-layout.mode-details {
  --ac-week-h: 5.5rem;
}
.ac-month-layout.mode-details.is-dense {
  --ac-week-h: 6.6rem;
}
.ac-month-layout.mode-details.is-dense .ac-detail-pill.is-time {
  display: block;
}
.ac-month-layout.mode-stacked .ac-week-row,
.ac-month-layout.mode-details .ac-week-row {
  min-height: var(--ac-week-h);
}
.ac-day-cell {
  appearance: none;
  border: 0;
  background: transparent;
  color: #f5f5f7;
  font: inherit;
  min-height: inherit;
  padding: 0.12rem 0.05rem 0.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.12rem;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.ac-day-cell.is-muted { color: #636366; }
.ac-day-cell.is-muted .ac-day-num { color: #636366; }
.ac-day-num-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.12rem;
  min-height: 1.85rem;
}
.ac-day-mon {
  font-size: 0.58rem;
  font-weight: 700;
  color: #8e8e93;
  text-transform: uppercase;
}
.ac-day-num {
  width: 1.85rem;
  height: 1.85rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 650;
  font-size: 0.98rem;
  border-radius: 50%;
  color: #f5f5f7;
}
.ac-day-cell.is-today .ac-day-num {
  background: #ff453a;
  color: #fff;
}
.ac-day-cell.is-selected .ac-day-num {
  background: #0a84ff;
  color: #fff;
}
.ac-day-cell.is-today.is-selected .ac-day-num {
  background: #ff453a;
  box-shadow: 0 0 0 2px rgba(10, 132, 255, 0.9);
}
.ac-day-ev {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.12rem;
  width: 100%;
  min-height: 0.4rem;
}
.ac-day-dots { gap: 0.14rem; }
.ac-dot {
  width: 0.34rem;
  height: 0.34rem;
  border-radius: 50%;
  display: inline-block;
  background: #64d2ff;
}
.ac-dot.is-ok { background: #30d158; }
.ac-dot.is-pre { background: #ff9f0a; }
.ac-dot.is-gone { background: #8e8e93; }
.ac-day-stack {
  flex-direction: column;
  align-items: stretch;
  padding: 0 0.15rem;
  gap: 0.1rem;
}
.ac-stack-bar {
  display: block;
  height: 0.28rem;
  border-radius: 999px;
  background: #64d2ff;
}
.ac-stack-bar.is-ok { background: #30d158; }
.ac-stack-bar.is-pre { background: #ff9f0a; }
.ac-stack-bar.is-gone { background: #8e8e93; }
.ac-detail-pill {
  display: block;
  width: 100%;
  font-size: 0.52rem;
  font-weight: 700;
  line-height: 1.15;
  padding: 0.08rem 0.18rem;
  border-radius: 3px;
  color: #fff;
  background: #0a84ff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: left;
}
.ac-detail-pill.is-ok { background: #30d158; }
.ac-detail-pill.is-pre { background: #ff9f0a; color: #1c1c1e; }
.ac-detail-pill em.ac-detail-time {
  display: block;
  font-style: normal;
  font-size: 0.48rem;
  opacity: 0.9;
  font-weight: 650;
}
.ac-events {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0.65rem 0.1rem 1rem;
  overscroll-behavior: contain;
}
.ac-events-head {
  margin-bottom: 0.55rem;
  color: #f5f5f7;
  font-size: 1.05rem;
}
.ac-events-empty { padding: 0.35rem 0; }
.ac-chip-swatch {
  width: 0.45rem;
  align-self: stretch;
  border-radius: 999px;
  background: #ff9f0a;
  flex-shrink: 0;
}
.ac-chip-swatch.is-ok { background: #30d158; }
.ac-chip-swatch.is-pre { background: #ff9f0a; }
.ac-chip-swatch.is-gone { background: #8e8e93; }
.bc-handy-card { display: flex; align-items: stretch; gap: 0.55rem; }
.ac-event-detail { display: grid; gap: 0.85rem; padding-bottom: 1rem; }
.ac-event-hero { display: grid; gap: 0.25rem; }
.ac-event-actions { margin-top: 0.35rem; }
.ac-delete-event {
  appearance: none;
  border: 0;
  background: transparent;
  color: #ff453a;
  font: inherit;
  font-size: 1.05rem;
  font-weight: 650;
  min-height: 3.1rem;
  width: 100%;
  text-align: center;
  cursor: pointer;
  padding: 0.85rem 0.5rem 1.25rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  margin-top: 0.5rem;
}
.ac-later-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  background: rgba(142, 142, 147, 0.28);
  color: #aeaeb2;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: lowercase;
}
.ac-hint-stub .ac-hint-note {
  margin: 0;
  padding: 0 0.9rem 0.75rem;
  font-size: 0.8rem;
}
.ac-ctx-menu {
  position: fixed;
  z-index: 120;
  min-width: 10.5rem;
  padding: 0.3rem;
  border-radius: 14px;
  background: rgba(44, 44, 46, 0.97);
  border: 1px solid rgba(255,255,255,0.14);
  box-shadow: 0 14px 40px rgba(0,0,0,0.5);
  display: grid;
  gap: 0.1rem;
}
.ac-ctx-item {
  appearance: none;
  border: 0;
  background: transparent;
  color: #f5f5f7;
  font: inherit;
  font-weight: 650;
  text-align: left;
  padding: 0.75rem 0.9rem;
  border-radius: 10px;
  cursor: pointer;
}
.ac-ctx-item:active,
.ac-ctx-item:hover { background: rgba(10, 132, 255, 0.35); }
.ac-ctx-item.is-danger { color: #ff453a; }
.ac-allday-event,
.ac-week-event {
  position: relative;
  touch-action: none;
}
.ac-allday-event.is-dragging,
.ac-week-event.is-dragging {
  opacity: 0.85;
  z-index: 5;
}
.ac-allday-event.is-saving,
.ac-week-event.is-saving { opacity: 0.55; }
.ac-ev-handle {
  position: absolute;
  top: 50%;
  width: 0.55rem;
  height: 0.55rem;
  margin-top: -0.28rem;
  border-radius: 50%;
  background: #fff;
  border: 2px solid rgba(0,0,0,0.35);
  z-index: 2;
  touch-action: none;
}
.ac-ev-handle-start { left: -0.15rem; }
.ac-ev-handle-end { right: -0.15rem; }

/* Apple Querformat: Wochenkalender */
.ac-week-layout {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  gap: 0.35rem;
}
.ac-week-nav {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.35rem;
  padding: 0.15rem 0.1rem;
}
.ac-week-nav strong {
  text-align: center;
  font-size: 0.95rem;
  color: #f5f5f7;
}
.ac-week-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0;
  flex: 1;
  min-height: 0;
  border-top: 1px solid rgba(255,255,255,0.12);
  overflow: hidden;
}
.ac-week-col {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border-right: 1px solid rgba(255,255,255,0.1);
  min-height: 0;
}
.ac-week-col:last-child { border-right: 0; }
.ac-week-col.is-today { background: rgba(255, 69, 58, 0.06); }
.ac-week-col.is-selected { background: rgba(10, 132, 255, 0.08); }
.ac-week-col-head {
  appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  padding: 0.45rem 0.1rem 0.35rem;
  cursor: pointer;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.ac-week-wd {
  font-size: 0.65rem;
  font-weight: 700;
  color: #8e8e93;
  text-transform: uppercase;
}
.ac-week-num {
  width: 1.7rem;
  height: 1.7rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-weight: 700;
  font-size: 0.92rem;
}
.ac-week-col.is-today .ac-week-num {
  background: #ff453a;
  color: #fff;
}
.ac-week-col-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0.3rem 0.2rem 0.6rem;
  display: grid;
  gap: 0.28rem;
  align-content: start;
}
.ac-week-empty {
  margin: 0.35rem 0;
  text-align: center;
  font-size: 0.75rem;
}
.ac-week-event {
  appearance: none;
  border: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.05rem;
  text-align: left;
  padding: 0.3rem 0.45rem;
  border-radius: 6px;
  background: #ff9f0a;
  color: #1c1c1e;
  font: inherit;
  cursor: pointer;
  width: 100%;
  box-sizing: border-box;
}
.ac-week-event strong {
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}
.ac-week-event span {
  font-size: 0.58rem;
  opacity: 0.85;
}
.ac-week-event.is-ok { background: #30d158; color: #003214; }
.ac-week-event.is-pre { background: #ff9f0a; color: #1c1c1e; }
.ac-week-event.is-gone { background: #8e8e93; color: #1c1c1e; }
.ac-week-hint {
  margin: 0;
  padding: 0.15rem 0.25rem 0.35rem;
  font-size: 0.72rem;
  color: #8e8e93;
  text-align: center;
}
@media (orientation: landscape) {
  .work-body.is-cal-mode .ac-cal-tabs {
    padding: 0.2rem 0;
  }
  .ac-week-grid {
    max-height: calc(100dvh - 8.5rem);
  }
}

.ac-snap-track {
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
  touch-action: pan-x;
}
.ac-snap-track::-webkit-scrollbar { display: none; }
.ac-snap-page {
  flex: 0 0 100%;
  width: 100%;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  box-sizing: border-box;
}
.ac-day-layout {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.ac-day-layout .ac-snap-track {
  flex: 1;
  min-height: 0;
  overflow-y: hidden;
}
.ac-day-page {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0.15rem 0.05rem 1.25rem;
  max-height: none;
  height: 100%;
}
.ac-day-timeline-date {
  margin: 0 0 0.45rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: #f5f5f7;
  padding: 0 0.15rem;
}
.ac-allday-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: #8e8e93;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  writing-mode: horizontal-tb;
}
.ac-allday-section {
  display: grid;
  grid-template-columns: 3.4rem 1fr;
  gap: 0.35rem;
  align-items: start;
  padding: 0.15rem 0 0.55rem;
  border-bottom: 1px solid rgba(255,255,255,0.12);
  margin-bottom: 0.15rem;
}
.ac-allday-rail {
  padding-top: 0.35rem;
}
.ac-allday-items {
  display: grid;
  gap: 0.28rem;
  min-height: 1.6rem;
}
.ac-allday-empty {
  margin: 0.2rem 0;
  font-size: 0.85rem;
}
.ac-allday-event {
  appearance: none;
  border: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.05rem;
  text-align: left;
  padding: 0.35rem 0.55rem;
  border-radius: 7px;
  background: #ff9f0a;
  color: #1c1c1e;
  font: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.ac-allday-event strong {
  font-size: 0.88rem;
  font-weight: 700;
}
.ac-allday-event span {
  font-size: 0.72rem;
  opacity: 0.85;
}
.ac-allday-event.is-ok { background: #30d158; color: #003214; }
.ac-allday-event.is-pre { background: #ff9f0a; color: #1c1c1e; }
.ac-allday-event.is-gone { background: #8e8e93; color: #1c1c1e; }
.ac-allday-event.is-multi { box-shadow: inset 3px 0 0 rgba(0,0,0,0.25); }
.ac-hours-grid {
  display: grid;
  gap: 0;
  padding-bottom: 2rem;
}
.ac-hour-row {
  display: grid;
  grid-template-columns: 3.4rem 1fr;
  min-height: 3rem;
  align-items: start;
}
.ac-hour-label {
  font-size: 0.68rem;
  font-weight: 600;
  color: #8e8e93;
  transform: translateY(-0.35rem);
  text-align: right;
  padding-right: 0.45rem;
  font-variant-numeric: tabular-nums;
}
.ac-hour-track {
  position: relative;
  min-height: 3rem;
  border-top: 1px solid rgba(255,255,255,0.1);
}
.ac-hour-line { display: none; }
.ac-day-timeline {
  min-height: 100%;
}
.ac-handy-text.is-hidden-today {
  visibility: hidden;
  pointer-events: none;
}
.ac-multi-snap {
  flex: 1;
  min-height: 0;
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
}
.ac-multi-snap::-webkit-scrollbar { display: none; }
.ac-multi-snap .ac-multi-layout {
  flex: 0 0 100%;
  width: 100%;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  max-height: calc(100dvh - 11rem);
}
.ac-multi-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.ac-multi-col {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0.35rem 0.35rem 1rem;
  border-right: 1px solid rgba(255,255,255,0.1);
}
.ac-multi-col:last-child { border-right: 0; }
.ac-multi-col .ac-day-timeline-date {
  font-size: 0.82rem;
}
.ac-multi-col .ac-allday-section {
  grid-template-columns: 1fr;
}
.ac-multi-col .ac-allday-rail { padding-top: 0; }
.ac-multi-col .ac-hour-row {
  grid-template-columns: 2.4rem 1fr;
  min-height: 2.4rem;
}
.ac-multi-col .ac-hour-track { min-height: 2.4rem; }
.ac-multi-nav {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.35rem 0;
}

.ac-year-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  max-height: calc(100dvh - 11rem);
  padding-bottom: 1rem;
}
.ac-year-heading {
  margin: 0.85rem 0 0.55rem;
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #fff;
}
.ac-year-block:first-child .ac-year-heading { margin-top: 0.15rem; }
.ac-year-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem 0.65rem;
  padding: 0;
  overflow: visible;
  max-height: none;
}
.ac-year-month {
  appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  padding: 0.2rem;
  cursor: pointer;
}
.ac-year-month strong {
  display: block;
  color: #0a84ff;
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
}
.ac-year-mini-head,
.ac-year-mini-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0;
  text-align: center;
}
.ac-year-mini-head {
  color: #636366;
  font-size: 0.58rem;
  font-weight: 700;
  margin-bottom: 0.1rem;
}
.ac-year-d {
  font-size: 0.62rem;
  line-height: 1.55;
  color: #d1d1d6;
}
.ac-year-d.is-empty { visibility: hidden; }
.ac-year-d.is-today {
  background: #ff453a;
  color: #fff;
  border-radius: 50%;
}
.ac-year-d.is-selected {
  background: #0a84ff;
  color: #fff;
  border-radius: 50%;
}
.ac-year-d.has-ev { font-weight: 800; }
.ac-list-view {
  overflow-y: auto;
  max-height: calc(100dvh - 12rem);
  padding-bottom: 1rem;
}
.buchung-agenda-day h3 {
  margin: 0.85rem 0 0.4rem;
  font-size: 0.95rem;
  color: #0a84ff;
}

.ac-handy-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.ac-handy-header-left,
.ac-handy-header-right {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.ac-handy-icon,
.ac-handy-text,
.ac-handy-add {
  appearance: none;
  border: 0;
  background: transparent;
  color: #0a84ff;
  font: inherit;
  font-weight: 650;
  min-height: 2.75rem;
  min-width: 2.75rem;
  border-radius: 10px;
  cursor: pointer;
}
.ac-handy-icon { font-size: 1.55rem; line-height: 1; }
.ac-handy-text { padding: 0 0.55rem; }
.ac-handy-add {
  background: #0a84ff;
  color: #fff;
  font-size: 1.55rem;
  font-weight: 700;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.ac-handy-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.25rem;
  padding-top: 0.35rem;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.ac-handy-strip {
  margin-top: 0.85rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  display: grid;
  gap: 0.5rem;
}
.ac-handy-strip-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.ac-handy-allday { display: grid; gap: 0.45rem; margin-bottom: 0.75rem; }

.ac-handy-sheet { display: grid; gap: 0.75rem; }
.ac-handy-sheet-nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.35rem;
}
.ac-handy-sheet-nav strong { text-align: center; font-size: 1.05rem; }
.ac-handy-nav-link {
  appearance: none;
  border: 0;
  background: transparent;
  color: #0a84ff;
  font: inherit;
  font-size: 1rem;
  min-height: 2.75rem;
  justify-self: start;
  cursor: pointer;
}
.ac-handy-nav-link.is-strong {
  font-weight: 700;
  justify-self: end;
}
.ac-handy-nav-spacer { min-height: 2.75rem; }
.ac-handy-group {
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  overflow: hidden;
  background: rgba(0,0,0,0.22);
}
.ac-handy-row {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.75rem 0.9rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  color: #e2e8f0;
  font-size: 0.92rem;
  font-weight: 600;
}
.ac-handy-row:last-child { border-bottom: 0; }
.ac-handy-row.is-static {
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
}
.ac-handy-row input,
.ac-handy-row select {
  width: 100%;
  box-sizing: border-box;
  border: 0;
  background: transparent;
  color: #f1f5f9;
  font: inherit;
  font-size: 1.05rem;
  font-weight: 500;
  min-height: 2.4rem;
}
.ac-handy-dog-block { padding: 0.9rem; display: grid; gap: 0.75rem; }
.ac-handy-dog-picked {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.ac-handy-dog-picked span { color: #94a3b8; font-size: 0.85rem; font-weight: 500; }
.ac-handy-dog-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}
.ac-handy-dog-btn {
  appearance: none;
  border: 1px solid rgba(10,132,255,0.45);
  background: rgba(10,132,255,0.18);
  color: #e8f1ff;
  font: inherit;
  font-weight: 700;
  min-height: 3rem;
  border-radius: 12px;
  cursor: pointer;
}
.ac-handy-dog-btn.is-secondary {
  background: rgba(0,0,0,0.28);
  border-color: rgba(255,255,255,0.12);
  color: #cbd5e1;
}
.ac-handy-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(0,0,0,0.55);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
}
.ac-handy-modal[hidden] { display: none !important; }
.ac-handy-modal-panel {
  width: 100%;
  max-height: 88vh;
  overflow: auto;
  background: #122033;
  border-radius: 16px 16px 0 0;
  padding: 0.75rem 0.9rem 1.25rem;
  display: grid;
  gap: 0.65rem;
}
.ac-handy-search {
  width: 100%;
  box-sizing: border-box;
  min-height: 3rem;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(0,0,0,0.28);
  color: #f1f5f9;
  font: inherit;
  font-size: 1rem;
  padding: 0.75rem 0.9rem;
}

.buchung-month-head {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.2rem;
  margin-bottom: 0.35rem;
  color: #94a3b8;
  font-size: 0.72rem;
  font-weight: 700;
  text-align: center;
}
.buchung-month-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.28rem;
}
.buchung-day {
  min-height: 3.6rem;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.2rem;
  padding: 0.35rem 0.2rem;
  border-radius: var(--radius, 4px);
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
  color: inherit;
  font: inherit;
  cursor: pointer;
}
.buchung-day.is-empty { visibility: hidden; pointer-events: none; }
.buchung-day.is-today .buchung-day-num {
  background: #ff453a;
  color: #fff;
  border-radius: 50%;
  width: 1.9rem;
  height: 1.9rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
}
.buchung-day.is-selected .buchung-day-num {
  background: #0a84ff;
  color: #fff;
  border-radius: 50%;
  width: 1.9rem;
  height: 1.9rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
}
.buchung-day-num { font-weight: 700; font-size: 0.88rem; text-align: center; }
.buchung-day-dots {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.15rem;
  min-height: 0.55rem;
}
.buchung-dot {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: #64748b;
}
.buchung-dot.is-huta { background: #06b6d4; }
.buchung-dot.is-pension { background: #f97316; }
.buchung-dot.is-pre { background: #64748b; }
.buchung-more { font-size: 0.65rem; color: #94a3b8; }

.buchung-week {
  display: grid;
  gap: 0.55rem;
}
.buchung-week-col {
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius, 4px);
  background: rgba(255,255,255,0.03);
  padding: 0.45rem;
}
.buchung-week-head {
  display: flex;
  justify-content: space-between;
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 700;
  padding: 0.35rem 0.2rem;
  cursor: pointer;
}
.buchung-week-items { display: grid; gap: 0.35rem; margin-top: 0.35rem; }
.buchung-chip,
.buchung-chip-card {
  text-align: left;
  width: 100%;
  min-height: 2.6rem;
  padding: 0.55rem 0.7rem;
  border-radius: var(--radius, 4px);
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(15, 122, 108, 0.18);
  color: inherit;
  font: inherit;
  cursor: pointer;
}
.buchung-chip.is-pre,
.buchung-chip-card.is-preliminary {
  background: rgba(100, 116, 139, 0.2);
}
.bc-handy-card {
  display: grid !important;
  grid-template-columns: auto 1fr;
  gap: 0.65rem;
  align-items: center;
}
.bc-handy-avatar {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.65rem;
  background: rgba(10, 132, 255, 0.2);
  color: #e8f1ff;
  font-weight: 750;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}
.bc-handy-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.bc-handy-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
  text-align: left;
}
.bc-handy-cards { gap: 0.55rem; }
.buchung-day-heading { margin: 0 0 0.5rem; font-size: 1.05rem; }
.buchung-agenda { display: grid; gap: 1rem; }
.buchung-agenda-day h3 {
  margin: 0 0 0.4rem;
  font-size: 0.95rem;
  color: #94a3b8;
  font-weight: 700;
}

.buchung-dog-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem;
  margin-bottom: 0.35rem;
}
.buchung-tab {
  min-height: 2.5rem;
  border-radius: var(--radius, 4px);
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(0,0,0,0.22);
  color: #cbd5e1;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.buchung-tab.is-active {
  background: #0f7a6c;
  border-color: #0c655a;
  color: #f0fffc;
}
.buchung-dog-results {
  max-height: 12rem;
  overflow: auto;
  margin: 0.35rem 0 0.75rem;
}

.aufenthalt-board { display: grid; gap: 1.1rem; }
.aufenthalt-h {
  margin: 0 0 0.45rem;
  font-size: 0.95rem;
  color: #e2e8f0;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
}
.aufenthalt-h span {
  color: #94a3b8;
  font-weight: 600;
  font-size: 0.85rem;
}
.aufenthalt-section.is-focus .aufenthalt-h { color: #7dd3fc; }
.aufenthalt-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.25rem;
}
.aufenthalt-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.45rem;
  border-radius: 3px;
  background: rgba(196, 92, 38, 0.25);
  color: #fdba74;
  border: 1px solid rgba(196, 92, 38, 0.4);
}
.aufenthalt-badge.is-carry {
  background: rgba(15, 122, 108, 0.25);
  color: #5eead4;
  border-color: rgba(15, 122, 108, 0.45);
}

.mp-form .btn { width: 100%; }

/* Buchung-Kalender: Desktop-CSS in assets/calendar.css + assets/calendar-mobile.css (kein handyfc-Chrome). */

/* ——— PWA Install-Hinweis ——— */
.pwa-install {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 12000;
  padding: 0 calc(12px + var(--safe-right)) calc(12px + var(--safe-bottom)) calc(12px + var(--safe-left));
  pointer-events: none;
}

.pwa-install[hidden] {
  display: none !important;
}

.pwa-install-inner {
  pointer-events: auto;
  max-width: 420px;
  margin: 0 auto;
  padding: 14px 16px;
  background: rgba(12, 18, 26, 0.96);
  border: 1px solid rgba(64, 120, 127, 0.45);
  border-radius: 6px;
  box-shadow: 0 -8px 28px rgba(0, 0, 0, 0.45);
  color: var(--ink);
}

.pwa-install-title {
  margin: 0 0 6px;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--brand);
}

.pwa-install-text {
  margin: 0 0 12px;
  font-size: 0.82rem;
  line-height: 1.4;
  color: var(--ink-muted);
}

.pwa-install-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.pwa-install-btn,
.pwa-install-dismiss {
  font-family: var(--font);
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: var(--radius);
  padding: 8px 14px;
  cursor: pointer;
  border: 1px solid transparent;
  -webkit-tap-highlight-color: transparent;
}

.pwa-install-btn {
  background: var(--brand);
  color: #071014;
  border-color: rgba(255, 255, 255, 0.08);
}

.pwa-install-dismiss {
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink-muted);
  border-color: rgba(255, 255, 255, 0.1);
}

@media (display-mode: standalone) {
  .pwa-install {
    display: none !important;
  }
}



/* --- Abrechnung HuTa Detail-Modal --- */
.abr-handy-detail { display: grid; gap: 0.75rem; }
.abr-handy-detail .abr-hints {
  margin: 0;
  min-height: 0;
}
.abr-handy-detail .abr-metrics {
  padding: 0.7rem 0.8rem;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.45);
}
.abr-handy-detail .abr-metrics-title {
  margin: 0 0 0.4rem;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #94a3b8;
}
.abr-handy-detail .abr-metrics-table,
.abr-handy-detail .abr-summary-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
}
.abr-handy-detail .abr-metrics-table th,
.abr-handy-detail .abr-metrics-table td,
.abr-handy-detail .abr-summary-table th,
.abr-handy-detail .abr-summary-table td {
  padding: 0.32rem 0.4rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}
.abr-handy-detail .abr-metrics-table th {
  font-weight: 500;
  color: #cbd5e1;
  width: 72%;
}
.abr-handy-detail .abr-metrics-table td,
.abr-handy-detail .abr-summary-table td.abr-num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.abr-handy-detail .abr-metrics-note {
  margin: 0.4rem 0 0;
  color: #94a3b8;
  font-size: 0.74rem;
}
.abr-handy-detail .abr-table-wrap {
  margin-top: 0.4rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.abr-handy-detail .abr-summary-table thead th {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #94a3b8;
  font-weight: 600;
  border-bottom-color: rgba(148, 163, 184, 0.28);
  white-space: nowrap;
}
.abr-handy-detail .abr-summary-table tbody tr:last-child td {
  border-bottom: 0;
}
.abr-handy-detail .abr-owner-card {
  border: 1px solid rgba(255,255,255,0.1); border-radius: 10px;
  background: rgba(255,255,255,0.04); padding: 0.75rem 0.85rem;
}
.abr-handy-detail .abr-owner-label {
  font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em; color: #94a3b8;
}
.abr-handy-detail .abr-owner-name { font-size: 1.05rem; font-weight: 600; margin: 0.15rem 0 0.45rem; }
.abr-kv { display: grid; gap: 0.35rem; }
.abr-kv-row { display: grid; gap: 0.1rem; font-size: 0.92rem; }
.abr-kv-label { color: #94a3b8; font-size: 0.8rem; }
.abr-kv-value { color: #e2e8f0; white-space: pre-wrap; word-break: break-word; }
.abr-phone { color: #34d399; text-decoration: none; }
.abr-dogs { display: grid; gap: 0.65rem; }
.abr-dog-card {
  border: 1px solid rgba(255,255,255,0.1); border-radius: 10px;
  background: rgba(255,255,255,0.04); padding: 0.75rem;
}
.abr-dog-card.is-idle { opacity: 0.75; }
.abr-dog-card h3 { margin: 0; font-size: 1.05rem; color: #f4f8fc; }
.abr-dog-card h3 span { color: #94a3b8; font-weight: 500; font-size: 0.9rem; }
.abr-visit-heading {
  margin: 0.55rem 0 0.25rem; font-size: 0.75rem; text-transform: uppercase;
  letter-spacing: 0.04em; color: #94a3b8;
}
.abr-handy-detail .abr-visit-li.is-shuttle,
.abr-handy-detail .abr-visit-li.is-self {
  border-left: 3px solid rgba(56, 189, 248, 0.55);
  padding-left: 0.45rem;
}
.abr-handy-detail .abr-visit-li.is-self {
  border-left-color: rgba(52, 211, 153, 0.55);
}
.abr-handy-detail .abr-visit-transport {
  display: inline-block;
  margin-top: 0.2rem;
  padding: 0.12rem 0.4rem;
  border-radius: 6px;
  font-size: 0.8rem;
  background: rgba(148, 163, 184, 0.14);
  color: #cbd5e1;
}
.abr-handy-detail .abr-visit-transport.is-shuttle {
  background: rgba(56, 189, 248, 0.16);
  color: #7dd3fc;
}
.abr-handy-detail .abr-visit-transport.is-self {
  background: rgba(52, 211, 153, 0.14);
  color: #6ee7b7;
}
.abr-handy-detail .abr-summary {
  margin-top: 0.35rem;
  padding: 0.85rem 0.8rem;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.45);
}
.abr-handy-detail .abr-summary-title {
  margin: 0 0 0.2rem;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #e2e8f0;
}
.abr-handy-detail .abr-summary-lead {
  margin: 0 0 0.7rem;
  color: #94a3b8;
  font-size: 0.8rem;
}
.abr-handy-detail .abr-summary-section {
  margin-bottom: 0.75rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}
.abr-handy-detail .abr-summary-section:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: 0;
}
.abr-handy-detail .abr-summary-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.abr-handy-detail .abr-summary-count {
  padding: 0.1rem 0.45rem;
  border-radius: 6px;
  background: rgba(52, 211, 153, 0.14);
  color: #6ee7b7;
  font-size: 0.78rem;
}
.abr-handy-detail .abr-summary-section--shuttle .abr-summary-count {
  background: rgba(56, 189, 248, 0.16);
  color: #7dd3fc;
}
.abr-handy-detail .abr-summary-section--week_2 .abr-summary-count,
.abr-handy-detail .abr-summary-section--week_3 .abr-summary-count {
  background: rgba(167, 139, 250, 0.16);
  color: #c4b5fd;
}
.abr-handy-detail .abr-summary-sub {
  margin-top: 0.15rem;
  color: #94a3b8;
  font-size: 0.78rem;
}
