:root {
  --bg: #fcebf4;
  --surface: rgb(255 248 252 / 88%);
  --text: #3d2432;
  --muted: #806476;
  --accent: #d94d93;
  --accent-text: #ffffff;
  --border: color-mix(in srgb, var(--text) 12%, transparent);
  --danger: #bf3b3b;
  --warning: #9a6410;
  --radius: 18px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
}

* { box-sizing: border-box; }

html, body {
  touch-action: pan-x pan-y;
  overscroll-behavior: none;
}

body {
  position: relative;
  isolation: isolate;
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
}

body::before {
  position: fixed;
  z-index: 0;
  inset: -24px;
  content: "";
  pointer-events: none;
  background: url("/static/back.jpg?v=1") center 20% / cover no-repeat;
  filter: blur(12px);
  transform: scale(1.06);
}

body::after {
  position: fixed;
  z-index: 0;
  inset: 0;
  content: "";
  pointer-events: none;
  background: linear-gradient(180deg, rgb(255 238 248 / 76%), rgb(252 230 242 / 88%));
}

button, input, textarea, select { font: inherit; }
button { cursor: pointer; }

.app-shell {
  position: relative;
  z-index: 1;
  width: min(760px, 100%);
  margin: 0 auto;
  padding: max(18px, env(safe-area-inset-top)) 16px max(32px, env(safe-area-inset-bottom));
}

.app-header, .form-title-row, .toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(24px, 6vw, 34px); letter-spacing: -0.04em; }
h2 { font-size: 22px; letter-spacing: -0.025em; }
h3 { font-size: 18px; }

.eyebrow {
  margin-bottom: 4px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.brand-logo {
  display: block;
  width: 56px;
  height: 56px;
  flex: 0 0 56px;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid #f58bc2;
  background: #000;
  box-shadow: 0 5px 18px rgb(0 0 0 / 15%);
}

.main-nav, .subnav {
  display: flex;
  gap: 5px;
  padding: 5px;
  margin: 22px 0;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgb(255 244 250 / 78%);
  box-shadow: 0 8px 28px rgb(114 27 72 / 8%);
  backdrop-filter: blur(16px);
}

.nav-button, .subnav-button {
  flex: 1;
  min-width: max-content;
  padding: 10px 12px;
  border: 0;
  border-radius: 10px;
  color: var(--muted);
  background: transparent;
  font-size: 13px;
  font-weight: 700;
}

.nav-button.is-active, .subnav-button.is-active {
  color: var(--text);
  background: var(--surface);
  box-shadow: 0 3px 14px color-mix(in srgb, var(--text) 8%, transparent);
}

.view, .admin-view { display: none; }
.view.is-active, .admin-view.is-active { display: block; }

.section-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 24px 0 14px;
}
.section-heading.slim { margin-top: 20px; }
.section-heading p { margin-top: 3px; color: var(--muted); font-size: 13px; }

.step {
  display: grid;
  flex: 0 0 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  font-weight: 800;
}

.card-grid { display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); }

.service-card, .summary-card, .list-card, .form-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 10px 30px rgb(105 31 69 / 9%);
  backdrop-filter: blur(18px);
}

.service-card {
  min-height: 142px;
  padding: 16px;
  text-align: left;
  color: var(--text);
  transition: transform 150ms ease, border-color 150ms ease;
}
.service-card:active { transform: scale(0.98); }
.service-card.is-selected { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 18%, transparent); }
.service-card h3 { margin-bottom: 8px; }
.service-card p { min-height: 36px; color: var(--muted); font-size: 13px; line-height: 1.4; }
.service-meta { display: flex; justify-content: space-between; gap: 8px; margin-top: 15px; font-size: 13px; font-weight: 750; }

.booking-step { margin-top: 28px; }
.compact-field { max-width: 280px; }
.date-strip { display: flex; gap: 8px; margin: 4px 0 14px; overflow-x: auto; padding-bottom: 4px; }
.date-chip { min-width: max-content; padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px; color: var(--text); background: var(--surface); font-size: 12px; font-weight: 750; }
.date-chip.is-selected { color: var(--accent-text); border-color: var(--accent); background: var(--accent); }
.slot-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 12px; }
.slot-button {
  padding: 11px 6px;
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  background: var(--surface);
  font-weight: 700;
}
.slot-button.is-selected { color: var(--accent-text); border-color: var(--accent); background: var(--accent); }

