:root {
  color-scheme: dark;

  --bg: #0f1020;
  --bg-soft: rgba(255, 255, 255, 0.06);
  --bg-soft-2: rgba(255, 255, 255, 0.08);
  --text: #f4f0ff;
  --muted: #b8b1cf;
  --accent: #d29cff;
  --accent-2: #8ec5ff;
  --border: rgba(255, 255, 255, 0.1);
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.35);

  --page-glow-1: rgba(210, 156, 255, 0.18);
  --page-glow-2: rgba(142, 197, 255, 0.16);
  --page-bg-1: #0f1020;
  --page-bg-2: #141733;

  --control-bg: rgba(255, 255, 255, 0.04);
  --control-bg-hover: rgba(255, 255, 255, 0.06);
  --control-border: rgba(255, 255, 255, 0.1);
  --control-option-bg: #26263a;
  --control-option-text: #f4f0ff;
  --control-placeholder: #a8a0c0;

  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 14px;

  --today-ring: rgba(142, 197, 255, 0.78);
  --today-ring-soft: rgba(142, 197, 255, 0.16);
  --today-bubble-1: #c8ffe6;
  --today-bubble-2: #55d79c;
  --today-bubble-3: #1c9e67;
  --today-bubble-outline: rgba(28, 158, 103, 0.14);
  --today-bubble-glow: rgba(28, 158, 103, 0.35);

  --cycle-current-border: rgba(222, 108, 146, 0.72);
  --cycle-current-fill-1: rgba(222, 108, 146, 0.10);
  --cycle-current-fill-2: rgba(222, 108, 146, 0.04);
  --cycle-current-inner: rgba(222, 108, 146, 0.14);

  --cycle-past-border: rgba(164, 111, 148, 0.40);
  --cycle-past-fill-1: rgba(164, 111, 148, 0.05);
  --cycle-past-fill-2: rgba(164, 111, 148, 0.02);
  --cycle-past-bar: rgba(164, 111, 148, 0.42);

  --cycle-predicted-border: rgba(230, 156, 184, 0.52);
  --cycle-predicted-fill-1: rgba(230, 156, 184, 0.06);
  --cycle-predicted-fill-2: rgba(230, 156, 184, 0.025);
  --cycle-predicted-dash: rgba(230, 156, 184, 0.60);

  --pill-predicted-bg: rgba(255, 190, 214, 0.22);
  --pill-predicted-text: #f0d3de;
  --pill-past-bg: rgba(176, 138, 176, 0.18);
  --pill-past-text: #ddd1ea;
}

html[data-theme="light"] {
  color-scheme: light;

  --bg: #f6f2fb;
  --bg-soft: rgba(255, 255, 255, 0.72);
  --bg-soft-2: rgba(255, 255, 255, 0.88);
  --text: #2f2742;
  --muted: #746a8b;
  --accent: #b985ff;
  --accent-2: #79b8ff;
  --border: rgba(98, 84, 138, 0.16);
  --shadow: 0 20px 60px rgba(91, 76, 132, 0.12);

  --page-glow-1: rgba(196, 160, 255, 0.22);
  --page-glow-2: rgba(146, 201, 255, 0.18);
  --page-bg-1: #f8f5fc;
  --page-bg-2: #edf4ff;

  --control-bg: rgba(255, 255, 255, 0.94);
  --control-bg-hover: rgba(255, 255, 255, 1);
  --control-border: rgba(114, 102, 156, 0.22);
  --control-option-bg: #ffffff;
  --control-option-text: #2f2742;
  --control-placeholder: #8b819f;

  
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: Inter, Arial, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(210, 156, 255, 0.18), transparent 30%),
    radial-gradient(circle at bottom right, rgba(142, 197, 255, 0.16), transparent 30%),
    var(--bg);
  color: var(--text);
}

body {
  position: relative;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

.bg-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.35;
  pointer-events: none;
  z-index: 0;
}

.orb-1 {
  width: 260px;
  height: 260px;
  background: #d29cff;
  top: 5%;
  left: 8%;
}

.orb-2 {
  width: 320px;
  height: 320px;
  background: #8ec5ff;
  bottom: 10%;
  right: 8%;
}

.landing-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px;
  position: relative;
  z-index: 1;
}

.hero-card {
  width: min(1180px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 28px;
  align-items: stretch;
}

.hero-copy,
.login-card,
.sidebar,
.stat-card,
.panel,
.live-box {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.hero-copy {
  border-radius: var(--radius-xl);
  padding: 48px;
}

.hero-copy h1 {
  font-size: clamp(2rem, 4vw, 4rem);
  line-height: 1.05;
  margin: 14px 0 18px;
  max-width: 780px;
}

.hero-text {
  color: var(--muted);
  font-size: 1.08rem;
  max-width: 720px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.78rem;
  color: var(--accent);
  margin: 0;
}

.hero-pills {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-pills span {
  padding: 10px 14px;
  border-radius: 999px;
  background: var(--bg-soft-2);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 0.95rem;
}

.login-card {
  border-radius: var(--radius-xl);
  padding: 28px;
  align-self: center;
}

.login-card h2 {
  margin: 0 0 8px;
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 0.92rem;
}

.login-form,
.settings-form,
.entry-form {
  display: grid;
  gap: 16px;
}

.login-form {
  margin-top: 22px;
}

.login-form label,
.settings-form label,
.entry-form label {
  display: grid;
  gap: 8px;
}

.login-form span,
.settings-form span,
.entry-form span {
  font-size: 0.95rem;
  color: var(--muted);
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 12px 14px;
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 16px;
  background: rgba(255,255,255,0.04);
  cursor: pointer;
}

.checkbox-label span {
  margin: 0;
}

.checkbox-label input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  min-width: 22px;
  border-radius: 7px;
  border: 1px solid rgba(255,255,255,0.22);
  background: rgba(255,255,255,0.06);
  display: inline-block;
  margin: 0;
  cursor: pointer;
  position: relative;
  flex: 0 0 auto;
}

.checkbox-label input[type="checkbox"]:checked {
  background: linear-gradient(135deg, #c9b6ff, #9f8cff);
  border-color: rgba(201,182,255,0.85);
  box-shadow: 0 0 0 1px rgba(255,255,255,0.08) inset;
}

.checkbox-label input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  left: 7px;
  top: 3px;
  width: 5px;
  height: 10px;
  border: solid #15172b;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.checkbox-label:hover {
  border-color: rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.06);
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--control-border);
  background: var(--control-bg);
  color: var(--text);
  border-radius: 16px;
  padding: 14px 16px;
  outline: none;
  appearance: none;
  transition:
    border-color 0.18s ease,
    background 0.18s ease,
    box-shadow 0.18s ease;
}

input:hover,
select:hover,
textarea:hover {
  background: var(--control-bg-hover);
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent);
}

input::placeholder,
textarea::placeholder {
  color: var(--control-placeholder);
}

textarea {
  resize: vertical;
  min-height: 120px;
}

