:root {
  --bg: #f4f7fb;
  --panel: #ffffff;
  --text: #0f172a;
  --muted: #475569;
  --line: #e5e7eb;
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --green: #15803d;
  --shadow: 0 24px 70px rgba(15, 23, 42, 0.12);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.45 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.page {
  width: min(1500px, calc(100vw - 48px));
  margin: 24px auto 48px;
}

.back {
  display: inline-block;
  margin: 0 0 18px;
  color: var(--muted);
  text-decoration: none;
  font-weight: 700;
}

.shell {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 28px;
}

.hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 24px;
  margin-bottom: 24px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--blue);
  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

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

h1 {
  max-width: 850px;
  margin-bottom: 10px;
  font-size: clamp(2rem, 5vw, 4.5rem);
  line-height: 1.02;
}

h2 {
  margin-bottom: 14px;
  font-size: 1.25rem;
}

.lede {
  color: var(--muted);
  font-size: 1.05rem;
}

.resource-pill {
  flex: 0 0 auto;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: #f8fafc;
}

.layout {
  display: grid;
  grid-template-columns: minmax(320px, 460px) minmax(560px, 1fr);
  gap: 24px;
  align-items: start;
}

.panel,
.map-panel,
.events,
.output-wrap {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 20px;
}

.disabled-step {
  opacity: 0.62;
}

.disabled-step input,
.disabled-step textarea,
.disabled-step select,
.disabled-step .space,
.disabled-step .ghost,
.disabled-step .primary {
  pointer-events: none;
}

.step-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 11px;
  color: var(--muted);
  background: #f8fafc;
  font-size: 0.82rem;
  font-weight: 800;
  white-space: nowrap;
}

.badge.ready {
  color: var(--green);
  border-color: #bbf7d0;
  background: #f0fdf4;
}

label {
  display: grid;
  gap: 7px;
  margin-bottom: 14px;
  color: var(--muted);
  font-weight: 700;
}

input,
textarea {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 12px 13px;
  color: var(--text);
  font: inherit;
}

textarea { resize: vertical; }

.time-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.invite-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.workspace-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  margin-bottom: 14px;
}

.workspace-row select {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 0 12px;
  color: var(--text);
  font: inherit;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.check-row input {
  width: auto;
}

button {
  font: inherit;
}

.primary,
.ghost {
  min-height: 44px;
  border-radius: 8px;
  border: 1px solid var(--blue);
  cursor: pointer;
  font-weight: 800;
}

.primary {
  width: 100%;
  background: var(--blue);
  color: #fff;
}

.primary:hover {
  background: var(--blue-dark);
}

.ghost {
  background: #fff;
  color: var(--blue);
  padding: 0 16px;
}

.status {
  min-height: 24px;
  margin-top: 12px;
  color: var(--muted);
}

.map-header,
.events-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.map-header p {
  color: var(--muted);
}

.embedded-map {
  margin: 16px 0;
  padding: 14px;
  background: #f8fafc;
}

.map-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  background: #e5e7eb;
}

.map-wrap img {
  display: block;
  width: 100%;
  height: auto;
}

.space {
  position: absolute;
  display: grid;
  place-items: center;
  gap: 4px;
  border: 2px solid rgba(255, 255, 255, 0.85);
  border-radius: 0;
  background: rgba(21, 128, 61, 0.86);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 900;
  cursor: pointer;
  text-align: center;
  line-height: 1.15;
  padding: 8px;
  box-shadow: inset 0 0 0 999px rgba(255, 255, 255, 0.02);
  transition: filter 120ms ease, outline 120ms ease, transform 120ms ease;
}

.space:hover,
.space:focus-visible {
  filter: brightness(1.08);
  outline: 3px solid rgba(37, 99, 235, 0.75);
  outline-offset: 2px;
  z-index: 3;
}

.space:hover::after,
.space:focus-visible::after {
  content: attr(data-label) "\A Available";
  white-space: pre;
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  transform: translateX(-50%);
  min-width: 190px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--text);
  background: #fff;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.18);
  text-align: left;
  font-weight: 800;
}

.space:hover::before,
.space:focus-visible::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: calc(100% + 2px);
  width: 14px;
  height: 14px;
  transform: translateX(-50%) rotate(45deg);
  border-right: 1px solid #cbd5e1;
  border-bottom: 1px solid #cbd5e1;
  background: #fff;
  z-index: 4;
}

.space.empty {
  background: rgba(100, 96, 111, 0.88);
}

.space.compact {
  font-size: 0.72rem;
}

.park-icon {
  display: block;
  font-size: 1.4rem;
  line-height: 1;
}

.space.selected {
  background: rgba(22, 101, 52, 0.96);
  border-color: #93c5fd;
  color: #fff;
  outline: 4px solid rgba(37, 99, 235, 0.7);
  outline-offset: 2px;
  z-index: 2;
}

.events {
  margin-top: 24px;
}

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

.event-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}

.event-card h3 {
  margin: 0 0 4px;
  font-size: 1rem;
}

.event-card p {
  margin: 0;
  color: var(--muted);
}

.output-wrap {
  margin-top: 16px;
}

pre {
  overflow: auto;
  white-space: pre-wrap;
  color: #1f2937;
}

@media (max-width: 980px) {
  .page { width: min(100% - 24px, 900px); }
  .hero, .layout { display: block; }
  .resource-pill { margin-top: 16px; }
  .map-panel { margin-top: 18px; }
  h1 { font-size: 2.25rem; }
  .workspace-row,
  .invite-grid,
  .time-grid { grid-template-columns: 1fr; }
  .space {
    font-size: 0.62rem;
    padding: 4px;
  }
  .park-icon {
    font-size: 1rem;
  }
}
