@import url('https://fonts.googleapis.com/css2?family=Caveat:wght@400;700&display=swap');

:root {
  --bg: #FFFCF3;
  --text: #4e463c;
  --muted: #7a6a57;
  --accent: #F3945E;
  --border: rgba(0, 0, 0, 0.12);
  --header-h: 100px;

  /* Build 138: Font variables for cross-device consistency */
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-display: "Caveat", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

/* P2 Fix: Permanently hide calEdit button */
#calEdit {
  display: none !important;
}

/* P2 Fix: Permanently hide calEdit button */
#calEdit {
  display: none !important;
}

/* Build 130: Beige background for Über mich/Praxis sections */
#ueber-mich,
#ueber-die-praxis {
  background: var(--bg);
}

* {
  box-sizing: border-box
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif
}

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

img {
  max-width: 100%;
  height: auto;
  display: block
}

.container {
  max-width: 920px;
  margin: 0 auto;
  padding: 0 20px
}

.site-header {
  position: sticky;
  top: 0;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  z-index: 20
}

/* Build 138: Neutralize iOS default button/link styles */
.site-header button,
.site-header a {
  -webkit-appearance: none;
  appearance: none;
  font: inherit;
  color: inherit;
  text-decoration: none;
  background: transparent;
  border: 0
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  padding: 0;
  position: relative
}

.logo-wrap {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center
}

.logo-wrap img {
  height: 220px;
  width: auto;
  position: relative;
  top: 0
}

@media (max-width:720px) {
  .logo-wrap img {
    height: 140px
  }
}

.menu {
  display: flex;
  align-items: center;
  gap: 20px;
  font-weight: 600;
  position: relative
}

.menu a,
.menu button {
  opacity: .9;
  background: none;
  border: 0;
  font: inherit;
  color: inherit;
  cursor: pointer
}

.menu a:hover,
.menu a.active,
.menu button:hover {
  color: var(--accent);
  opacity: 1
}

.dropdown {
  position: relative
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .06);
  border-radius: 10px;
  padding: 8px;
  display: none;
  z-index: 30;
  min-width: 180px
}

.dropdown-menu a {
  display: block;
  padding: 8px 10px;
  border-radius: 8px
}

.dropdown-menu a:hover {
  background: #faf7ef
}

main {
  min-height: calc(100vh - var(--header-h));
  display: block
}

.site-footer {
  background: #f2f2f2;
  padding: 40px 20px 20px;
  margin-top: 40px;
  font-size: 14px;
  color: #333
}

.footer-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
  margin-bottom: 30px
}

.footer-columns h3 {
  font-size: 15px;
  font-weight: bold;
  margin-bottom: 10px
}

.footer-columns a {
  display: block;
  margin-bottom: 6px;
  color: #333;
  opacity: .9
}

.footer-columns a:hover {
  color: var(--accent);
  opacity: 1
}

.footer-bottom {
  text-align: center;
  font-size: 13px;
  color: #555
}

.footer-bottom .icon {
  font-size: 24px;
  display: block;
  margin-bottom: 6px
}

.hero {
  padding: 28px 0;
  text-align: center
}

.hero h1 {
  margin: 0 0 16px;
  font-size: 32px;
  line-height: 1.4;
  font-family: "Comic Sans MS", cursive, sans-serif;
  font-weight: bold;
  font-style: italic;
  text-align: center;
  /* Build 142: Comic Sans MS, bold, italic, centered */
}

.intro-text {
  margin: 10px auto 16px;
  font-size: 18px;
  max-width: 720px;
  text-align: center;
  white-space: pre-line
}

.rita-photo {
  margin: 16px auto;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  max-width: 320px
}

.questions {
  margin: 28px auto 0;
  max-width: 820px;
  text-align: left
}

.questions h2 {
  margin: 0 0 14px;
  font-size: 22px;
  color: var(--accent);
  text-align: center
}

.questions ul {
  list-style: disc;
  padding-left: 20px
}

.questions li {
  margin-bottom: 8px
}

.cal {
  max-width: 860px;
  margin: 10px auto;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden
}

.cal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  font-weight: 700;
  background: #fafafa
}

.cal-nav {
  display: flex;
  gap: 8px
}

.cal-nav button {
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer
}

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  border-top: 1px solid var(--border)
}

.cal-cell {
  min-height: 110px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 8px;
  position: relative
}

.cal-cell:nth-child(7n) {
  border-right: none
}

.cal-dow {
  text-align: center;
  padding: 8px 0;
  font-weight: 600;
  color: var(--muted);
  background: #fff7eb
}

.cal-daynum {
  font-weight: 700
}