select {
  padding-right: 46px;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;

  background-image:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position:
    calc(100% - 22px) calc(50% - 3px),
    calc(100% - 16px) calc(50% - 3px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

select option,
select optgroup {
  background: var(--control-option-bg);
  color: var(--control-option-text);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.theme-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid var(--control-border);
  background: var(--control-bg);
  color: var(--text);
  cursor: pointer;
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition:
    transform 0.15s ease,
    border-color 0.18s ease,
    background 0.18s ease;
}

.theme-toggle-btn:hover {
  transform: translateY(-1px);
  border-color: var(--accent);
  background: var(--control-bg-hover);
}

.theme-toggle-icon {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #151725;
  font-size: 0.95rem;
  line-height: 1;
  font-weight: 700;
}

.primary-btn,
.ghost-btn,
.logout-link,
.icon-btn,
.mini-link-btn,
.button-like-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  text-decoration: none;
  border: none;
  cursor: pointer;
  font-weight: 700;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
}

.primary-btn:hover,
.ghost-btn:hover,
.logout-link:hover,
.icon-btn:hover,
.mini-link-btn:hover,
.button-like-link:hover {
  transform: translateY(-1px);
}

.primary-btn {
  padding: 14px 18px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #12131f;
}

.ghost-btn,
.logout-link,
.button-like-link {
  padding: 14px 18px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  border: 1px solid var(--border);
}

.icon-btn {
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-size: 1.2rem;
}

.mini-link-btn {
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  color: var(--text);
}

button:disabled,
.primary-btn:disabled,
.ghost-btn:disabled,
.icon-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.form-message {
  min-height: 20px;
  margin: 0;
  font-size: 0.95rem;
  color: #ffb8c8;
}

.form-message.neutral {
  color: var(--muted);
}

.success-message {
  margin: 0;
  color: #9df1c8;
}

.dashboard-layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 24px;
  padding: 24px;
  position: relative;
  z-index: 1;
}

.sidebar {
  border-radius: 28px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-width: 0;
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #12131f;
  font-size: 1.4rem;
  font-weight: 900;
}

.sidebar-nav {
  display: grid;
  gap: 8px;
}

.sidebar-nav a {
  color: var(--muted);
  padding: 12px 14px;
  border-radius: 14px;
  white-space: nowrap;
}

.sidebar-nav a.active,
.sidebar-nav a:hover {
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
}

.dashboard-main {
  display: grid;
  gap: 24px;
  min-width: 0;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.live-box {
  border-radius: 999px;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.live-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ff6a88;
  box-shadow: 0 0 16px rgba(255, 106, 136, 0.6);
}

.live-dot.ok {
  background: #6cffb3;
  box-shadow: 0 0 16px rgba(108, 255, 179, 0.6);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.stat-card {
  border-radius: var(--radius-lg);
  padding: 22px;
  min-width: 0;
}

.stat-label {
  color: var(--muted);
  margin: 0 0 10px;
}

.stat-card h3 {
  margin: 0;
  font-size: 1.8rem;
  overflow-wrap: anywhere;
}

.dashboard-split {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(340px, 0.8fr);
  gap: 18px;
  align-items: start;
}

.content-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.panel {
  border-radius: var(--radius-lg);
  padding: 22px;
  min-width: 0;
}

.panel.full-width {
  grid-column: 1 / -1;
}

.panel-head {
  margin-bottom: 14px;
}

.panel-head.between {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.panel-head h3 {
  margin: 0;
}

.panel-head p {
  margin: 6px 0 0;
}

.panel-body {
  color: var(--muted);
  line-height: 1.65;
}

.profile-lines {
  display: grid;
  gap: 8px;
}

.entry-list {
  display: grid;
  gap: 12px;
}

.entry-item {
  padding: 14px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  min-width: 0;
}

.calendar-panel,
.editor-panel,
.settings-panel {
  min-width: 0;
}

.calendar-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
}

.calendar-scroll {
  width: 100%;
  position: relative;
}

.weekday-row {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.weekday-cell {
  text-align: center;
  color: var(--muted);
  font-size: 0.88rem;
  padding: 6px 0;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}

.calendar-spacer {
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-md);
  opacity: 0.2;
}

.day-cell {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  padding: 10px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
  overflow: hidden;
  min-width: 0;
  isolation: isolate;
}

.day-cell:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.06);
}

.day-cell.today {
  box-shadow: inset 0 0 0 1px rgba(142, 197, 255, 0.7);
}

.day-cell.selected {
  outline: 2px solid rgba(210, 156, 255, 0.75);
  outline-offset: 0;
}

.day-cell.has-entry {
  border-color: rgba(142, 197, 255, 0.45);
}

.day-cell.in-bleeding {
  background:
    radial-gradient(circle at 50% 18%, rgba(255, 220, 226, 0.06), transparent 28%),
    linear-gradient(
      180deg,
      rgba(255, 220, 228, 0.04) 0%,
      rgba(188, 24, 52, 0.18) 24%,
      rgba(120, 8, 26, 0.18) 70%,
      rgba(255, 255, 255, 0.03) 100%
    );
  border-color: rgba(255, 120, 138, 0.35);
}

.day-cell.is-bleeding-start {
  box-shadow: inset 0 0 0 1px rgba(255, 164, 183, 0.75);
}

.day-cell.is-bleeding-last-day {
  box-shadow: inset 0 0 0 1px rgba(255, 120, 138, 0.85);
}

.day-top,
.day-bottom {
  position: relative;
  z-index: 2;
}

.day-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.day-number {
  font-size: 1rem;
  font-weight: 700;
}

.moon-badge {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.moon-svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
  filter:
    drop-shadow(0 0 3px rgba(255, 244, 220, 0.18))
    drop-shadow(0 0 7px rgba(255, 220, 120, 0.08));
}

.moon-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.95rem;
  flex-shrink: 0;
}

.moon-inline .moon-svg {
  width: 18px;
  height: 18px;
}

.day-bottom {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.day-markers {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  min-width: 0;
}

.day-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  padding: 4px 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted);
  line-height: 1;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.day-pill.bleed {
  color: #ffd6df;
  background: rgba(255, 116, 141, 0.14);
}

.day-pill.mood {
  color: #d8d2f0;
}

.day-pill.cycle-day {
  color: #ffe5ea;
  background: rgba(176, 24, 48, 0.25);
}

.day-note {
  font-size: 0.75rem;
  color: var(--muted);
  line-height: 1.25;
  min-height: 1.9em;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.empty-note {
  opacity: 0.18;
}

.selected-day-box {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.03);
  margin-bottom: 14px;
}

.selected-day-hero {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.03));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 10px 24px rgba(0, 0, 0, 0.10);
}

.selected-day-hero-main {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.selected-day-copy {
  display: grid;
  gap: 8px;
  min-width: 0;
  flex: 1 1 auto;
}

.selected-day-copy strong {
  font-size: clamp(1.2rem, 2vw, 1.55rem);
  line-height: 1.15;
}

#selectedCycleInfo {
  min-height: 1.2em;
}

.selected-moon-hero {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 220px;
  padding: 12px 14px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  cursor: pointer;
}

.selected-moon-hero:hover {
  background: rgba(255, 255, 255, 0.08);
}

.selected-moon-hero .moon-inline {
  gap: 10px;
  font-size: 1rem;
}

.selected-moon-hero .moon-svg {
  width: 34px;
  height: 34px;
}

.selected-day-facts {
  margin-top: 14px;
}

.selected-day-facts-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.selected-day-fact {
  display: grid;
  gap: 4px;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
}