.summary-card { padding: 17px; margin-bottom: 14px; }
.summary-line { display: flex; justify-content: space-between; gap: 14px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.summary-line:last-child { border-bottom: 0; }
.summary-line span:first-child { color: var(--muted); }
.summary-line strong { text-align: right; }

.field { display: grid; gap: 7px; margin-bottom: 13px; color: var(--muted); font-size: 13px; font-weight: 650; }
.field input, .field textarea, select {
  width: 100%;
  padding: 12px 13px;
  border: 1px solid var(--border);
  border-radius: 12px;
  outline: 0;
  color: var(--text);
  background: var(--bg);
  font-size: 16px;
}
.field input:focus, .field textarea:focus, select:focus { border-color: var(--accent); }
.field textarea { resize: vertical; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.check-field { display: flex; align-items: center; gap: 8px; margin: 4px 0 16px; font-size: 14px; }

.primary-button, .secondary-button {
  width: 100%;
  padding: 13px 16px;
  border-radius: 13px;
  font-weight: 800;
}
.primary-button { border: 1px solid var(--accent); color: var(--accent-text); background: var(--accent); }
.secondary-button { border: 1px solid var(--border); color: var(--text); background: var(--surface); }
.text-button { padding: 6px; border: 0; color: var(--accent); background: transparent; font-weight: 750; }
.danger-button { color: var(--danger); }

.stack { display: grid; gap: 10px; }
.list-card { padding: 15px; }
.list-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.list-card p { margin-top: 6px; color: var(--muted); font-size: 13px; line-height: 1.45; }
.card-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.card-actions button { padding: 8px 10px; border: 1px solid var(--border); border-radius: 10px; color: var(--text); background: transparent; font-size: 12px; font-weight: 750; }
.card-actions button.danger-button { color: var(--danger); }

.badge { display: inline-flex; padding: 5px 8px; border-radius: 999px; color: var(--accent); background: color-mix(in srgb, var(--accent) 13%, transparent); font-size: 11px; font-weight: 800; white-space: nowrap; }
.badge.cancelled { color: var(--danger); background: color-mix(in srgb, var(--danger) 12%, transparent); }
.badge.completed { color: var(--muted); background: color-mix(in srgb, var(--muted) 13%, transparent); }
.badge.inactive { color: var(--warning); background: color-mix(in srgb, var(--warning) 14%, transparent); }

.form-card { padding: 16px; margin-bottom: 18px; }
.form-card h3 { margin-bottom: 16px; }
.admin-hero { padding: 19px; border-radius: var(--radius); color: white; background: linear-gradient(135deg, #8e315e, #e761a5); box-shadow: 0 12px 32px rgb(117 25 72 / 20%); }
.admin-hero .eyebrow { color: #ffe0f0; }
.toolbar { margin-bottom: 12px; }
.toolbar select { flex: 1; }
.toolbar button { width: auto; }

.empty-state { padding: 28px 16px; text-align: center; color: var(--muted); border: 1px dashed var(--border); border-radius: var(--radius); }
.app-footer { padding: 24px 0 max(24px, env(safe-area-inset-bottom)); text-align: center; }
.channel-link { display: inline-flex; padding: 12px 18px; border: 1px solid rgb(217 77 147 / 35%); border-radius: 999px; color: #b52d72; background: rgb(255 246 251 / 88%); box-shadow: 0 8px 24px rgb(112 28 70 / 12%); font-size: 14px; font-weight: 800; text-decoration: none; backdrop-filter: blur(16px); }
.notice { padding: 11px 13px; margin-top: 16px; border-radius: 12px; color: var(--danger); background: color-mix(in srgb, var(--danger) 11%, var(--surface)); font-size: 13px; }
.toast { position: fixed; z-index: 10; right: 16px; bottom: max(20px, env(safe-area-inset-bottom)); left: 16px; max-width: 500px; padding: 13px 15px; margin: auto; border-radius: 13px; color: white; background: #6c294b; box-shadow: 0 10px 34px rgb(78 16 48 / 25%); text-align: center; font-weight: 700; }

.skeleton-grid::before, .skeleton-grid::after { content: ""; display: block; height: 142px; border-radius: var(--radius); background: linear-gradient(90deg, var(--surface), color-mix(in srgb, var(--surface) 60%, var(--bg)), var(--surface)); background-size: 200% 100%; animation: shimmer 1.2s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

@media (max-width: 430px) {
  .card-grid { grid-template-columns: 1fr; }
  .service-card { min-height: 120px; }
  .slot-grid { grid-template-columns: repeat(3, 1fr); }
}

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