.cal-today .cal-daynum {
  color: var(--accent)
}

.past {
  opacity: .4
}

.slot {
  display: inline-block;
  font-size: 12px;
  border-radius: 6px;
  padding: 4px 6px;
  margin: 4px 4px 0 0;
  cursor: pointer
}

.slot.blue {
  background: #e7f0ff;
  border: 1px solid #b9cfff
}

.slot.green {
  background: #e6f8ea;
  border: 1px solid #b8e5c1
}

.slot.taken {
  background: #eee;
  border: 1px solid #ddd;
  text-decoration: line-through;
  cursor: not-allowed;
  color: #888
}

.legend {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin: 12px 0 0;
  font-size: 14px;
  color: #555
}

.legend .box {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  display: inline-block;
  margin-right: 6px;
  vertical-align: middle
}

.legend .b {
  background: #e7f0ff;
  border: 1px solid #b9cfff
}

.legend .g {
  background: #e6f8ea;
  border: 1px solid #b8e5c1
}

.legend .t {
  background: #eee;
  border: 1px solid #ddd
}

.btn {
  padding: 10px 16px;
  border: 1px solid var(--accent);
  border-radius: 10px;
  background: #fff;
  cursor: pointer
}

.form {
  max-width: 560px;
  margin: 0 auto;
  text-align: left
}

.form label {
  display: block;
  margin: 10px 0 4px;
  font-weight: 600
}

.form input,
.form textarea,
.form select {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff
}

.table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px
}

.table th,
.table td {
  border: 1px solid var(--border);
  padding: 8px;
  text-align: left
}

.badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 14px;
  border: 1px solid var(--border);
  font-size: 12px
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .4);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 50;
  pointer-events: auto
    /* Build 136: Block clicks to content behind */
}

.modal .card {
  background: #fff;
  width: min(560px, 92vw);
  border-radius: 14px;
  border: 1px solid var(--border);
  padding: 16px
}

.modal .header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px
}

.modal .close {
  border: 2px solid #333;
  background: transparent;
  font-size: 18px;
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.modal .close:hover {
  background: #f5f5f5;
  border-color: #000;
}

.hand {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.5px
}


/* Handwriting style for Home headline */
.hand {
  font-family: var(--font-display) !important;
  font-weight: 700;
  letter-spacing: .2px
}

/* Make the home hero headline clearly handwriting and larger */
.hero h1.hand {
  font-size: 42px;
  line-height: 1.1;
  margin-bottom: 18px
}

@media (max-width:720px) {
  .hero h1.hand {
    font-size: 34px
  }
}

/* Navigation: remove down-arrow from 'Über mich' and add minimalist caret to 'Mehr' */
.menu .dropdown>button {
  position: relative;
  padding-right: 18px
}

.menu .dropdown.more>button::after {
  content: '';
  position: absolute;
  right: 2px;
  top: 50%;
  transform: translateY(-40%);
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid currentColor;
  opacity: .7;
}

.menu .dropdown.ueber>button::after {
  content: none
}

/* Dropdown alignment & clean look */
.menu .dropdown>button {
  font-weight: 600
}

.menu .dropdown .dropdown-menu {
  box-shadow: 0 8px 22px rgba(0, 0, 0, .08)
}

/* Parallax background section for Über-mich Seiten */
.parallax-wrap {
  position: relative;
  overflow: hidden;
  background: #fff
}

.parallax-bg {
  position: absolute;
  inset: -10% -10% -10% -10%;
  background-size: cover;
  background-position: center;
  will-change: transform;
  transform: translateY(0);
  filter: brightness(.85);
}

/* Readability bubble near text */
.parallax-content {
  position: relative;
  z-index: 1
}

.parallax-bubble {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 0;
  height: 100%;
  width: min(840px, 92%);
  background: radial-gradient(ellipse at 50% 0%, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.88) 35%, rgba(255, 255, 255, 0.75) 55%, rgba(255, 255, 255, 0.55) 75%, rgba(255, 255, 255, 0.15) 100%);
  pointer-events: none;
  border-radius: 24px;
}

/* Home page subtle decorations */
.decors {
  position: relative
}

.decor {
  position: absolute;
  opacity: .18;
  user-select: none;
  pointer-events: none
}

.decor svg {
  display: block
}

.decor.plane {
  top: -12px;
  right: -10px;
  width: 120px
}

.decor.star {
  top: 80px;
  left: -20px;
  width: 48px
}

.decor.block {
  bottom: -10px;
  left: 10px;
  width: 80px
}

.decor.balloon {
  bottom: -30px;
  right: 30px;
  width: 90px
}

