:root {
  --brand: #121212;
  --accent: #4fbaac;
  --mint: #4fbaac;
  --lilac: #d9c9ff;
  --lilac-soft: #f2edff;
  --paper: #fbfbfa;
  --surface: #ffffff;
  --surface-2: #f4f7f6;
  --ink: #121212;
  --muted: #74747a;
  --line: #e3e3e0;
  --moon-shadow: #e7e7e5;
  --shadow: 0 22px 54px rgba(18, 18, 18, 0.08);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 78% 8%, rgba(217, 201, 255, 0.48), transparent 28%),
    linear-gradient(180deg, #ffffff 0%, var(--paper) 42%, #f6faf9 100%);
  color: var(--ink);
}

body[data-theme="dark"] {
  --paper: #101615;
  --surface: #17211f;
  --surface-2: #1f2b29;
  --ink: #f6fbfa;
  --muted: #b7c5c1;
  --line: #2c3c38;
  --moon-shadow: #33433f;
  --shadow: 0 22px 54px rgba(0, 0, 0, 0.28);
  background:
    radial-gradient(circle at 78% 8%, rgba(217, 201, 255, 0.18), transparent 28%),
    linear-gradient(180deg, #0d1211 0%, var(--paper) 100%);
}

button,
input,
select {
  font: inherit;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 15;
  min-height: 78px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 12px 24px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface), transparent 7%);
  backdrop-filter: blur(18px);
}

.live-time {
  min-width: 112px;
  display: grid;
  justify-items: end;
  gap: 2px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.live-time time {
  color: var(--ink);
  font-size: 17px;
  font-variant-numeric: tabular-nums;
  letter-spacing: .02em;
}

.app-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  background: transparent;
  color: var(--ink);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.sidebar-timer-display {
  font-size: 34px;
  line-height: 1;
  font-weight: 900;
  color: var(--accent);
}

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

.brand-logo {
  width: 52px;
  height: 52px;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 10px 26px rgba(18, 18, 18, 0.16);
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: 22px;
  letter-spacing: 0;
}

h2 {
  font-size: clamp(30px, 5vw, 58px);
  line-height: 0.95;
  letter-spacing: 0;
}

h3 {
  font-size: 22px;
  letter-spacing: 0;
}

.eyebrow,
.signal-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.sidebar .eyebrow,
.sidebar .soft,
.sidebar .tiny {
  color: var(--muted);
}

.nav-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.nav-tabs::-webkit-scrollbar {
  display: none;
}

.tab,
.primary-action,
.secondary-action,
.ghost-file,
.secondary-link,
.icon-button {
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 180ms ease, background 180ms ease, border 180ms ease, box-shadow 180ms ease, color 180ms ease;
}

.tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  background: var(--surface-2);
  color: var(--ink);
  font-weight: 700;
  white-space: nowrap;
  padding: 0 12px;
}

.tab svg,
.icon-only svg,
.icon-tab img {
  width: 20px;
  height: 20px;
}

.tab svg,
.icon-only svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-tab,
.icon-only {
  width: 44px;
  padding: 0;
  justify-content: center;
}

.sidebar-rhythm {
  display: grid;
  gap: 12px;
}

.sidebar-cycle-track,
.energy-meter {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent), transparent 82%);
}

.sidebar-cycle-track span,
.energy-meter span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--lilac));
  transition: width 450ms ease;
}

.tab.active,
.tab:hover {
  background: var(--surface);
  color: var(--brand);
  box-shadow: 0 10px 24px rgba(79, 186, 172, 0.2);
}

.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: var(--surface);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
}

.compact {
  display: grid;
  gap: 14px;
}

