body {
  font-family: Arial, sans-serif;
  padding: 20px;
  background-color: #f4f4f4;
}

h1 {
  text-align: center;
  margin-bottom: 20px;
  font-size: 24px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.card {
  background-color: white;
  border: 1px solid #ddd;
  border-radius: 12px;
  padding: 15px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.card h2 {
  margin: 0 0 10px 0;
  font-size: 18px;
}

.card .row {
  margin-bottom: 8px;
  font-size: 14px;
}

.label {
  font-weight: bold;
}

.color-box {
  padding: 4px 8px;
  border-radius: 6px;
  display: inline-block;
  color: #000;
}

.red       { background-color: red; color: white; }
.pink      { background-color: plum; }
.orange    { background-color: peachpuff; }
.lightblue { background-color: lightblue; }
.green     { background-color: lightgreen; }
.blue      { background-color: deepskyblue; }
.yellow    { background-color: rgb(229, 241, 47); }

.card-grid .bz-card {
  grid-column: 1 / -1;
  max-width: 400px;
  margin: 0 auto;
}

.pokal-card {
  background-color: rgb(238, 79, 51);
  color: black;
  font-weight: bold;
}



/* === Modern, responsive table === */
:root{
  --bg: #0b0c10;
  --surface: #ffffff;
  --text: #111827;
  --muted: #6b7280;
  --primary: #0f56ee;
  --ring: rgba(37,99,235,.25);
  --border: #e5e7eb;
  --hover: #f9fafb;
}
@media (prefers-color-scheme: dark){
  :root{
    --bg: #0b0c10;
    --surface: #0f172a;
    --text: #e5e7eb;
    --muted: #9ca3af;
    --primary: #81b7f8;
    --ring: rgba(96,165,250,.25);
    --border: #1f2937;
    --hover: #111827;
  }
}

.table-container{
  overflow-x:auto;
  -webkit-overflow-scrolling: touch;
  background: linear-gradient(to right, transparent, transparent) padding-box;
  padding: .5rem;
  margin: 1rem 0 2rem;
  border-radius: 1rem;
}

.table-modern{
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0,0,0,.08);
}

.table-modern thead th{
  position: sticky;
  top: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.04), rgba(0,0,0,0)) , var(--surface);
  backdrop-filter: saturate(1.1) blur(6px);
  z-index: 1;
}

.table-modern th, .table-modern td{
  padding: .9rem 1rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  text-align: left;
  font-size: .98rem;
  line-height: 1.3;
}

.table-modern thead th{
  font-weight: 700;
}

