:root {
  --bg: #f5f7fb;
  --card: #ffffff;
  --card-2: #f1f4fa;
  --text: #0f172a;
  --muted: #475569;

  --accent: #2563eb;     /* blau */
  --accent-2: #7c3aed;   /* violett */
  --danger: #ef4444;
  --ok: #10b981;

  --border: rgba(15, 23, 42, 0.10);
  --shadow: rgba(15, 23, 42, 0.08);
}

  
  * { box-sizing: border-box; }
  body {
    margin: 0;
    font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Apple Color Emoji","Segoe UI Emoji";
        background:
            radial-gradient(900px 600px at 20% 0%, rgba(37,99,235,0.12), transparent 60%),
            radial-gradient(900px 600px at 80% 0%, rgba(124,58,237,0.10), transparent 60%),
            var(--bg);
  }
  
  a { color: var(--accent); text-decoration: none; }
  a:hover { text-decoration: underline; }
  
  .header {
    border-bottom: 1px solid var(--border);
    background: rgba(255,255,255,0.7);
    backdrop-filter: blur(10px);
  }
  
  .header-inner {
    max-width: 980px;
    margin: 0 auto;
    padding: 22px 18px;
    display: flex;
    gap: 18px;
    align-items: center; 
  }
  

  @media (max-width: 640px) {
    .logo img {
      width: 64px;
      height: 64px;
    }
    .headline h1 {
      font-size: 22px;
    }
  }
  
  
  .logo {
    display: flex;
    align-items: center;
  }
  .logo img {
    width: 88px;
    height: 88px;
    object-fit: contain;
    display: block;
  }
  
  
  .headline {
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
  .headline h1 {
    margin: 0;
    font-size: 26px;
    line-height: 1.1;
  }
  .headline p {
    margin: 4px 0 0 0;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.2;
  }
  
  
  .container {
    max-width: 980px;
    margin: 0 auto;
    padding: 24px 18px;
  }
  
  .card {
    background: linear-gradient(180deg, rgba(37,99,235,0.05), transparent 60%), var(--card);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 22px;
    box-shadow: 0 14px 50px var(--shadow);
  }
  
  .card.narrow { max-width: 520px; margin: 0 auto; }
  
  h2 { margin-top: 0; font-size: 22px; }
  h3 { margin-bottom: 10px; }
  
  .lead { color: var(--text); line-height: 1.6; }
  .muted { color: var(--muted); }
  .cta { margin-top: 14px; font-weight: 700; }
  
  .sep {
    border: 0;
    height: 1px;
    background: var(--border);
    margin: 18px 0;
  }
  
  .checklist { padding-left: 18px; }
  
  .form-row {
    display: flex;
    gap: 10px;
    margin-top: 10px;
  }
  .form-row input {
    flex: 1;
    padding: 12px 12px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--card-2);
    color: var(--text);
    outline: none;
  }
  .form-row input:focus { border-color: rgba(110,231,255,0.35); }
  
  .form-stack {
    display: grid;
    gap: 8px;
    margin-top: 14px;
  }
  
  label { font-size: 13px; color: var(--muted); }
  
  .form-stack input {
    padding: 12px 12px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--card-2);
    color: var(--text);
    outline: none;
  }

  .btn-text-mobile {
    display: none;
  }  
  
  .btn, button {
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid rgba(37,99,235,0.22);
    background: linear-gradient(180deg, rgba(37,99,235,0.16), rgba(37,99,235,0.08));
    color: var(--text);
    font-weight: 800;
    cursor: pointer;
  }
 
  .btn:hover, button:hover { filter: brightness(1.08); }
  
  .btn.secondary {
    background: rgba(15, 23, 42, 0.04);
    border: 1px solid var(--border);
    font-weight: 700;
  }
  
  .btn.danger {
    background: rgba(255,107,107,0.14);
    border: 1px solid rgba(255,107,107,0.25);
  }
  
  .flashes { margin-bottom: 14px; display: grid; gap: 8px; }
  .flash {
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: rgba(255,255,255,0.03);
  }
  .flash-error {
    border-color: rgba(255,107,107,0.25);
    background: rgba(255,107,107,0.10);
  }
  .flash-success {
    border-color: rgba(52,211,153,0.25);
    background: rgba(52,211,153,0.10);
  }
  
  .footer {
    border-top: 1px solid var(--border);
    margin-top: 28px;
    padding: 16px 0;
    color: var(--muted);
  }
  .footer-inner {
    max-width: 980px;
    margin: 0 auto;
    padding: 0 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  
  /* Manage list */
  .list { display: grid; gap: 10px; margin-top: 14px; }
  .list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: rgba(255,255,255,0.03);
  }
  .list-title { font-weight: 800; }
  .list-sub { color: var(--muted); font-size: 13px; margin-top: 3px; }
  .list-actions { display: flex; gap: 10px; align-items: center; }
  
  /* Calendar */
  .cal-header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
  }
  .cal-nav { display: flex; gap: 8px; }
  
  .share-row {
    margin-top: 12px;
    display: flex;
    gap: 10px;
    align-items: center;
  }
  .share-url {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--card-2);
    color: var(--muted);
    font-size: 13px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  
  .calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
  }
  
  .weekday {
    color: var(--muted);
    font-weight: 700;
    font-size: 12px;
    text-align: center;
    padding: 4px 0;
  }
  
  .day {
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 10px;
    min-height: 84px;
    background: rgba(255,255,255,0.03);
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: stretch;
  }
  .day.empty {
    background: transparent;
    border: 1px dashed rgba(255,255,255,0.06);
  }
  .day.disabled {
    background: rgba(255,107,107,0.10);
    border-color: rgba(255,107,107,0.25);
  }
  
  .day-num {
    font-weight: 900;
    text-align: center;
    font-size: 16px;
    line-height: 1;
    margin-top: 2px;
  }
  
  .day-btn {
    width: 100%;
    padding: 10px 10px;
    border-radius: 12px;
    font-weight: 800;
    font-size: 12px;
  }
  .day-btn.admin {
    background: rgba(52,211,153,0.12);
    border: 1px solid rgba(52,211,153,0.25);
  }
 
  .tag {
    font-size: 12px;
    color: rgba(255,255,255,0.85);
    padding: 8px 10px;
    border-radius: 12px;
    background: rgba(255,107,107,0.12);
    border: 1px solid rgba(255,107,107,0.20);
    text-align: center;
  }
  
  /* Responsive */
  @media (max-width: 640px) {
    .form-row { flex-direction: column; }
    .share-row { flex-direction: column; align-items: stretch; }
    .list-item { flex-direction: column; align-items: stretch; }
    .list-actions { justify-content: flex-end; }
  }
  
  .availability {
    margin-top: 10px;
  }
  
  .days-list {
    margin: 10px 0 12px 0;
    padding: 12px 12px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--card-2);
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }
  
  .day-chip {
    padding: 8px 10px;
    border-radius: 999px;
    border: 1px solid rgba(37, 99, 235, 0.22);
    background: rgba(37, 99, 235, 0.08);
    font-weight: 800;
    font-size: 13px;
  }
  
  /* versteckter Copy-Text */
  .copy-text {
    position: absolute;
    left: -9999px;
    top: -9999px;
    white-space: pre;
  }
    