.panel-title,
.day-heading,
.topbar,
.calendar-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.notification-title {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.notification-title .orbit-icon {
  width: 18px;
  height: 18px;
  color: var(--brand);
}

.push-consent {
  align-items: flex-start;
  margin-top: 4px;
}

.push-consent span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.push-settings-card {
  margin-top: 22px;
}

.push-sidebar-card {
  border-color: color-mix(in srgb, var(--accent), var(--line) 55%);
  background: linear-gradient(145deg, var(--surface), color-mix(in srgb, var(--accent), white 92%));
}

/* Sidebar cards must fit their column at every desktop width. */
.sidebar .push-sidebar-card { min-width: 0; border-radius: 14px; padding: 18px; gap: 12px; }
.sidebar .push-sidebar-card > * { min-width: 0; max-width: 100%; }
.sidebar .push-sidebar-card .panel-title { flex-wrap: wrap; align-items: flex-start; gap: 8px; line-height: 1.4; }
.sidebar .push-sidebar-card .panel-title strong { overflow-wrap: anywhere; }
.sidebar .push-sidebar-card p { margin: 0; font-size: 14px; line-height: 1.6; overflow-wrap: anywhere; }
.sidebar .push-sidebar-card .tiny { font-size: 12px; }
.sidebar .push-sidebar-card .tiny:empty { display: none; }
.sidebar .push-sidebar-card .wide { width: 100%; min-width: 0; white-space: normal; overflow-wrap: anywhere; font-size: 13px; line-height: 1.4; padding: 12px 10px; }
.sidebar .push-sidebar-card .panel-title { display: grid; justify-content: start; gap: 10px; }
.sidebar .notification-title { align-items: flex-start; font-size: 15px; font-weight: 750; line-height: 1.4; }
.sidebar .notification-title .orbit-icon { flex: 0 0 18px; margin-top: 2px; }
.sidebar .push-state-badge { justify-self: start; max-width: 100%; line-height: 1.3; }

.push-heading-status,
.verification-row,
.weekday-options,
.update-banner {
  display: flex;
  align-items: center;
  gap: 12px;
}

.push-state-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.push-state-badge[data-status="active"] { background: color-mix(in srgb, var(--accent), white 76%); color: #1e5e54; }
.push-state-badge[data-status="paused"] { background: #fff1cf; color: #795a10; }
.push-state-badge[data-status="error"] { background: #fbe0e0; color: #8b3030; }
.push-state-badge[data-status="revoked"] { background: #ece8f3; color: #625872; }

.weekday-fieldset {
  margin: 0;
  padding: 12px 14px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.weekday-fieldset legend {
  padding: 0 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.weekday-options {
  flex-wrap: wrap;
}

.weekday-options label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 9px;
  border-radius: 9px;
  background: var(--surface-2);
  font-size: 12px;
  font-weight: 800;
}

.verification-row {
  align-items: end;
  flex-wrap: wrap;
  padding: 14px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--lilac), white 78%);
}

.verification-row .field { min-width: 240px; flex: 1; }
.push-consent a { color: inherit; font-weight: 800; }
.push-consent-actions { flex-wrap: wrap; }
.push-form-message { margin: 0; }
.push-form-message.is-success { color: #25685e; }
.push-next-send { font-weight: 800; }

.push-compatibility-hint {
  margin: 0;
  padding: 11px 13px;
  border-radius: 11px;
  background: color-mix(in srgb, var(--accent), white 87%);
  color: #285f57;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.45;
}

.push-compatibility-hint[data-state="warning"] {
  background: #fff3d8;
  color: #735a1a;
}

.update-banner {
  position: sticky;
  top: 0;
  z-index: 35;
  justify-content: center;
  flex-wrap: wrap;
  padding: 12px 18px;
  border-bottom: 1px solid color-mix(in srgb, var(--accent), var(--line) 45%);
  background: color-mix(in srgb, var(--accent), white 84%);
  color: #173f39;
  box-shadow: 0 8px 24px rgba(18, 24, 23, .1);
}

.update-banner[hidden] { display: none; }

.push-settings-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent), white 74%);
  color: var(--brand);
}

.push-settings-icon .orbit-icon {
  width: 24px;
  height: 24px;
}

.print-calendar-header,
.print-calendar-footer {
  display: none;
}

.calendar-export-actions,
.print-month-button,
.share-month-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.calendar-export-actions {
  margin-left: 8px;
}

.print-month-button svg,
.share-month-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

main {
  padding: 34px;
  overflow: auto;
}

.topbar {
  margin-bottom: 26px;
}

.top-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

body:not([data-active-view="calendar"]) .top-actions {
  display: none;
}

.primary-action {
  background: var(--accent);
  color: var(--brand);
  border-color: color-mix(in srgb, var(--accent), black 8%);
  font-weight: 800;
  padding: 0 16px;
  box-shadow: 0 12px 28px rgba(79, 186, 172, 0.22);
}

.secondary-action,
.ghost-file,
.secondary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  color: var(--brand);
  border-color: var(--line);
  font-weight: 800;
  padding: 0 14px;
  text-decoration: none;
}

.primary-action:hover,
.secondary-action:hover,
.ghost-file:hover,
.secondary-link:hover,
.icon-button:hover {
  transform: translateY(-1px);
  border-color: var(--accent);
  box-shadow: 0 14px 34px rgba(79, 186, 172, 0.18);
}

.wide {
  width: 100%;
}

.sub-head {
  margin-top: 34px;
}

.ghost-file input {
  display: none;
}

.icon-button {
  width: 44px;
  background: var(--brand);
  color: white;
  font-size: 28px;
  line-height: 1;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.calendar-toolbar {
  max-width: 860px;
  margin-bottom: 12px;
}

.weekday-row,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(82px, 1fr));
  gap: 8px;
  max-width: 980px;
}

.weekday-row {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.day-tile {
  min-height: 112px;
  border: 1px solid var(--line);
  background:
    linear-gradient(145deg, rgba(255,255,255,0.98), rgba(246,250,249,0.92)),
    var(--surface);
  border-radius: 8px;
  padding: 10px;
  text-align: left;
  display: grid;
  align-content: start;
  gap: 8px;
  position: relative;
  overflow: hidden;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.day-tile::after {
  content: "";
  position: absolute;
  width: 46px;
  height: 46px;
  right: -22px;
  bottom: -24px;
  border-radius: 50%;
  background: var(--lilac-soft);
  opacity: 0;
  transition: opacity 180ms ease, transform 180ms ease;
}

.day-tile:hover,
.day-tile.selected {
  border-color: var(--accent);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.day-tile.is-today {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.day-tile.is-today .tile-date::after {
  content: "Heute";
  margin-left: 5px;
  color: var(--accent);
  font-size: 8px;
  font-weight: 900;
  text-transform: uppercase;
}

.day-tile:hover::after,
.day-tile.selected::after {
  opacity: 1;
  transform: scale(1.28);
}

.day-tile.outside {
  opacity: 0.36;
}

.month-guidance-card {
  max-width: 980px;
  margin-top: 18px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: radial-gradient(circle at 94% 4%, rgba(217, 201, 255, 0.48), transparent 30%), var(--surface);
}

.month-guidance-heading,
.month-guidance-footer,
.astro-link-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.month-guidance-heading h3,
.month-guidance-heading p,
.month-guidance-grid p,
.month-guidance-footer p,
.astro-link-card h3,
.astro-link-card p {
  margin: 0;
}

.astro-profile-pill {
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--lilac-soft);
  color: var(--brand);
  font-size: 12px;
  font-weight: 800;
}

.month-guidance-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.month-guidance-grid article {
  min-height: 150px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface), var(--accent) 3%);
}

.month-guidance-grid span,
.month-guidance-grid strong {
  display: block;
}

.month-guidance-grid span {
  color: var(--accent);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.month-guidance-grid strong {
  margin: 7px 0;
}

.month-guidance-grid p,
.month-guidance-footer {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.month-guidance-footer {
  margin-top: 16px;
}

.month-guidance-footer a,
.astro-link-card a {
  color: var(--brand);
  font-weight: 800;
}

.astro-link-card {
  margin-top: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.astro-link-card a {
  flex: 0 0 auto;
  text-decoration: none;
}

.tile-date {
  font-weight: 800;
  position: relative;
  z-index: 1;
}

.tile-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  position: relative;
  z-index: 1;
}

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  border-radius: 999px;
  padding: 0 8px;
  background: var(--surface-2);
  color: var(--brand);
  font-size: 11px;
  font-weight: 800;
}

.chip.accent {
  background: color-mix(in srgb, var(--accent), white 84%);
  color: color-mix(in srgb, var(--accent), black 35%);
}

.wellness-chip {
  background: color-mix(in srgb, var(--lilac), white 62%);
  color: #5e4a82;
}

.moon-symbol {
  --moon-size: 24px;
  width: var(--moon-size);
  height: var(--moon-size);
  display: inline-block;
  flex: 0 0 auto;
  border-radius: 50%;
  position: relative;
  overflow: hidden;
  background: var(--accent);
  border: 1px solid rgba(18, 18, 18, 0.1);
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,0.28),
    0 6px 18px rgba(79, 186, 172, 0.28);
  vertical-align: middle;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.moon-symbol::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 50%;
  background: var(--moon-shadow);
}

.moon-symbol.mini {
  --moon-size: 24px;
}

.moon-symbol.medium {
  --moon-size: 34px;
}

.moon-symbol.hero {
  --moon-size: 96px;
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,0.25),
    0 18px 48px rgba(79, 186, 172, 0.32);
}

