

:root {
  
  --korn: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='k'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23k)' opacity='0.55'/%3E%3C/svg%3E");

  
  --schleier: 255, 255, 255;
  --tiefe: 0, 0, 0;

  
  --akzent:      var(--brand);
  
  --zeichen:     #ffffff;
  --symbol:      var(--brand);
  --datum:       var(--symbol);
  --voll:        var(--ring-color);
  --voll-ink:    #ffffff;
  --voll-strich: 1;

  
  --grad-from: #3A4A58;
  --grad-mid: #252D36;
  --grad-to: #1A1F26;
  --text: #ffffff;
  --label: rgba(var(--schleier), 0.64);
  --brand: #c283e6;
  --primary: #3E5568;
  --on-primary: #ffffff;
  --soft: #55697C;
  --on-soft: #ffffff;
  --nav-bg: #222A33;
  --nav-ink: rgba(var(--schleier), 0.76);
  --nav-active: #ffffff;
  --card-from: #4C5866;
  --card-to: #38424D;
  --ms-glass: rgba(var(--schleier), 0.10);
  --ms-glass-border: rgba(var(--schleier), 0.18);
  --ms-glass-ink: #ffffff;
  --ms-glass-line: rgba(var(--schleier), 0.45);
  --ring-color: #E2C4F5;
  --ms-ink: #ffffff;
  --card-line: rgba(var(--schleier), 0.45);
  --card-placeholder: rgba(var(--schleier), 0.45);
  --card-soft: rgba(var(--schleier), 0.14);
  --field-line: rgba(var(--schleier), 0.5);
  --field-focus: #ffffff;
  --glass: rgba(var(--schleier), 0.06);
  --glass-border: rgba(var(--schleier), 0.16);
  --glass-soft: rgba(var(--schleier), 0.1);
  --divider: rgba(var(--schleier), 0.14);
  --toast-bg: #3E5568;
  --toast-ok: #2F6B45;
  --autofill-bg: #c283e6;
  --autofill-ink: #ffffff;

  
  --danger: #B82A2A;
  --error: #FFD9D5;
  --ok: #D9F2DE;
  
  --spalte: 408px;
  --radius-card: 20px;
  --radius-btn: 25px;
  --radius-input: 12px;
  --padding-input: 14px 18px;
  --logo-width: 128px;
  --identity-gap: 7px;
}

[data-theme="rosa"] {
  --grad-from: #5A3A47;
  --grad-mid: #3A2530;
  --grad-to: #261A20;
  --text: #ffffff;
  --label: rgba(var(--schleier), 0.64);
  --brand: #F2A0BE;
  --primary: #7A4B5C;
  --on-primary: #ffffff;
  --soft: #976274;
  --on-soft: #ffffff;
  --nav-bg: #33222A;
  --nav-ink: rgba(var(--schleier), 0.76);
  --nav-active: #ffffff;
  --card-from: #6B4A57;
  --card-to: #4E3540;
  --ms-glass: rgba(var(--schleier), 0.10);
  --ms-glass-border: rgba(var(--schleier), 0.18);
  --ms-glass-ink: #ffffff;
  --ms-glass-line: rgba(var(--schleier), 0.45);
  --ring-color: #F7C4D6;
  --ms-ink: #ffffff;
  --card-line: rgba(var(--schleier), 0.45);
  --card-placeholder: rgba(var(--schleier), 0.45);
  --card-soft: rgba(var(--schleier), 0.14);
  --field-line: rgba(var(--schleier), 0.5);
  --field-focus: #ffffff;
  --glass: rgba(var(--schleier), 0.06);
  --glass-border: rgba(var(--schleier), 0.16);
  --glass-soft: rgba(var(--schleier), 0.1);
  --divider: rgba(var(--schleier), 0.14);
  --toast-bg: #7A4B5C;
  --toast-ok: #2F6B45;
  --autofill-bg: #F2A0BE;
  --autofill-ink: #3A2530;
}

* { box-sizing: border-box; }

button:focus, [role="button"]:focus { outline: none; }
button:focus-visible, [role="button"]:focus-visible {
  outline: 2px solid rgba(var(--schleier), 0.7);
  outline-offset: 3px;
  border-radius: 6px;
}
button, [role="button"] { -webkit-tap-highlight-color: transparent; }

