# Task: tour booking page for "Ayaz Gözlemevi"

Build `index.html`: ONE self-contained file (HTML + CSS + JS inline, no libraries, no network requests). It is the booking page of a fictional mountain observatory. All visible copy in Turkish. It is tested automatically through the `data-testid` attributes below, so use them exactly.

## Today
Read today's date from the query string `?today=YYYY-MM-DD`; if absent use the real current date. All dates are local calendar dates.

## Data (inline in your JS, exactly)
Tours:
| id | name | price per ticket (TL) | seats per night |
|---|---|---|---|
| `gece-turu` | Gece turu | 450 | 20 |
| `teleskop` | 60 cm teleskop seansı | 700 | 8 |
| `foto` | Astrofotoğraf atölyesi | 1200 | 6 |

Seats already sold before any user booking (per date, per tour):
`{"2026-12-05":{"gece-turu":18,"teleskop":8},"2026-12-12":{"foto":5},"2026-12-19":{"gece-turu":20,"teleskop":8,"foto":6}}`

## Calendar
- Show the 30 days starting with today (today included), each as a `<button data-testid="day-YYYY-MM-DD">`.
- Only Fridays and Saturdays are bookable. Other days, and any day where every tour is full, have the `disabled` attribute.
- Clicking an enabled day selects it (`aria-pressed="true"` on the selected one, `"false"` on the others).

## Tour, tickets, price
- One radio input per tour: `data-testid="tour-<id>"`. Next to each, `data-testid="remaining-<id>"` whose text is just the number of seats left on the selected date (seats per night − sold − this browser's bookings). A tour with 0 seats left on that date has its radio `disabled`.
- Ticket count: `<input type="number" data-testid="qty">` plus buttons `data-testid="qty-minus"` and `data-testid="qty-plus"`. The count is always clamped to 1 … min(8, seats left for the selected tour). Changing tour or date re-clamps it.
- Price: `data-testid="total"` shows the final price formatted like `1.620 TL` (Turkish thousands dot, no decimals; round to the nearest lira).
- Discounts (only the larger one applies, they never stack): 4 or more tickets → 10% off. Promo code field `data-testid="promo"` + button `data-testid="promo-apply"`: code `AYAZ25` (case-insensitive, surrounding spaces ignored) → 25% off. Any other code shows `data-testid="promo-error"` with text `Geçersiz kod` and removes a previously applied code. `data-testid="discount"` shows the applied discount as `%10` or `%25`, or is empty / hidden when none.

## Form
- Fields: `data-testid="name"`, `data-testid="email"`, `data-testid="phone"`.
- Validation runs when the user clicks submit, and again on every input after that first attempt:
  - name: at least two words, each at least 2 letters → else `data-testid="err-name"` with text `Ad ve soyad girin`
  - email: something@something.tld → else `data-testid="err-email"` with text `Geçerli bir e-posta girin`
  - phone: after removing spaces, exactly 11 digits starting with `05` → else `data-testid="err-phone"` with text `Telefon 05XX XXX XX XX biçiminde olmalı`
  - Error elements must not be visible while their field is valid.
- Submit button `data-testid="submit"`: `disabled` until both a day and a tour are selected.

## Confirmation and my bookings
- A valid submit shows `data-testid="confirm"` containing `data-testid="code"` with a booking code matching `AYZ-` + 4 characters from A–Z/0–9, unique per booking.
- Save every booking in `localStorage` key `ayaz-bookings` as a JSON array of objects `{code, date, tour, qty, total, name, email, phone}` (`total` is a number in TL, `phone` without spaces).
- Bookings reduce the seats left (also after a page reload).
- `data-testid="new"` (inside the confirmation) returns to an empty form (no day, no tour, qty 1, no promo, no errors).
- A "Rezervasyonlarım" list `data-testid="my-bookings"` shows one item per stored booking: `data-testid="booking-<code>"`, each with a cancel button `data-testid="cancel-<code>"` that removes it from storage and restores the seats. The list survives reloads.

## Quality
- Zero console errors. Usable with the keyboard. At 390 px width no horizontal scrolling, everything readable. Clean, calm design that matches an observatory (dark navy, one ice-blue accent).

`node check.mjs` runs a small smoke test (3 checks). The hidden test is much longer and covers every rule above, so test your own work carefully. Work only in this directory. When done, reply with one line.