.moon-symbol.new {
  background: var(--moon-shadow);
}

.moon-symbol.new::after,
.moon-symbol.full::after {
  opacity: 0;
}

.moon-symbol.waxing-crescent::after {
  transform: translateX(-22%) scale(1.03);
}

.moon-symbol.first-quarter {
  background: linear-gradient(90deg, var(--moon-shadow) 0 50%, var(--accent) 50% 100%);
}

.moon-symbol.first-quarter::after,
.moon-symbol.last-quarter::after {
  opacity: 0;
}

.moon-symbol.waxing-gibbous::after {
  transform: translateX(-62%) scale(0.92);
}

.moon-symbol.waning-gibbous::after {
  transform: translateX(62%) scale(0.92);
}

.moon-symbol.last-quarter {
  background: linear-gradient(90deg, var(--accent) 0 50%, var(--moon-shadow) 50% 100%);
}

.moon-symbol.waning-crescent::after {
  transform: translateX(22%) scale(1.03);
}

.day-tile:hover .moon-symbol,
.moon-symbol:hover {
  transform: scale(1.08);
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,0.35),
    0 9px 22px rgba(79, 186, 172, 0.34);
}

.moon-reading {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.cycle-symbol {
  --cycle-size: 24px;
  width: var(--cycle-size);
  height: var(--cycle-size);
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  color: var(--brand);
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  border: 1px solid rgba(18, 18, 18, 0.08);
  box-shadow: 0 6px 18px rgba(217, 201, 255, 0.32);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.cycle-symbol.mini {
  --cycle-size: 24px;
}

.cycle-symbol.medium {
  --cycle-size: 34px;
  font-size: 13px;
}

.cycle-symbol.period {
  background:
    radial-gradient(circle at 35% 30%, rgba(255,255,255,0.72), transparent 24%),
    linear-gradient(135deg, #f5d2dc, #d9c9ff);
}

.cycle-symbol.ovulation {
  background:
    radial-gradient(circle at 50% 48%, #ffffff 0 24%, transparent 25%),
    linear-gradient(135deg, var(--accent), #d9c9ff);
}

.day-tile:hover .cycle-symbol,
.cycle-symbol:hover {
  transform: scale(1.08);
  box-shadow: 0 9px 22px rgba(217, 201, 255, 0.45);
}

.day-layout,
.work-grid,
.today-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.7fr);
  gap: 18px;
  margin-top: 22px;
}

.today-grid {
  margin-top: 0;
  grid-template-columns: 1fr;
  max-width: 980px;
}

.journal-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  max-width: 980px;
}

.journal-card {
  display: grid;
  gap: 16px;
}

.day-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
  box-shadow: var(--shadow);
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.day-card:hover {
  border-color: color-mix(in srgb, var(--accent), white 20%);
  box-shadow: 0 24px 58px rgba(79, 186, 172, 0.12);
}

.horoscope-card {
  background:
    radial-gradient(circle at top right, color-mix(in srgb, var(--lilac), transparent 45%), transparent 42%),
    linear-gradient(145deg, var(--surface), color-mix(in srgb, var(--accent), white 92%));
}

.horoscope-card .day-heading {
  align-items: flex-start;
}

.horoscope-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border: 1px solid color-mix(in srgb, var(--accent), white 45%);
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent), white 86%);
  color: var(--brand);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.horoscope-text {
  max-width: 72ch;
  margin: 18px 0 10px;
  color: var(--ink);
  font-size: 17px;
  line-height: 1.65;
}

.horoscope-meta {
  margin: 0 0 16px;
}

.signal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  gap: 12px;
  margin: 20px 0;
}

