:root {
  --bg: #fbf7f7;
  --surface: #ffffff;
  --ink: #2b1f22;
  --muted: #6f6266;
  --line: #eee2e4;
  --brand: #e6344b;        /* Mango Studio red */
  --brand-ink: #b5182e;    /* darker red for text and hover */
  --brand-soft: #fdebed;
  --ok: #1f7a4d;
  --ok-soft: #e5f4ec;
  --bad: #b3261e;
  --bad-soft: #fbe9e7;
  --radius: 14px;
  color-scheme: light;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.5 "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}
header { background: var(--surface); border-bottom: 1px solid var(--line); }
header .inner { padding: 18px 16px 24px; max-width: 880px; margin: 0 auto; }
header .logo { display: block; width: 210px; max-width: 60%; height: auto; margin: 0 0 14px -4px; }
header .topbar { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
header .top-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px 18px; padding-top: 6px; font-size: 14px; }
header .top-links a { color: var(--muted); text-decoration: none; overflow-wrap: anywhere; }
header .top-links a:hover { color: var(--brand-ink); text-decoration: underline; }
header .top-links .home-link { color: var(--brand-ink); font-weight: 600; }
header .topbar .logo { flex-shrink: 0; }
@media (max-width: 600px) {
  header .topbar { flex-direction: column; gap: 0; }
  header .top-links { justify-content: flex-start; padding: 0 0 12px; gap: 4px 14px; }
}
.photo-note { background: var(--brand-soft); color: var(--brand-ink); font-weight: 600; border-radius: 10px; padding: 10px 14px; display: inline-block; }
header h1 { margin: 6px 0 4px; font-size: clamp(26px, 5vw, 36px); letter-spacing: -.02em; line-height: 1.15; }
header p { margin: 0; color: var(--muted); max-width: 64ch; }
header p a { color: var(--brand-ink); }
main { max-width: 880px; margin: 0 auto; padding: 16px 16px 64px; }
section.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin-top: 18px; }
h2 { font-size: 19px; margin: 0 0 14px; letter-spacing: -.01em; }
h2 .step { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--brand); color: #fff; font-size: 14px; margin-right: 8px; vertical-align: 2px; }
label.field { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.hint { color: var(--muted); font-size: 13px; font-weight: 400; }
.group { margin-bottom: 20px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  border-radius: 999px; padding: 8px 14px; font: inherit; font-size: 14px; cursor: pointer;
}
.chip:hover { border-color: var(--brand); }
.chip[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }
.hours { display: grid; grid-template-columns: repeat(auto-fill, minmax(98px, 1fr)); gap: 8px; }
.hours .chip { border-radius: 10px; padding: 8px 6px; }
.row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
input[type=date], input[type=text], input[type=email], input[type=tel] {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; font: inherit; background: #fff; color: var(--ink);
}
input:focus-visible, .chip:focus-visible, button:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 45%, transparent); outline-offset: 1px; }
button.primary {
  background: var(--brand); color: #fff; border: 0; border-radius: 10px; padding: 12px 20px; font: inherit; font-weight: 600; cursor: pointer;
}
button.primary:hover { background: var(--brand-ink); }
button.danger { background: var(--surface); color: var(--bad); border: 1px solid currentColor; }
button.danger:hover { background: var(--bad-soft); }
button.primary:disabled { opacity: .5; cursor: progress; }
button.link { background: none; border: 0; color: var(--brand-ink); font: inherit; font-weight: 600; cursor: pointer; padding: 0; text-decoration: underline; }
.error { background: var(--bad-soft); color: var(--bad); border-radius: 10px; padding: 10px 14px; margin-top: 14px; font-size: 14px; }
.summary-line { color: var(--muted); font-size: 14px; margin: -6px 0 16px; }