.selected-day-fact-label {
  font-size: 0.78rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.selected-day-fact-value {
  font-size: 0.98rem;
  line-height: 1.3;
}

.selected-day-note-card {
  margin-top: 12px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
}

.selected-day-note-label {
  font-size: 0.78rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}

.selected-day-note-text {
  color: var(--text);
  line-height: 1.5;
  white-space: pre-wrap;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.selected-day-events {
  margin-top: 12px;
  min-height: 28px;
}

.selected-day-box p {
  margin: 8px 0 0;
}

.selected-day-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.selected-day-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.selected-day-fertility {
  margin-top: 10px;
}

.selected-fertility-status {
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 0.95rem;
  line-height: 1.35;
  background: rgba(255, 255, 255, 0.06);
}

.selected-fertility-status.status-low {
  background: rgba(255, 255, 255, 0.06);
}

.selected-fertility-status.status-signs {
  background: rgba(120, 180, 120, 0.12);
}

.selected-fertility-status.status-likely {
  background: rgba(220, 180, 90, 0.14);
}

.selected-fertility-status.status-high {
  background: rgba(255, 140, 90, 0.16);
}

.selected-fertility-status.status-confirmed {
  background: rgba(120, 200, 160, 0.18);
}


.marker-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

#editorEditArea {
  display: grid;
  gap: 14px;
}

#editorEditArea[hidden] {
  display: none !important;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.settings-panel {
  max-width: 980px;
}

.mobile-editor-trigger {
  display: none;
}

.editor-panel__sheet-head {
  display: none;
}

.editor-sheet-backdrop {
  display: none;
}

@media (max-width: 1200px) {
  .dashboard-split {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 980px) {
  .hero-card {
    grid-template-columns: 1fr;
  }

  .dashboard-layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    gap: 16px;
  }

  .sidebar-nav {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: thin;
  }

  .card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .content-grid {
    grid-template-columns: 1fr;
  }

  .editor-panel {
    order: 1;
  }

  .calendar-panel {
    order: 2;
  }
}

@media (max-width: 720px) {
  .form-grid {
    grid-template-columns: 1fr;
  }

  .calendar-scroll {
    overflow-x: auto;
    padding-bottom: 8px;
  }

  .weekday-row,
  .calendar-grid {
    min-width: 640px;
  }

  .weekday-cell {
    font-size: 0.78rem;
  }

  .day-cell {
    padding: 8px;
    border-radius: var(--radius-sm);
  }

  .day-note {
    display: none;
  }

  .marker-actions {
    flex-direction: column;
  }

  .marker-actions .ghost-btn {
    width: 100%;
  }

  .selected-day-top {
    flex-direction: column;
    align-items: flex-start;
  }

  .selected-day-hero-main {
    flex-direction: column;
  }

  .selected-moon-hero {
    width: 100%;
    justify-content: flex-start;
    min-width: 0;
  }

  .selected-day-facts-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .landing-shell,
  .dashboard-layout {
    padding: 16px;
  }

  .hero-copy,
  .login-card,
  .sidebar,
  .panel,
  .stat-card {
    border-radius: 22px;
  }

  .hero-copy {
    padding: 28px;
  }

  .login-card,
  .panel,
  .stat-card,
  .sidebar {
    padding: 18px;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  .topbar,
  .panel-head.between {
    flex-direction: column;
    align-items: flex-start;
  }

  .calendar-controls {
    width: 100%;
    justify-content: space-between;
  }
}

@media (max-width: 640px) {
  .topbar-actions {
    width: 100%;
  }

  .theme-toggle-btn {
    width: 100%;
    justify-content: center;
  }
}

.astro-day-cell {
  text-decoration: none;
  color: inherit;
}

.astro-has-events {
  border-color: rgba(210, 156, 255, 0.34);
  background:
    linear-gradient(180deg, rgba(210, 156, 255, 0.08), rgba(255, 255, 255, 0.03));
}

.astro-day-count {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  font-size: 0.72rem;
  font-weight: 700;
}

.astro-pill {
  color: #f6ebff;
  background: rgba(185, 133, 255, 0.16);
}

.astro-event-meta {
  color: var(--muted);
  font-size: 0.92rem;
}

.astro-empty {
  color: var(--muted);
}

.day-cell.is-cycle-current {
  border-color: rgba(255, 110, 160, 0.65);
  background: rgba(255, 110, 160, 0.10);
}

.day-cell.is-cycle-predicted {
  border-color: rgba(255, 170, 200, 0.45);
  background: rgba(255, 170, 200, 0.08);
}

.day-cell.is-cycle-past {
  border-color: rgba(170, 120, 150, 0.30);
  background: rgba(170, 120, 150, 0.05);
}

.day-pill.predicted {
  background: rgba(255, 170, 200, 0.16);
}

.day-pill.past {
  background: rgba(170, 120, 150, 0.14);
}

.day-pill.more {
  background: rgba(255, 255, 255, 0.10);
  color: var(--text-muted, var(--muted));
  font-weight: 700;
}


[hidden] {
  display: none !important;
}

.selected-day-events {
  margin-top: 10px;
}

.selected-day-events .day-markers {
  margin-top: 4px;
}

/* =========================================================
   Dashboard refinements, consolidated
   Enthält die zuvor einzeln angehängten Mini-Hero-, Kalender-
   und Statuskarten-Anpassungen ohne doppelte Zwischenstände.
   ========================================================= */

/* Selected day mini hero */
.selected-day-box.selected-day-hero {
  padding: 18px;
  border-radius: 28px;
}

.selected-day-box.selected-day-hero .selected-day-hero-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  align-items: start;
  gap: 16px;
}

.selected-day-box.selected-day-hero .selected-day-copy {
  display: block;
}

.selected-day-title-row {
  margin-top: 2px;
}

.selected-day-lead {
  margin-top: 12px;
  min-height: 1.4em;
}

.selected-day-box.selected-day-hero .selected-day-progress {
  display: block;
  width: 100%;
  height: 8px;
  margin: 18px 0 0;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.26);
}

.selected-day-box.selected-day-hero .selected-day-progress-fill {
  display: block;
  width: 0%;
  min-width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ff6fa8, #c99cff, #8ec5ff);
  transition: width 220ms ease;
}

.selected-day-box.selected-day-hero .selected-day-progress-labels {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 8px;
  color: rgba(244, 240, 255, 0.52);
  font-size: 0.74rem;
  line-height: 1.2;
}

.selected-day-box.selected-day-hero .selected-day-progress-labels span:nth-child(2) {
  text-align: center;
}

.selected-day-box.selected-day-hero .selected-day-progress-labels span:nth-child(3) {
  text-align: right;
}

.selected-day-box.selected-day-hero .selected-moon-hero {
  width: 280px;
  min-width: 280px;
  max-width: 280px;
  min-height: 130px;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  justify-content: start;
  justify-self: end;
  align-self: start;
  padding: 18px;
  text-align: left;
}

.selected-moon-icon-shell {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 20px;
  background: rgba(10, 12, 25, 0.30);
  box-shadow:
    inset 0 1px 8px rgba(255, 255, 255, 0.08),
    0 10px 24px rgba(0, 0, 0, 0.20);
}

.selected-moon-icon-shell #selectedMoonLabel {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  gap: 0;
  color: transparent;
  font-size: 0;
}

.selected-moon-icon-shell #selectedMoonLabel > span {
  display: none;
}

.selected-moon-icon-shell #selectedMoonLabel .moon-svg {
  width: 42px;
  height: 42px;
  display: block;
}

.selected-day-box.selected-day-hero .selected-moon-copy {
  width: 100%;
  min-width: 0;
  display: grid;
  gap: 3px;
}