.signal-grid > div {
  background: linear-gradient(145deg, var(--surface-2), #ffffff);
  border: 1px solid rgba(217, 201, 255, 0.45);
  border-radius: 8px;
  padding: 14px;
  display: grid;
  gap: 8px;
}

.guidance-list,
.ritual-grid,
.event-list {
  display: grid;
  gap: 12px;
}

.guidance-item,
.ritual,
.event-item {
  border-left: 4px solid var(--accent);
  background: linear-gradient(135deg, #ffffff, var(--lilac-soft));
  border-radius: 8px;
  padding: 14px;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.guidance-item {
  padding: 0;
  overflow: hidden;
}

.guidance-toggle {
  width: 100%;
  min-height: 68px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.guidance-category-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: color-mix(in srgb, var(--accent), white 78%);
  color: var(--brand);
}

.guidance-category-copy strong,
.guidance-category-copy small {
  display: block;
}

.guidance-category-copy strong {
  margin: 0 0 3px;
}

.guidance-category-copy small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.guidance-chevron {
  color: var(--brand);
  font-size: 24px;
  line-height: 1;
  transition: transform 180ms ease;
}

.guidance-item.open .guidance-chevron {
  transform: rotate(180deg);
}

.guidance-reveal {
  padding: 0 14px 14px 68px;
}

.orbit-icon {
  width: 22px;
  height: 22px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.guidance-item:hover,
.ritual:hover,
.event-item:hover {
  transform: translateX(2px);
  box-shadow: 0 12px 26px rgba(79, 186, 172, 0.12);
}

.guidance-item strong,
.ritual strong,
.event-item strong {
  display: block;
  margin-bottom: 5px;
}

.guidance-head,
.event-head,
.suggestion-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.event-head strong {
  margin-bottom: 0;
}

.suggestion-time {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.suggestion-strip {
  margin-top: 12px;
  padding: 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.68);
  color: var(--brand);
  font-size: 13px;
  font-weight: 800;
}

.mini-action {
  min-height: 32px;
  border: 1px solid color-mix(in srgb, var(--accent), white 35%);
  border-radius: 999px;
  background: var(--accent);
  color: var(--brand);
  cursor: pointer;
  font-weight: 900;
  padding: 0 12px;
  white-space: nowrap;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.mini-action:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(79, 186, 172, 0.22);
  background: color-mix(in srgb, var(--accent), white 12%);
}

.mini-action:disabled {
  cursor: default;
  opacity: .62;
  transform: none;
  box-shadow: none;
}

.text-action {
  min-height: 28px;
  border: 0;
  border-radius: 999px;
  background: rgba(217, 201, 255, 0.45);
  color: var(--brand);
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
  padding: 0 10px;
}

.text-action:hover {
  background: var(--lilac);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(18, 18, 18, 0.42);
  backdrop-filter: blur(10px);
}

.modal-backdrop[hidden] {
  display: none;
}

.modal-card {
  width: min(760px, 100%);
  max-height: min(760px, 88vh);
  overflow: auto;
  position: relative;
  border: 1px solid rgba(217, 201, 255, 0.72);
  border-radius: 8px;
  background:
    radial-gradient(circle at 92% 4%, rgba(217, 201, 255, 0.5), transparent 26%),
    #ffffff;
  padding: 28px;
  box-shadow: 0 30px 80px rgba(18, 18, 18, 0.24);
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: white;
  color: var(--brand);
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
}

.modal-close:hover {
  border-color: var(--accent);
  box-shadow: 0 10px 22px rgba(79, 186, 172, 0.18);
}

.modal-card h3 {
  padding-right: 36px;
  line-height: 1.18;
}

.month-image-modal {
  width: min(680px, 100%);
}

.month-image-preview {
  display: block;
  width: min(100%, 520px);
  height: auto;
  margin: 18px auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 44px rgba(18, 18, 18, 0.12);
  -webkit-touch-callout: default;
  user-select: auto;
}

.month-image-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.month-image-actions a {
  text-decoration: none;
}

.month-image-actions svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

@media (max-width: 760px) {
  #monthImageModal {
    padding: 8px;
  }

  .month-image-modal {
    max-height: calc(100dvh - 16px);
    padding: 20px 14px;
  }

  .month-image-hint {
    padding-right: 28px;
    font-size: 13px;
  }

  .month-image-preview {
    margin: 12px auto;
  }

  .month-image-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .month-image-actions .primary-action {
    grid-column: 1 / -1;
  }

  .month-image-actions > * {
    justify-content: center;
  }
}

.section-head {
  display: grid;
  gap: 8px;
  margin-bottom: 20px;
  max-width: 780px;
}

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

.ritual-tile {
  min-height: 138px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 9px;
  padding: 16px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(145deg, #ffffff, var(--lilac-soft));
  color: var(--ink);
  text-align: center;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.ritual-tile:hover,
.ritual-tile:focus-visible {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: 0 16px 34px rgba(79, 186, 172, 0.16);
  outline: none;
}

.ritual-tile-icon,
.ritual-modal-icon {
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent), white 76%);
  color: var(--brand);
}

.ritual-tile-icon {
  width: 54px;
  height: 54px;
}

.ritual-tile-icon .orbit-icon {
  width: 27px;
  height: 27px;
}

.ritual-tile strong {
  font-size: 15px;
}

.ritual-tile small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.ritual-modal {
  width: min(520px, 100%);
  text-align: center;
}

.ritual-modal-icon {
  width: 76px;
  height: 76px;
  margin: 0 auto 18px;
}

.ritual-modal-icon .orbit-icon {
  width: 36px;
  height: 36px;
}

.ritual-modal h3 {
  padding: 0;
  margin-bottom: 12px;
  font-size: 30px;
}

.ritual-modal-body {
  margin: 0 auto 24px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.65;
}

.ritual-modal .secondary-action {
  min-width: 150px;
}

.soundscape-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  margin-top: 16px;
  padding: 18px;
  border: 1px solid color-mix(in srgb, var(--accent), white 42%);
  border-radius: 14px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--brand), white 90%), color-mix(in srgb, var(--lilac), white 62%));
}