.studios { display: grid; gap: 14px; }
.studio { border: 1px solid var(--line); border-radius: 12px; padding: 18px; display: grid; gap: 10px; }
.studio.ok { border-color: color-mix(in srgb, var(--ok) 35%, var(--line)); }
.studio.no { background: #fbf8f4; }
.studio-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: baseline; }
.studio-head h3 { margin: 0; font-size: 17px; }
.badge { font-size: 13px; font-weight: 600; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.no { background: var(--bad-soft); color: var(--bad); }
.price { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.price div { background: var(--bg); border-radius: 10px; padding: 10px 12px; }
.price b { display: block; font-size: 18px; }
.price span { font-size: 12px; color: var(--muted); }
details { font-size: 14px; }
details summary { cursor: pointer; color: var(--muted); }
details ul { margin: 8px 0 0; padding-left: 18px; columns: 2; column-gap: 24px; }
details ul.single { columns: 1; }
@media (max-width: 520px) { details ul { columns: 1; } }

.recap { background: var(--brand-soft); border-radius: 12px; padding: 14px 16px; margin-bottom: 18px; font-size: 14px; }
.recap b { font-size: 15px; }
.recap ul { margin: 6px 0 0; padding-left: 18px; }
.recap li { margin: 2px 0; }
.recap .recap-sub { margin-top: 12px; font-weight: 700; }
.recap .recap-note { margin-top: 10px; color: var(--muted); font-size: 13px; }
#payment-element { margin: 16px 0; }
.agree { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; margin: 12px 0 18px; }
.agree input { margin-top: 4px; }
.done { text-align: center; padding: 28px 22px; }
.done .big { font-size: 40px; }
.sessions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.sessions span { font-size: 13px; padding: 3px 9px; border-radius: 8px; background: var(--ok-soft); color: var(--ok); }
.sessions span.released { background: #f1ece6; color: var(--muted); text-decoration: line-through; }
.sessions span.past { background: #f1ece6; color: var(--muted); }
[hidden] { display: none !important; }
footer { text-align: center; color: var(--muted); font-size: 13px; padding-bottom: 32px; }
footer a { color: inherit; }

/* Studio cards: buttons row */
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
button.secondary {
  background: var(--surface); color: var(--brand-ink); border: 1px solid var(--line);
  border-radius: 10px; padding: 11px 18px; font: inherit; font-weight: 600; cursor: pointer;
}
button.secondary:hover { border-color: var(--brand); }

/* Studio details pop-up */
dialog#details-dialog {
  width: min(760px, calc(100% - 32px)); max-height: calc(100vh - 48px); padding: 0;
  border: 0; border-radius: var(--radius); background: var(--surface); color: var(--ink);
  box-shadow: 0 20px 60px rgba(0, 0, 0, .25); overflow: auto;
}
dialog#details-dialog::backdrop { background: rgba(43, 31, 34, .55); }
.dialog-head {
  position: sticky; top: 0; z-index: 2; display: flex; justify-content: space-between; align-items: center; gap: 12px;
  background: var(--surface); padding: 14px 18px; border-bottom: 1px solid var(--line);
}
.dialog-head h2 { margin: 0; font-size: 17px; }
.dialog-head .close { background: none; border: 0; font-size: 20px; line-height: 1; cursor: pointer; color: var(--muted); padding: 6px; }
.gallery { padding: 16px 18px 0; }
.gallery .stage { position: relative; }
.gallery .track {
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory; border-radius: 12px; background: #f3eeee;
  scrollbar-width: none;
}
.gallery .track::-webkit-scrollbar { display: none; }
.gallery .track img { flex: 0 0 100%; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; scroll-snap-align: start; }
.gallery .nav {
  position: absolute; top: 50%; transform: translateY(-50%); width: 38px; height: 38px; border-radius: 50%;
  border: 0; background: rgba(255, 255, 255, .92); color: var(--ink); font-size: 24px; line-height: 1; cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .2);
}
.gallery .prev { left: 10px; }
.gallery .next { right: 10px; }
.gallery .thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; }
.gallery .thumbs button { padding: 0; border: 2px solid transparent; border-radius: 8px; background: none; cursor: pointer; flex: 0 0 auto; }
.gallery .thumbs button.on { border-color: var(--brand); }
.gallery .thumbs img { display: block; width: 72px; height: 48px; object-fit: cover; border-radius: 6px; }
.details-body { padding: 8px 18px 22px; font-size: 15px; }
.details-body h1 { font-size: 20px; margin: 12px 0 8px; }
.details-body h2 { font-size: 17px; margin: 18px 0 6px; }
.details-body ul { padding-left: 20px; }
.details-body a { color: var(--brand-ink); }