.selected-moon-kicker {
  color: rgba(244, 240, 255, 0.58);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.selected-day-box.selected-day-hero .selected-moon-phase-name {
  min-height: 2.35em;
  max-height: 2.35em;
  display: flex;
  align-items: center;
  overflow: hidden;
  color: rgba(244, 240, 255, 0.94);
  font-size: 0.98rem;
  font-weight: 900;
  line-height: 1.15;
}

.selected-day-box.selected-day-hero .selected-moon-hint {
  min-height: 1.2em;
  color: rgba(244, 240, 255, 0.55);
  font-size: 0.78rem;
  line-height: 1.2;
}

.selected-day-box.selected-day-hero .selected-day-facts {
  overflow: hidden;
}

.selected-day-box.selected-day-hero .selected-day-facts-grid {
  grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
}

.selected-day-box.selected-day-hero .selected-day-fact {
  min-width: 0;
  min-height: 66px;
  overflow: hidden;
}

.selected-day-box.selected-day-hero .selected-day-fact-label,
.selected-day-box.selected-day-hero .selected-day-fact-value {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.selected-day-box.selected-day-hero .selected-day-events,
.selected-day-box.selected-day-hero .selected-day-note-card {
  margin-top: 12px;
}

/* Calendar: current day via cell fill, not badge */
.day-cell.today::after {
  content: none;
  display: none;
}

.day-cell.today {
  position: relative;
  border-color: rgba(199, 156, 255, 0.72);
  background:
    radial-gradient(circle at 18% 0%, rgba(255, 111, 168, 0.22), transparent 42%),
    radial-gradient(circle at 85% 100%, rgba(142, 197, 255, 0.22), transparent 46%),
    linear-gradient(145deg, rgba(116, 92, 168, 0.42), rgba(46, 55, 88, 0.50));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.12),
    0 0 0 1px rgba(199, 156, 255, 0.16),
    0 14px 30px rgba(199, 156, 255, 0.14);
}

.day-cell.today .day-number {
  width: 25px;
  height: 25px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, #ff8fc3, #c99cff, #8ec5ff);
  color: #101224;
  font-weight: 950;
  text-shadow: none;
  box-shadow:
    0 0 0 2px rgba(255, 255, 255, 0.10),
    0 8px 18px rgba(0, 0, 0, 0.24);
}

.day-cell.today.selected {
  border-color: rgba(255, 255, 255, 0.78);
  background:
    radial-gradient(circle at 18% 0%, rgba(255, 111, 168, 0.34), transparent 42%),
    radial-gradient(circle at 85% 100%, rgba(142, 197, 255, 0.32), transparent 46%),
    linear-gradient(145deg, rgba(137, 102, 190, 0.58), rgba(52, 63, 104, 0.62));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.20),
    0 0 0 2px rgba(199, 156, 255, 0.24),
    0 16px 34px rgba(199, 156, 255, 0.20);
}

.day-cell.today.selected .day-number {
  background: linear-gradient(135deg, #ffd1e6, #d7b8ff, #b7dcff);
  color: #111325;
}

/* Compact dashboard status cards on desktop */
@media (min-width: 821px) {
  .card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 14px;
  }

  .card-grid .stat-card {
    min-height: 82px;
    padding: 14px 16px;
    border-radius: 18px;
  }

  .card-grid .stat-label {
    margin: 0 0 6px;
    font-size: 0.78rem;
    line-height: 1.15;
    opacity: 0.72;
  }

  .card-grid .stat-card h3 {
    margin: 0;
    font-size: 1.45rem;
    line-height: 1.05;
    letter-spacing: -0.04em;
  }

  #todayMoonCard {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr);
    align-items: center;
    gap: 14px;
  }

  #todayMoonCard .stat-label {
    margin-bottom: 3px;
  }

  #todayMoonCardIcon {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
  }

  #todayMoonCardIcon .moon-svg {
    width: 58px;
    height: 58px;
  }

  #todayMoonCardLabel {
    max-width: none;
    overflow-wrap: normal;
    font-size: 1.25rem;
    line-height: 1.05;
  }
}

/* Mobile dashboard and calendar */
@media (max-width: 820px) {
  body.mobile-editor-open {
    overflow: hidden;
  }

  .topbar {
    display: none;
  }

  .dashboard-layout {
    gap: 10px;
    padding: 8px;
  }

  .sidebar {
    gap: 12px;
    padding: 14px;
  }

  .sidebar-nav {
    gap: 6px;
    padding-bottom: 2px;
  }

  .dashboard-main,
  .dashboard-split,
  .content-grid {
    gap: 10px;
  }

  .panel {
    padding: 16px;
  }

  .dashboard-split {
    grid-template-columns: 1fr;
  }

  .calendar-panel {
    order: 1;
    overflow: hidden;
    padding: 14px 10px 12px;
    border-radius: 22px;
  }

  .editor-panel {
    order: 2;
  }

  .calendar-panel .panel-head {
    margin-bottom: 8px;
  }

  .calendar-controls {
    gap: 8px;
  }

  .calendar-controls h3,
  #calendarMonthLabel {
    font-size: 1rem;
  }

  .calendar-scroll {
    overflow-x: visible;
    padding-bottom: 0;
  }

  .weekday-row,
  .calendar-grid {
    width: 100%;
    min-width: 0;
    gap: 6px;
  }

  .weekday-cell {
    padding: 3px 0;
    font-size: 0.68rem;
  }

  .calendar-spacer,
  .day-cell {
    border-radius: 12px;
  }

  .day-cell {
    min-width: 0;
    min-height: 54px;
    aspect-ratio: 1 / 1.08;
    padding: 6px;
  }

  .day-top {
    gap: 3px;
  }

  .day-number {
    font-size: 0.9rem;
    line-height: 1;
  }

  .day-cell.today .day-number {
    width: 22px;
    height: 22px;
    font-size: 0.78rem;
  }

  .moon-badge {
    width: 17px;
    height: 17px;
  }

  .calendar-grid .day-bottom {
    gap: 3px;
  }

  .calendar-grid .day-markers {
    flex-wrap: nowrap;
    gap: 3px;
    overflow: hidden;
  }

  .calendar-grid .day-pill {
    max-width: 100%;
    padding: 3px 5px;
    font-size: 0.58rem;
  }

  .calendar-grid .day-markers .day-pill:nth-child(n+2),
  .day-note {
    display: none;
  }

  .mobile-editor-trigger {
    position: sticky;
    bottom: 8px;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 12px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background:
      linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.04));
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
  }

  .mobile-editor-trigger__meta {
    display: grid;
    gap: 2px;
    min-width: 0;
  }

  .mobile-editor-trigger__label {
    color: var(--muted);
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  .mobile-editor-trigger__meta strong {
    font-size: 0.86rem;
    line-height: 1.25;
  }

  .mobile-editor-trigger__btn {
    min-height: 46px;
    flex: 0 0 auto;
    padding-inline: 18px;
    border-radius: 15px;
    white-space: nowrap;
  }

  .card-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 10px;
  }

  .card-grid .stat-card {
    min-height: 64px;
    padding: 10px 12px;
    border-radius: 16px;
  }

  .card-grid .stat-label {
    margin: 0 0 4px;
    font-size: 0.72rem;
    line-height: 1.1;
    opacity: 0.72;
  }

  .card-grid .stat-card h3 {
    margin: 0;
    font-size: 1.25rem;
    line-height: 1.05;
    letter-spacing: -0.04em;
  }

  .card-grid .stat-card:nth-child(3) {
    grid-column: 1 / -1;
    min-height: 78px;
    padding: 10px 12px;
  }

  #todayMoonCard {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
  }

  #todayMoonCard .stat-label {
    margin-bottom: 2px;
  }

  #todayMoonCardIcon {
    width: 54px;
    height: 54px;
    flex: 0 0 54px;
    display: grid;
    place-items: center;
  }

  #todayMoonCardIcon .moon-svg {
    width: 54px;
    height: 54px;
  }

  #todayMoonCardLabel {
    max-width: none;
    overflow-wrap: normal;
    font-size: 1.12rem;
    line-height: 1.05;
  }

  .selected-day-box.selected-day-hero .selected-day-hero-main {
    grid-template-columns: 1fr;
  }

  .selected-day-box.selected-day-hero .selected-moon-hero {
    width: 100%;
    min-width: 0;
    max-width: none;
    min-height: 96px;
    justify-self: stretch;
  }

  .selected-day-box.selected-day-hero .selected-moon-phase-name {
    min-height: auto;
    max-height: none;
  }

  .selected-day-box {
    margin-bottom: 12px;
  }

  .marker-actions {
    gap: 8px;
  }

  .selected-day-hero-actions,
  .form-actions,
  .marker-actions {
    flex-direction: column;
  }

  .selected-day-hero-actions .primary-btn,
  .selected-day-hero-actions .ghost-btn,
  .form-actions .primary-btn,
  .form-actions .ghost-btn,
  .marker-actions .primary-btn,
  .marker-actions .ghost-btn {
    width: 100%;
  }

  .editor-sheet-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 60;
    opacity: 0;
    pointer-events: none;
    background: rgba(5, 8, 18, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    transition: opacity 0.22s ease;
  }

  body.mobile-editor-open .editor-sheet-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  .editor-panel {
    position: fixed;
    right: 10px;
    bottom: 10px;
    left: 10px;
    z-index: 70;
    max-height: min(82vh, 900px);
    overflow: auto;
    border-radius: 24px 24px 18px 18px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(calc(100% + 24px));
    transition:
      transform 0.26s ease,
      opacity 0.2s ease;
    box-shadow:
      0 30px 80px rgba(0, 0, 0, 0.32),
      0 8px 24px rgba(0, 0, 0, 0.18);
  }

  body.mobile-editor-open .editor-panel {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .editor-panel__sheet-head {
    position: sticky;
    top: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: -4px 0 10px;
    padding: 8px 0 6px;
    background:
      linear-gradient(180deg, rgba(15, 16, 32, 0.92), rgba(15, 16, 32, 0.72));
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
  }

  html[data-theme="light"] .editor-panel__sheet-head {
    background:
      linear-gradient(180deg, rgba(246, 242, 251, 0.95), rgba(246, 242, 251, 0.74));
  }

  .editor-sheet-handle {
    width: 56px;
    height: 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.2);
  }

  html[data-theme="light"] .editor-sheet-handle {
    background: rgba(92, 78, 130, 0.22);
  }

  .editor-sheet-close {
    position: absolute;
    top: 2px;
    right: 0;
  }
}