.soundscape-icon {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--brand);
  color: white;
}

.soundscape-icon .orbit-icon {
  width: 28px;
  height: 28px;
}

.soundscape-copy h4,
.soundscape-copy p {
  margin: 0;
}

.soundscape-copy h4 {
  margin-bottom: 5px;
  font-size: 20px;
}

.soundscape-copy p:not(.eyebrow) {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.soundscape-copy small {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 10px;
}

.spotify-action {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 14px;
  border-radius: 999px;
  background: #1db954;
  color: #08170d;
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
  white-space: nowrap;
}

.spotify-action:hover,
.spotify-action:focus-visible {
  background: #1ed760;
  outline: 3px solid rgba(29, 185, 84, 0.22);
}

.spotify-action .orbit-icon {
  width: 17px;
  height: 17px;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin: 16px 0;
}

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

.wellbeing-panel {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(217, 201, 255, 0.55);
  border-radius: 8px;
  background: linear-gradient(135deg, var(--surface-2), var(--surface));
}

.wellbeing-grid {
  display: grid;
  gap: 12px;
}

.field {
  display: grid;
  gap: 7px;
  font-weight: 800;
  font-size: 13px;
}

.field input,
.field select,
.field textarea,
textarea {
  min-height: 42px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: var(--surface);
  color: var(--ink);
}

.field textarea,
textarea {
  min-height: 150px;
  padding: 12px;
  resize: vertical;
}

.checkbox-field {
  display: flex;
  align-items: center;
  align-self: end;
  min-height: 42px;
  gap: 10px;
}

.checkbox-field input {
  width: 18px;
  min-height: 18px;
  accent-color: var(--accent);
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.timer-card h3#timerDisplay {
  font-size: clamp(42px, 7vw, 78px);
  line-height: 1;
  margin-top: 8px;
}

.stat-row {
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 16px 0;
  padding: 12px 14px;
  border-radius: 8px;
  background: var(--surface-2);
}

.mood-card {
  max-width: 980px;
  margin-top: 22px;
}

.mood-chart {
  min-height: 150px;
  display: flex;
  align-items: end;
  gap: 12px;
  padding: 18px 4px 4px;
  overflow-x: auto;
}

.mood-bar {
  width: 54px;
  min-width: 54px;
  height: 130px;
  display: grid;
  grid-template-rows: 1fr auto auto;
  align-items: end;
  justify-items: center;
  gap: 5px;
}

.mood-column {
  width: 22px;
  min-height: 8px;
  border-radius: 999px 999px 4px 4px;
  background: linear-gradient(180deg, var(--accent), var(--lilac));
}

.task-item.done {
  opacity: 0.62;
}

.task-item.done strong {
  text-decoration: line-through;
}

.project-item .tiny {
  margin-top: 8px;
}

.progress-line {
  height: 8px;
  margin-top: 10px;
  border-radius: 999px;
  background: var(--surface-2);
  overflow: hidden;
}

.progress-line span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--lilac));
}

.compact-disclosure {
  margin-top: 14px;
}

.compact-disclosure summary {
  cursor: pointer;
  font-size: 18px;
  font-weight: 900;
}

.compact-disclosure[open] summary {
  margin-bottom: 12px;
}

.project-overview-card {
  max-width: 980px;
}

.project-list-grid {
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.color-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid white;
  box-shadow: 0 0 0 1px var(--line);
  flex: 0 0 auto;
}

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

.sidebar .field input {
  background: var(--surface-2);
  color: var(--ink);
  border-color: var(--line);
}

.soft {
  color: var(--muted);
  line-height: 1.55;
}

