:root {
  --bg-left: #ffffff;
  --bg-right: #f4f4f4;
  --text-main: #141414;
  --text-muted: #767676;
  --text-light: #b3b3b3;
  --line: #dedede;
  --font-stack: 'Helvetica Neue', Helvetica, -apple-system, BlinkMacSystemFont, Arial, sans-serif;
  --space-edge: 4rem;
  --space-edge-mobile: 1.5rem;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

body {
  font-family: var(--font-stack);
  color: var(--text-main);
  background-color: var(--bg-left);
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  font-size: 14px;
}

a { color: inherit; text-decoration: none; cursor: pointer; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
:focus-visible { outline: 1px solid var(--text-main); outline-offset: 3px; }
[hidden] { display: none !important; }

/* ---------- Grundlayout: zwei Flächen ---------- */

.layout-container { display: flex; width: 100%; height: 100%; }
.pane { flex: 1; position: relative; height: 100%; min-width: 0; }

.pane-left {
  background-color: var(--bg-left);
  display: flex; flex-direction: column; justify-content: space-between;
  padding: var(--space-edge);
}
.pane-right {
  background-color: var(--bg-right);
  display: flex; flex-direction: column;
  padding: var(--space-edge) var(--space-edge) 2.5rem 6rem;
}

.edge-nav {
  position: absolute; top: 50%;
  transform: translateY(-50%) rotate(180deg);
  writing-mode: vertical-rl;
  font-size: 10px; font-weight: 500; letter-spacing: 0.05em;
  color: var(--text-muted); text-transform: uppercase; z-index: 2;
}
.edge-nav.left { left: 1.5rem; }
.edge-nav.right { right: 1.5rem; transform: translateY(-50%); }
.edge-nav span { display: inline-block; transition: color 0.3s ease; }
.edge-nav:hover span { color: var(--text-main); }

/* ---------- Linke Fläche ---------- */

.brand-header { position: relative; z-index: 2; }
.brand { font-size: 13px; font-weight: 500; letter-spacing: -0.01em; display: inline-flex; gap: 0.3em; }
.brand .light { font-weight: 300; color: var(--text-muted); }
.brand .logo { height: 38px; width: auto; display: block; flex: none; margin: -8px 0 0 -2px; }
.mobile-nav { display: none; }

.product-display {
  position: absolute; top: 45%; left: 50%;
  transform: translate(-50%, -50%);
  width: 60%; max-width: 500px;
  display: flex; justify-content: center; align-items: center;
}
.product-image {
  width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block;
  border-radius: 200px 200px 10px 10px;
  background: #ececec;
  box-shadow: 0 30px 60px rgba(0,0,0,0.05);
  transition: opacity 0.25s ease;
}
.product-image.swap { opacity: 0; }

.product-meta-bottom { display: flex; justify-content: space-between; align-items: flex-end; width: 100%; position: relative; z-index: 2; }
.product-title-group { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.meta-label { font-size: 10px; color: var(--text-muted); letter-spacing: 0.02em; }
.main-title { font-size: 48px; font-weight: 400; letter-spacing: -0.03em; line-height: 1; margin-bottom: 2rem; text-wrap: balance; }

.action-link { font-size: 11px; font-weight: 500; display: inline-flex; align-items: center; gap: 0.5rem; transition: opacity 0.2s; }
a.action-link:hover { opacity: 0.5; }
.action-link .tri { font-size: 8px; }
.action-link .arr { font-size: 10px; margin-left: -2px; }

.thumbnail-stack { display: flex; flex-direction: column; gap: 6px; margin-bottom: 2rem; }
.thumb { width: 44px; height: 44px; display: block; overflow: hidden; opacity: 0.6; transition: opacity 0.3s, filter 0.3s; filter: grayscale(100%); }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb:hover { opacity: 1; }
.thumb.active { opacity: 1; filter: grayscale(0%); box-shadow: 0 0 0 1px var(--text-main); }

.summary { display: flex; flex-direction: column; gap: 10px; margin-bottom: 2rem; text-align: right; max-width: 45%; }
.summary dt { font-size: 10px; font-weight: 600; }
.summary dd { font-size: 12px; color: var(--text-muted); }

/* ---------- Rechte Fläche ---------- */

.right-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 7vh; flex: none; }
.nav-menu { display: flex; flex-direction: column; gap: 4px; font-size: 11px; color: var(--text-muted); }
.nav-item { display: flex; align-items: center; gap: 6px; transition: color 0.2s; }
.nav-item:hover, .nav-item.active { color: var(--text-main); }
.indicator { font-size: 14px; line-height: 0; opacity: 0; transform: translateY(1px); }
.nav-item.active .indicator { opacity: 1; }

.studio-meta { display: flex; align-items: center; gap: 1.5rem; font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.header-side { display: flex; flex-direction: column; align-items: flex-end; gap: 1.1rem; }
.header-cta { align-self: flex-end; gap: 0.5rem; padding: 0.85rem 1.4rem; font-size: 12px; }
.header-cta .arr { font-size: 11px; }
.grid-icon { width: 14px; height: 10px; display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(2, 1fr); gap: 1px; }
.grid-icon div { background-color: var(--text-light); }

.content-scroll { flex: 1; min-height: 0; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--line) transparent; padding-right: 1rem; }
.content-body { max-width: 420px; padding-bottom: 2rem; }
.content-body.wide { max-width: 520px; }

.right-footer { flex: none; display: flex; justify-content: space-between; align-items: center; padding-top: 1.5rem; }
.legal { display: flex; gap: 1.25rem; font-size: 10px; color: var(--text-muted); }
.legal a:hover, .inline-link:hover { color: var(--text-main); }

.section-heading { font-size: 24px; font-weight: 400; line-height: 1.3; letter-spacing: -0.01em; margin-bottom: 2rem; text-wrap: balance; }
.section-desc { font-size: 13px; line-height: 1.7; color: var(--text-muted); margin-bottom: 3.5rem; }
.section-desc p + p { margin-top: 1em; }
.section-desc .group-label { color: var(--text-main); margin: 2.25rem 0 0.6rem; }
.section-desc .group-label:first-child { margin-top: 0; }
.inline-link { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--text-light); transition: color 0.2s; }
.muted { color: var(--text-muted); font-weight: 400; }

.spec-grid { display: grid; grid-template-columns: 1fr 1fr; row-gap: 2rem; column-gap: 4rem; }
.spec-grid.spaced { margin-top: 3rem; }
.spec-item { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.spec-label { font-size: 10px; font-weight: 600; }
.spec-value { font-size: 12px; line-height: 1.6; color: var(--text-muted); overflow-wrap: anywhere; }

.group-label { font-size: 10px; font-weight: 600; margin: 3rem 0 1rem; display: flex; gap: 0.75rem; align-items: baseline; }
.section-desc + .group-label, .section-desc + #booking .step:first-child .group-label { margin-top: 0; }
.step-no { color: var(--text-light); font-weight: 400; font-variant-numeric: tabular-nums; }

/* Archiv-Index */
.index-list { list-style: none; border-top: 1px solid var(--line); }
.index-list a { display: grid; grid-template-columns: 2rem 1fr auto 44px; align-items: center; gap: 1rem; padding: 0.75rem 0; border-bottom: 1px solid var(--line); transition: padding 0.25s ease; }
.index-list a:hover { padding-left: 0.5rem; }
.index-list .idx { font-size: 10px; color: var(--text-light); font-variant-numeric: tabular-nums; }
.index-list .idx-title { font-size: 16px; letter-spacing: -0.01em; }
.index-list .idx-meta { font-size: 10px; color: var(--text-muted); }
.index-list img { width: 44px; height: 44px; object-fit: cover; filter: grayscale(100%); opacity: 0.7; transition: filter 0.3s, opacity 0.3s; }
.index-list a:hover img { filter: none; opacity: 1; }

/* Leistungen */
.service-list { list-style: none; border-top: 1px solid var(--line); }
.service-list li { display: flex; justify-content: space-between; gap: 2rem; padding: 1rem 0; border-bottom: 1px solid var(--line); }
.svc-name { font-size: 14px; }
.svc-desc { font-size: 12px; line-height: 1.6; color: var(--text-muted); margin-top: 4px; max-width: 36ch; }
.svc-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; font-size: 12px; color: var(--text-muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.svc-price { color: var(--text-main); }
.svc-meta .action-link { margin-top: 6px; }

/* Öffnungszeiten */
.hours { width: 100%; border-collapse: collapse; font-size: 12px; font-variant-numeric: tabular-nums; }
.hours th, .hours td { padding: 0.55rem 0; border-bottom: 1px solid var(--line); text-align: left; font-weight: 400; color: var(--text-muted); }
.hours tr:first-child th, .hours tr:first-child td { border-top: 1px solid var(--line); }
.hours td { text-align: right; }
.hours .today th, .hours .today td { color: var(--text-main); font-weight: 500; }

/* Formulare */
.form { display: flex; flex-direction: column; gap: 1.25rem; }
.form label { display: flex; flex-direction: column; gap: 6px; font-size: 10px; font-weight: 600; }
.form input:not([type=checkbox]), .form textarea {
  font: inherit; font-size: 14px; font-weight: 400; color: var(--text-main);
  background: transparent; border: 0; border-bottom: 1px solid var(--text-light);
  padding: 6px 0 8px; border-radius: 0; width: 100%; resize: vertical;
}
.form input:focus, .form textarea:focus { outline: none; border-bottom-color: var(--text-main); }
.form .check { flex-direction: row; align-items: flex-start; gap: 10px; font-weight: 400; font-size: 12px; line-height: 1.5; color: var(--text-muted); }
.form .check input { margin-top: 2px; accent-color: var(--text-main); }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-error { font-size: 12px; color: #b3261e; }
.notice { font-size: 13px; line-height: 1.7; padding: 1rem 0; border-top: 1px solid var(--text-main); border-bottom: 1px solid var(--line); }

.btn { display: inline-flex; align-items: center; justify-content: center; align-self: flex-start; font-size: 11px; font-weight: 500; letter-spacing: 0.02em; padding: 0.9rem 1.5rem; background: var(--text-main); color: #fff; border: 1px solid var(--text-main); transition: opacity 0.2s; }
.btn:hover { opacity: 0.75; }
.btn[disabled] { opacity: 0.4; cursor: default; }
.btn.ghost { background: transparent; color: var(--text-main); border-color: var(--text-light); }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 3rem; }

/* ---------- Terminbuchung ---------- */

.choice-list { border-top: 1px solid var(--line); }
.choice { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 0.9rem; padding: 0.8rem 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.choice input { appearance: none; width: 9px; height: 9px; border-radius: 50%; border: 1px solid var(--text-light); transition: background 0.2s, border-color 0.2s; }
.choice input:checked { background: var(--text-main); border-color: var(--text-main); }
.choice-name { font-size: 14px; }
.choice-meta { font-size: 11px; color: var(--text-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.choice:hover .choice-name { opacity: 0.6; }

.calendar { max-width: 360px; }
.cal-nav { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; font-size: 14px; }
.cal-nav button { font-size: 8px; padding: 8px; }
.cal-nav button[disabled] { opacity: 0.2; cursor: default; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.cal-head { font-size: 10px; color: var(--text-muted); text-align: center; margin-bottom: 6px; }
.cal-grid.loading { opacity: 0.4; }
.day { aspect-ratio: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 13px; font-variant-numeric: tabular-nums; color: var(--text-light); position: relative; }
.day.free { color: var(--text-main); background: #fff; transition: background 0.15s, color 0.15s; }
.day.free::after { content: ''; width: 3px; height: 3px; border-radius: 50%; background: currentColor; }
.day.free:hover { background: #e6e6e6; }
.day.selected, .day.selected:hover { background: var(--text-main); color: #fff; }
.day.today { text-decoration: underline; text-underline-offset: 4px; }
.cal-legend { font-size: 10px; color: var(--text-muted); margin-top: 0.9rem; display: flex; align-items: center; gap: 6px; }
.dot { width: 5px; height: 5px; border-radius: 50%; background: var(--text-main); display: inline-block; }
.dot.off { background: var(--text-light); margin-left: 10px; }

.slot-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(68px, 1fr)); gap: 4px; max-width: 360px; }
.slot { padding: 0.7rem 0; font-size: 12px; font-variant-numeric: tabular-nums; background: #fff; text-align: center; transition: background 0.15s, color 0.15s; }
.slot:hover { background: #e6e6e6; }
.slot.selected { background: var(--text-main); color: #fff; }
.slot-empty { font-size: 12px; color: var(--text-muted); grid-column: 1 / -1; }

/* ---------- Kleinere Bildschirme ---------- */

@media (max-height: 760px) and (min-width: 769px) {
  .product-display { width: 46%; top: 42%; }
  .right-header { margin-bottom: 4vh; }
}

@media (max-width: 1024px) {
  .main-title { font-size: 36px; }
  .spec-grid { grid-template-columns: 1fr; row-gap: 1.5rem; }
  .pane-right { padding-left: 3rem; }
  .pane-left, .pane-right { padding-right: 3rem; }
  .pane-left { padding-left: 3rem; }
}

/* ---------- Handy, kleines Tablet und Querformat: alles untereinander ---------- */

.mobile-cta, .form-summary:empty, .wizard-bar, .wizard-summary { display: none; }
.form-summary { font-size: 12px; line-height: 1.6; color: var(--text-muted); padding: 0.9rem 0; border-top: 1px solid var(--text-main); border-bottom: 1px solid var(--line); }
.step { scroll-margin-top: 1rem; }
.cal-nav button { min-width: 40px; min-height: 40px; }

@media (max-width: 900px), (max-height: 560px) {
  :root { --bar: 86px; }
  html { scroll-padding-top: calc(var(--bar) + 1rem); }
  body { height: auto; overflow: auto; padding-bottom: env(safe-area-inset-bottom); }
  body.has-cta { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
  .layout-container { flex-direction: column; height: auto; }
  .pane { height: auto; flex: none; }
  .edge-nav, .nav-menu { display: none; }
  .pane-left, .pane-right { padding: var(--space-edge-mobile); padding-left: max(var(--space-edge-mobile), env(safe-area-inset-left)); padding-right: max(var(--space-edge-mobile), env(safe-area-inset-right)); }
  .pane-left { padding-top: calc(var(--bar) + 0.5rem); }

  /* Feste Kopfzeile mit Logo und Navigation */
  .brand-header {
    position: fixed; top: 0; left: 0; right: 0; z-index: 20; height: var(--bar);
    display: flex; flex-direction: column; justify-content: flex-end;
    padding: 0 max(var(--space-edge-mobile), env(safe-area-inset-right)) 0 max(var(--space-edge-mobile), env(safe-area-inset-left));
    background: rgba(255, 255, 255, 0.94); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
    border-bottom: 1px solid #ececec;
  }
  .brand { align-self: flex-start; padding: 2px 0 0; }
  .brand .logo { height: 34px; margin: 0 0 -4px -2px; }
  .mobile-nav { display: flex; justify-content: space-between; max-width: 420px; font-size: 13px; color: var(--text-muted); }
  .mobile-nav .indicator { display: none; }
  .mobile-nav a { display: flex; align-items: center; min-height: 44px; padding: 0 2px; border-bottom: 1px solid transparent; }
  .mobile-nav a.active { color: var(--text-main); border-bottom-color: var(--text-main); }

  /* Bildfläche: groß auf Startseite und Arbeiten, kompakt auf Unterseiten, aus bei der Buchung */
  .product-display { position: relative; top: auto; left: auto; transform: none; width: 100%; max-width: 440px; margin: 0 auto; padding: 1.5rem 0 2rem; }
  .product-display { max-width: min(440px, 95vh); }
  .m-compact .product-display { max-width: min(520px, 120vh); padding: 1rem 0 1.5rem; }
  .m-compact .product-image { aspect-ratio: 2 / 1; border-radius: 140px 140px 8px 8px; }
  .m-plain .product-display { display: none; }
  .m-plain .pane-left { padding-bottom: 0.5rem; }
  .m-plain .product-meta-bottom { padding-top: 1.25rem; }

  .main-title { font-size: 36px; margin-bottom: 0.75rem; }
  .m-compact .main-title, .m-plain .main-title { font-size: 32px; }
  .action-link { min-height: 44px; }
  span.action-link { display: none; }
  .thumbnail-stack { margin-bottom: 0; }
  .summary { display: none; }

  .right-header { margin-bottom: 2rem; justify-content: flex-end; }
  .content-scroll { overflow: visible; padding-right: 0; }
  .content-body, .content-body.wide { max-width: 560px; padding-bottom: 0; }
  .section-heading { font-size: 22px; margin-bottom: 1.5rem; }
  .section-desc { font-size: 14px; margin-bottom: 2.5rem; }
  .spec-grid { grid-template-columns: 1fr 1fr; column-gap: 1.5rem; }
  .spec-value { font-size: 13px; }
  .hours { font-size: 14px; }
  .hours th, .hours td { padding: 0.75rem 0; }
  .inline-link { display: inline-block; padding: 6px 0; }
  .spec-value .inline-link { padding: 8px 0 2px; }

  .index-list a { grid-template-columns: 1.5rem 1fr 52px; padding: 0.6rem 0; }
  .index-list .idx-meta { display: none; }
  .index-list img { width: 52px; height: 52px; filter: none; opacity: 1; }
  .service-list li { gap: 1rem; }
  .svc-desc { font-size: 13px; }
  .svc-meta { font-size: 13px; }

  /* Formulare: 16px verhindert das automatische Hineinzoomen auf dem iPhone */
  .form input:not([type=checkbox]), .form textarea { font-size: 16px; padding: 10px 0 12px; }
  .form label { font-size: 11px; }
  .form .check { font-size: 13px; }
  .form .check input { width: 20px; height: 20px; flex: none; margin-top: 0; }
  .btn { min-height: 50px; font-size: 13px; }
  .form .btn, .actions .btn, .actions form { width: 100%; align-self: stretch; }
  .actions { flex-direction: column; }

  .step { scroll-margin-top: calc(var(--bar) + 1rem); }
  .choice { min-height: 56px; gap: 0.75rem; }
  .choice input { width: 12px; height: 12px; }
  .choice-name { font-size: 15px; }
  .choice-meta { font-size: 12px; text-align: right; white-space: normal; }
  .calendar, .slot-list { max-width: none; }
  .cal-nav { font-size: 15px; }
  .cal-nav button { min-width: 44px; min-height: 44px; font-size: 10px; }
  .day { font-size: 15px; min-height: 44px; }
  .slot-list { grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 6px; }
  .slot { min-height: 48px; font-size: 14px; }

  .right-footer { padding-top: 2.5rem; }
  .right-footer .action-link, .header-cta { display: none; }
  .legal { gap: 1.5rem; font-size: 12px; }
  .legal a { display: flex; align-items: center; min-height: 44px; }

  /* Buchung in einzelnen Schritten mit „Zurück“ und „Weiter“ am unteren Rand */
  body.wizard-on { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
  .in-flow > .section-heading, .in-flow > .section-desc { display: none; }
  .wizard-on .step .group-label { margin-top: 0; font-size: 12px; }
  .wizard-on .step .step-no { color: var(--text-muted); }
  .wizard-summary:not([hidden]) { display: block; font-size: 12px; line-height: 1.5; color: var(--text-muted); padding-bottom: 0.9rem; margin-bottom: 1.25rem; border-bottom: 1px solid var(--line); }
  .wizard-bar:not([hidden]) {
    display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 0.5rem;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; box-sizing: content-box;
    min-height: 64px; padding: 0 max(12px, env(safe-area-inset-right)) env(safe-area-inset-bottom) max(12px, env(safe-area-inset-left));
    background: rgba(255, 255, 255, 0.96); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
    border-top: 1px solid #e6e6e6;
  }
  .wizard-btn { display: inline-flex; align-items: center; gap: 0.5rem; justify-self: start; min-height: 46px; padding: 0 14px; font-size: 13px; font-weight: 500; }
  .wizard-btn .tri { font-size: 8px; }
  .wizard-btn.primary { justify-self: end; padding: 0 20px; background: var(--text-main); color: #fff; }
  .wizard-btn[disabled] { opacity: 0.28; cursor: default; }
  .wizard-progress { font-size: 11px; color: var(--text-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }

  /* Fester Knopf zur Terminbuchung am unteren Rand */
  .mobile-cta {
    display: flex; align-items: center; justify-content: center; gap: 0.5rem;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
    min-height: 56px; padding: 0 1.5rem env(safe-area-inset-bottom); box-sizing: content-box;
    background: var(--text-main); color: #fff; font-size: 13px; font-weight: 500; letter-spacing: 0.02em;
  }
  .mobile-cta:active { opacity: 0.85; }
}

@media (max-width: 380px) {
  .spec-grid { grid-template-columns: 1fr; }
  .mobile-nav { font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
