/* ==========================================================================
   Tourist Map Builder (/create-map/)
   ========================================================================== */
.up-builder-page { background: #f4f6f4; padding-bottom: 56px; }

.up-builder-hero {
  background: linear-gradient(135deg, #064e3b 0%, #0f766e 60%, #0284c7 100%);
  color: #ffffff;
  text-align: center;
  padding: 44px 0 36px;
  margin-bottom: 28px;
}
.up-builder-hero-title { font-size: clamp(26px, 5vw, 40px); font-weight: 900; line-height: 1.2; margin: 0 0 10px; color: #ffffff; }
.up-builder-hero-desc { max-width: 620px; margin: 0 auto 18px; font-size: 15px; line-height: 1.6; color: #d1fae5; }
.up-builder-steps { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 18px; margin: 0; padding: 0; font-size: 12px; font-weight: 600; color: #ecfdf5; }
.up-builder-steps li { display: inline-flex; align-items: center; gap: 8px; }
.up-builder-steps span { width: 22px; height: 22px; border-radius: 50%; background: rgba(255,255,255,.18); display: inline-flex; align-items: center; justify-content: center; font-size: 11px; }

.up-builder-layout { display: grid; grid-template-columns: 1fr; gap: 20px; align-items: start; }
@media (min-width: 900px) {
  .up-builder-layout { grid-template-columns: minmax(300px, 4fr) minmax(360px, 5fr); }
  .up-builder-stage { position: sticky; top: 16px; }
}

.up-builder-card { background: #ffffff; border: 1px solid #e2e8f0; border-radius: 20px; padding: 20px; }
.up-builder-empty { text-align: center; padding: 48px 20px; }

/* Picker */
.up-b-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.up-b-head h2 { font-size: 17px; font-weight: 800; margin: 0; color: #0f172a; }
.up-b-count { background: #d1fae5; color: #065f46; font-size: 12px; font-weight: 800; padding: 3px 10px; border-radius: 999px; }
.up-b-search { width: 100%; padding: 10px 14px; border: 1px solid #cbd5e1; border-radius: 12px; font-size: 14px; background: #f8fafc; }
.up-b-actions { display: flex; gap: 14px; margin: 10px 0 6px; flex-wrap: wrap; }
.up-b-link { appearance: none; background: none; border: 0; padding: 2px 0; cursor: pointer; font: inherit; font-size: 12px; font-weight: 700; color: #475569; text-decoration: underline; }
.up-b-link:hover, .up-b-link:focus-visible { color: #047857; }
.up-b-link-strong { color: #047857; }
.up-b-groups { max-height: 640px; overflow-y: auto; padding-right: 4px; margin-top: 6px; }
.up-b-group { border-top: 1px solid #e2e8f0; padding: 12px 0 8px; }
.up-b-group[hidden], .up-b-chip[hidden] { display: none; }
.up-b-group-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.up-b-group-head h3 { font-size: 13px; font-weight: 800; margin: 0; color: #0f172a; }
.up-b-group-count { font-weight: 600; font-size: 11px; color: #64748b; margin-left: 4px; }
.up-b-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.up-b-chip {
  appearance: none; cursor: pointer; font: inherit; font-size: 12px; font-weight: 600;
  padding: 7px 12px; border-radius: 999px; border: 1px solid #e2e8f0; background: #f1f5f2; color: #334155;
  transition: background .12s, color .12s, border-color .12s;
}
.up-b-chip:hover { border-color: #94a3b8; }
.up-b-chip:focus-visible { outline: 3px solid #34d399; outline-offset: 2px; }
.up-b-chip.is-on { background: #0b5d3f; border-color: #0b5d3f; color: #ffffff; }
.up-b-chip.is-on::before { content: '• '; }
.up-b-muted { font-size: 12px; color: #64748b; margin: 8px 0 0; }

/* Preview */
.up-b-controls { display: flex; flex-direction: column; gap: 12px; margin-bottom: 14px; }
.up-b-themes { display: flex; gap: 10px; align-items: center; }
.up-b-swatch { width: 34px; height: 34px; border-radius: 50%; border: 2px solid #cbd5e1; cursor: pointer; padding: 0; }
.up-b-swatch[aria-pressed="true"] { border-color: #0f172a; box-shadow: 0 0 0 3px #ffffff, 0 0 0 5px #0f172a; }
.up-b-swatch:focus-visible { outline: 3px solid #34d399; outline-offset: 3px; }
.up-b-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.up-b-fields input { width: 100%; padding: 10px 12px; border: 1px solid #cbd5e1; border-radius: 10px; font-size: 13px; background: #f8fafc; }
.up-b-check { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: #334155; cursor: pointer; }
.up-b-canvas-wrap { border-radius: 14px; overflow: hidden; border: 1px solid #e2e8f0; background: #f5f1e6; line-height: 0; }
#up-b-canvas { width: 100%; height: auto; display: block; }
.up-b-tip { text-align: center; }
.up-b-dl-title { font-size: 14px; font-weight: 800; margin: 18px 0 10px; color: #0f172a; }
.up-b-dl { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.up-b-dl-btn {
  appearance: none; cursor: pointer; font: inherit; font-weight: 800; font-size: 13px;
  padding: 12px 0; border-radius: 12px; border: 1px solid #cbd5e1; background: #ffffff; color: #0f172a;
}
.up-b-dl-btn:hover:not(:disabled) { background: #0b5d3f; border-color: #0b5d3f; color: #ffffff; }
.up-b-dl-btn:disabled { opacity: .45; cursor: not-allowed; }
.up-b-status { min-height: 18px; font-size: 12px; font-weight: 600; color: #047857; margin: 10px 0 0; }

@media (max-width: 480px) {
  .up-b-fields { grid-template-columns: 1fr; }
}

/* Language switch for place names */
.up-b-lang { display: flex; align-items: center; gap: 0.5rem; }
.up-b-lang-label { font-size: 0.75rem; font-weight: 700; color: #475569; }
.up-b-lang button {
  appearance: none; cursor: pointer; font: inherit; font-size: 0.8125rem; font-weight: 700;
  padding: 0.35rem 0.85rem; border-radius: 9999px; border: 1px solid #cbd5e1; background: #ffffff; color: #334155;
}
.up-b-lang button.is-on { background: #0b5d3f; border-color: #0b5d3f; color: #ffffff; }
.up-b-lang button:focus-visible { outline: 3px solid #34d399; outline-offset: 2px; }

.up-b-checks { display: flex; flex-wrap: wrap; gap: 8px 22px; }