@media (max-width: 640px) {
  .selected-day-facts-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .selected-moon-hero {
    grid-template-columns: 52px minmax(0, 1fr);
    padding: 15px;
  }

  .selected-moon-icon-shell {
    width: 52px;
    height: 52px;
    border-radius: 18px;
  }

  .selected-moon-icon-shell #selectedMoonLabel,
  .selected-moon-icon-shell #selectedMoonLabel .moon-svg {
    width: 38px;
    height: 38px;
  }
}

@media (max-width: 380px) {
  .weekday-row,
  .calendar-grid {
    gap: 5px;
  }

  .day-cell {
    min-height: 50px;
    padding: 5px;
  }

  .day-number {
    font-size: 0.84rem;
  }

  .day-cell.today .day-number {
    width: 20px;
    height: 20px;
    font-size: 0.72rem;
  }

  .moon-badge {
    width: 15px;
    height: 15px;
  }

  .calendar-grid .day-pill {
    padding: 3px 4px;
    font-size: 0.54rem;
  }

  .card-grid {
    gap: 7px;
  }

  .card-grid .stat-card {
    min-height: 58px;
    padding: 9px 10px;
  }

  .card-grid .stat-card h3 {
    font-size: 1.12rem;
  }

  .card-grid .stat-card:nth-child(3) {
    min-height: 68px;
  }

  #todayMoonCard {
    grid-template-columns: 46px minmax(0, 1fr);
    gap: 10px;
  }

  #todayMoonCardIcon,
  #todayMoonCardIcon .moon-svg {
    width: 46px;
    height: 46px;
  }

  #todayMoonCardLabel {
    font-size: 1rem;
  }
}

/* =========================================================
   Geschätztes Fruchtbarkeitsfenster im Kalender
   ========================================================= */

.day-cell.is-fertility-window {
  border-color: rgba(124, 220, 205, 0.52);
  background:
    radial-gradient(circle at 50% 18%, rgba(195, 255, 242, 0.10), transparent 30%),
    linear-gradient(
      180deg,
      rgba(124, 220, 205, 0.14) 0%,
      rgba(91, 185, 176, 0.12) 48%,
      rgba(255, 255, 255, 0.03) 100%
    );
}

.day-cell.is-fertility-window-past {
  border-color: rgba(124, 220, 205, 0.26);
  background:
    radial-gradient(circle at 50% 18%, rgba(195, 255, 242, 0.05), transparent 30%),
    linear-gradient(
      180deg,
      rgba(124, 220, 205, 0.07) 0%,
      rgba(91, 185, 176, 0.06) 48%,
      rgba(255, 255, 255, 0.03) 100%
    );
}

/* Geschätzter Eisprung: stärker hervorgehoben */
.day-cell.is-estimated-ovulation {
  border-color: rgba(188, 255, 226, 0.88);
  box-shadow:
    inset 0 0 0 1px rgba(188, 255, 226, 0.58),
    0 0 0 1px rgba(124, 220, 205, 0.28),
    0 0 24px rgba(124, 220, 205, 0.18);
}

.day-cell.is-estimated-ovulation::after {
  content: "";
  position: absolute;
  top: 11px;
  left: 11px;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: rgba(207, 255, 235, 0.95);
  box-shadow:
    0 0 0 4px rgba(124, 220, 205, 0.14),
    0 0 18px rgba(124, 220, 205, 0.48);
  z-index: 3;
}

.day-cell.is-estimated-ovulation-past {
  border-color: rgba(188, 255, 226, 0.42);
  box-shadow:
    inset 0 0 0 1px rgba(188, 255, 226, 0.26),
    0 0 0 1px rgba(124, 220, 205, 0.14);
}

.day-cell.is-estimated-ovulation-past::after {
  background: rgba(207, 255, 235, 0.56);
  box-shadow:
    0 0 0 4px rgba(124, 220, 205, 0.08),
    0 0 12px rgba(124, 220, 205, 0.20);
}

/* Pill für den geschätzten Eisprung */
.day-pill.ovulation-estimated {
  background: rgba(124, 220, 205, 0.18);
  border: 1px solid rgba(124, 220, 205, 0.28);
  color: rgba(226, 255, 247, 0.96);
}

/* Reserve, falls wir Fruchtbarkeitsfenster-Pills später doch sichtbar machen */
.day-pill.fertility-window {
  background: rgba(124, 220, 205, 0.12);
  border: 1px solid rgba(124, 220, 205, 0.18);
  color: rgba(226, 255, 247, 0.90);
}

/* Hero-Status */
.selected-fertility-status.status-window {
  background: rgba(124, 220, 205, 0.12);
  border: 1px solid rgba(124, 220, 205, 0.18);
}

.selected-fertility-status.status-estimated-ovulation {
  background: rgba(124, 220, 205, 0.18);
  border: 1px solid rgba(124, 220, 205, 0.28);
}

/* =========================================================
   Fruchtbarkeitshinweise: qualitative Skala im Hero
   ========================================================= */

.selected-fertility-status {
  display: grid;
  gap: 9px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.10);
}

.selected-fertility-status-label {
  display: block;
  font-size: 0.96rem;
  font-weight: 900;
  line-height: 1.25;
}

.selected-fertility-status-detail {
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.4;
}

.fertility-signal-meter {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  width: 100%;
}

