/* ============================================================
 * TrueTool HTML-map tools — shared UI styles (map-export.js).
 * Load after style.css (depends on its CSS variables).
 * ============================================================ */
.tt-map {
  height: 420px; position: relative;
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  margin: 1rem 0;
  background: #E2E0D8;
}
.tt-map-empty {
  position: absolute; inset: 0; margin: 0;
  display: flex; align-items: center; justify-content: center;
  color: var(--c-text-secondary);
}
.tt-actions {
  display: flex; flex-wrap: wrap; gap: 0.75rem;
  justify-content: center; margin: 1rem 0 0.5rem;
}
.tt-hint { font-size: 0.82rem; color: var(--c-text-secondary); }
.tt-det { font-size: 0.85rem; color: var(--c-text-secondary); }
.tt-sheetwrap { margin: 0.75rem 0; }
.tt-foothint { font-size: 0.8rem; color: var(--c-text-secondary); margin: -0.35rem 0 0.5rem; }
.tt-legend {
  position: absolute; left: 10px; bottom: 44px; z-index: 1000;
  background: rgba(255,255,255,.95); border: 1px solid var(--c-border);
  border-radius: 8px; padding: 8px 10px;
  box-shadow: var(--shadow-md); max-width: 230px;
}
.tt-lg-title { font-size: 11px; font-weight: 700; color: var(--c-text); margin-bottom: 4px; }
.tt-lg-item {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--c-text);
  padding: 2px 0; cursor: pointer; user-select: none;
}
.tt-lg-item:hover { color: var(--c-primary); }
.tt-lg-item.off { opacity: 0.35; }
.tt-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: none; }
.tt-lg-count { margin-left: auto; color: var(--c-text-secondary); font-size: 11px; }
.tt-brand-onmap {
  position: absolute; right: 10px; bottom: 8px;
  z-index: 1000; background: rgba(255,255,255,.88);
  border: 1px solid var(--c-border); border-radius: 999px;
  padding: 3px 10px; font-size: 11px; color: var(--c-text-secondary);
  box-shadow: var(--shadow); white-space: nowrap;
}
.tt-brand-onmap a { color: var(--c-primary); text-decoration: none; font-weight: 600; }
.tt-fs-btn {
  position: absolute; top: 10px; right: 10px; z-index: 1001;
  width: 34px; height: 34px; border: none; background: #fff;
  border: 1px solid var(--c-border); border-radius: 8px;
  box-shadow: var(--shadow-md); font-size: 16px; line-height: 1;
  cursor: pointer; color: var(--c-text);
}
.tt-fs-btn:hover { background: #F1EFE9; }
.tt-map-shell { position: relative; }
.tt-map-shell.tt-fs {
  position: fixed; inset: 0; z-index: 9990;
  background: var(--c-bg); padding: 0;
}
.tt-map-shell.tt-fs .tt-map {
  height: 100%; border-radius: 0; margin: 0;
  border: none;
}
.tt-pop { font-size: 12px; }
.tt-pop-title { font-weight: 700; color: var(--c-text); margin-bottom: 4px; }
.tt-pop-tbl { border-collapse: collapse; }
.tt-pop-tbl td { padding: 2px 4px; vertical-align: top; }
.tt-pop-k { color: var(--c-text-secondary); font-weight: 600; padding-right: 8px; white-space: nowrap; }

.tt-paste-label {
  display: block; margin: 0.9rem 0 0.4rem;
  font-size: 0.85rem; color: var(--c-text-secondary);
}
.tt-paste-box {
  width: 100%; min-height: 180px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.8rem; padding: 0.75rem;
  border: 1px solid var(--c-border); border-radius: var(--radius);
  resize: vertical; background: #fff;
}
.tt-paste-actions { margin-top: 0.75rem; }
.tt-pre-details { margin: 0.5rem 0; }
.tt-pre-details summary { cursor: pointer; font-weight: 500; font-size: 0.9rem; }
.tt-pre-details .table-wrap { margin: 0.6rem 0 0.25rem; }
.tt-preview-wrap { max-height: 200px; }
.tt-pre-details[open] summary { margin-bottom: 0; }
.tt-col-tag {
  display: inline-block; margin-left: 0.4rem;
  font-size: 0.68rem; font-weight: 700; color: #fff;
  padding: 1px 6px; border-radius: 999px; line-height: 1.4;
  vertical-align: middle; white-space: nowrap;
}

@media (max-width: 640px) {
  .tt-map { height: 360px; }
  .tt-brand-onmap { font-size: 10px; padding: 2px 8px; }
}
