/* ============================================================
   Taki — mapa colaborativo de eventos. Estilos (mobile-first).
   ============================================================ */
:root {
  --bg: #f1f5f9;
  --panel: #ffffff;
  --ink: #0f172a;
  --ink-soft: #475569;
  --muted: #94a3b8;
  --line: #e2e8f0;
  --brand: #f97316;
  --brand-ink: #ea580c;
  --cta: #dc2626;
  --cta-ink: #b91c1c;
  --red: #ef4444;
  --orange: #f59e0b;
  --green: #22c55e;
  --shadow: 0 10px 30px -12px rgba(15, 23, 42, .35);
  --shadow-sm: 0 2px 8px -2px rgba(15, 23, 42, .25);
  --header-h: 58px;
  --radius: 16px;
  font-synthesis: none;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; margin: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}
h1, h2, h3, h4 { margin: 0; }
button { font-family: inherit; cursor: pointer; }

/* ---------- Cabecera ---------- */
.tk-header {
  position: fixed; inset: 0 0 auto 0; height: var(--header-h);
  display: flex; align-items: center; gap: 12px;
  padding: 0 12px; background: var(--panel);
  border-bottom: 1px solid var(--line); z-index: 900;
  padding-top: env(safe-area-inset-top, 0);
}
.tk-brand { display: flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; flex: none; }
.tk-logo { color: var(--brand); display: grid; place-items: center; flex: none; filter: drop-shadow(0 2px 4px rgba(234,88,12,.35)); }
.tk-brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.tk-brand-name { color: var(--ink); font-weight: 800; font-size: 19px; letter-spacing: .6px; }
.tk-brand-tag { font-size: 10.5px; font-weight: 600; color: var(--brand-ink); letter-spacing: .1px; white-space: nowrap; }
.tk-logo-dot { width: 14px; height: 14px; border-radius: 50%; background: var(--brand); }