[hidden] { display: none !important; }

html {
  
  height: 100%;
  
  overflow-x: hidden;
  
  overscroll-behavior-y: none;
}

@media (min-width: 900px) and (pointer: fine) {
  html { zoom: 1.25; }
}

html {
  background-color: var(--grad-to);
}

body {
  margin: 0;
  
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  
  
  padding: calc(24px + env(safe-area-inset-top)) calc(6px + env(safe-area-inset-right))
           calc(24px + env(safe-area-inset-bottom)) calc(6px + env(safe-area-inset-left));

  
  background-color: transparent;
  background-image:
    var(--korn),
    
    radial-gradient(120% 85% at 12% -10%,
      rgba(255, 244, 230, var(--licht, 0.07)) 0%,
      rgba(255, 244, 230, 0) 62%),
    linear-gradient(135deg, var(--grad-from) 0%, var(--grad-mid) 50%, var(--grad-to) 100%);
  background-size: 200px 200px, auto, auto;
  background-repeat: repeat, no-repeat, no-repeat;
  background-blend-mode: overlay, normal, normal;
  color: var(--text);
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
  font-weight: 400;
  -webkit-text-size-adjust: 100%;
  
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  
  overscroll-behavior-y: none;
  
  touch-action: manipulation;
}

.card {
  width: 100%;
  
  padding: 0 14px;
  max-width: var(--spalte);
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  
  overscroll-behavior-y: contain;
  
  
  padding-bottom: 96px;
  scrollbar-width: none;
}
.card::-webkit-scrollbar { display: none; }

.card.steht {
  overflow: hidden;
  touch-action: pan-x;
}

.brand-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.identity {
  display: flex;
  
  min-width: 0;
  
  align-items: flex-start;
  gap: var(--identity-gap);
  width: 100%;
}
.identity .logo {
  flex-shrink: 0;
  cursor: pointer;
  
  width: var(--logo-width);
  height: auto;
  color: var(--text);
}

.heart-line {
  fill: none;
  stroke: currentColor;
  stroke-width: 1;
  stroke-linejoin: round;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}

.avatar-row {
  display: flex;
  align-items: center;
  gap: 18px;
}

.avatar-preview {
  flex-shrink: 0;
  color: var(--text);
}

.avatar-actions {
  display: flex;
  flex: 1;
  gap: 8px;
  min-width: 0;
}
.avatar-actions .btn {
  flex: 1;
  min-width: 0;
  margin-top: 0;
}

.avatar-preview.busy { opacity: 0.45; }

.titles { min-width: 0; flex: 1; }

@media (max-width: 360px) {
  .identity .logo { width: 96px; }
  .brand { font-size: 15pt; }
}

.brand {
  margin: 0;
  white-space: nowrap;
  font-size: 18pt;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: var(--brand);
  
  line-height: 1;
}

.names {
  margin: 2px 0 0;
  font-size: 14px;
  font-weight: 300;
  line-height: 1.15;
  overflow: hidden;
}
.who-name {
  display: inline-block;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: bottom;
}
.who-name.partner { color: var(--label); margin-right: 5px; }
.who-name.me { color: var(--label); }

.brand-sub {
  
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
  
  margin: -6px 0 0;
  text-align: center;
  font-size: 14px;
  font-weight: 300;
  letter-spacing: 0.34em;
  color: var(--label);
}

.screen { display: none; }
.screen.active { display: block; }

.screen-title {
  margin: 0 0 20px;
  font-size: 9.6px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--label);
  text-align: center;
}

.field { margin-bottom: 12px; position: relative; }