@media (max-width:720px) {
  .decor {
    opacity: .13
  }

  .decor.plane {
    width: 84px;
    right: -6px
  }
}

/* Calendar admin edit button */
.admin-bar {
  display: none;
  position: sticky;
  top: calc(var(--header-h) + 0px);
  z-index: 15;
  background: #fff;
  border-bottom: 1px solid var(--border)
}

.admin-bar .inner {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 10px 16px;
  font-weight: 600
}

.admin-bar .badge {
  font-size: 12px;
  padding: 4px 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  opacity: .8
}

.admin-only {
  display: none
}

.admin .admin-only {
  display: block
}

.editing .cal .day {
  cursor: pointer;
  outline: 2px dashed rgba(0, 0, 0, 0.15)
}

.editing .cal .day:hover {
  outline-color: var(--accent)
}

.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.45);
  z-index: 50
}

.modal.open {
  display: flex
}

.modal-card {
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  min-width: 300px;
  max-width: 90vw;
  border: 1px solid var(--border)
}

.modal-card h3 {
  margin-top: 0
}

.modal-card .actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 12px
}

.login-form {
  max-width: 420px;
  margin: 30px auto;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px
}

.login-form input {
  width: 100%;
  padding: 10px;
  margin: 6px 0;
  border: 1px solid var(--border);
  border-radius: 8px
}

.login-form button {
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer
}

.login-form p {
  font-size: 13px;
  color: #666
}


/* Dropdown open behaviour */
.menu .dropdown:hover .dropdown-menu,
.menu .dropdown:focus-within .dropdown-menu {
  display: block
}

.menu .dropdown>button {
  outline: none
}


/* Stronger readability bubble */
.parallax-bubble {
  background:
    radial-gradient(ellipse at 50% 20%, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 0.93) 25%, rgba(255, 255, 255, 0.86) 40%, rgba(255, 255, 255, 0.7) 60%, rgba(255, 255, 255, 0.35) 78%, rgba(255, 255, 255, 0.12) 92%, rgba(255, 255, 255, 0.0) 100%);
}


@media (max-width:520px) {
  .hero h1.hand {
    font-size: 28px
  }
}


/* Try to keep home headline to two lines */
.hero h1.hand {
  max-width: 40ch
}

@media (max-width:520px) {
  .hero h1.hand {
    font-size: 26px;
    max-width: 36ch
  }
}


.modal-card input,
.modal-card textarea,
.modal-card select {
  width: 100%;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  margin: 6px 0;
}

.modal-card h4 {
  margin-bottom: 6px
}


/* login modal form inputs */
.modal-card form[data-login] input {
  width: 100%;
  padding: 10px;
  margin: 6px 0;
  border: 1px solid var(--border);
  border-radius: 8px
}


/* admin bar inside calendar */
.cal {
  position: relative
}

.cal .admin-bar {
  position: absolute;
  top: 6px;
  left: 8px;
  background: transparent;
  border: 0
}

.cal .admin-bar .inner {
  padding: 0
}

.cal .admin-bar button {
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer
}

.appts-list .appt {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  margin: 6px 0
}

.appts-list .appt .del {
  cursor: pointer
}


/* Enforce exactly two lines for home H1 */
.hero h1.hand {
  display: block;
  margin: 0 0 16px;
  line-height: 1.12
}

.hero h1.hand .hline1,
.hero h1.hand .hline2 {
  display: inline;
  white-space: normal
    /* Build 141: Allow text to flow as single block */
}

.hero h1.hand .hline1 {
  font-size: clamp(28px, 3.4vw, 42px)
}

.hero h1.hand .hline2 {
  font-size: clamp(24px, 3.0vw, 38px)
}

@media (max-width:480px) {
  .hero h1.hand .hline1 {
    font-size: clamp(22px, 6vw, 28px)
  }

  .hero h1.hand .hline2 {
    font-size: clamp(18px, 5.4vw, 24px)
  }
}


/* Profile in header */
.profile {
  position: relative;
  margin-left: auto
}

.menu {
  gap: 18px
}

.profile-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-weight: 600
}

.profile .avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid var(--border)
}

.profile .name {
  opacity: .8
}

.profile .profile-menu {
  position: absolute;
  top: 100%;
  right: 0;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px;
  display: none;
  z-index: 30;
  min-width: 160px
}

.profile .profile-menu a {
  display: block;
  padding: 8px;
  border-radius: 8px
}

.profile .profile-menu a:hover {
  background: #faf7ef
}

/* Fix dropdown hover globally */
.menu .dropdown:hover .dropdown-menu,
.menu .dropdown:focus-within .dropdown-menu {
  display: block
}