.table-modern .header-top th{
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  font-size: .75rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.table-modern tbody tr:nth-child(even){
  background: color-mix(in srgb, var(--hover) 70%, transparent);
}

.table-modern tbody tr:hover{
  background: color-mix(in srgb, var(--hover) 100%, transparent);
}

.table-modern tr:last-child td{
  border-bottom: none;
}

/* Small screens: transform to cards */
@media (max-width: 640px){
  .table-modern thead{
    display: none;
  }
  .table-modern, .table-modern tbody, .table-modern tr, .table-modern td{
    display: block;
    width: 100%;
  }
  .table-modern tr{
    border: 1px solid var(--border);
    border-radius: .9rem;
    margin: .75rem 0;
    overflow: hidden;
    background: var(--surface);
    box-shadow: 0 4px 14px rgba(0,0,0,.06);
  }
  .table-modern td{
    border: none;
    padding: .75rem .9rem;
    display: grid;
    grid-template-columns: 10ch 1fr;
    gap: .75rem;
  }
  .table-modern td::before{
    content: attr(data-label);
    font-weight: 600;
    color: var(--muted);
  }
}

/* Badges for phases */
.badge{
  display: inline-block;
  font-size: .75rem;
  font-weight: 600;
  padding: .25rem .55rem;
  border-radius: 9999px;
  border: 1px solid transparent;
  background: color-mix(in srgb, var(--primary) 12%, transparent);
  color: var(--primary);
}
.badge--menstruation{
  background: rgba(220, 38, 38, .12);
  color: #dc2626;
  border-color: rgba(220,38,38,.2);
}
.badge--folikel{
  background: rgba(16, 185, 129, .12);
  color: #10b981;
  border-color: rgba(16,185,129,.2);
}
.badge--luteal{
  background: rgba(234, 179, 8, .12);
  color: #ca8a04;
  border-color: rgba(234,179,8,.2);
}
.badge--eisprung{
  background: rgba(99, 102, 241, .12);
  color: #6366f1;
  border-color: rgba(99,102,241,.2);
}
.badge--unbekannt{
  background: rgba(57, 57, 61, 0.12);
  color: #141414;
  border-color: rgba(99,102,241,.2);
}

/* Screen-reader only caption */
.sr-only{
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

/* Focus ring for keyboard users */
.table-container:focus-within .table-modern{
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}



/* Highlight current week row */
.table-modern tr.current-week{
  background: #22c55e !important; /* bright green */
  color: white;
}
.table-modern tr.current-week td, 
.table-modern tr.current-week th{
  color: white;
}


/* Ensure current week isn't hidden under sticky header when scrolled into view */
.table-modern tr.current-week{
  scroll-margin-top: 88px;
}
@media (max-width: 640px){
  .table-modern tr.current-week{
    scroll-margin-top: 64px;
  }
}
/* === Startseite: moderne, responsive Kacheln === */
.start-wrap{
  max-width: 1000px;
  margin: 32px auto;
  padding: 0 16px;
}

.welcome{
  text-align: center;
  font-size: clamp(1.4rem, 2.5vw, 1.8rem);
  margin: 0 0 16px 0;
  color: var(--text);
}

.tile-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px; /* deutlich weniger Abstand */
}

/* Kachel / Tile */
.tile{
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 88px;                 /* große Touch-Zielgröße für Handy */
  border-radius: 16px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: .2px;
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(0,0,0,.04), rgba(0,0,0,0))
    , var(--surface);
  border: 1px solid var(--border);
  box-shadow: 0 8px 20px rgba(0,0,0,.06);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

/* Hover/Focus States (auch Tastaturfreundlich) */
.tile:hover{
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(0,0,0,.08);
  border-color: color-mix(in srgb, var(--primary) 30%, var(--border));
}
.tile:focus{
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}
.tile:active{
  transform: translateY(0);
  box-shadow: 0 8px 20px rgba(0,0,0,.06);
}

/* Dichte Darstellung auf sehr kleinen Screens */
@media (max-width: 420px){
  .tile-grid{ gap: 10px; }
  .tile{ min-height: 72px; font-size: 1rem; border-radius: 14px; }
}


/* Erster Tag des Zyklus */
.cycle-start span {
  transform: scale(1.9);
  font-weight: 800;
  background: #ddd6fe; /* leichtes Lila als Highlight */
  border-color: #7c3aed;
}

/* Follikelphase: erste Hälfte = hellgrün, zweite Hälfte = leuchtend grün */
.follicular-early span{
  background:#dcfce7; /* sehr helles Grün */
  color:#166534;
  border:1px solid #86efac;
}
.follicular-late span{
  background:#86efac; /* kräftigeres Grün */
  color:#064e3b;
  border:1px solid #22c55e;
}


/* Optional: leichtes Farbthema pro Kachel (wenn gewünscht) */
.tile:nth-child(1){ background: color-mix(in srgb, var(--primary) 6%, var(--surface)); }
.tile:nth-child(2){ background: color-mix(in srgb, #10b981 10%, var(--surface)); }
.tile:nth-child(3){ background: color-mix(in srgb, #f59e0b 10%, var(--surface)); }
.tile:nth-child(4){ background: color-mix(in srgb, #6366f1 10%, var(--surface)); }
.tile:nth-child(5){ background: color-mix(in srgb, #63f163 10%, var(--surface)); }
.tile:nth-child(6){ background: color-mix(in srgb, #d9f869 10%, var(--surface)); }
.tile:nth-child(7){ background: color-mix(in srgb, #f163f1 10%, var(--surface)); }
.tile:nth-child(8){ background: color-mix(in srgb, #f18463 10%, var(--surface)); }
.tile:nth-child(9){ background: color-mix(in srgb, #c463f1 10%, var(--surface)); }
.tile:nth-child(9){ background: color-mix(in srgb, #63f1aa 10%, var(--surface)); }
.tile:nth-child(10){ background: color-mix(in srgb, #f59e0b 10%, var(--surface)); }
.tile:nth-child(11){ background: color-mix(in srgb, #9293f5 10%, var(--surface)); }
.tile:nth-child(12){ background: color-mix(in srgb, #63f163 10%, var(--surface)); }
.tile:nth-child(13){ background: color-mix(in srgb, #d9f869 10%, var(--surface)); }
.tile:nth-child(14){ background: color-mix(in srgb, #f163f1 10%, var(--surface)); }
.tile:nth-child(15){ background: color-mix(in srgb, #f18463 10%, var(--surface)); }


/* ====== Nur für den Zyklus-/Hochrechnungs-Kalender: ganze Zelle färben ====== */
.calendars-wrap-bleed .calendar__day span{
  /* Boxen entfernen, nur Zahl zeigen */
  background: transparent !important;
  border: none !important;
  padding: .1rem .2rem;
}

/* Follikelphase */
.calendars-wrap-bleed .calendar__day.follicular-early{
  background:#b0f0c6; color:#166534; /* war span-basiert */
}
.calendars-wrap-bleed .calendar__day.follicular-late{
  background:#59c07f; color:#064e3b;
}

/* Lutealphase */
.calendars-wrap-bleed .calendar__day.luteal-early{
  background:#70a1e0; color:#0c34a1;
}
.calendars-wrap-bleed .calendar__day.luteal-late{
  background:#1776eb; color:#031547;
}

/* Blutung (IST) 1..5 */
.calendars-wrap-bleed .calendar__day.bleed-1{ background:#fee2e2; color:#991b1b; }
.calendars-wrap-bleed .calendar__day.bleed-2{ background:#fca5a5; color:#991b1b; }
.calendars-wrap-bleed .calendar__day.bleed-3{ background:#ef4444; color:#fff;    }
.calendars-wrap-bleed .calendar__day.bleed-4{ background:#b91c1c; color:#fff;    }
.calendars-wrap-bleed .calendar__day.bleed-5{ background:#7f1d1d; color:#fff;    }

/* Eisprung – gelber Tageshintergrund + feiner Innen-Ring */
.calendars-wrap-bleed .calendar__day.ovulation,
.calendars-wrap-bleed .calendar__day.pred-ovulation{
  background:#fef08a; color:#92400e;
  box-shadow: inset 0 0 0 2px rgba(250,204,21,.35);
}

/* Prognose: Start + Blutung */
.calendars-wrap-bleed .calendar__day.pred-start{
  background:#f385f7; color:#3b0764;
}
.calendars-wrap-bleed .calendar__day.pred-bleed{
  background:#e631f7; color:#5b21b6;
}

/* Heute-Markierung (Rand beibehalten) – bereits vorhanden, hier nur falls nötig stärker sichtbar */
.calendars-wrap-bleed .calendar__day.calendar__day--today{
  outline: 1px solid var(--ring, rgba(37,99,235,.25));
  outline-offset: -1px;
}

/* Zyklus-Start: Zahl weiterhin größer, aber ohne farbige Box */
.calendars-wrap-bleed .calendar__day.cycle-start span{
  transform: scale(1.3);
  font-weight: 800;
}
/* Für den zweiten Kalender: alle Tage untereinander */
.calendars-wrap-bleed .calendar__grid {
  display: flex;
  flex-direction: column;
}

.calendars-wrap-bleed .calendar__dow {
  display: none; /* Wochentags-Köpfe ausblenden */
}

.calendars-wrap-bleed .calendar__day {
  display: flex;
  justify-content: flex-start;
  padding: 4px 6px;
  min-height: auto;
  border: none;
  border-bottom: 1px solid var(--border, #e5e7eb);
}

.calendars-wrap-bleed .calendar__day span {
  font-size: 0.75rem;
}

/* Größere Monatsüberschrift im Kalender */
.calendar__header {
  font-size: 1.2rem !important;
  font-weight: 800;
  text-transform: uppercase; /* optional, wenn du alles groß willst */
  letter-spacing: 0.5px;     /* optional, etwas luftiger */
  padding: .6rem;            /* mehr Abstand */
}