input, textarea {
  width: 100%;
  
  -webkit-user-select: text;
  user-select: text;
  padding: var(--padding-input);
  
  background: rgba(var(--schleier), 0.88);
  border: 1px solid rgba(var(--schleier), 0.6);
  border-radius: var(--radius-input);
  color: #1a3d45;
  
  font-size: 16px;
  font-weight: 400;
  font-family: inherit;
}
input:focus, textarea:focus {
  outline: none;
  border-color: #1a3d45;
  background: #ffffff;
}
input::placeholder, textarea::placeholder { color: rgba(26, 61, 69, 0.55); }

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active,
textarea:-webkit-autofill,
.screen input:-webkit-autofill,
.view input:-webkit-autofill,
#profileForm input:-webkit-autofill,
#milestoneForm input:-webkit-autofill {
  transition: background-color 9999s ease-in-out 0s, color 9999s ease-in-out 0s;
  -webkit-box-shadow: 0 0 0 10000px var(--autofill-bg) inset !important;
  box-shadow: 0 0 0 10000px var(--autofill-bg) inset !important;
  -webkit-text-fill-color: var(--autofill-ink) !important;
  caret-color: var(--autofill-ink) !important;
  
  -webkit-background-clip: text;
  background-clip: text;
  border-radius: var(--radius-input);
  padding: var(--padding-input);
}
input:autofill,
input:autofill:hover,
input:autofill:focus,
input:autofill:active,
textarea:autofill,
.screen input:autofill,
.view input:autofill,
#profileForm input:autofill,
#milestoneForm input:autofill {
  transition: background-color 9999s ease-in-out 0s, color 9999s ease-in-out 0s;
  -webkit-box-shadow: 0 0 0 10000px var(--autofill-bg) inset !important;
  box-shadow: 0 0 0 10000px var(--autofill-bg) inset !important;
  -webkit-text-fill-color: var(--autofill-ink) !important;
  caret-color: var(--autofill-ink) !important;
  
  -webkit-background-clip: text;
  background-clip: text;
  border-radius: var(--radius-input);
  padding: var(--padding-input);
}

textarea {
  resize: vertical;
  min-height: 76px;
  line-height: 1.45;
}