.fertility-meter-step {
  display: block;
  height: 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.10);
  transition:
    background 0.18s ease,
    box-shadow 0.18s ease,
    opacity 0.18s ease;
}

.selected-fertility-status.status-low {
  background: rgba(255, 255, 255, 0.05);
}

.selected-fertility-status.status-low .fertility-meter-step.is-active {
  background: rgba(190, 190, 210, 0.52);
}

.selected-fertility-status.status-slightly-elevated {
  background: rgba(124, 220, 205, 0.10);
  border-color: rgba(124, 220, 205, 0.18);
}

.selected-fertility-status.status-slightly-elevated .fertility-meter-step.is-active {
  background: rgba(124, 220, 205, 0.60);
}

.selected-fertility-status.status-elevated {
  background: rgba(124, 220, 205, 0.15);
  border-color: rgba(124, 220, 205, 0.28);
}

.selected-fertility-status.status-elevated .fertility-meter-step.is-active {
  background: rgba(124, 220, 205, 0.84);
  box-shadow: 0 0 12px rgba(124, 220, 205, 0.20);
}

.selected-fertility-status.status-high {
  background: rgba(138, 236, 192, 0.18);
  border-color: rgba(138, 236, 192, 0.34);
}

.selected-fertility-status.status-high .fertility-meter-step.is-active {
  background: rgba(150, 245, 202, 0.95);
  box-shadow: 0 0 14px rgba(150, 245, 202, 0.28);
}

.selected-fertility-status.status-very-high {
  background: rgba(176, 255, 219, 0.22);
  border-color: rgba(176, 255, 219, 0.44);
}

.selected-fertility-status.status-very-high .fertility-meter-step.is-active {
  background: rgba(201, 255, 231, 1);
  box-shadow: 0 0 16px rgba(201, 255, 231, 0.38);
}

/* Signal-Pills im Kalender */
.day-pill.fertility-signal {
  background: rgba(124, 220, 205, 0.16);
  border: 1px solid rgba(124, 220, 205, 0.24);
  color: rgba(226, 255, 247, 0.94);
}

.day-pill.ovulation-signal {
  background: rgba(176, 255, 219, 0.20);
  border: 1px solid rgba(176, 255, 219, 0.34);
  color: rgba(235, 255, 247, 0.98);
}

/* =========================================================
   Weitere Live-Tagesereignisse im Kalender
   ========================================================= */

.day-pill.spotting {
  background: rgba(255, 170, 194, 0.16);
  border: 1px solid rgba(255, 170, 194, 0.24);
  color: rgba(255, 226, 236, 0.96);
}

.day-pill.migraine {
  background: rgba(185, 146, 255, 0.16);
  border: 1px solid rgba(185, 146, 255, 0.25);
  color: rgba(236, 224, 255, 0.96);
}

.day-pill.pain-strong {
  background: rgba(255, 120, 138, 0.18);
  border: 1px solid rgba(255, 120, 138, 0.28);
  color: rgba(255, 226, 232, 0.98);
}

.day-pill.energy-low {
  background: rgba(255, 208, 130, 0.16);
  border: 1px solid rgba(255, 208, 130, 0.24);
  color: rgba(255, 241, 214, 0.96);
}

.day-pill.sexuality {
  background: rgba(255, 158, 216, 0.15);
  border: 1px solid rgba(255, 158, 216, 0.24);
  color: rgba(255, 228, 244, 0.96);
}

.day-pill.pregnancy-test {
  background: rgba(142, 197, 255, 0.16);
  border: 1px solid rgba(142, 197, 255, 0.26);
  color: rgba(227, 242, 255, 0.98);
}

/* =========================================================
   MoonCycle · Auswertungen
   ========================================================= */

.insights-intro {
  max-width: 720px;
  margin-top: 8px;
}

@media (min-width: 821px) {
  .insights-kpi-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.insights-overview-grid,
.insights-detail-grid {
  align-items: start;
}

.insight-summary-list {
  display: grid;
  gap: 10px;
}

.insight-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
}

.insight-summary-row span {
  color: var(--muted);
  line-height: 1.35;
}

.insight-summary-row strong {
  text-align: right;
  font-size: 1rem;
  line-height: 1.2;
}

.insight-note {
  margin: 14px 0 0;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(142, 197, 255, 0.18);
  background: rgba(142, 197, 255, 0.08);
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.insights-cycle-table-panel {
  overflow: hidden;
}

.insight-table-wrap {
  overflow-x: auto;
  border-radius: 18px;
  border: 1px solid var(--border);
}

.insight-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  background: rgba(255, 255, 255, 0.03);
}

.insight-table th,
.insight-table td {
  padding: 14px 16px;
  text-align: left;
  vertical-align: middle;
  border-bottom: 1px solid var(--border);
}

.insight-table th {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.035);
}

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

.insight-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.035);
}

.insight-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
}

.insight-badge.neutral {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.06);
}

.insight-badge.average {
  color: rgba(220, 255, 239, 0.98);
  border-color: rgba(138, 236, 192, 0.28);
  background: rgba(138, 236, 192, 0.14);
}

.insight-badge.shorter {
  color: rgba(227, 242, 255, 0.98);
  border-color: rgba(142, 197, 255, 0.28);
  background: rgba(142, 197, 255, 0.14);
}

.insight-badge.longer {
  color: rgba(255, 229, 236, 0.98);
  border-color: rgba(255, 158, 190, 0.30);
  background: rgba(255, 158, 190, 0.15);
}

.insight-event-list {
  display: grid;
  gap: 10px;
}

.insight-event-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
}

.insight-event-row span {
  color: var(--muted);
}

.insight-event-row strong {
  text-align: right;
}

.insight-empty-state {
  padding: 16px;
  border-radius: 18px;
  border: 1px dashed var(--border);
  background: rgba(255, 255, 255, 0.025);
  color: var(--muted);
  line-height: 1.5;
}

@media (max-width: 720px) {
  .insight-summary-row,
  .insight-event-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .insight-summary-row strong,
  .insight-event-row strong {
    text-align: left;
  }
}

/* =========================================================
   Kalendersteuerung: Heute-Button
   ========================================================= */

.calendar-today-btn {
  min-height: 42px;
  padding-inline: 14px;
  white-space: nowrap;
}

@media (max-width: 820px) {
  .calendar-today-btn {
    min-height: 40px;
    padding-inline: 12px;
    font-size: 0.88rem;
  }
}

/* =========================================================
   Insights: Drilldowns, Musterkarten, klickbare Kennzahlen
   ========================================================= */

.insight-stat-link {
  color: inherit;
  text-decoration: none;
  transition:
    transform 0.16s ease,
    border-color 0.16s ease,
    background 0.16s ease;
}

.insight-stat-link:hover {
  transform: translateY(-2px);
  border-color: rgba(210, 156, 255, 0.34);
  background: rgba(255, 255, 255, 0.075);
}

.insight-summary-link {
  color: inherit;
  text-decoration: none;
  transition:
    transform 0.16s ease,
    border-color 0.16s ease,
    background 0.16s ease;
}

.insight-summary-link:hover {
  transform: translateY(-1px);
  border-color: rgba(142, 197, 255, 0.28);
  background: rgba(255, 255, 255, 0.065);
}

.insights-pattern-panel {
  overflow: hidden;
}

.insight-pattern-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.insight-pattern-card {
  display: grid;
  gap: 8px;
  min-height: 144px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
}

.insight-pattern-label {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.35;
}

.insight-pattern-card strong {
  font-size: 1.6rem;
  line-height: 1.1;
}

.insight-pattern-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.48;
}

