/* ============ Design-Tokens ============ */
:root {
  color-scheme: light; /* immer hell, auch wenn das Handy im Dark Mode ist */
  --bg: #ffffff;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #5b6678;
  --border: #e5e8ee;
  --soft: #f5f7fa;

  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --on-primary: #ffffff;
  --primary-soft: #e3ecff;
  --primary-soft-text: #1e40af;

  /* Frei = grün */
  --free: #15803d;
  --free-solid: #16a34a;
  --on-free: #ffffff;
  --free-bg: #f0fdf4;
  --free-border: #86d9a4;

  --slot-free-bg: #ffffff;

  /* Belegt = grau, gestreift */
  --booked-bg: #f3f5f8;
  --booked-stripe: #e9edf2;
  --booked-text: #475569;
  --booked-solid: #94a3b8;

  /* Dein Termin = blau */
  --own: #2563eb;
  --on-own: #ffffff;

  --danger: #dc2626;
  --on-danger: #ffffff;
  --past-text: #a3adbd;

  --radius-lg: 20px;
  --radius: 14px;
  --shadow: none;
  --ring: 0 0 0 3px rgb(37 99 235 / .35);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --font: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ============ Basis ============ */
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
html, body { overflow-x: clip; max-width: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 1.25rem; font-weight: 700; letter-spacing: -.01em; }
h2 { font-size: 1.15rem; font-weight: 700; letter-spacing: -.01em; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
:focus-visible { outline: none; box-shadow: var(--ring); }

.icon {
  width: 20px; height: 20px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

/* ============ Buttons & Felder ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 50px; padding: 0 22px;
  border: 0; border-radius: var(--radius);
  background: var(--soft);
  font-weight: 650;
  transition: background-color .15s var(--ease), transform .1s var(--ease), opacity .15s;
}
.btn:active:not(:disabled) { transform: scale(.98); }
.btn:disabled { opacity: .55; cursor: default; }
.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-primary:hover:not(:disabled) { background: var(--primary-hover); }
.btn-danger { background: var(--danger); color: var(--on-danger); }
.btn-block { width: 100%; }
.btn-soft { min-height: 44px; padding: 0 14px; background: var(--primary-soft); color: var(--primary-soft-text); font-size: .92rem; flex: none; }

.icon-btn {
  display: inline-grid; place-items: center;
  width: 44px; height: 44px; flex: none;
  border: 1px solid var(--border); border-radius: 12px;
  background: var(--card);
  transition: background-color .15s var(--ease);
}
.icon-btn:hover:not(:disabled) { background: var(--soft); }
.icon-btn:disabled { opacity: .35; cursor: default; }
.icon-btn-ghost { border-color: transparent; background: transparent; }
.link-btn {
  border: 0; background: none; padding: 2px 8px; min-height: 32px;
  color: var(--primary); font-weight: 650; font-size: .88rem; border-radius: 8px;
}

.field { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; margin-top: 14px; }
.label { font-weight: 650; font-size: .9rem; }
.hint { font-size: .8rem; color: var(--muted); }
.field input, .field select {
  min-height: 52px; padding: 0 16px;
  border: 1.5px solid var(--border); border-radius: var(--radius);
  background: var(--soft);
  font-size: 1.05rem;
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
.field select {
  padding-right: 40px;
  background: var(--soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center / 18px;
  font-size: 1.15rem; font-weight: 650; font-variant-numeric: tabular-nums;
  appearance: none; -webkit-appearance: none; cursor: pointer;
}
.field input:focus, .field select:focus { outline: none; border-color: var(--primary); box-shadow: var(--ring); }
.field input.pin { font-size: 1.6rem; letter-spacing: .7em; text-align: center; padding-left: calc(16px + .7em); font-variant-numeric: tabular-nums; }
.error { color: var(--danger); font-size: .9rem; font-weight: 600; min-height: 1.4em; margin: 10px 0 4px; }
.error:empty { min-height: 0; margin: 6px 0 0; }
.time-row { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: end; gap: 10px; }
.time-sep { padding-bottom: 14px; color: var(--muted); font-weight: 700; }

/* ============ Zimmer ============ */
.room-badge {
  display: inline-grid; place-items: center; flex: none;
  min-width: 30px; height: 30px; padding: 0 6px; border-radius: 9px;
  background: var(--booked-solid); color: #fff;
  font-size: .85rem; font-weight: 800; font-variant-numeric: tabular-nums;
}
.room-badge-lg { min-width: 40px; height: 40px; border-radius: 12px; font-size: 1.05rem; }
.room-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.room-group-label { margin-bottom: 6px; font-size: .75rem; font-weight: 750; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.room-grid-inner { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }

/* Tagauswahl im Buchungsdialog */
.day-strip {
  min-width: 0;
  display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x proximity;
  margin: 0 -20px; padding: 2px 20px 6px; scrollbar-width: none;
}
.day-strip::-webkit-scrollbar { display: none; }
.day-chip {
  display: grid; justify-items: center; align-content: center; gap: 1px; flex: none;
  width: 58px; height: 70px; scroll-snap-align: center;
  border: 1.5px solid var(--border); border-radius: 14px; background: var(--card);
  line-height: 1.1; font-variant-numeric: tabular-nums;
  transition: background-color .12s var(--ease), border-color .12s var(--ease), transform .1s var(--ease);
}
.day-chip small { font-size: .72rem; font-weight: 700; color: var(--muted); }
.day-chip b { font-size: 1.3rem; font-weight: 800; }
.day-chip:hover:not(:disabled) { border-color: var(--primary); }
.day-chip:active:not(:disabled) { transform: scale(.95); }
.day-chip[aria-checked="true"] { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.day-chip[aria-checked="true"] small { color: var(--on-primary); opacity: .85; }
.day-chip:disabled { opacity: .4; cursor: default; }
.room-btn {
  min-width: 0; min-height: 48px; padding: 0; border-radius: 12px;
  border: 1.5px solid var(--border); background: var(--card);
  font-size: 1.1rem; font-weight: 750; font-variant-numeric: tabular-nums;
  transition: background-color .12s var(--ease), border-color .12s var(--ease), transform .1s var(--ease);
}
.room-btn:hover { border-color: var(--primary); }
.room-btn:active { transform: scale(.94); }
.room-btn[aria-checked="true"] { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.room-current {
  display: flex; align-items: center; gap: 12px;
  padding: 8px; border-radius: var(--radius);
  background: var(--primary-soft); color: var(--primary-soft-text);
}
.room-current .room-badge { background: var(--primary); color: var(--on-primary); }
.room-current-text { flex: 1; font-weight: 600; }
.room-chip {
  display: inline-flex; align-items: center; gap: 8px; flex: none;
  min-height: 44px; padding: 0 14px 0 6px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--card);
  font-weight: 650; font-size: .9rem;
}
.room-chip .room-badge { background: var(--primary); color: var(--on-primary); min-width: 32px; height: 32px; border-radius: 999px; }
.room-chip.empty { padding-left: 14px; color: var(--primary); }

/* ============ Logo ============ */
.logo {
  display: grid; place-items: center; flex: none;
  width: 44px; height: 44px; border-radius: 14px;
  background: var(--primary); color: var(--on-primary);
}
.logo .icon { width: 24px; height: 24px; }
.logo-lg { width: 64px; height: 64px; border-radius: 20px; margin: 0 auto 14px; }
.logo-lg .icon { width: 34px; height: 34px; }

/* ============ Login ============ */
.login { min-height: 100dvh; display: grid; place-items: center; padding: 16px; }
.login-card { width: 100%; max-width: 400px; padding: 32px 24px 24px; text-align: center; }
.login-card h1 { font-size: 1.5rem; }
.login-card p.muted { margin-top: 4px; }
.login-card .field { text-align: left; }
.login-card .btn { margin-top: 8px; }

/* ============ App-Gerüst ============ */
#app { max-width: 1100px; margin: 0 auto; padding: 0 16px calc(96px + env(safe-area-inset-bottom)); }
.topbar {
  position: sticky; top: 0; z-index: 9;
  display: flex; align-items: center; gap: 12px;
  margin: 0 -16px 16px; padding: calc(12px + env(safe-area-inset-top)) 16px 12px;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; }
.brand > div { min-width: 0; }
.brand h1 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brand .small { line-height: 1.2; }

.tabs-top { display: none; }
.bottomnav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  display: grid; grid-template-columns: 1fr 1fr;
  padding: 8px 16px calc(8px + env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--card) 88%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--border);
}
.bottomnav .tab {
  display: grid; justify-items: center; gap: 2px;
  min-height: 56px; border: 0; background: none; border-radius: 14px;
  color: var(--muted); font-size: .78rem; font-weight: 650;
  transition: color .15s var(--ease), background-color .15s var(--ease);
}
.bottomnav .tab .icon { width: 24px; height: 24px; }
.bottomnav .tab.active { color: var(--primary); background: var(--primary-soft); }

@media (min-width: 860px) {
  #app { padding-bottom: 40px; }
  .bottomnav { display: none; }
  .tabs-top { display: flex; gap: 4px; padding: 4px; background: var(--card); border: 1px solid var(--border); border-radius: 14px; }
  .tabs-top .tab {
    display: inline-flex; align-items: center; gap: 8px;
    min-height: 42px; padding: 0 16px; border: 0; border-radius: 10px;
    background: none; color: var(--muted); font-weight: 650;
    transition: color .15s var(--ease), background-color .15s var(--ease);
  }
  .tabs-top .tab:hover { color: var(--text); }
  .tabs-top .tab.active { background: var(--primary); color: var(--on-primary); }
}
@media (max-width: 400px) {
  .brand .small { display: none; }
  .room-chip .room-chip-text { display: none; }
  .room-chip { padding-right: 6px; }
  .room-chip.empty { padding-right: 14px; }
  .room-chip.empty .room-chip-text { display: inline; }
}
/* Sehr schmale Handys: Zimmer-Knöpfe etwas kleiner */
@media (max-width: 350px) {
  .field select { padding: 0 26px 0 10px; background-position: right 8px center; background-size: 16px; font-size: 1rem; }
  .time-row { gap: 6px; }
  .room-grid-inner { gap: 6px; }
  .room-btn { font-size: 1rem; min-height: 44px; }
  .mine-rooms { padding: 12px; }
}

/* ============ Status-Karte ============ */
.status {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 14px 14px 16px; margin-bottom: 20px;
  border-radius: var(--radius-lg);
  background: var(--free-bg); border: 1.5px solid var(--free-border); color: var(--text);
}
.status.is-busy, .status.is-pause { background: var(--soft); border-color: var(--border); }
.status .status-icon {
  display: grid; place-items: center; flex: none;
  width: 48px; height: 48px; border-radius: 14px;
  background: var(--free-solid); color: var(--on-free);
}
.status.is-busy .status-icon { background: var(--booked-solid); color: #fff; }
.status.is-pause .status-icon { background: var(--border); color: var(--muted); }
.status .status-icon .icon { width: 26px; height: 26px; }
.status.is-busy .status-icon .icon { animation: spin 2.4s linear infinite; }
.status .status-text { flex: 1; min-width: 0; }
.status .status-title { display: flex; align-items: center; gap: 8px; font-weight: 750; font-size: 1.1rem; }
.status .status-sub { color: var(--muted); font-size: .9rem; }
.status .btn { min-height: 46px; padding: 0 18px; background: var(--primary); color: var(--on-primary); flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 460px) {
  .status { flex-wrap: wrap; }
  .status .btn { width: 100%; }
}

/* ============ Layout Kalender + Tag ============ */
.cal-layout { display: grid; gap: 20px; }
@media (min-width: 860px) {
  .cal-layout { grid-template-columns: 370px 1fr; align-items: start; gap: 28px; }
  .calendar { position: sticky; top: 88px; }
}

/* ============ Monatskalender ============ */
.calendar { padding: 16px 12px 14px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 4px 10px; }
.cal-title { display: grid; justify-items: center; }
.cal-title h2 { font-size: 1.1rem; }
.cal-weekdays, .cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-weekdays span { text-align: center; font-size: .75rem; font-weight: 650; color: var(--muted); padding: 4px 0; }
.cal-weekdays span:nth-child(n+6) { color: var(--primary); }

.cal-day {
  position: relative;
  display: grid; justify-items: center; align-content: center; gap: 5px;
  height: 56px;
  border: 0; border-radius: 12px; background: none;
  font-weight: 650; font-variant-numeric: tabular-nums;
  transition: background-color .15s var(--ease), color .15s var(--ease), transform .1s var(--ease);
}
.cal-day:hover:not(:disabled):not(.selected) { background: var(--soft); }
.cal-day:active:not(:disabled) { transform: scale(.94); }
.cal-day .num { line-height: 1; }
/* Mini-Zeitleiste: zeigt, wann am Tag frei/belegt ist */
.cal-day .bar { width: 76%; height: 6px; border-radius: 6px; overflow: hidden; }
.cal-day .own-dot {
  position: absolute; top: 5px; right: 6px;
  width: 8px; height: 8px; border-radius: 50%; background: var(--own);
  box-shadow: 0 0 0 2px var(--card);
}
.cal-day.today .num { color: var(--primary); }
.cal-day.today::after {
  content: ""; position: absolute; inset: 2px; border-radius: 10px;
  border: 2px solid var(--primary); pointer-events: none;
}
.cal-day.outside { opacity: .5; }
.cal-day.past, .cal-day:disabled { color: var(--past-text); cursor: default; }
.cal-day.past .bar, .cal-day:disabled .bar { visibility: hidden; }
.cal-day.selected { background: var(--primary); color: var(--on-primary); }
.cal-day.selected .num { color: var(--on-primary); }
.cal-day.selected::after { display: none; }
.cal-day.selected .bar { box-shadow: 0 0 0 1.5px var(--on-primary); }
.cal-day.selected .own-dot { background: var(--on-primary); box-shadow: 0 0 0 2px var(--primary); }

.legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; margin-top: 12px; font-size: .82rem; color: var(--muted); font-weight: 600; }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.lg { display: inline-block; width: 16px; height: 10px; border-radius: 4px; }
.lg-free { background: var(--free-solid); }
.lg-booked { background: repeating-linear-gradient(-45deg, var(--booked-solid) 0 3px, var(--booked-stripe) 3px 6px); }
.lg-own { background: var(--own); }

/* ============ Tagesansicht ============ */
.day-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.day-head-text { display: grid; justify-items: start; gap: 6px; min-width: 0; }
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px; border-radius: 999px;
  background: var(--free-bg); color: var(--free);
  font-size: .8rem; font-weight: 750; white-space: nowrap;
}
.badge.none { background: var(--soft); color: var(--muted); }

/* Tages-Zeitleiste */
.timeline { margin: 16px 0 4px; }
.tl-track {
  position: relative; height: 28px; border-radius: 10px; overflow: hidden;
  background: var(--soft);
}
.tl-seg { position: absolute; top: 0; bottom: 0; }
.tl-seg.free { background: var(--free-solid); }
.tl-seg.booked { background: repeating-linear-gradient(-45deg, var(--booked-solid) 0 4px, var(--booked-stripe) 4px 8px); }
.tl-seg.own { background: var(--own); }
.tl-seg + .tl-seg { box-shadow: inset 2px 0 0 var(--card); }
.tl-past { position: absolute; top: 0; bottom: 0; left: 0; background: color-mix(in srgb, var(--bg) 70%, transparent); }
.tl-now { position: absolute; top: -2px; bottom: -2px; width: 3px; margin-left: -1.5px; border-radius: 2px; background: var(--danger); }
.tl-labels { position: relative; height: 18px; margin-top: 4px; font-size: .72rem; font-weight: 650; color: var(--muted); font-variant-numeric: tabular-nums; }
.tl-labels span { position: absolute; transform: translateX(-50%); }
.tl-labels span:first-child { transform: none; }
.tl-labels span:last-child { transform: translateX(-100%); }

.day-slots { animation: fade-up .25s var(--ease); }
.daypart { margin-top: 18px; }
.daypart-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; color: var(--muted); font-size: .82rem; font-weight: 750; text-transform: uppercase; letter-spacing: .05em; }
.daypart-head .icon { width: 18px; height: 18px; }
.slots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 1000px) { .slots { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* Slot-Karten: frei = grün, belegt = grau gestreift, deins = blau */
.slot {
  position: relative;
  display: grid; gap: 12px; align-content: space-between;
  min-height: 140px; padding: 12px 14px 14px;
  border: 1.5px solid var(--free-border); border-radius: var(--radius);
  background: var(--slot-free-bg);
  text-align: left;
  transition: border-color .15s var(--ease), transform .1s var(--ease), box-shadow .15s var(--ease);
}
.slot:hover:not(:disabled) { box-shadow: 0 6px 18px rgb(15 23 42 / .08); }
.slot.free:hover:not(:disabled) { border-color: var(--free-solid); }
.slot:active:not(:disabled) { transform: scale(.97); }
.slot-top { display: grid; gap: 8px; justify-items: start; }
.slot-top .slot-pill { order: -1; }
.slot-time { display: grid; line-height: 1.15; min-width: 0; }
.slot-time b { font-size: 1.4rem; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.slot-time small { color: var(--muted); font-size: .8rem; font-weight: 600; white-space: nowrap; }
.slot-pill {
  display: inline-flex; align-items: center; gap: 4px; flex: none;
  padding: 3px 8px; border-radius: 999px;
  font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em;
}
.slot-pill .icon { width: 13px; height: 13px; stroke-width: 2.6; }
.slot-foot { display: flex; align-items: center; gap: 8px; min-width: 0; font-weight: 700; font-size: .92rem; }
.slot-foot .txt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.slot.free .slot-pill { background: var(--free-solid); color: var(--on-free); }
.slot .cta {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px 6px 8px; border-radius: 999px;
  background: var(--free-solid); color: var(--on-free); font-weight: 750;
}
.slot .cta .icon { width: 16px; height: 16px; stroke-width: 2.6; }

.slot.booked {
  border-color: transparent;
  background: repeating-linear-gradient(-45deg, var(--booked-bg) 0 10px, var(--booked-stripe) 10px 20px);
  color: var(--booked-text);
}
.slot.booked .slot-time small { color: var(--booked-text); opacity: .85; }
.slot.booked .slot-pill { background: var(--booked-solid); color: #fff; }

.slot.own { border-color: var(--own); background: var(--own); color: var(--on-own); }
.slot.own .slot-time small { color: var(--on-own); opacity: .85; }
.slot.own .slot-pill { background: rgb(255 255 255 / .22); color: var(--on-own); }
.slot.own .room-badge { background: rgb(255 255 255 / .25); color: var(--on-own); }

.slot.past { opacity: .5; filter: grayscale(.9); cursor: default; }
.slot.past .cta { display: none; }

.slot.running .slot-pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .3; } }

/* ============ Meine Termine ============ */
.section-head { margin: 4px 0 14px; }
.section-head p { margin-top: 4px; }
.mine-rooms { padding: 16px; }
.mine-list { display: grid; gap: 10px; margin-top: 16px; animation: fade-up .25s var(--ease); }
.mine-item { display: flex; align-items: center; gap: 14px; padding: 12px; }
.date-badge {
  display: grid; place-items: center; align-content: center; flex: none;
  width: 58px; height: 62px; border-radius: 14px;
  background: var(--own); color: var(--on-own); line-height: 1.05;
}
.date-badge small { font-size: .72rem; font-weight: 700; text-transform: uppercase; opacity: .9; }
.date-badge b { font-size: 1.45rem; font-weight: 800; }
.mine-info { flex: 1; min-width: 0; }
.mine-info strong { display: block; }
.mine-info span { color: var(--muted); font-size: .9rem; }
.mine-item .icon-btn { color: var(--danger); }
.empty { display: grid; justify-items: center; gap: 8px; padding: 36px 16px; text-align: center; color: var(--muted); }
.empty .icon { width: 36px; height: 36px; opacity: .6; }

/* ============ Bottom-Sheet ============ */
.sheet {
  width: min(460px, calc(100% - 32px));
  max-height: calc(100dvh - 24px); overflow-y: auto; overflow-x: hidden;
  padding: 10px 20px 22px;
  border: 1px solid var(--border); border-radius: 24px;
  background: var(--card); color: var(--text);
  box-shadow: 0 24px 64px rgb(0 0 0 / .25);
}
.sheet[open] { animation: pop-in .22s var(--ease); }
.sheet::backdrop { background: rgb(8 12 24 / .5); backdrop-filter: blur(2px); }
.sheet-handle { width: 40px; height: 5px; margin: 0 auto 8px; border-radius: 5px; background: var(--border); }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.when-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.when-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 12px; border-radius: 12px;
  background: var(--primary-soft); color: var(--primary-soft-text);
  font-weight: 650; font-size: .92rem;
}
.when-chip .icon { width: 18px; height: 18px; }
.who-row { display: flex; align-items: center; gap: 12px; margin-top: 14px; }
.sheet .btn-block { margin-top: 6px; }
@media (max-width: 560px) {
  .sheet {
    width: 100%; max-width: 100%; margin: auto 0 0;
    border-radius: 24px 24px 0 0; border-bottom: 0;
    padding-bottom: calc(22px + env(safe-area-inset-bottom));
  }
  .sheet[open] { animation: slide-up .28s var(--ease); }
  .sheet { padding-left: 16px; padding-right: 16px; }
  .day-strip { margin: 0 -16px; padding: 2px 16px 6px; }
  .sheet .field { margin-top: 12px; }
}

/* ============ Toast ============ */
.toast {
  position: fixed; left: 50%; z-index: 30;
  bottom: calc(92px + env(safe-area-inset-bottom));
  transform: translate(-50%, 16px);
  width: max-content; max-width: calc(100% - 32px);
  display: flex; align-items: center; gap: 10px;
  padding: 12px 18px; border-radius: 14px;
  background: var(--text); color: var(--bg);
  font-weight: 650;
  opacity: 0; pointer-events: none;
  transition: opacity .2s var(--ease), transform .2s var(--ease);
}
.toast .icon { width: 18px; height: 18px; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
@media (min-width: 860px) { .toast { bottom: 28px; } }

/* ============ Animationen ============ */
@keyframes fade-up { from { opacity: 0; transform: translateY(6px); } }
@keyframes pop-in { from { opacity: 0; transform: scale(.96); } }
@keyframes slide-up { from { transform: translateY(100%); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