input[type="date"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator {
  opacity: 0.7;
  cursor: pointer;
}
input[type="date"], input[type="time"] { min-height: 51px; }

.code-input {
  text-align: center;
  
  font-size: 26px;
  font-weight: 300;
  letter-spacing: 0.4em;
  text-indent: 0.4em;
}

.field:has(.pw-toggle) input { padding-right: 60px; }

.pw-toggle {
  position: absolute;
  top: 50%;
  right: 16px;
  transform: translateY(-50%);
  padding: 4px 8px;
  background: none;
  border: 0;
  color: rgba(26, 61, 69, 0.7);
  font-size: 9.6px;
  font-family: inherit;
  cursor: pointer;
}

.btn {
  width: 100%;
  margin-top: 8px;
  padding: 12px 16px;
  background: var(--primary);
  border: 1px solid transparent;
  border-radius: var(--radius-btn);
  color: var(--on-primary);
  font-size: 14px;
  font-weight: 400;
  font-family: inherit;
  cursor: pointer;
}

.link-danger {
  display: block;
  width: 100%;
  margin-top: 14px;
  padding: 6px 0;
  background: none;
  border: 0;
  color: var(--danger);
  font-size: 14px;
  font-weight: 400;
  font-family: inherit;
  text-align: center;
  cursor: pointer;
}
.btn:disabled { opacity: 0.5; cursor: default; }

.btn-secondary {
  background: rgba(var(--schleier), 0.18);
  border: 1px solid var(--glass-border);
  color: var(--text);
}

.btn-soft {
  background: var(--soft);
  border-color: var(--soft);
  color: var(--on-soft);
}

.btn-danger {
  background: var(--danger);
  border-color: var(--danger);
  color: #ffffff;
}

.link-btn {
  display: block;
  width: 100%;
  margin-top: 16px;
  padding: 8px;
  background: none;
  border: 0;
  color: var(--label);
  font-size: 10.4px;
  font-family: inherit;
  cursor: pointer;
}
.link-btn:hover { color: var(--text); }

.msg {
  margin: 12px 0 0;
  min-height: 18px;
  font-size: 10.4px;
  line-height: 1.5;
  text-align: center;
  color: var(--label);
}

.msg.error {
  color: var(--text);
  font-size: 10pt;
  font-weight: 300;
  text-align: left;
  padding: 20px 20px 20px 54px;
  
  border-radius: 22px;
  background: rgba(30, 26, 22, 0.58);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border: 1px solid rgba(217, 164, 65, 0.45);
  position: relative;
  width: 100%;
  
  animation: fehler-einblenden 200ms ease-out both;
}
@keyframes fehler-einblenden { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .msg.error { animation: none; } }

:root {
  --fehler-herz-breite: 108px;
  --fehler-herz-hoehe: auto;
  --fehler-herz-farbe: #D9A441;
  --fehler-herz-strich: 0.5pt;
}
.msg.error { padding-left: 126px; min-height: 96px; display: flex; flex-direction: column; justify-content: center; gap: 4px;
  
  box-sizing: border-box; width: 100%; }
.msg.error .msg-titel { font-size: 15px; font-weight: 400; line-height: 1.3; }
.msg.error .msg-rest { font-size: 10pt; font-weight: 300; }
.msg.error .msg-neu { align-self: flex-start; margin-top: 6px; padding: 6px 12px; background: rgba(255, 255, 255, 0.12); border: 0; border-radius: 999px; color: var(--text); font: inherit; font-size: 12px; cursor: pointer; }
.msg.error .msg-herz {
  position: absolute; left: 8px; top: 50%; transform: translateY(-50%);
  width: var(--fehler-herz-breite); height: var(--fehler-herz-hoehe);
  overflow: visible;
}
.msg.error .msg-herz .fieber { fill: #D9A441; stroke: none; }

.msg.error .msg-herz.fuchs {
  width: 62px; height: 92px; left: 30px;
  background: var(--fehler-herz-farbe);
  -webkit-mask: url("img/fuchs.png") center / contain no-repeat;
          mask: url("img/fuchs.png") center / contain no-repeat;
}

.msg.error.eingabe { border-radius: 22px; padding: 12px 20px 12px 52px; min-height: 0; width: fit-content; max-width: 100%; margin-left: auto; margin-right: auto; }
.msg.error.eingabe .msg-frage {
  position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
  width: 16px; height: 21px; fill: none; stroke: #D9A441; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round;
}
.msg.error.eingabe .msg-titel { font-size: 13px; }
.msg.error .msg-herz .herz-linie {
  fill: none; stroke: var(--fehler-herz-farbe); stroke-width: var(--fehler-herz-strich);
  stroke-linecap: round; stroke-linejoin: round;
}
.msg.error:empty { display: none; }
.msg.info  { color: var(--label); }
.msg.ok    { color: var(--ok); }

.overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(24px + env(safe-area-inset-top)) 16px calc(24px + env(safe-area-inset-bottom));
  background: rgba(25, 38, 30, 0.72);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.overlay-card {
  position: relative;
  width: 100%;
  max-width: 420px;
  max-height: 100%;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 22px 20px 26px;
  
  background: linear-gradient(135deg, var(--card-from) 0%, var(--card-to) 100%);
  border-radius: var(--radius-card);
  color: var(--ms-ink);
  box-shadow: 0 18px 44px rgba(var(--tiefe), 0.42);
}

#milestoneList {
  display: flex;
  flex-direction: column;
  
  min-width: 0;
}
#milestoneList > .ms-wrap { min-width: 0; max-width: 100%; }

.ms-wrap.open { order: -2; }
.ms-actions   { order: -1; }

#milestoneList.dimmed { --dim-ruhe: 0.1; }
#milestoneList.dimmed .ms-wrap {
  
  opacity: var(--dim, var(--dim-ruhe));
  transition: opacity 0.16s ease;
}

#milestoneList.wischt .ms-wrap { transition: none; }

#milestoneList.dimmed .ms-wrap.open {
  opacity: 1;
  margin-top: 0.25rem;
}

.ms-wrap.open {
  position: relative;
  z-index: 5;
}

.ms-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 22px;
}
.ms-actions .btn { flex: 1; margin-top: 0; }
.ms-actions .icon-btn { width: 44px; height: 44px; }

.ms-wrap.open .ms-icon { display: none; }

.ms-body {
  max-height: 400px;
  opacity: 1;
  overflow: hidden;
  transition: max-height 0.28s ease, opacity 0.18s ease 0.06s;
}