.insight-focus-panel {
  border-color: rgba(142, 197, 255, 0.24);
  background:
    radial-gradient(circle at top left, rgba(142, 197, 255, 0.10), transparent 34%),
    var(--bg-soft);
}

.insight-focus-list {
  margin-top: 6px;
}

.insight-event-row--expanded > div {
  display: grid;
  gap: 4px;
}

.insight-event-meta {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

@media (max-width: 1100px) {
  .insight-pattern-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .insight-pattern-grid {
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   Insights: Muster nach Zyklustagen
   ========================================================= */

.insight-cycleday-highlight-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.insight-cycleday-distribution-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.insight-distribution-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
}

.insight-distribution-card h4 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.3;
}

.insight-distribution-list {
  display: grid;
  gap: 8px;
}

.insight-distribution-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.035);
}

.insight-distribution-row span {
  color: var(--muted);
}

.insight-distribution-row strong {
  white-space: nowrap;
}

@media (max-width: 1100px) {
  .insight-cycleday-highlight-grid,
  .insight-cycleday-distribution-grid {
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   Insights: Phasenanalyse
   ========================================================= */

.insight-pattern-link {
  color: inherit;
  text-decoration: none;
  transition:
    transform 0.16s ease,
    border-color 0.16s ease,
    background 0.16s ease;
}

.insight-pattern-link:hover {
  transform: translateY(-2px);
  border-color: rgba(142, 197, 255, 0.28);
  background: rgba(255, 255, 255, 0.065);
}

.insight-phase-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.insight-phase-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
}

.insight-phase-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.insight-phase-card-head h4 {
  margin: 0;
  font-size: 1.08rem;
}

.insight-phase-card-head span {
  color: var(--muted);
  font-size: 0.88rem;
}

.insight-phase-list {
  display: grid;
  gap: 8px;
}

.insight-phase-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.035);
  color: inherit;
  text-decoration: none;
}

.insight-phase-row span {
  color: var(--muted);
}

.insight-phase-row strong {
  white-space: nowrap;
}

.insight-phase-row em {
  font-style: normal;
  color: var(--muted);
  font-size: 0.84rem;
  white-space: nowrap;
}

.insight-phase-link {
  transition:
    transform 0.16s ease,
    border-color 0.16s ease,
    background 0.16s ease;
}

.insight-phase-link:hover {
  transform: translateY(-1px);
  border-color: rgba(142, 197, 255, 0.28);
  background: rgba(255, 255, 255, 0.06);
}

@media (max-width: 1100px) {
  .insight-phase-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .insight-phase-row {
    grid-template-columns: 1fr;
    align-items: flex-start;
  }
}


/* =========================================================
   Insights: Phasenanalyse + weitere Trackingmuster
   ========================================================= */

.insight-pattern-link {
  color: inherit;
  text-decoration: none;
  transition:
    transform 0.16s ease,
    border-color 0.16s ease,
    background 0.16s ease;
}

.insight-pattern-link:hover {
  transform: translateY(-2px);
  border-color: rgba(142, 197, 255, 0.28);
  background: rgba(255, 255, 255, 0.065);
}

.insight-phase-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 14px;
}

.insight-phase-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
}

.insight-phase-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.insight-phase-card-head h4 {
  margin: 0;
  font-size: 1.08rem;
}

.insight-phase-card-head span {
  color: var(--muted);
  font-size: 0.88rem;
}

.insight-phase-list {
  display: grid;
  gap: 8px;
}

.insight-phase-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.035);
  color: inherit;
  text-decoration: none;
}

.insight-phase-row span {
  color: var(--muted);
}

.insight-phase-row strong {
  white-space: nowrap;
}

.insight-phase-row em {
  font-style: normal;
  color: var(--muted);
  font-size: 0.84rem;
  white-space: nowrap;
}

.insight-phase-link {
  transition:
    transform 0.16s ease,
    border-color 0.16s ease,
    background 0.16s ease;
}

.insight-phase-link:hover {
  transform: translateY(-1px);
  border-color: rgba(142, 197, 255, 0.28);
  background: rgba(255, 255, 255, 0.06);
}

.insight-cycleday-distribution-grid--wide {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 1100px) {
  .insight-cycleday-distribution-grid--wide {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .insight-phase-row {
    grid-template-columns: 1fr;
    align-items: flex-start;
  }
}

/* =========================================================
   Astro-Kalender: System-Pills
   ========================================================= */

.astro-pill--chinese {
  border-color: rgba(237, 184, 93, 0.42);
  background:
    linear-gradient(135deg, rgba(237, 184, 93, 0.20), rgba(175, 74, 56, 0.16));
  color: #f7dfb3;
}

html[data-theme="light"] .astro-pill--chinese {
  border-color: rgba(173, 104, 30, 0.32);
  background:
    linear-gradient(135deg, rgba(255, 229, 174, 0.82), rgba(255, 213, 199, 0.58));
  color: #6f3f10;
}

.astro-pill--eclipse {
  border-color: rgba(195, 120, 255, 0.36);
  background: rgba(195, 120, 255, 0.14);
}

.astro-pill--moon {
  border-color: rgba(142, 197, 255, 0.36);
  background: rgba(142, 197, 255, 0.14);
}

/* =========================================================
   Astro-Kalender: verdichtete Aspekte
   ========================================================= */

.astro-pill--aspect-summary {
  border-color: rgba(176, 144, 255, 0.28);
  background: rgba(176, 144, 255, 0.13);
  color: #dcd0ff;
}

html[data-theme="light"] .astro-pill--aspect-summary {
  border-color: rgba(126, 92, 190, 0.28);
  background: rgba(229, 216, 255, 0.72);
  color: #4e347d;
}

/* =========================================================
   Astro-Kalender: chinesische Tagesfakten
   ========================================================= */

.astro-system-facts {
  border-color: rgba(237, 184, 93, 0.24);
  background:
    radial-gradient(circle at top right, rgba(237, 184, 93, 0.10), transparent 34%),
    rgba(255, 255, 255, 0.035);
}

/* =========================================================
   Astro-Kalender: Systemfilter
   ========================================================= */

.astro-system-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 14px;
}

.astro-filter-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.045);
  color: var(--text);
  text-decoration: none;
  font-size: 0.86rem;
  line-height: 1.1;
  transition:
    transform 0.16s ease,
    border-color 0.16s ease,
    background 0.16s ease;
}

.astro-filter-chip:hover {
  transform: translateY(-1px);
  border-color: rgba(142, 197, 255, 0.28);
  background: rgba(255, 255, 255, 0.07);
}

.astro-filter-chip.active {
  border-color: rgba(237, 184, 93, 0.44);
  background:
    linear-gradient(135deg, rgba(237, 184, 93, 0.18), rgba(142, 197, 255, 0.12));
  color: #f7dfb3;
}

html[data-theme="light"] .astro-filter-chip.active {
  border-color: rgba(173, 104, 30, 0.34);
  background:
    linear-gradient(135deg, rgba(255, 229, 174, 0.86), rgba(221, 236, 255, 0.72));
  color: #5f3b13;
}

/* =========================================================
   Astro-Kalender: Heute + Jump-to-Date
   ========================================================= */

.astro-calendar-controls {
  flex-wrap: wrap;
}

.astro-today-btn {
  min-height: 34px;
}

.astro-jump-form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  align-items: center;
}

.astro-jump-form input[type="date"] {
  min-height: 34px;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.045);
  color: var(--text);
  font: inherit;
  font-size: 0.86rem;
}

