:root {
    color-scheme: dark;
    --bg: #08090d;
    --surface: #12141b;
    --surface-2: #191c25;
    --border: #2a2e3a;
    --text: #f5f7fb;
    --muted: #9299aa;
    --accent: #7c5cff;
    --accent-2: #31d0aa;
    --danger: #ff6b6b;
    --shadow: 0 24px 70px rgba(0, 0, 0, .32);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background:
        linear-gradient(145deg, rgba(124, 92, 255, .14), transparent 34%),
        radial-gradient(circle at 90% 0%, rgba(49, 208, 170, .12), transparent 28%),
        var(--bg);
    color: var(--text);
}

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

.app {
    width: min(860px, 100%);
    margin: 0 auto;
    padding: 22px 16px 42px;
}

.hero {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: flex-end;
    margin-bottom: 18px;
}

.eyebrow {
    margin: 0 0 6px;
    color: var(--accent-2);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

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

h1 {
    margin-bottom: 0;
    font-size: clamp(34px, 5vw, 52px);
    line-height: 1;
    letter-spacing: 0;
}

h2 {
    margin-bottom: 0;
    font-size: clamp(25px, 3.5vw, 36px);
    line-height: 1.08;
    letter-spacing: 0;
}

h3 {
    margin: 20px 0 10px;
    font-size: 18px;
}

.date-heading {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
    margin-bottom: 10px;
}

.date-heading h3 {
    margin: 0;
}

.calendar-btn {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface-2);
    color: var(--text);
}

.calendar-btn svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.calendar-btn:hover {
    border-color: rgba(124, 92, 255, .72);
    background: #1d2030;
}

.date-picker {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

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

.step {
    min-height: 32px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 11px;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--muted);
    background: rgba(18, 20, 27, .74);
    font-size: 13px;
    font-weight: 700;
}

.step::before {
    content: attr(data-step-dot);
    display: grid;
    place-items: center;
    width: 19px;
    height: 19px;
    border-radius: 50%;
    background: var(--surface-2);
    color: var(--muted);
    font-size: 12px;
}

.step.is-active {
    color: var(--text);
    border-color: rgba(124, 92, 255, .72);
}

.step.is-active::before {
    background: var(--accent);
    color: white;
}

.panel {
    background: rgba(18, 20, 27, .9);
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 8px;
    box-shadow: var(--shadow);
    padding: 18px;
}

.is-hidden {
    display: none;
}

.section-head {
    margin-bottom: 18px;
}

.section-head.row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.icon-btn {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: var(--surface-2);
    color: var(--text);
    padding: 0;
}

.icon-btn::before {
    content: "";
    width: 10px;
    height: 10px;
    border-left: 3px solid currentColor;
    border-bottom: 3px solid currentColor;
    transform: rotate(45deg);
    margin-left: 4px;
}

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

.service-footer {
    position: sticky;
    bottom: 12px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 14px;
    align-items: center;
    margin-top: 18px;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: rgba(18, 20, 27, .96);
    box-shadow: 0 16px 44px rgba(0, 0, 0, .35);
}

.selection-summary {
    color: var(--muted);
    font-weight: 800;
    font-size: 14px;
}

.service-card {
    position: relative;
    width: 100%;
    min-height: 96px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 20px;
    align-items: center;
    padding: 16px 18px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface-2);
    color: var(--text);
    text-align: left;
    transition: border-color .18s ease, transform .18s ease, background .18s ease;
}

.service-card:hover,
.service-card.is-selected {
    border-color: var(--accent);
    background: #1d2030;
}

.service-card:active {
    transform: scale(.99);
}

.service-name {
    display: block;
    margin-bottom: 6px;
    font-size: 18px;
    font-weight: 800;
}

.service-meta {
    display: block;
    color: var(--muted);
    font-size: 15px;
}

.service-price {
    display: block;
    margin-top: 18px;
    font-size: 18px;
    font-weight: 900;
}

.service-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .12);
    font-size: 28px;
    font-weight: 300;
    line-height: 1;
    padding-bottom: 3px;
}

.service-card.is-selected .service-action {
    background: var(--accent);
    border-color: var(--accent);
    font-size: 21px;
    padding-bottom: 1px;
}

.selected-service,
.summary {
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface-2);
    padding: 14px 16px;
    color: var(--muted);
    line-height: 1.45;
}

.summary-services {
    display: grid;
    gap: 5px;
    margin: 0 0 8px;
    padding: 0;
    list-style: none;
}