/* ---------------------------------------
   Responsive: Smartphone / kleine Displays
---------------------------------------- */
@media (max-width: 640px) {
  .container {
    padding: 16px 12px;
  }

  .card {
    padding: 14px;
    border-radius: 16px;
  }

  /* Header kompakter */
  .header-inner {
    padding: 14px 12px;
    gap: 12px;
  }

  .logo img {
    width: 56px;
    height: 56px;
  }

  .headline h1 {
    font-size: 20px;
  }
  .headline p {
    font-size: 13px;
  }

  /* Form: untereinander */
  .form-row {
    flex-direction: column;
    gap: 10px;
  }

  /* Kalender-Kopf: untereinander */
  .cal-header {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .cal-nav {
    justify-content: flex-start;
    gap: 8px;
  }

  /* Share Link: untereinander */
  .share-row {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .share-url {
    font-size: 12px;
    white-space: normal;
    overflow: visible;
    text-overflow: initial;
    word-break: break-all;
  }

  /* Kalender-Grid kompakter */
  .calendar-grid {
    gap: 6px;
  }

  .weekday {
    font-size: 11px;
    padding: 2px 0;
  }

  .day {
    min-height: 60px;
    padding: 6px;
    border-radius: 12px;
    gap: 6px;
  }

  .day-num {
    font-size: 14px;
    margin-top: 0;
  }

  /* Buttons in Tagen: kompakt + gut klickbar */
  .day-btn {
    padding: 8px 6px;
    font-size: 12px;
    border-radius: 10px;
  }

  /* Desktop-Text ausblenden, Mobile-Symbol zeigen */
  .btn-text-desktop {
    display: none;
  }
  .btn-text-mobile {
    display: inline;
    font-size: 14px;
    line-height: 1;
  }

  /* Deaktiviert-Tag kompakter */
  .tag {
    padding: 6px 6px;
    font-size: 11px;
    border-radius: 10px;
  }

  /* Liste der freien Tage: Chips kleiner */
  .day-chip {
    font-size: 12px;
    padding: 6px 9px;
  }

  /* Manage list */
  .list-item {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .list-actions {
    justify-content: flex-end;
  }
}

/* ---------------------------------------
   Tablet / mittelgroß: leichte Anpassung
---------------------------------------- */
@media (max-width: 860px) {
  .calendar-grid {
    gap: 8px;
  }
}

@media (max-width: 640px) {
  .share-url {
    display: none;          /* ✅ URL nicht anzeigen */
  }
}