.astro-jump-form input[type="date"]:focus {
  outline: none;
  border-color: rgba(142, 197, 255, 0.45);
  box-shadow: 0 0 0 3px rgba(142, 197, 255, 0.12);
}

/* =========================================================
   Astro-Kalender: Datenstatus / Auto-Loading
   ========================================================= */

.astro-data-status {
  margin: 12px 0 14px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(237, 184, 93, 0.28);
  background:
    radial-gradient(circle at top left, rgba(237, 184, 93, 0.13), transparent 34%),
    rgba(255, 255, 255, 0.04);
}

.astro-data-status strong {
  display: block;
  margin-bottom: 6px;
}

.astro-data-status p {
  margin: 6px 0 0;
  line-height: 1.5;
}

html[data-theme="light"] .astro-data-status {
  border-color: rgba(173, 104, 30, 0.30);
  background:
    radial-gradient(circle at top left, rgba(255, 229, 174, 0.78), transparent 38%),
    rgba(255, 255, 255, 0.74);
}

/* =========================================================
   Astro Personal
   ========================================================= */

.astro-fact-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.astro-fact-row:last-child {
  border-bottom: 0;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 0.78rem;
  white-space: nowrap;
}

.status-pill--ok {
  border-color: rgba(92, 205, 154, 0.32);
  background: rgba(92, 205, 154, 0.12);
  color: #a8f3ce;
}

.status-pill--ready {
  border-color: rgba(142, 197, 255, 0.32);
  background: rgba(142, 197, 255, 0.12);
  color: #c8e4ff;
}

.status-pill--warn {
  border-color: rgba(237, 184, 93, 0.34);
  background: rgba(237, 184, 93, 0.13);
  color: #f6ddb0;
}

.status-pill--missing {
  border-color: rgba(255, 112, 112, 0.34);
  background: rgba(255, 112, 112, 0.12);
  color: #ffc4c4;
}

.table-wrap {
  overflow-x: auto;
  border-radius: 18px;
  border: 1px solid var(--border);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 640px;
}

.data-table th,
.data-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}

.data-table th {
  color: var(--muted);
  font-weight: 600;
}

.data-table tr:last-child td {
  border-bottom: 0;
}

html[data-theme="light"] .status-pill--ok {
  color: #166345;
}

html[data-theme="light"] .status-pill--ready {
  color: #1e5d8d;
}

html[data-theme="light"] .status-pill--warn {
  color: #7a4f12;
}

html[data-theme="light"] .status-pill--missing {
  color: #8f2d2d;
}


/* =========================================================
   Astro Personal: Score Bars
   ========================================================= */

.astro-score-card {
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background:
    radial-gradient(circle at top left, rgba(237, 184, 93, 0.10), transparent 34%),
    rgba(255, 255, 255, 0.04);
}

.astro-score-bars {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.astro-score-row {
  display: grid;
  gap: 6px;
}

.astro-score-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.9rem;
}

.astro-score-track {
  height: 12px;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.055);
}

.astro-score-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(142, 197, 255, 0.55), rgba(237, 184, 93, 0.72));
}

.astro-score-details {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.astro-score-details summary {
  cursor: pointer;
  font-size: 0.9rem;
}

.astro-score-details ul {
  margin: 10px 0 0;
  padding-left: 18px;
}

.astro-score-details li {
  margin: 6px 0;
}

html[data-theme="light"] .astro-score-card {
  background:
    radial-gradient(circle at top left, rgba(255, 229, 174, 0.76), transparent 38%),
    rgba(255, 255, 255, 0.76);
}

html[data-theme="light"] .astro-score-track {
  background: rgba(16, 35, 31, 0.06);
}

.astro-context-switcher {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0;
}

.astro-score-card {
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background:
    radial-gradient(circle at top left, rgba(237, 184, 93, 0.10), transparent 34%),
    rgba(255, 255, 255, 0.04);
}

.astro-score-bars {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.astro-score-row {
  display: grid;
  gap: 6px;
}

.astro-score-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.9rem;
}

.astro-score-track {
  height: 12px;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.055);
}

.astro-score-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(142, 197, 255, 0.55), rgba(237, 184, 93, 0.72));
}

.astro-score-details {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.astro-score-details summary {
  cursor: pointer;
  font-size: 0.9rem;
}

.astro-score-details ul {
  margin: 10px 0 0;
  padding-left: 18px;
}

.astro-score-details li {
  margin: 6px 0;
}

.astro-live-status {
  position: fixed;
  right: 14px;
  bottom: 14px;
  z-index: 1000;
  max-width: 320px;
  padding: 9px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(20, 20, 28, 0.82);
  backdrop-filter: blur(12px);
  font-size: 0.78rem;
}

html[data-theme="light"] .astro-live-status {
  background: rgba(255, 255, 255, 0.88);
}

.ap-floating {
  position: fixed;
  right: 16px;
  bottom: calc /*des bestehenden `<style>`-Blocks ganz unten vor `</*/(16px + var(--safe));
  z-index: 60;
  width: 62px;
  height: 62px;
}

.ap-fab {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 62px;
  height: 62px;
  border: 0;
  border-radius: 23px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, var(--pink), var(--violet));
  box-shadow: 0 18px 55px rgba(255,79,157,.38);
  cursor: pointer;
  transition: transform .24s ease, border-radius .24s ease;
}

.ap-fab svg {
  width: 28px;
  height: 28px;
  transition: transform .24s ease;
}

.ap-floating.is-open .ap-fab {
  border-radius: 999px 22px 999px 999px;
  transform: rotate(-8deg) scale(1.02);
}

.ap-floating.is-open .ap-fab svg {
  transform: rotate(45deg);
}

.ap-float-item {
  position: absolute;
  right: 6px;
  bottom: 6px;
  width: 50px;
  height: 50px;
  border-radius: 19px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  background: rgba(20,16,32,.86);
  color: var(--text);
  text-decoration: none;
  box-shadow: 0 16px 34px rgba(0,0,0,.32);
  backdrop-filter: blur(18px);
  opacity: 0;
  pointer-events: none;
  transform: translate3d(0,0,0) scale(.45) rotate(10deg);
  transition:
    transform .34s cubic-bezier(.18,.88,.22,1.18),
    opacity .2s ease,
    background .18s ease;
}

.ap-float-item::after {
  content: attr(data-label);
  position: absolute;
  right: calc(100% + 9px);
  top: 50%;
  transform: translateY(-50%) scale(.92);
  opacity: 0;
  white-space: nowrap;
  padding: 7px 9px;
  border-radius: 999px;
  background: rgba(8,7,14,.82);
  border: 1px solid rgba(255,255,255,.13);
  color: var(--muted);
  font-size: .74rem;
  transition: opacity .18s ease, transform .18s ease;
}

.ap-float-item:hover::after,
.ap-float-item:focus-visible::after {
  opacity: 1;
  transform: translateY(-50%) scale(1);
}

.ap-floating.is-open .ap-float-item {
  opacity: 1;
  pointer-events: auto;
}

.ap-floating.is-open .ap-float-item:nth-of-type(1) {
  transform: translate3d(0, -72px, 0) scale(1) rotate(0deg);
}

.ap-floating.is-open .ap-float-item:nth-of-type(2) {
  transform: translate3d(0, -136px, 0) scale(1) rotate(0deg);
}

.ap-floating.is-open .ap-float-item:nth-of-type(3) {
  transform: translate3d(-72px, 0, 0) scale(1) rotate(0deg);
}

.ap-floating.is-open .ap-float-item:nth-of-type(4) {
  transform: translate3d(-136px, 0, 0) scale(1) rotate(0deg);
}

@media (min-width: 900px) {
  .ap-floating {
    display: none;
  }
}