.ms-wrap.collapsed .ms-body {
  max-height: 0;
  opacity: 0;
  transition: max-height 0.28s ease, opacity 0.14s ease;
}

.ms-wrap.collapsed .ms {
  padding: 13px 16px;
  border-radius: 999px;
}
.ms-wrap.collapsed .ms-date { display: none; }

.ms-wrap.collapsed .ms-icon {
  top: 50%;
  bottom: auto;
  transform: translateY(-50%);
}

.ms {
  transition: padding 0.28s ease, border-radius 0.28s ease;
}

@media (prefers-reduced-motion: reduce) {
  .ms-body, .ms, .ms-wrap { transition: none; }
}

.no-card-motion .ms-body,
.no-card-motion .ms,
.no-card-motion .ms-wrap { transition: none; }

.switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  
  height: 51px;
  cursor: pointer;
}
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }

.switch-track {
  position: relative;
  width: 52px;
  height: 30px;
  background: rgba(var(--schleier), 0.88);
  border: 1px solid rgba(var(--schleier), 0.6);
  border-radius: 999px;
  transition: background 0.18s ease, border-color 0.18s ease;
}
.switch-track::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  background: #1a3d45;
  border-radius: 50%;
  opacity: 0.32;
  transition: transform 0.18s ease, opacity 0.18s ease, background 0.18s ease;
}
.switch input:checked + .switch-track {
  background: var(--primary);
  border-color: var(--primary);
}
.switch input:checked + .switch-track::after {
  transform: translateX(22px);
  background: var(--on-primary);
  opacity: 1;
}
.switch input:focus-visible + .switch-track {
  outline: 2px solid rgba(var(--schleier), 0.7);
  outline-offset: 3px;
}

.overlay-close {
  position: absolute;
  top: 10px; right: 12px;
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(var(--schleier), 0.25);
  border: 0;
  border-radius: 50%;
  color: var(--ms-ink);
  font-size: 22px;
  line-height: 1;
  font-family: inherit;
  cursor: pointer;
}

#legalOverlay { background: var(--grad-to); -webkit-backdrop-filter: none; backdrop-filter: none; align-items: flex-start; }
#legalOverlay .overlay-card { background: none; border-radius: 0; box-shadow: none; max-height: 100%; }

#legalOverlay .overlay-close {
  position: fixed; top: calc(14px + env(safe-area-inset-top)); left: 16px; right: auto;
  width: 45px; height: 45px; padding: 0;
  background: rgba(var(--schleier), 0.15); color: var(--label);
}
#legalOverlay .overlay-close:hover { background: rgba(var(--schleier), 0.24); }
#legalOverlay .overlay-body { padding-top: 52px; }

.overlay-body { padding-right: 30px; }
.overlay-body h2 {
  margin: 0 0 18px;
  font-size: 24px;
  font-weight: 500;
  letter-spacing: 0.04em;
}
.overlay-body h3 {
  margin: 32px 0 0;
  font-size: 18px;
  font-weight: 500;
  opacity: 0.85;
}

.overlay-body .legal-pfad {
  display: inline-block; margin: 0 0 18px; padding: 0;
  background: none; border: 0; cursor: pointer;
  font: inherit; font-size: 24px; font-weight: 500; letter-spacing: 0.04em;
  text-transform: uppercase; color: #fff;
}
.overlay-body .legal-pfad .pfeil { font-size: 11pt; }
.overlay-body p { margin: 6px 0 0; font-size: 13px; font-weight: 300; line-height: 1.5; }

.overlay-card.confirm,
.overlay-card.share-card,
.overlay-card.crop-card { max-width: 320px; }
.confirm-text {
  margin: 4px 0 18px;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--ms-ink);
}

.overlay-card.confirm .row { display: flex; flex-direction: column-reverse; gap: 8px; }
.overlay-card.confirm .row .btn { flex: none; width: 100%; max-width: none; margin-top: 0; }