.tiny {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.source-note {
  margin-top: 12px;
}

@media (max-width: 980px) {
  .app-header {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 10px 14px;
  }

  .brand-logo {
    width: 42px;
    height: 42px;
  }

  .brand h1 {
    font-size: 18px;
  }

  .nav-tabs {
    width: calc(100vw - 28px);
    margin: 0 -2px;
  }

  .tab {
    min-height: 38px;
    padding: 0 12px;
    font-size: 13px;
  }

  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    padding: 14px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .weekday-row,
  .calendar-grid {
    grid-template-columns: repeat(7, minmax(42px, 1fr));
  }

  .day-tile {
    min-height: 78px;
    padding: 7px;
  }

  .chip:not(.accent) {
    display: none;
  }

  .day-layout,
  .work-grid,
  .today-grid,
  .journal-layout,
  .reflection-grid,
  .signal-grid {
    grid-template-columns: 1fr;
  }

  main {
    padding: 16px 14px 24px;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* ORBIT redesign */
.brand-logo {
  object-fit: contain;
  border-radius: 12px;
}

.brand-credit {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .04em;
}

.brand-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.beta-badge,
.version-pill {
  display: inline-flex;
  align-items: center;
  min-height: 21px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--lilac);
  color: #2f2547;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .08em;
  white-space: nowrap;
}

button:disabled,
input:disabled,
select:disabled {
  cursor: not-allowed;
  opacity: .58;
}

.dashboard-hero {
  max-width: 1100px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 22px;
  padding: 26px;
  border: 1px solid color-mix(in srgb, var(--lilac), white 34%);
  border-radius: 18px;
  background:
    radial-gradient(circle at 88% 20%, color-mix(in srgb, var(--lilac), transparent 30%), transparent 28%),
    linear-gradient(135deg, var(--surface), color-mix(in srgb, var(--accent), white 92%));
  box-shadow: var(--shadow);
}

.dashboard-hero h3 {
  margin: 5px 0 8px;
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1.05;
}

.quick-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.dashboard-stats {
  max-width: 1100px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.stat-card {
  min-width: 0;
  min-height: 138px;
  display: grid;
  align-content: space-between;
  gap: 8px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  overflow: hidden;
}

.stat-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.stat-card-head > span:first-child {
  min-width: 0;
  line-height: 1.25;
}

.stat-visual {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent), white 76%);
  color: var(--brand);
}

.stat-visual .moon-symbol {
  margin: 0;
}

.stat-visual .orbit-icon {
  width: 22px;
  height: 22px;
}

.stat-card span,
.stat-card small {
  color: var(--muted);
}

.stat-card span {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.stat-card strong {
  min-width: 0;
  font-size: clamp(18px, 1.7vw, 23px);
  line-height: 1.12;
  overflow-wrap: anywhere;
  hyphens: auto;
}

.stat-card small {
  min-width: 0;
  font-size: 11px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.rhythm-card {
  background: linear-gradient(145deg, var(--surface), color-mix(in srgb, var(--lilac), white 72%));
}

.dashboard-grid {
  max-width: 1100px;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(290px, .65fr);
  gap: 18px;
}

.dashboard-grid .day-card {
  margin: 0;
}

.active-work-card {
  display: grid;
  align-content: start;
  gap: 12px;
  background: #111817;
  color: #fff;
}

.active-work-card .soft,
.active-work-card .eyebrow,
.active-work-card .field {
  color: #c7d2d0;
}

.dashboard-timer {
  color: var(--accent);
  font-size: clamp(34px, 5vw, 54px);
  font-weight: 900;
  letter-spacing: -.04em;
}

.dashboard-timer-fields {
  display: grid;
  gap: 10px;
}

.dashboard-timer-fields input,
.dashboard-timer-fields select {
  border-color: #33413f;
  background: #1c2826;
  color: #fff;
}

.dashboard-task {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}

.dashboard-task p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.priority-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
}

.priority-dot.hoch { background: #ef6b6b; }
.priority-dot.niedrig { background: var(--lilac); }

.empty-state {
  padding: 24px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  text-align: center;
}

.empty-state p {
  margin-top: 5px;
  color: var(--muted);
}

.cycle-section-head {
  align-items: center;
}

.cycle-day-badge,
.current-phase-pill {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent), white 78%);
  color: var(--brand);
  font-size: 12px;
  font-weight: 800;
}

.cycle-overview-card {
  overflow: hidden;
  background: linear-gradient(145deg, var(--surface), color-mix(in srgb, var(--lilac), white 84%));
}

.cycle-summary-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(230px, .7fr);
  gap: 28px;
  align-items: end;
}

.cycle-summary-grid strong {
  display: block;
  margin: 7px 0;
  font-size: clamp(24px, 4vw, 38px);
}

.cycle-energy-meter small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
}

.cycle-curve-wrap {
  margin-top: 22px;
  padding: 14px 10px 0;
  border: 1px solid color-mix(in srgb, var(--line), transparent 25%);
  border-radius: 16px;
  background: color-mix(in srgb, var(--surface), transparent 12%);
}

.cycle-curve {
  display: block;
  width: 100%;
  height: auto;
  min-height: 190px;
}

.cycle-line {
  fill: none;
  stroke: var(--brand);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 5px 8px color-mix(in srgb, var(--brand), transparent 75%));
}

.cycle-marker-line {
  stroke: var(--brand);
  stroke-width: 2;
  stroke-dasharray: 5 5;
  opacity: .55;
}

.cycle-marker-dot {
  fill: var(--accent);
  stroke: var(--surface);
  stroke-width: 5;
}

#cycleDayMarker text {
  fill: var(--ink);
  font: 700 14px Inter, sans-serif;
}

.cycle-axis {
  display: flex;
  justify-content: space-between;
  padding: 0 14px 12px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.cycle-disclaimer {
  max-width: 760px;
  margin: 14px auto 0;
  text-align: center;
}

.cycle-phase-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.cycle-phase-card {
  margin: 0;
  border: 1px solid var(--line);
}

.cycle-phase-card.active {
  border-color: var(--accent);
  box-shadow: 0 14px 34px color-mix(in srgb, var(--accent), transparent 82%);
}

.phase-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.phase-card-head > div {
  flex: 1;
}

.phase-dot {
  width: 17px;
  height: 44px;
  border-radius: 999px;
  background: var(--phase-color);
}

.cycle-phase-card ul {
  margin: 15px 0 0;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.8;
}

.cycle-observation-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: color-mix(in srgb, var(--accent), white 88%);
}

.dashboard-section-head {
  margin-top: 30px;
}

