.tm-shell {
    position: relative;
    border: 1px solid var(--bs-border-color, #dee0e2);
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}
.tm-canvas {
    height: var(--tm-h, 480px);
    width: 100%;
    z-index: 0;
}
.tm-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px;
    background: #f8f8f8;
    border-bottom: 1px solid var(--bs-border-color, #dee0e2);
}
.tm-search {
    position: relative;
    flex: 1 1 220px;
    min-width: 180px;
}
.tm-search__results {
    position: absolute;
    z-index: 500;
    left: 0;
    right: 0;
    margin: 0;
    padding: 0;
    list-style: none;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    max-height: 220px;
    overflow: auto;
}
.tm-search__results button {
    display: block;
    width: 100%;
    text-align: left;
    background: none;
    border: 0;
    padding: 8px 10px;
}
.tm-search__results button:hover {
    background: #f3f2f1;
}
.tm-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    flex: 2 1 320px;
}
.tm-filters .form-control {
    width: auto;
    min-width: 120px;
    flex: 1 1 120px;
}
.tm-contribute-hint {
    margin: 0;
    padding: 8px 12px;
    font-size: .9rem;
    color: #334155;
    background: #f8fafc;
    border-bottom: 1px solid var(--bs-border-color, #dee0e2);
}
.tm-drawer {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(400px, 100%);
    max-height: none;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: #fff;
    border-left: 1px solid #e5e7eb;
    z-index: 400;
    box-shadow: -8px 0 24px rgba(15, 23, 42, .12);
}
.tm-drawer[hidden] {
    display: none;
}
.tm-drawer__head {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 14px 14px 0;
    flex-shrink: 0;
}
.tm-drawer__title {
    margin: 0;
    flex: 1;
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.3;
    color: #0f172a;
}
.tm-drawer__close {
    flex-shrink: 0;
    border: 0;
    background: none;
    font-size: 22px;
    line-height: 1;
    padding: 0 2px;
    color: #64748b;
    cursor: pointer;
}
.tm-drawer__close:hover {
    color: #0f172a;
}
.tm-drawer__body {
    flex: 1;
    overflow: auto;
    padding: 8px 16px 16px;
}
.tm-form__intro {
    margin: 0 0 14px;
    color: #64748b;
    font-size: .92rem;
    line-height: 1.45;
}
.tm-field {
    margin: 0 0 14px;
}
.tm-field__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 6px;
}
.tm-field__label {
    font-weight: 650;
    color: #0f172a;
}
.tm-field__req {
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .03em;
    text-transform: uppercase;
    color: #ae1f6e;
}
.tm-field__error {
    margin: 6px 0 0;
    font-size: .85rem;
    color: #b42318;
}
.tm-field.is-invalid .form-control {
    border-color: #b42318;
}
.tm-field__empty {
    margin: 0;
    color: #64748b;
    font-size: .9rem;
}
.tm-choices {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.tm-choice {
    position: relative;
    margin: 0;
    cursor: pointer;
    font-weight: 600;
}
.tm-choice input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
}
.tm-choice span {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 6px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    background: #fff;
    color: #0f172a;
    line-height: 1.2;
}
.tm-choice:hover span {
    border-color: #94a3b8;
}
.tm-choice input:checked + span {
    background: var(--bs-primary, #ae1f6e);
    border-color: var(--bs-primary, #ae1f6e);
    color: #fff;
}
.tm-choice input:focus-visible + span {
    outline: 2px solid var(--bs-primary, #ae1f6e);
    outline-offset: 2px;
}
.tm-form__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid #f1f5f9;
}
.tm-privacy {
    margin: 0;
    padding: 6px 10px;
    font-size: 12px;
    color: #505a5f;
    background: #f3f2f1;
}
.tm-detail__meta {
    color: #64748b;
    margin: 0 0 10px;
}
.tm-detail__engage {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #f1f5f9;
}
.tm-map-row {
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}
.tm-map-row__actions {
    font-size: 13px;
    margin-top: 4px;
}
.leaflet-container {
    font-family: inherit;
}
.leaflet-marker-icon.tm-pin {
    background: none !important;
    border: 0 !important;
}
.tm-pin svg {
    display: block;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .35));
}
.fullscreen-icon {
    background-image: none !important;
    color: #333;
    font: normal normal normal 16px/26px FontAwesome;
    text-align: center;
    text-indent: 0 !important;
}
.fullscreen-icon:before {
    content: "\f065";
}
.fullscreen-icon.leaflet-fullscreen-on:before {
    content: "\f066";
}
.tm-tile-error {
    margin: 0;
    padding: 10px 12px;
    background: #f4c6c6;
    color: #2a2a2a;
    font-size: 14px;
    line-height: 1.4;
}
.tm-tile-error a {
    font-weight: 600;
}
.tm-place-search {
    position: relative;
    margin-bottom: 12px;
}
.tm-place-search .tm-search__results {
    z-index: 1200;
}
.tm-place-search__empty {
    padding: 8px 10px;
    color: #505a5f;
}
.tm-preview {
    margin: 0 0 16px;
}
.tm-preview__frame {
    position: relative;
    border: 1px solid var(--bs-border-color, #dee0e2);
    border-radius: 8px;
    overflow: hidden;
}
.tm-preview__map {
    height: 320px;
    min-height: 320px;
    width: 100%;
    z-index: 0;
    background: #e8e8e8;
}
.tm-preview__crosshair {
    pointer-events: none;
    position: absolute;
    left: 50%;
    top: 50%;
    width: 18px;
    height: 18px;
    margin: -9px 0 0 -9px;
    border: 2px solid #1d70b8;
    border-radius: 50%;
    box-shadow: 0 0 0 2px #fff;
    z-index: 500;
}
.tm-preview__crosshair:after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 2px;
    height: 2px;
    margin: -1px 0 0 -1px;
    background: #1d70b8;
    border-radius: 50%;
}
.tm-edit__lead {
    margin: 0 0 20px;
    color: #505a5f;
}
.tm-edit__section {
    margin: 0 0 28px;
    padding-bottom: 8px;
    border-bottom: 1px solid #eee;
}
.tm-edit__section:last-of-type {
    border-bottom: 0;
}
.tm-edit__section h4 {
    margin: 0 0 6px;
}
.tm-edit__section .help-block {
    margin-bottom: 10px;
}
.tm-edit__after-checks {
    margin-top: 8px;
}
.tm-edit__list {
    padding-left: 18px;
    margin-bottom: 12px;
}
.tm-edit__list li {
    margin-bottom: 4px;
}
.tm-edit__mini {
    display: block;
    font-size: 12px;
    font-weight: 600;
    margin: 8px 0 4px;
    color: #505a5f;
}
.tm-edit__question,
.tm-edit__layer {
    margin-bottom: 12px;
}
.tm-edit__question {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 10px 14px 8px;
}
.tm-edit__question-options {
    margin-top: 8px;
    padding-top: 4px;
}
.tm-edit__choice-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 8px;
}
.tm-edit__choice {
    display: flex;
    align-items: center;
    gap: 8px;
}
.tm-edit__choice .form-control {
    flex: 1;
}
.tm-edit__choice-remove {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    color: #64748b;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}
.tm-edit__choice-remove:hover {
    color: #b42318;
    border-color: #fecaca;
    background: #fef2f2;
}
.tm-edit__enabled {
    margin-top: 28px;
}
.tm-edit__actions {
    margin-top: 8px;
}
@media (max-width: 767px) {
    .tm-canvas {
        height: 60vh;
        min-height: 280px;
    }
    .tm-drawer {
        top: auto;
        bottom: 0;
        width: 100%;
        max-height: 72%;
        border-left: 0;
        border-top: 1px solid #dee0e2;
    }
}

/* —— Maps list (matches Thiscovery Forms / Page Builder) —— */
.tm-list-page { margin-bottom: 2rem; }
.tm-list-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.25rem;
}
.tm-list-title {
    margin: 0;
    font-size: 1.6rem;
    font-weight: 700;
    color: #0f172a;
}
.tm-list-sub { margin: .3rem 0 0; color: #64748b; }
.tm-list-header__actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.tm-list-empty {
    text-align: center;
    padding: 3rem 1.5rem;
    background: #fff;
    border: 1px dashed #cbd5e1;
    border-radius: 14px;
    color: #64748b;
}
.tm-list-empty i { font-size: 2.25rem; margin-bottom: .75rem; opacity: .55; }
.tm-list-empty h3 { color: #0f172a; margin-bottom: .5rem; }
.tm-list-filters {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    align-items: center;
    margin: 0 0 1rem;
    padding: .75rem;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
}
.tm-list-filters__search {
    position: relative;
    flex: 1 1 220px;
    min-width: 180px;
}
.tm-list-filters__search i {
    position: absolute;
    left: .75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
}
.tm-list-filters__search input {
    width: 100%;
    padding: .4rem .75rem .4rem 2rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
}
.tm-list-filters select {
    min-width: 140px;
    max-width: 260px;
    padding: .4rem .6rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
}
.tm-map-table-wrap {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: auto;
    box-shadow: 0 4px 14px rgba(15, 23, 42, .04);
}
.tm-map-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
    min-width: 720px;
}
.tm-map-table thead th {
    background: #f8fafc;
    color: #64748b;
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    padding: .75rem 1rem;
    border-bottom: 1px solid #e5e7eb;
    white-space: nowrap;
    vertical-align: middle;
}
.tm-map-table tbody td {
    padding: .85rem 1rem;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}
.tm-map-table tbody tr:last-child td { border-bottom: 0; }
.tm-map-table tbody tr:hover td { background: #f8fafc; }
.tm-map-table__actions-col,
.tm-map-table__status-col,
.tm-map-table__num-col,
.tm-map-table__date-col { width: 1%; white-space: nowrap; }
.tm-map-table__num-col { text-align: center; }
.tm-map-table__map-col { min-width: 240px; }
.tm-map-table__date-col { color: #64748b; font-size: .85rem; }
.tm-map-row__actions {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    flex-wrap: nowrap;
}
.tm-map-row__delete { display: inline; margin: 0; }
.tm-map-row__title {
    font-size: 1rem;
    font-weight: 650;
    line-height: 1.3;
}
.tm-map-row__title a { color: #0f172a; text-decoration: none; }
.tm-map-row__title a:hover { color: #2563eb; }
.tm-map-row__desc {
    margin-top: .2rem;
    color: #64748b;
    font-size: .85rem;
    line-height: 1.4;
}
.tm-map-row__stat {
    display: inline-block;
    min-width: 1.75rem;
    font-weight: 650;
    color: #0f172a;
    font-variant-numeric: tabular-nums;
}
.tm-list-pager {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1.25rem;
}
.tm-list-pager__count { color: #64748b; font-size: .9rem; }
.tm-view-heading {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.tm-view-heading__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-left: auto;
}
@media (max-width: 767px) {
    .tm-list-header { flex-direction: column; }
    .tm-map-table { min-width: 880px; }
}

/* —— In-product Help —— */
.tm-help-page { margin-bottom: 2rem; }
.tm-help-header {
    display: flex; justify-content: space-between; align-items: flex-start;
    gap: 1rem; margin-bottom: 1.25rem;
}
.tm-help-kicker { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: #94a3b8; }
.tm-help-title { margin: .15rem 0 0; font-size: 1.6rem; font-weight: 700; color: #0f172a; }
.tm-help-sub { margin: .3rem 0 0; color: #64748b; }
.tm-help-header__actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.tm-help-section { margin: 0 0 2rem; }
.tm-help-section__title { margin: 0 0 .35rem; font-size: 1.15rem; font-weight: 700; color: #0f172a; }
.tm-help-section__intro { margin: 0 0 1rem; color: #64748b; }
.tm-help-cards {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .85rem;
}
.tm-help-card {
    display: flex; gap: .85rem; align-items: flex-start;
    padding: 1rem 1.1rem; background: #fff; border: 1px solid #e5e7eb;
    border-radius: 12px; text-decoration: none; color: inherit; min-height: 100%;
}
.tm-help-card:hover {
    border-color: #93c5fd; box-shadow: 0 6px 18px rgba(37, 99, 235, .08); text-decoration: none;
}
.tm-help-card__icon {
    width: 2.1rem; height: 2.1rem; border-radius: 8px; background: #eff6ff; color: #2563eb;
    display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.tm-help-card__title { display: block; font-weight: 700; color: #0f172a; margin-bottom: .25rem; }
.tm-help-card__summary { display: block; font-size: .88rem; color: #64748b; line-height: 1.4; }
.tm-help-layout {
    display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 1.5rem; align-items: start;
}
.tm-help-nav {
    position: sticky; top: 1rem; background: #fff; border: 1px solid #e5e7eb;
    border-radius: 12px; padding: .75rem .6rem 1rem;
}
.tm-help-nav__group {
    font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
    color: #94a3b8; padding: .65rem .65rem .25rem;
}
.tm-help-nav__link {
    display: block; padding: .45rem .65rem; border-radius: 8px;
    color: #334155; text-decoration: none; font-size: .9rem;
}
.tm-help-nav__link:hover { background: #f1f5f9; text-decoration: none; }
.tm-help-nav__link.is-active { background: #eff6ff; color: #2563eb; font-weight: 600; }
.tm-help-body a {
    color: #2563eb;
    text-decoration: underline;
    text-underline-offset: .12em;
}
.tm-help-body a:hover { color: #1d4ed8; }
.tm-help-body h2 { margin: 1.6rem 0 .6rem; font-size: 1.2rem; }
.tm-help-body h3 { margin: 1.25rem 0 .45rem; font-size: 1.05rem; }
.tm-help-body p, .tm-help-body ul, .tm-help-body ol { margin: 0 0 .85rem; }
.tm-help-body table { width: 100%; border-collapse: collapse; margin: 0 0 1rem; font-size: .92rem; }
.tm-help-body th, .tm-help-body td {
    border: 1px solid #e5e7eb; padding: .45rem .65rem; text-align: left; vertical-align: top;
}
.tm-help-body th { background: #f8fafc; }
.tm-help-body code { background: #f1f5f9; padding: .1rem .3rem; border-radius: 4px; font-size: .88em; }
@media (max-width: 991px) {
    .tm-help-layout { grid-template-columns: 1fr; }
    .tm-help-nav { position: static; }
}