.toast {
  position: fixed;
  left: 16px; right: 16px;
  
  bottom: calc(var(--nav-hoehe, 76px) + var(--nav-lueft, 12px) + 12px);
  z-index: 60;
  padding: 13px 18px;
  background: #1a3d45;
  border-radius: var(--radius-btn);
  box-shadow: 0 10px 26px rgba(var(--tiefe), 0.34);
  color: #ffffff;
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}
.toast.show { opacity: 1; transform: none; }
.toast.ok { background: #2F6B45; }
.toast.error { background: var(--danger); }

.themenwahl {
  position: fixed; inset: 0; z-index: 300;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  background: #14110E;
  color: #ffffff;
  overflow-y: auto;
}
.tw-mitte { width: 100%; max-width: 520px; text-align: center; }
.themenwahl h2 {
  margin: 0 0 10px;
  font-family: 'Poppins', sans-serif;
  font-weight: 300; font-size: clamp(22px, 5vw, 30px); line-height: 1.2;
}
.themenwahl h2 { margin-bottom: 30px; }

.tw-karten { display: flex; flex-direction: column; gap: 12px; }

.tw-karte[hidden], .modus-knopf[hidden] { display: none; }
.tw-karte {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 16px;
  align-items: center;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  color: inherit; font-family: inherit; text-align: left; cursor: pointer;
}
.tw-karte[aria-pressed="true"] {
  border-color: rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.10);
}
.tw-karte b { display: block; font-size: 17px; font-weight: 500; }
.tw-karte i { display: block; margin-top: 2px; font-size: 13px; font-style: normal;
              font-weight: 300; color: rgba(255, 255, 255, 0.62); }

.tw-schau {
  grid-row: 1 / 3;
  width: 74px; height: 74px;
  display: flex; flex-direction: column; gap: 4px;
  padding: 8px; border-radius: 12px; overflow: hidden;
}
.tw-schau .tw-kopf { height: 12px; border-radius: 3px; margin-bottom: 2px; }
.tw-schau .tw-zeile { height: 9px; border-radius: 3px; }