.tk-filters { display: flex; gap: 6px; margin-left: 4px; overflow-x: auto; scrollbar-width: none; flex: 1; }
.tk-filters::-webkit-scrollbar { display: none; }
.tk-chip {
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  border: 1px solid var(--line); background: #fff; color: var(--ink-soft);
  padding: 6px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; opacity: .55;
  transition: .15s;
}
.tk-chip.is-active { opacity: 1; border-color: #cbd5e1; box-shadow: var(--shadow-sm); color: var(--ink); }
.tk-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.tk-dot--red { background: var(--red); } .tk-dot--orange { background: var(--orange); } .tk-dot--green { background: var(--green); }

.tk-header-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.tk-icon-btn { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line); background: #fff; color: var(--ink-soft); }
.tk-icon-btn:hover { background: #f8fafc; color: var(--ink); }
.tk-user { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: #fff; padding: 4px 10px 4px 4px; border-radius: 999px; }
.tk-avatar { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 700; font-size: 14px; flex: none; }
.tk-user-meta { display: flex; flex-direction: column; line-height: 1.15; text-align: left; }
.tk-user-name { font-size: 13px; font-weight: 700; max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tk-user-points { font-size: 11px; color: var(--brand-ink); font-weight: 700; }

/* ---------- Layout principal ---------- */
.tk-main { position: fixed; inset: var(--header-h) 0 0 0; display: flex; }
.tk-sidebar {
  width: 380px; flex: none; background: var(--panel); border-right: 1px solid var(--line);
  display: flex; flex-direction: column; overflow: hidden;
}
.tk-sidebar-head { display: flex; align-items: center; gap: 8px; padding: 14px 16px 10px; border-bottom: 1px solid var(--line); }
.tk-sidebar-head h2 { font-size: 15px; text-transform: uppercase; letter-spacing: .4px; color: var(--ink-soft); }
.tk-count { margin-left: auto; background: #fff1e6; color: var(--brand-ink); font-weight: 700; font-size: 12px; padding: 2px 9px; border-radius: 999px; }
.tk-list { overflow-y: auto; padding: 8px; flex: 1; }
.tk-list-empty { padding: 30px 22px; color: var(--muted); text-align: center; font-size: 14px; }

.tk-card { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px; margin-bottom: 8px; transition: .12s; }
.tk-card:hover { border-color: #cbd5e1; box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.tk-card-ico { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; font-size: 22px; flex: none; background: color-mix(in srgb, var(--pin) 18%, #fff); border: 2px solid var(--pin); box-shadow: 0 2px 6px -2px color-mix(in srgb, var(--pin) 60%, transparent); }
.tk-card-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.tk-card-title { font-weight: 700; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tk-card-meta { font-size: 12px; color: var(--ink-soft); display: flex; align-items: center; gap: 5px; }
.tk-card-confirms { font-size: 12px; font-weight: 700; color: var(--green); flex: none; }

.tk-map-wrap { position: relative; flex: 1; }
#tk-map { position: absolute; inset: 0; background: #e5e7eb; z-index: 1; }

.tk-map-controls { position: absolute; right: 14px; bottom: 88px; display: flex; flex-direction: column; gap: 10px; z-index: 500; }

/* Controles de zoom de Leaflet: apilados por encima del FAB y de los botones de ubicación */
.leaflet-bottom.leaflet-right { display: flex; flex-direction: column; align-items: flex-end; }
.leaflet-control-zoom { order: -1; margin: 0 14px 196px 0 !important; border: none !important; box-shadow: var(--shadow) !important; border-radius: 12px !important; overflow: hidden; }
.leaflet-control-zoom a { width: 40px !important; height: 40px !important; line-height: 40px !important; font-size: 20px !important; color: var(--ink) !important; border: none !important; }
.leaflet-control-zoom a:hover { color: var(--brand) !important; }
.leaflet-control-attribution { margin: 0 !important; }
.tk-round-btn { width: 46px; height: 46px; border-radius: 50%; border: none; background: #fff; color: var(--ink); box-shadow: var(--shadow); display: grid; place-items: center; }
.tk-round-btn:hover { color: var(--brand); }
.tk-round-btn.is-active { background: var(--brand); color: #fff; }

.tk-fab { position: absolute; right: 16px; bottom: 24px; z-index: 500; display: inline-flex; align-items: center; gap: 8px; border: none; background: linear-gradient(180deg, var(--cta), var(--cta-ink)); color: #fff; font-weight: 800; font-size: 15px; padding: 15px 22px; border-radius: 999px; box-shadow: 0 12px 24px -8px rgba(220,38,38,.7); }
.tk-fab:hover { filter: brightness(1.05); }
.tk-fab:active { transform: scale(.97); }

.tk-place-bar { position: absolute; left: 12px; right: 12px; bottom: 20px; z-index: 600; background: var(--panel); border-radius: 14px; box-shadow: var(--shadow); padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; text-align: center; font-size: 14px; color: var(--ink-soft); }
.tk-place-actions { display: flex; gap: 8px; }
.tk-place-actions .tk-btn { flex: 1; }
.tk-place-crosshair { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -100%); z-index: 550; pointer-events: none; filter: drop-shadow(0 6px 6px rgba(0,0,0,.3)); animation: tk-drop .3s ease; }
@keyframes tk-drop { from { transform: translate(-50%, -140%); opacity: 0; } to { transform: translate(-50%, -100%); opacity: 1; } }

/* ---------- Tabs móvil ---------- */
.tk-mobile-tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 800; display: none; background: var(--panel); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom, 0); }
.tk-tab { flex: 1; border: none; background: none; color: var(--muted); font-size: 12px; font-weight: 600; padding: 10px 0 8px; display: flex; flex-direction: column; align-items: center; gap: 3px; }
.tk-tab.is-active { color: var(--brand); }

/* ---------- Botones / inputs ---------- */
.tk-btn { border: 1px solid var(--line); background: #fff; color: var(--ink); font-weight: 700; font-size: 14.5px; padding: 12px 16px; border-radius: 12px; transition: .12s; }
.tk-btn--primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.tk-btn--primary:hover { background: var(--brand-ink); }
.tk-btn--primary:disabled { opacity: .6; cursor: default; }
.tk-btn--ghost { background: #f1f5f9; }
.tk-btn--block { width: 100%; margin-top: 6px; }

.tk-label { display: block; font-size: 13px; font-weight: 700; color: var(--ink-soft); margin: 14px 0 6px; }
.tk-muted { color: var(--muted); font-weight: 500; }
.tk-input { width: 100%; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; font-size: 15px; color: var(--ink); background: #fff; }
.tk-input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(249,115,22,.18); }
.tk-textarea { min-height: 84px; resize: vertical; }

.tk-cat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.tk-cat { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 12px 6px; border: 1px solid var(--line); border-radius: 12px; background: #fff; font-size: 11.5px; font-weight: 600; color: var(--ink-soft); text-align: center; }
.tk-cat-ico { font-size: 22px; }
.tk-cat.is-active { border-color: var(--brand); background: #fff7ed; color: var(--brand-ink); box-shadow: 0 0 0 1px var(--brand) inset; }
.tk-cat-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 6px; }
.tk-cat-chip { font-size: 12px; font-weight: 600; color: var(--ink-soft); background: color-mix(in srgb, var(--ink) 6%, #fff); border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; }
.tk-card-extra { font-size: 12.5px; font-weight: 400; opacity: .85; }

.tk-seg { display: flex; gap: 6px; }
.tk-seg-btn { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--line); background: #fff; color: var(--ink-soft); font-weight: 700; font-size: 13px; padding: 10px 8px; border-radius: 11px; }
.tk-seg-btn--red.is-active { background: color-mix(in srgb, var(--red) 14%, #fff); border-color: var(--red); color: #b91c1c; }
.tk-seg-btn--orange.is-active { background: color-mix(in srgb, var(--orange) 16%, #fff); border-color: var(--orange); color: #b45309; }
.tk-seg-btn--green.is-active { background: color-mix(in srgb, var(--green) 16%, #fff); border-color: var(--green); color: #15803d; }
.tk-seg--yn { max-width: 180px; }
.tk-yn.is-active { background: var(--brand); border-color: var(--brand); color: #fff; }

.tk-file { display: flex; align-items: center; justify-content: center; padding: 14px; border: 1.5px dashed var(--line); border-radius: 12px; color: var(--ink-soft); font-weight: 600; font-size: 14px; }
.tk-file:hover { border-color: var(--brand); color: var(--brand); }
.tk-photo-preview { position: relative; margin-top: 10px; }
.tk-photo-preview img { width: 100%; border-radius: 12px; display: block; max-height: 240px; object-fit: cover; }
.tk-photo-x { position: absolute; top: 8px; right: 8px; width: 30px; height: 30px; border-radius: 50%; border: none; background: rgba(15,23,42,.7); color: #fff; font-size: 18px; line-height: 1; }

.tk-color-row { display: flex; flex-wrap: wrap; gap: 8px; }
.tk-swatch { width: 34px; height: 34px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); }
.tk-swatch.is-active { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--brand); }
.tk-check { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--ink-soft); margin: 14px 0; }
.tk-check input { width: 18px; height: 18px; accent-color: var(--brand); }

/* ---------- Overlay / Modal ---------- */
.tk-overlay { position: fixed; inset: 0; background: rgba(15,23,42,.5); z-index: 1000; backdrop-filter: blur(2px); }
.tk-modal { position: fixed; inset: 0; z-index: 1001; display: flex; align-items: center; justify-content: center; padding: 16px; pointer-events: none; }
.tk-modal-card { pointer-events: auto; width: 100%; max-width: 460px; max-height: 92vh; overflow-y: auto; background: var(--panel); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; animation: tk-pop .18s ease; }
@keyframes tk-pop { from { transform: translateY(12px) scale(.98); opacity: 0; } to { transform: none; opacity: 1; } }
/* Cabecera del modal: pegada arriba para que el botón de cerrar nunca se oculte al hacer scroll */
.tk-modal-head { display: flex; align-items: center; position: sticky; top: -18px; z-index: 6; background: var(--panel); margin: -18px -18px 8px; padding: 14px 18px 8px; }
.tk-modal-head h3 { font-size: 18px; flex: 1; }
.tk-modal-head [data-close] { flex: none; }
.tk-loading { padding: 40px; text-align: center; color: var(--muted); }

/* ---------- Bienvenida ---------- */
.tk-welcome { text-align: center; padding: 8px 4px; }
.tk-welcome-logo { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; font-size: 26px; margin-bottom: 10px; }
.tk-welcome h3 { font-size: 20px; margin-bottom: 6px; }
.tk-welcome p { color: var(--ink-soft); font-size: 14.5px; margin: 0 0 16px; }
.tk-welcome .tk-input { text-align: center; font-size: 17px; }
.tk-welcome .tk-color-row { justify-content: center; margin: 16px 0; }

/* ---------- Detalle ---------- */
.tk-detail-img { margin: 0 -18px 14px; }
.tk-detail-img img { width: 100%; max-height: 260px; object-fit: cover; display: block; }
.tk-detail-top { display: flex; gap: 12px; align-items: flex-start; }
.tk-detail-cat { display: grid; place-items: center; width: 50px; height: 50px; border-radius: 14px; font-size: 26px; flex: none; background: color-mix(in srgb, var(--pin) 15%, #fff); border: 2px solid var(--pin); }
.tk-detail-titles h3 { font-size: 19px; line-height: 1.25; }
.tk-detail-sub { font-size: 12.5px; color: var(--muted); }
.tk-detail-desc { font-size: 15px; color: var(--ink); line-height: 1.5; margin: 12px 0; white-space: pre-wrap; }
.tk-detail-actions { display: flex; gap: 8px; margin: 10px 0 14px; }
.tk-mini { flex: 1; border: 1px solid var(--line); background: #fff; border-radius: 11px; padding: 10px; font-weight: 700; font-size: 13.5px; color: var(--ink-soft); }
.tk-mini:hover { border-color: var(--brand); color: var(--brand); }
/* Modal "Sobre Taki" */
.tk-about { padding: 4px 2px 8px; }
.tk-about-brand { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.tk-about-brand .tk-logo { color: var(--brand); display: grid; place-items: center; }
.tk-about-brand .tk-brand-name { font-weight: 800; font-size: 20px; letter-spacing: .6px; color: var(--ink); }
.tk-about-intro { color: var(--ink-soft); font-size: 14.5px; line-height: 1.5; margin: 0 0 6px; }
.tk-about-h { font-size: 13px; text-transform: uppercase; letter-spacing: .4px; color: var(--ink-soft); margin: 16px 0 8px; }
.tk-about-list { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 8px; }
.tk-about-list li { font-size: 14px; line-height: 1.45; color: var(--ink); }
.tk-about-p { color: var(--ink-soft); font-size: 14px; line-height: 1.45; margin: 0; }
.tk-about-credit { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 14px; color: var(--ink-soft); text-align: center; }
.tk-about-credit a { color: var(--brand-ink); font-weight: 700; text-decoration: none; }
.tk-about-credit a:hover { text-decoration: underline; }
.tk-about-wa { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; color: #fff !important; background: #25d366; padding: 8px 14px; border-radius: 999px; }
.tk-about-wa:hover { background: #1ebe5b; text-decoration: none !important; }
.tk-about-credit { display: flex; flex-direction: column; align-items: center; gap: 2px; }

.tk-mini--danger { color: var(--cta, #dc2626); border-color: color-mix(in srgb, var(--cta, #dc2626) 35%, var(--line)); }
.tk-mini--danger:hover { border-color: var(--cta, #dc2626); color: #fff; background: var(--cta, #dc2626); }
.tk-mini:disabled { opacity: .6; cursor: default; }

.tk-vote-box, .tk-status-change { background: #f8fafc; border: 1px solid var(--line); border-radius: 14px; padding: 12px; margin-bottom: 12px; }
.tk-vote-label { display: block; font-size: 12.5px; font-weight: 700; color: var(--ink-soft); margin-bottom: 8px; }
.tk-vote-btns { display: flex; gap: 8px; }
.tk-vote { flex: 1; border: 1px solid var(--line); background: #fff; border-radius: 11px; padding: 11px; font-weight: 700; font-size: 14px; }
.tk-vote b { margin-left: 4px; }
.tk-vote--yes:hover { border-color: var(--green); color: #15803d; }
.tk-vote--no:hover { border-color: var(--red); color: #b91c1c; }

.tk-comments { margin-top: 6px; }
.tk-comments h4 { font-size: 14px; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.tk-comments-list { display: flex; flex-direction: column; gap: 12px; max-height: 260px; overflow-y: auto; }
.tk-comment { display: flex; gap: 10px; }
.tk-comment-body { display: flex; flex-direction: column; gap: 2px; background: #f1f5f9; border-radius: 12px; padding: 8px 12px; flex: 1; }
.tk-comment-name { font-size: 12.5px; font-weight: 700; }
.tk-comment-text { font-size: 14px; color: var(--ink); word-break: break-word; }
.tk-nocomments { font-size: 13.5px; text-align: center; padding: 14px; }
.tk-comment-form { display: flex; gap: 8px; margin-top: 12px; }
.tk-comment-form .tk-input { flex: 1; }

/* ---------- Servicios / Perfil ---------- */
.tk-svc-row { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--line); }
.tk-svc-name { font-weight: 700; font-size: 15px; }
.tk-profile-head { display: flex; align-items: center; gap: 16px; margin-bottom: 8px; }
.tk-profile-name { font-size: 18px; font-weight: 800; }
.tk-profile-points { font-size: 13px; color: var(--ink-soft); }
.tk-profile-points b { color: var(--brand-ink); font-size: 16px; }

/* ---------- Marcadores del mapa ---------- */
.tk-pin-wrap { background: none; border: none; }
.tk-pin { position: relative; width: 38px; height: 48px; }
.tk-pin-body { position: absolute; top: 0; left: 0; width: 38px; height: 38px; border-radius: 50% 50% 50% 4px; transform: rotate(-45deg); background: var(--pin); box-shadow: 0 4px 8px -2px rgba(0,0,0,.4); border: 2px solid #fff; }
.tk-pin-emoji { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -60%); font-size: 18px; z-index: 2; }
.tk-pin-badge { position: absolute; top: -3px; right: -5px; min-width: 16px; height: 16px; padding: 0 3px; border-radius: 999px; background: var(--ink, #0f172a); color: #fff; font-size: 10px; font-weight: 700; line-height: 16px; text-align: center; z-index: 3; border: 1.5px solid #fff; box-sizing: border-box; }
.tk-cc-wrap, .tk-sc-wrap { background: none; }
.tk-cc { width: 40px; height: 40px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 800; border: 3px solid #fff; box-shadow: var(--shadow-sm); }
.tk-sc { border-radius: 50%; color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 15px; background: var(--sc); border: 3px solid #fff; box-shadow: 0 6px 14px -4px rgba(0,0,0,.5); }
.tk-me-wrap { background: none; }
.tk-me { width: 18px; height: 18px; border-radius: 50%; background: #2563eb; border: 3px solid #fff; box-shadow: 0 0 0 2px rgba(37,99,235,.4); position: relative; }
.tk-me::after { content: ""; position: absolute; inset: -8px; border-radius: 50%; background: rgba(37,99,235,.25); animation: tk-pulse 2s infinite; z-index: -1; }
@keyframes tk-pulse { 0% { transform: scale(.6); opacity: .8; } 100% { transform: scale(1.8); opacity: 0; } }
.tk-report-wrap { background: none; }
.tk-report { display: inline-flex; align-items: center; gap: 4px; background: #fff; border-radius: 999px; padding: 2px 8px 2px 2px; box-shadow: var(--shadow-sm); border: 1.5px solid var(--green); transform: translate(-50%, -50%); white-space: nowrap; }
.tk-report--alert { border-color: var(--red); }
.tk-report-dot { width: 22px; height: 22px; border-radius: 50%; color: #fff; display: grid; place-items: center; font-size: 10px; font-weight: 700; }
.tk-report-svc { font-size: 12px; }

/* ---------- Selector de capa (eventos / servicios) ---------- */
.tk-layers { position: absolute; left: 14px; bottom: 24px; z-index: 500; display: flex; gap: 4px; background: rgba(255,255,255,.92); backdrop-filter: blur(6px); padding: 5px; border-radius: 999px; box-shadow: var(--shadow-sm); max-width: calc(100% - 28px); overflow-x: auto; scrollbar-width: none; }
.tk-layers::-webkit-scrollbar { display: none; }
.tk-layer { border: none; background: transparent; color: var(--ink-soft); font-size: 13px; font-weight: 600; padding: 7px 12px; border-radius: 999px; cursor: pointer; white-space: nowrap; }
.tk-layer.is-active { background: var(--brand, #2563eb); color: #fff; }

.tk-legend { position: absolute; left: 14px; bottom: 74px; z-index: 500; display: flex; gap: 12px; background: rgba(255,255,255,.92); backdrop-filter: blur(6px); padding: 6px 12px; border-radius: 12px; box-shadow: var(--shadow-sm); font-size: 12px; color: var(--ink-soft); }
.tk-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 4px; vertical-align: middle; }

/* Clúster de servicios (mapa de calor por celda) */
.tk-sc-wrap { background: none; }
.tk-sc { border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 14px; background: var(--sc); box-shadow: 0 0 0 5px color-mix(in srgb, var(--sc) 28%, transparent); border: 2px solid #fff; transform: translate(-50%, -50%); }
.tk-report--svc { border-width: 2px; }

/* Fila de ubicación en el modal de servicios */
.tk-svc-loc { display: flex; align-items: center; justify-content: space-between; gap: 8px; background: color-mix(in srgb, var(--ink) 5%, #fff); border-radius: 12px; padding: 10px 12px; margin-bottom: 8px; font-size: 13px; flex-wrap: wrap; }
.tk-svc-loc-txt { color: var(--ink-soft); }
.tk-btn--sm { padding: 6px 12px; font-size: 13px; width: auto; }
.tk-card--person .tk-card-ico { background: var(--pin); color: #fff; border-color: var(--pin); font-size: 15px; font-weight: 700; }

body.tk-service-mode .tk-filters { display: none; }

/* ---------- Coach-tooltip (invitación a reportar servicios) ---------- */
.tk-coach { position: fixed; z-index: 1100; transform: translateX(-50%); animation: tk-coach-in .25s ease; }
@keyframes tk-coach-in { from { opacity: 0; } to { opacity: 1; } }
.tk-coach-bubble { position: relative; background: var(--ink, #0f172a); color: #fff; max-width: 260px; padding: 14px 16px; border-radius: 14px; box-shadow: var(--shadow); text-align: center; cursor: pointer; }
.tk-coach-bubble p { margin: 0 0 10px; font-size: 14px; font-weight: 600; line-height: 1.35; }
.tk-coach-bubble .tk-btn--sm { width: 100%; }
.tk-coach-arrow { position: absolute; top: -6px; left: 50%; transform: translateX(-50%) rotate(45deg); width: 14px; height: 14px; background: var(--ink, #0f172a); border-radius: 3px; }

.tk-icon-btn.tk-pulse { position: relative; }
.tk-icon-btn.tk-pulse::after { content: ''; position: absolute; inset: -3px; border-radius: 14px; border: 2px solid var(--brand, #2563eb); animation: tk-pulse-ring 1.4s ease-out infinite; pointer-events: none; }
@keyframes tk-pulse-ring { 0% { transform: scale(.85); opacity: .9; } 100% { transform: scale(1.7); opacity: 0; } }

/* ---------- Toast ---------- */
.tk-toast { position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%) translateY(20px); z-index: 1200; background: var(--ink); color: #fff; font-size: 14px; font-weight: 600; padding: 12px 18px; border-radius: 999px; box-shadow: var(--shadow); opacity: 0; transition: .25s; max-width: 90vw; text-align: center; }
.tk-toast.is-show { opacity: 1; transform: translateX(-50%) translateY(0); }
.tk-toast--ok { background: #16a34a; } .tk-toast--error { background: #dc2626; }

/* ---------- Responsivo ---------- */
@media (max-width: 899px) {
  .tk-filters { position: absolute; top: calc(var(--header-h) + 8px); left: 8px; right: 8px; }
  .tk-mobile-tabs { display: flex; }
  .tk-main { bottom: 56px; }
  .tk-sidebar { position: absolute; inset: 0; width: 100%; border-right: none; z-index: 10; }
  /* En móvil el FAB es un botón "+" compacto para no chocar con las capas */
  .tk-fab { bottom: 20px; padding: 0; width: 56px; height: 56px; justify-content: center; }
  .tk-fab-label { display: none; }
  /* La píldora de capas no debe quedar bajo el botón "+" */
  .tk-layers { max-width: calc(100% - 84px); }
  /* En pantallas muy estrechas, compacta el usuario para dar aire a la marca */
  .tk-user-meta { display: none; }
  .tk-user { padding: 4px; }

  body.tk-view-map .tk-sidebar { display: none; }
  body.tk-view-list .tk-map-wrap { visibility: hidden; }
  body.tk-view-list .tk-filters { display: none; }
  body.tk-placing .tk-header, body.tk-placing .tk-mobile-tabs { pointer-events: none; opacity: .5; }

  .tk-modal { align-items: flex-end; padding: 0 16px calc(16px + env(safe-area-inset-bottom, 0px)); }
  .tk-modal-card.is-sheet { max-width: 100%; max-height: 84vh; border-radius: 22px; animation: tk-sheet .22s ease; }
  @keyframes tk-sheet { from { transform: translateY(100%); } to { transform: none; } }
}

@media (min-width: 900px) {
  .tk-mobile-tabs { display: none; }
  .tk-user-name { max-width: 140px; }
}

/* En móvil los filtros flotan como pastilla translúcida sobre el mapa */
@media (max-width: 899px) {
  .tk-filters { background: rgba(255,255,255,.92); backdrop-filter: blur(6px); padding: 6px; border-radius: 999px; box-shadow: var(--shadow-sm); }
}