/* Parallax bottom gap fix */
.parallax-wrap {
  overflow: hidden;
  padding-bottom: 0;
  margin-bottom: 0
}

.parallax-content>*:last-child {
  margin-bottom: 0
}

.parallax-bubble {
  pointer-events: none
}

/* softer edge to transparent */
.parallax-bubble {
  background:
    radial-gradient(ellipse at 50% 20%, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 0.9) 30%, rgba(255, 255, 255, 0.6) 58%, rgba(255, 255, 255, 0.25) 80%, rgba(255, 255, 255, 0.0) 100%);
}


/* Profile dropdown on click */
.profile.open .profile-menu {
  display: block
}


/* Calendar tools in header */
.cal-header {
  display: flex;
  align-items: center;
  justify-content: space-between
}

.cal-tools {
  margin-left: auto
}

.cal-tools .cal-edit {
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer
}

/* Day pencil in edit mode */
.cal .day {
  position: relative
}

.editing .cal .day .pencil {
  display: inline-flex
}

.cal .day .pencil {
  display: none;
  position: absolute;
  top: 6px;
  right: 6px;
  width: 22px;
  height: 22px;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  opacity: .9;
  cursor: pointer;
}

.cal .day.disabled .pencil,
.cal .day.muted .pencil {
  display: none
}


/* Admin visibility helper */
.admin .admin-only {
  display: block
}

/* Keep month layout; place edit button on the right without shifting layout */
.cal-header {
  position: relative
}

.cal-tools {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  pointer-events: auto
}

.cal-tools .cal-edit {
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  background: #fff
}

/* Ensure pencils sit above day content */
.cal .day .pencil {
  z-index: 3
}

/* Muted past days: visually de-emphasize and disable interaction */
.cal-cell.muted,
.cal .day.muted {
  opacity: 0.45;
  color: #777;
  pointer-events: none;
}


/* Calendar header layout: [Month][Edit][Nav → right] */
.cal-header {
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative
}

.cal-header #cal-title {
  font-weight: 700
}

.cal-header .cal-tools {
  position: static;
  transform: none;
  margin-left: 0;
  z-index: auto
}

.cal-header .cal-nav {
  margin-left: auto;
  display: flex;
  gap: 8px
}

.cal-tools .cal-edit {
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  background: #fff
}


/* v34 minimal: inline edit button + pencils bottom-left */
.admin .admin-only {
  display: block
}

.cal-header {
  display: flex;
  align-items: center;
  gap: 8px
}

/* keep header one row */
.cal-edit-wrap {
  display: inline-flex
}

.cal-edit {
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  cursor: pointer
}

.cal .day {
  position: relative
}

.cal .day .pencil {
  display: none;
  position: absolute;
  left: 6px;
  bottom: 6px;
  width: 22px;
  height: 22px;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  opacity: .95;
  cursor: pointer;
  z-index: 3;
}

.editing .cal .day .pencil {
  display: inline-flex
}

.cal .day.muted .pencil,
.cal .day.disabled .pencil {
  display: none
}


/* v39 calendar layout safeguard */
#calendar {
  width: 100%;
}


/* v40: remove bullets from top navigation */
.site-nav ul,
.site-nav .menu,
.site-nav .menu li,
.site-nav .dropdown-menu,
.site-nav .dropdown-menu li {
  list-style: none !important;
  margin: 0;
  padding: 0;
}

.site-nav .menu>li::marker,
.site-nav .dropdown-menu>li::marker {
  content: none;
}

/* keep spacing handled by flex gap */


/* === PATCH v19: kleine zentrale Logo-Hitbox (Layout unverändert) ===== */
a.logo-wrap {
  position: relative;
}

/* bleibt Flex-Item wie gehabt */
a.logo-wrap img {
  display: block;
  pointer-events: none;
}

:root {
  --logo-hit-w: 100%;
  /* Breite der Klickfläche (nur Mitte) */
  --logo-hit-h: 88px;
  /* Höhe der Klickfläche */
  --logo-hit-top: 0%;
  /* Abstand von oben */
}

a.logo-wrap .logo-hit {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: var(--logo-hit-w);
  height: var(--logo-hit-h);
  top: var(--logo-hit-top);
  display: block;
  background: transparent;
  border: 0;
  pointer-events: auto;
  border-radius: 8px;
}

a.logo-wrap .logo-hit:focus-visible {
  outline: 3px solid rgba(255, 158, 87, .6);
  outline-offset: 2px;
  border-radius: 8px;
}

@media (max-width: 720px) {
  :root {
    --logo-hit-w: 100%;
    --logo-hit-h: 88px;
    --logo-hit-top: 0%;
  }
}