.tw-midnight { background: linear-gradient(rgba(23, 18, 13, 0.6), rgba(23, 18, 13, 0.6)), url("img/bg-midnight.webp") center / cover no-repeat; }
.tw-midnight .tw-kopf { background: #6D8C84; }
.tw-midnight .tw-zeile { background: rgba(255, 255, 255, 0.16); }
.tw-blossom { background: linear-gradient(rgba(46, 30, 32, 0.4), rgba(46, 30, 32, 0.4)), url("img/bg-blossom.webp") center / cover no-repeat; }
.tw-blossom .tw-kopf { background: #E8AEB4; }
.tw-blossom .tw-zeile { background: #4A3D3C; }
.tw-dawn { background: #F2EAE0; }
.tw-dawn .tw-kopf { background: #5C766D; }
.tw-dawn .tw-zeile { background: #FFFDF9; }

.tw-weiter {
  margin-top: 26px; padding: 14px 34px;
  background: #ffffff; color: #14110E;
  border: 0; border-radius: 999px;
  font-family: inherit; font-size: 15px; font-weight: 500; cursor: pointer;
}
.tw-weiter[disabled] { opacity: 0.35; cursor: default; }

.erster-moment {
  margin: 0 0 18px;
  text-align: center;
}
.erster-titel {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 300;
  line-height: 1.2;
  color: var(--ms-ink, var(--text));
}
.erster-frage {
  margin: 0 auto;
  max-width: 26em;
  font-size: 14px;
  font-weight: 300;
  line-height: 1.5;
  color: var(--label);
}

.titel-tipps {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: -4px 0 14px;
}

.titel-tipps button {
  padding: 7px 12px;
  background: rgba(var(--schleier), 0.08);
  border: 0;
  border-radius: 8px;
  color: whitesmoke;
  font-family: inherit;
  font-size: 13px;
  font-weight: 300;
  cursor: pointer;
}
.titel-tipps button:hover, .titel-tipps button:active {
  background: rgba(var(--schleier), 0.16);
}

.legal-links {
  display: block;
  margin: 0;
}

.legal-links button,
.legal-links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 12px 0;
  background: none;
  border: 0;
  border-bottom: 1px solid rgba(var(--schleier), 0.14);
  color: var(--label);
  font-size: 16px;
  font-weight: 300;
  font-family: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.legal-links > :last-child { border-bottom: 0; }

.legal-links [hidden] { display: none; }

.legal-links button, .legal-links a,
.overlay-body a { color: var(--text); }
.legal-links button::after, .legal-links a::after { color: var(--text); }

.legal-links.sammel button { display: block; position: relative; text-align: left; padding: 16px 3em 16px 0; font-size: 24px; font-weight: 500; letter-spacing: 0.04em; color: var(--text); }
.legal-links.sammel button span { display: block; margin-top: 2px; padding-right: 3em; font-size: 12px; font-weight: 300; color: var(--label); }

.legal-links.sammel button::after { position: absolute; right: 0; top: 50%; transform: translateY(-50%); margin: 0; }

.legal-links button::after,
.legal-links a::after {
  content: '›';
  flex-shrink: 0;
  margin-left: 12px;
  font-size: 20px;
  line-height: 1;
  opacity: 0.7;
}
.legal-links button:hover,
.legal-links a:hover { color: var(--text); }

[data-layout="VB001"] {
  --grad-from: #3A3026;
  --grad-mid:  #271F18;
  --grad-to:   #17120D;

  --text:   #ffffff;
  --label:  rgba(var(--schleier), 0.68);
  --brand:  #b89937;
  
  
  --akzent:      #b89937;
  --symbol:      #b89937;
  --datum:       #b89937;
  --voll:        #b89937;
  --voll-ink:    #ffffff;
  --voll-strich: 1;

  --primary:    #6B5522;
  --on-primary: #ffffff;
  --soft:       #8A7038;
  --on-soft:    #ffffff;

  --nav-bg:     #1F1913;
  --nav-ink:    rgba(var(--schleier), 0.78);
  --nav-active: #D4AF37;

  --card-from:        #4C433A;
  --card-to:          #332C25;

  
  --ms-glass:        rgba(var(--schleier), 0.09);
  --ms-glass-border: rgba(212, 175, 55, 0.30);
  --ms-glass-ink:    #ffffff;
  --ms-glass-line:   rgba(var(--schleier), 0.42);
  
  --ring-color:      #E8CC74;

  --ms-ink:           #ffffff;
  --card-line:        rgba(var(--schleier), 0.42);
  --card-placeholder: rgba(var(--schleier), 0.45);
  --card-soft:        rgba(212, 175, 55, 0.16);

  --field-line:  rgba(212, 175, 55, 0.55);
  
  --field-focus: #b89937;

  --glass:        rgba(var(--schleier), 0.06);
  --glass-border: rgba(212, 175, 55, 0.22);
  --glass-soft:   rgba(var(--schleier), 0.08);
  --divider:      rgba(212, 175, 55, 0.20);

  --toast-bg: #6B5522;
  --toast-ok: #4E7A4A;

  --autofill-bg:  #6B5522;
  --autofill-ink: #ffffff;
}

[data-layout="VB001"] .brand { letter-spacing: -0.05em; }

[data-layout="VB001"] {
  
  
  background-color: var(--grad-to);
  
  background-image: linear-gradient(180deg,
    var(--grad-to) 0%,
    var(--grad-mid) 48%,
    var(--grad-from) 100%);
}

.legal-fold { margin: 0; }
.legal-fold > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-top: 1px solid rgba(var(--schleier), 0.14);
  color: var(--label);
  font-size: 16px;
  font-weight: 300;
  cursor: pointer;
  list-style: none;          
}
.legal-fold > summary::-webkit-details-marker { display: none; }
.legal-fold > summary::after {
  content: '›';
  flex-shrink: 0;
  margin-left: 12px;
  font-size: 20px;
  line-height: 1;
  opacity: 0.7;
  transition: transform 160ms ease;
}
.legal-fold[open] > summary::after { transform: rotate(90deg); }
.legal-fold > summary:hover { color: var(--text); }

.legal-fold .legal-links { padding-left: 14px; }
.legal-fold .legal-links > :last-child { border-bottom: 0; }

.overlay-body .entwurf {
  margin: 0 0 20px;
  padding: 11px 14px;
  border: 1px dashed rgba(220, 100, 100, 0.55);
  border-radius: 10px;
  background: rgba(220, 100, 100, 0.10);
  font-size: 13px;
  line-height: 1.45;
  color: var(--text);
}
.overlay-body .entwurf strong { letter-spacing: 0.08em; text-transform: uppercase; }

.overlay-body .legal-stand {
  margin: 0 0 18px;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--label);
  opacity: 0.8;
}
.overlay-body .legal-fussnote {
  margin: 26px 0 0;
  padding-top: 14px;
  border-top: 1px solid rgba(var(--schleier), 0.14);
  font-size: 12px;
  color: var(--label);
  opacity: 0.8;
}

@media (prefers-reduced-motion: reduce) {
  .legal-fold > summary::after { transition: none; }
}

#legalOverlay { align-items: flex-start; }

.test-warning[hidden] { display: none; }
.test-warning {
  display: flex; align-items: center; justify-content: center;
  position: fixed; inset: 0; z-index: 900;
  padding: 24px;
  background: rgba(23, 18, 13, 0.85);
  -webkit-backdrop-filter: blur(10px) grayscale(0.6); backdrop-filter: blur(10px) grayscale(0.6);
}
.dwb-karte .nur-schreibtisch { display: none; }
.dwb-karte .dwb-weiter { margin-top: 22px; }
@media (min-width: 900px) {
  .dwb-karte .nur-schreibtisch { display: block; }
  .dwb-karte .dwb-weiter { display: none; }
}
  .dwb-karte {
    width: min(460px, 100%);
    padding: 40px 36px 36px;
    border-radius: 24px;
    background: #17120D url("img/bg-midnight.webp") center / cover no-repeat;
    box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.1);
    color: #fff; text-align: center;
    font-size: 15px; line-height: 1.55;
    position: relative; overflow: hidden;
  }
  .dwb-karte::before { content: ""; position: absolute; inset: 0; background: rgba(23, 18, 13, 0.6); }
  .dwb-karte > * { position: relative; }
  .dwb-herz { width: 120px; height: auto; margin: 0 auto 18px; display: block;
              fill: none; stroke: #fff; stroke-width: 1.2; stroke-linecap: round; stroke-linejoin: round; }
  .dwb-karte p { margin: 0 0 12px; color: rgba(255, 255, 255, 0.8); }
  .dwb-karte p:last-child { margin-bottom: 0; }
  .dwb-karte .dwb-titel { font-size: 18px; font-weight: 500; color: #fff; }
  .dwb-karte .dwb-version { margin: 18px 0 0; font-size: 11px; letter-spacing: 0.06em; color: rgba(255, 255, 255, 0.5); }
  .dwb-karte .dwb-version:empty { display: none; }

.notfall-satz {
  margin: 0 0 12px; padding: 14px 12px;
  border: 1px dashed rgba(var(--schleier), 0.4); border-radius: 12px;
  font-family: ui-monospace, Menlo, monospace; font-size: 15px; letter-spacing: 0.06em;
  text-align: center; word-break: break-all; user-select: all; -webkit-user-select: all;
}
.notfall-satz[hidden], #btnNotfallKopieren[hidden] { display: none; }
#msgNotfall, #msgSchluessel { text-align: left; }

#btnNotfall { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
#btnNotfall svg { display: none; flex: 0 0 auto; }
#btnNotfall.erneuern svg { display: block; }

#milestoneList > .ms-wrap:not(.open),
.ms-wrap .ms-counter-row, .ms-wrap .ms-next, .ms-wrap .ms-ring, .ms-wrap .ms-type-icon,
.brand-block, #commandRow, #msTopRow, .tabs-halter, .tabs,
.icon-picker, .tw-karten, .modus-knopf, .einladen-wege, .befehl-gruppe,
button, [role="button"], summary {
  -webkit-user-select: none; user-select: none;
  -webkit-touch-callout: none;
}
.ms-wrap.open .ms-title, .ms-wrap.open .ms-note, .ms-wrap.open .ms-date {
  -webkit-user-select: text; user-select: text;
  -webkit-touch-callout: default;
}