.summary-services li {
    position: relative;
    padding-left: 16px;
    color: var(--text);
    font-weight: 800;
}

.summary-services li::before {
    content: "";
    position: absolute;
    left: 0;
    top: .72em;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent-2);
    transform: translateY(-50%);
}

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

.date-strip {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 86px;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
}

.date-strip::-webkit-scrollbar {
    display: none;
}

.date-scrollbar {
    position: relative;
    height: 12px;
    margin-top: 5px;
    margin-bottom: 18px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .07);
    overflow: hidden;
    cursor: pointer;
}

.date-scrollbar-thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    height: 8px;
    min-width: 52px;
    border-radius: 999px;
    background: rgba(124, 92, 255, .72);
    transition: background .15s ease;
}

.date-scrollbar:hover .date-scrollbar-thumb,
.date-scrollbar.is-dragging .date-scrollbar-thumb {
    background: rgba(124, 92, 255, .9);
}

.date-btn {
    min-height: 88px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface-2);
    color: var(--text);
}

.date-btn.is-active {
    background: var(--accent);
    border-color: var(--accent);
}

.date-btn span {
    display: block;
}

.date-weekday {
    color: rgba(255, 255, 255, .68);
    font-weight: 800;
}

.date-day {
    margin: 4px 0;
    font-size: 25px;
    font-weight: 900;
}

.date-month {
    color: rgba(255, 255, 255, .68);
}

.time-title {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: center;
}

.legend {
    color: var(--muted);
    white-space: nowrap;
}

.legend i {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin: 0 5px 0 10px;
    background: var(--accent-2);
}

.legend i:last-child {
    background: var(--danger);
}

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

.load-error {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    padding: 14px;
    border: 1px solid rgba(255, 107, 107, .24);
    border-radius: 8px;
    background: rgba(255, 107, 107, .08);
    color: var(--muted);
}

.load-error p {
    margin: 0;
}

.retry-btn {
    min-height: 38px;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface-2);
    color: var(--text);
    font-weight: 700;
}

.retry-btn:hover {
    border-color: rgba(124, 92, 255, .72);
}

.time-btn {
    min-height: 52px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface-2);
    color: var(--text);
    padding: 0 18px;
    text-align: left;
    font-size: 17px;
    font-weight: 800;
}

.time-btn[data-status="free"] {
    border-color: rgba(49, 208, 170, .35);
}

.time-btn[data-status="booked"],
.time-btn[data-status="past"] {
    color: #7e8494;
    background: rgba(255, 107, 107, .08);
    border-color: rgba(255, 107, 107, .24);
    cursor: not-allowed;
}

.time-btn[data-status="free"]::after {
    content: "Frei";
    color: var(--accent-2);
    font-size: 14px;
}

.time-btn[data-status="booked"]::after {
    content: "Besetzt";
    color: var(--danger);
    font-size: 14px;
}

.time-btn[data-status="past"]::after {
    content: "vorbei";
    color: var(--muted);
    font-size: 14px;
}

.booking-form {
    display: grid;
    gap: 14px;
    margin-top: 18px;
}

.booking-form.is-booked label,
.booking-form.is-booked button {
    display: none;
}

label span {
    display: block;
    margin-bottom: 7px;
    color: var(--muted);
    font-weight: 800;
}

input {
    width: 100%;
    min-height: 50px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #0c0e14;
    color: var(--text);
    padding: 0 14px;
    outline: none;
}

input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(124, 92, 255, .18);
}

.primary-btn {
    min-height: 48px;
    border: 0;
    border-radius: 8px;
    background: var(--accent);
    color: white;
    font-weight: 700;
    font-size: 16px;
}

.primary-btn:disabled {
    opacity: .7;
    cursor: wait;
}

.form-message {
    min-height: 22px;
    margin-bottom: 0;
    color: var(--muted);
}

.form-message.is-error {
    color: var(--danger);
}

.form-message.is-success {
    color: var(--accent-2);
}

@media (max-width: 720px) {
    .app {
        padding: 18px 12px 38px;
    }

    .hero {
        display: block;
    }

    .steps {
        justify-content: flex-start;
        margin-top: 16px;
    }

    .panel {
        padding: 16px;
    }

    .service-card {
        min-height: 94px;
        padding: 15px;
    }

    .service-footer {
        grid-template-columns: 1fr;
    }

    .service-name {
        font-size: 17px;
    }

    .time-title {
        display: block;
    }

    .legend {
        display: block;
        margin-bottom: 10px;
    }
}
