:root {
  --sand: #f6ead6;
  --ink: #18212f;
  --muted: #667085;
  --brand: #15b8d6;
  --brand-2: #65e4c7;
  --good: #2fbf71;
  --busy: #a8aeb8;
  --selected: #2494ff;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 20% 0%, rgba(101,228,199,.35), transparent 32rem),
    radial-gradient(circle at 80% 12%, rgba(21,184,214,.28), transparent 28rem),
    linear-gradient(135deg, #e9f7fb, #f8efe0 55%, #dceff5);
}
button, select { font: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
button:focus { outline: none; }
button:focus-visible { outline: 3px solid rgba(21,184,214,.55); outline-offset: 3px; }
.view-mode button:focus-visible { outline: none; }
.app-shell { min-height: 100vh; display: grid; place-items: center; padding: 22px; }
.phone {
  width: min(100%, 440px);
  min-height: min(900px, calc(100vh - 44px));
  border-radius: 36px;
  padding: 18px;
  background: rgba(255,255,255,.42);
  border: 1px solid rgba(255,255,255,.72);
  box-shadow: 0 28px 90px rgba(21, 74, 92, .20);
  backdrop-filter: blur(22px);
}
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.eyebrow { margin: 0 0 4px; color: #0d91aa; font-size: 11px; text-transform: uppercase; letter-spacing: .12em; font-weight: 800; }
h1, h2 { margin: 0; line-height: 1.05; }
h1 { font-size: 28px; }
h2 { font-size: 24px; }
.pill-button, .editor-panel button, .editor-panel a {
  border: 0;
  border-radius: 999px;
  padding: 10px 14px;
  color: white;
  background: linear-gradient(135deg, #10a8ca, #25cfaa);
  box-shadow: 0 12px 28px rgba(15, 166, 197, .28);
  text-decoration: none;
  font-weight: 800;
  white-space: nowrap;
}
.editor-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
  padding: 12px;
  border-radius: 24px;
  background: rgba(255,255,255,.64);
  border: 1px solid rgba(255,255,255,.76);
}
.editor-panel.is-hidden { display: none; }
.editor-panel label { display: grid; gap: 6px; color: var(--muted); font-size: 12px; font-weight: 700; }
.editor-panel select { width: 100%; min-width: 0; border: 1px solid rgba(23,45,64,.1); background: white; border-radius: 14px; padding: 10px; }
.editor-panel button, .editor-panel a { text-align: center; }
.map-card {
  overflow: hidden;
  border-radius: 30px;
  padding: 8px;
  background: rgba(255,255,255,.45);
  border: 1px solid rgba(255,255,255,.75);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8), 0 18px 60px rgba(31,89,111,.16);
}
.map-stage {
  position: relative;
  height: 610px;
  max-height: calc(100vh - 230px);
  min-height: 430px;
  overflow: hidden;
  border-radius: 24px;
  background: linear-gradient(160deg, #6ad5e4 0 30%, #f4ddae 30% 100%);
  touch-action: none;
  cursor: grab;
}
.map-stage.is-panning { cursor: grabbing; }
.map-stage::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(circle at 50% 25%, transparent 0 40%, rgba(255,255,255,.14)); z-index: 3; }
.map-content {
  position: absolute;
  left: 0;
  top: 0;
  width: 1280px;
  height: 860px;
  transform-origin: 0 0;
  will-change: transform;
  z-index: 1;
}
.map-background {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  user-select: none;
  pointer-events: none;
  filter: saturate(1.04) brightness(.86);
}
.map-content::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(rgba(8,33,42,.16), rgba(8,33,42,.16));
}
.empty-state { position: absolute; inset: 0; display: grid; place-content: center; gap: 8px; text-align: center; color: rgba(24,33,47,.7); z-index: 4; pointer-events: none; }
.empty-state.is-hidden { display: none; }
.empty-state code { background: rgba(255,255,255,.6); padding: 2px 6px; border-radius: 7px; }
.zoom-controls {
  position: absolute;
  right: 12px;
  top: 12px;
  z-index: 6;
  display: flex;
  gap: 6px;
  padding: 6px;
  border-radius: 999px;
  background: rgba(255,255,255,.72);
  border: 1px solid rgba(255,255,255,.78);
  box-shadow: 0 10px 24px rgba(8,43,56,.18);
  backdrop-filter: blur(14px);
}
.zoom-controls button {
  min-width: 36px;
  height: 34px;
  border: 0;
  border-radius: 999px;
  color: #073642;
  background: rgba(255,255,255,.82);
  font-weight: 900;
}
#zoomResetBtn { min-width: 58px; }
.map-object {
  position: absolute;
  display: grid;
  place-items: center;
  border: 0;
  padding: 0;
  background: transparent;
  transform-origin: center;
  filter: drop-shadow(0 0 10px rgba(255,255,255,.95)) drop-shadow(0 10px 20px rgba(8,43,56,.22));
  transition: filter .2s ease, transform .2s ease;
  z-index: 2;
  touch-action: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  appearance: none;
  -webkit-appearance: none;
  outline: none;
}
.map-object::before {
  content: "";
  position: absolute;
  inset: -10px;
  border-radius: 24px;
  background: radial-gradient(circle, rgba(101,228,199,.38), rgba(21,184,214,.18) 45%, transparent 72%);
  opacity: .9;
  animation: premium-pulse 2.6s ease-in-out infinite;
}
.map-object img { position: relative; width: 100%; height: 100%; object-fit: contain; user-select: none; pointer-events: none; }
.map-object:hover, .map-object.is-active { filter: drop-shadow(0 0 12px white) drop-shadow(0 0 20px rgba(37,207,170,.75)) drop-shadow(0 16px 24px rgba(8,43,56,.26)); }
.map-object.is-busy { opacity: .55; filter: grayscale(.45) drop-shadow(0 8px 18px rgba(8,43,56,.18)); }
.map-object.is-selected::before { background: radial-gradient(circle, rgba(36,148,255,.42), rgba(36,148,255,.18) 45%, transparent 72%); }
.view-mode .map-object::before {
  animation: none;
  opacity: .72;
}
.view-mode .map-object:focus,
.view-mode .map-object:active {
  outline: none;
  background: transparent;
  box-shadow: none;
}
.map-object.is-locked .resize-handle { display: none; }
.resize-handle { position: absolute; right: -6px; bottom: -6px; width: 18px; height: 18px; border-radius: 999px; background: white; border: 2px solid var(--brand); box-shadow: 0 4px 12px rgba(0,0,0,.18); z-index: 5; }
.object-label { position: absolute; left: 50%; bottom: -28px; transform: translateX(-50%); white-space: nowrap; padding: 6px 9px; border-radius: 999px; color: #073642; background: rgba(255,255,255,.8); border: 1px solid rgba(255,255,255,.78); box-shadow: 0 8px 18px rgba(8,43,56,.14); backdrop-filter: blur(12px); font-size: 11px; font-weight: 900; }
.legend { display: flex; justify-content: center; gap: 14px; padding: 14px 6px 2px; color: var(--muted); font-size: 12px; font-weight: 800; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.dot.available { background: var(--good); }
.dot.busy { background: var(--busy); }
.dot.selected { background: var(--selected); }
.sheet {
  position: fixed;
  left: 50%;
  bottom: 18px;
  width: min(420px, calc(100vw - 24px));
  transform: translate(-50%, calc(100% + 40px));
  display: grid;
  grid-template-columns: 104px 1fr;
  gap: 16px;
  padding: 18px;
  border-radius: 28px;
  background: rgba(255,255,255,.82);
  border: 1px solid rgba(255,255,255,.78);
  box-shadow: 0 22px 80px rgba(7,35,47,.30);
  backdrop-filter: blur(24px);
  transition: transform .28s ease;
  z-index: 20;
}
.sheet.is-open { transform: translate(-50%, 0); }
.sheet-close { position: absolute; right: 14px; top: 12px; width: 32px; height: 32px; border: 0; border-radius: 50%; background: rgba(10,33,43,.08); color: var(--ink); font-size: 22px; }
.sheet-glow { position: absolute; inset: -28px 40px auto; height: 60px; pointer-events: none; background: radial-gradient(circle, rgba(101,228,199,.44), transparent 70%); }
.sheet img { width: 104px; height: 104px; align-self: center; object-fit: contain; filter: drop-shadow(0 14px 24px rgba(8,43,56,.20)); }
.sheet p { margin: 6px 0; color: var(--muted); }
.sheet-meta { display: flex; justify-content: space-between; align-items: center; margin: 12px 0; }
.sheet-meta span { color: var(--good); font-weight: 900; }
.primary-cta { width: 100%; border: 0; border-radius: 16px; padding: 13px 16px; color: white; background: linear-gradient(135deg, #149fd0, #26cda9); font-weight: 900; box-shadow: 0 14px 32px rgba(20,159,208,.28); }
@keyframes premium-pulse { 0%,100% { transform: scale(.94); opacity: .55; } 50% { transform: scale(1.08); opacity: .95; } }
@media (max-width: 520px) { .app-shell { padding: 0; } .phone { min-height: 100vh; border-radius: 0; width: 100%; } .map-stage { max-height: none; height: calc(100vh - 250px); } }