.status-pill {
  display: inline-flex;
  margin-left: 8px;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.status-active { background: color-mix(in srgb, var(--accent), white 82%); color: #245f57; }
.status-paused { background: #fff1cf; color: #795a10; }
.status-completed { background: color-mix(in srgb, var(--lilac), white 62%); color: #5e4a82; }

.project-edit-action {
  margin-top: 12px;
}

.form-message {
  min-height: 20px;
  margin: 10px 0;
  color: #b54747;
  font-size: 13px;
  font-weight: 700;
}

.danger-action {
  color: #a23b3b;
  border-color: #efcaca;
}

.about-card {
  max-width: 520px;
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 28px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}

.install-card {
  max-width: 760px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  margin-top: 28px;
  padding: 18px;
  border: 1px solid color-mix(in srgb, var(--accent), white 42%);
  border-radius: 16px;
  background: linear-gradient(135deg, var(--surface), color-mix(in srgb, var(--lilac), white 76%));
  box-shadow: var(--shadow);
}

.calendar-subscription-card {
  max-width: 960px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(190px, auto);
  align-items: start;
  gap: 18px;
  margin-top: 28px;
  padding: 22px;
  border: 1px solid color-mix(in srgb, var(--accent), white 34%);
  border-radius: 16px;
  background: linear-gradient(135deg, var(--surface), color-mix(in srgb, var(--accent), white 90%));
  box-shadow: var(--shadow);
}

.data-card {
  max-width: 960px;
  display: grid;
  gap: 14px;
  margin-top: 18px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.data-card-heading,
.data-actions,
.onboarding-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.data-card-heading h3 {
  margin-top: 3px;
}

.data-actions {
  justify-content: flex-start;
  flex-wrap: wrap;
}

.file-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.onboarding-backdrop {
  z-index: 40;
}

.install-backdrop {
  z-index: 45;
}

.install-welcome-modal {
  width: min(560px, 100%);
  display: grid;
  gap: 16px;
  text-align: center;
  border-radius: 24px;
  background: linear-gradient(145deg, var(--surface), color-mix(in srgb, var(--lilac), white 74%));
}

.install-app-icon {
  width: 88px;
  height: 88px;
  margin: 0 auto;
  padding: 5px;
  border-radius: 24px;
  background: var(--surface);
  box-shadow: 0 16px 38px rgba(18, 24, 23, 0.16);
}

.install-app-icon img {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 19px;
}

.install-welcome-modal h3 {
  font-size: clamp(28px, 6vw, 42px);
}

.install-benefits {
  display: grid;
  gap: 9px;
  text-align: left;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: color-mix(in srgb, var(--surface), transparent 8%);
}

.install-benefits span {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 750;
}

.install-benefits b {
  color: #25685e;
}

.install-actions {
  display: grid;
  gap: 10px;
}

.install-instructions {
  padding: 14px;
  text-align: left;
  border-radius: 14px;
  background: #fff3d8;
  color: #634d19;
}

.install-instructions p {
  margin: 6px 0 0;
  line-height: 1.55;
}

.onboarding-modal {
  width: min(820px, 100%);
  display: grid;
  gap: 16px;
  border-radius: 22px;
  background: linear-gradient(145deg, var(--surface), color-mix(in srgb, var(--lilac), white 78%));
}

.onboarding-brand {
  justify-content: flex-start;
}

.onboarding-brand img {
  width: 58px;
  height: 58px;
  border-radius: 15px;
}

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

.onboarding-consent {
  margin: 16px 0;
  padding: 14px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--accent), white 86%);
}

.calendar-subscription-icon {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  background: var(--brand);
  color: var(--accent);
  font-size: 30px;
  font-weight: 900;
}

.calendar-subscription-copy h3 {
  margin: 3px 0 8px;
}

.subscription-url-field {
  margin-top: 14px;
}

.subscription-url-field input {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
}

.subscription-actions {
  display: grid;
  gap: 10px;
}

.subscription-steps {
  margin: 12px 0 0;
  padding-left: 19px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.privacy-note {
  margin-top: 10px;
}

.install-card img {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  box-shadow: 0 10px 24px rgba(18,18,18,.18);
}

.install-card h3 {
  margin: 3px 0 6px;
}

.about-card img {
  width: 46px;
  height: 46px;
}

.about-card p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.app-footer {
  padding: 20px 24px 32px 304px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.mobile-nav,
.mobile-timer-bar {
  display: none;
}

@media (max-width: 980px) and (min-width: 761px) {
  .app-header {
    grid-template-columns: auto 1fr;
  }

  .nav-tabs {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .live-time {
    grid-column: 2;
    grid-row: 1;
  }
}

@media (max-width: 760px) {
  body {
    padding-bottom: calc(78px + env(safe-area-inset-bottom));
  }

  .app-header {
    min-height: 66px;
    display: flex;
    padding: 8px 14px;
    justify-content: space-between;
  }

  .brand-logo {
    width: 42px;
    height: 42px;
  }

  .nav-tabs {
    display: none;
  }

  .live-time {
    min-width: 94px;
  }

  .live-time time {
    font-size: 15px;
  }

  .app-shell {
    display: block;
    min-height: 0;
  }

  .sidebar {
    display: none;
  }

  main {
    padding: 18px 14px 28px;
    overflow: visible;
  }

  .topbar {
    margin-bottom: 18px;
  }

  .topbar h2 {
    max-width: 340px;
    font-size: 34px;
    line-height: 1.02;
  }

  .dashboard-hero {
    display: grid;
    padding: 20px;
    border-radius: 16px;
  }

  .dashboard-hero h3 {
    font-size: 30px;
  }

  .quick-actions {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
  }

  .quick-actions button {
    min-width: 0;
    padding: 0 8px;
    font-size: 12px;
  }

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

  .stat-card {
    min-height: 128px;
    padding: 14px;
  }

  .stat-card strong {
    font-size: 18px;
  }

  .guidance-reveal {
    padding-left: 14px;
  }

  .suggestion-strip {
    align-items: stretch;
    flex-direction: column;
  }

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

  .ritual-tile {
    min-height: 126px;
  }

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

  .spotify-action {
    grid-column: 1 / -1;
    width: 100%;
  }

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

  .active-work-card {
    order: -1;
  }

  .dashboard-task {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .dashboard-task .text-action {
    grid-column: 2;
    justify-self: start;
  }

  .today-stack {
    gap: 14px;
  }

  .calendar-toolbar {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) 42px;
    position: sticky;
    top: 66px;
    z-index: 5;
    padding: 8px 0;
    background: color-mix(in srgb, var(--paper), transparent 4%);
  }

  .calendar-toolbar h3 {
    margin: 0;
    text-align: center;
  }

  .calendar-export-actions {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-left: 0;
  }

  .calendar-export-actions button {
    justify-content: center;
    min-width: 0;
    padding-inline: 10px;
  }

  .month-guidance-heading,
  .month-guidance-footer,
  .astro-link-card {
    align-items: flex-start;
    flex-direction: column;
  }

  .month-guidance-grid {
    grid-template-columns: 1fr;
  }

  .month-guidance-grid article {
    min-height: 0;
  }

  .weekday-row,
  .calendar-grid {
    grid-template-columns: repeat(7, minmax(38px, 1fr));
    gap: 4px;
  }

  .day-tile {
    min-height: 66px;
    gap: 5px;
    padding: 6px 4px;
  }

  .tile-tags {
    gap: 2px;
  }

  .moon-symbol.mini {
    --moon-size: 18px;
  }

  .chip.accent {
    min-height: 17px;
    padding: 0 4px;
    font-size: 8px;
  }

  .chip.wellness-chip {
    min-height: 17px;
    display: inline-flex;
    padding: 0 4px;
    font-size: 8px;
  }

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

  .project-list-grid,
  .form-grid,
  .settings-grid {
    grid-template-columns: 1fr;
  }

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

  .calendar-subscription-card {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .subscription-actions {
    grid-column: 1 / -1;
  }

  .subscription-actions button {
    width: 100%;
  }

  .data-card-heading {
    align-items: flex-start;
  }

  .data-actions,
  .onboarding-grid {
    display: grid;
    grid-template-columns: 1fr;
  }

  .data-actions > * {
    width: 100%;
  }

  .install-card .primary-action {
    grid-column: 1 / -1;
    width: 100%;
  }

  .modal-card {
    width: 100%;
    max-height: 92vh;
    align-self: end;
    border-radius: 18px 18px 0 0;
    padding: 24px 18px calc(24px + env(safe-area-inset-bottom));
  }

  .modal-backdrop {
    padding: 0;
    place-items: end stretch;
  }

  .mobile-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 18;
    min-height: calc(66px + env(safe-area-inset-bottom));
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    padding: 7px 6px env(safe-area-inset-bottom);
    border-top: 1px solid var(--line);
    background: color-mix(in srgb, var(--surface), transparent 3%);
    backdrop-filter: blur(18px);
  }

  .mobile-tab {
    min-width: 0;
    display: grid;
    place-items: center;
    gap: 2px;
    border: 0;
    background: transparent;
    color: var(--muted);
    font-size: 10px;
    font-weight: 800;
  }

  .mobile-tab svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .mobile-tab.active {
    color: var(--brand);
  }

  .cycle-summary-grid,
  .cycle-phase-grid {
    grid-template-columns: 1fr;
  }

  .cycle-curve-wrap {
    margin-inline: -8px;
    overflow-x: auto;
  }

  .cycle-curve {
    width: 680px;
    max-width: none;
  }

  .cycle-axis {
    width: 680px;
  }

  .cycle-observation-card {
    display: grid;
  }

  .cycle-observation-card .primary-action {
    width: 100%;
  }

  .mobile-timer-bar:not([hidden]) {
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: calc(70px + env(safe-area-inset-bottom));
    z-index: 17;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 0 16px;
    border: 0;
    border-radius: 14px;
    background: #111817;
    color: #fff;
    box-shadow: 0 16px 36px rgba(0,0,0,.28);
  }

  .mobile-timer-bar span {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .mobile-timer-bar i {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 5px rgba(79,186,172,.18);
  }

  .mobile-timer-bar strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .app-footer {
    padding: 20px 16px;
  }
}

@media print {
  @page {
    size: A4 landscape;
    margin: 10mm;
  }

  * {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  body {
    padding: 0;
    background: #fff;
    color: #121212;
  }

  .app-header,
  .sidebar,
  .topbar,
  .mobile-nav,
  .mobile-timer-bar,
  .app-footer,
  .modal-backdrop,
  .calendar-toolbar,
  .mood-card,
  .month-guidance-card,
  .view:not(#calendarView) {
    display: none !important;
  }

  .app-shell,
  main,
  #calendarView {
    display: block !important;
    width: 100%;
    min-height: 0;
    padding: 0;
    margin: 0;
    overflow: visible;
  }

  .print-calendar-header,
  .print-calendar-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
  }

  .print-calendar-header {
    padding-bottom: 5mm;
    border-bottom: 1px solid #d9dedc;
  }

  .print-brand {
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .print-brand img {
    width: 13mm;
    height: 13mm;
  }

  .print-brand strong,
  .print-brand span {
    display: block;
  }

  .print-brand strong {
    font-size: 20px;
  }

  .print-brand span,
  .print-month-meta p,
  .print-calendar-footer {
    color: #666;
    font-size: 10px;
  }

  .print-month-meta {
    text-align: right;
  }

  .print-month-meta h2 {
    margin: 0;
    font-size: 24px;
  }

  .weekday-row {
    margin-top: 4mm;
    font-size: 10px;
  }

  .calendar-grid {
    gap: 1.5mm;
  }

  .day-tile {
    min-height: 21.5mm;
    padding: 2mm;
    border: 1px solid #dfe5e2;
    border-radius: 3mm;
    box-shadow: none;
    transform: none;
    break-inside: avoid;
  }

  .day-tile::after {
    display: none;
  }

  .tile-date {
    font-size: 14px;
  }

  .tile-tags {
    gap: 2px;
  }

  .chip {
    padding: 1px 4px;
    font-size: 7px;
  }

  .moon-symbol.mini,
  .cycle-symbol.mini {
    transform: scale(.8);
    transform-origin: left center;
  }

  .print-calendar-footer {
    margin-top: 3mm;
    padding-top: 2mm;
    border-top: 1px solid #d9dedc;
  }
}
