:root {
    --lilac: #c4b5fd;
    --lilac-deep: #8b5cf6;
    --mint: #6ee7b7;
    --mint-deep: #10b981;
    --peach: #fda4af;
    --peach-deep: #f43f5e;
    --cream: #fff7ed;
    --sky: #bae6fd;
    --ink: #1e1b4b;
    --ink-soft: #64748b;
    --card: rgba(255, 255, 255, 0.92);
    --shadow: 0 8px 32px rgba(139, 92, 246, 0.12);
    --shadow-hover: 0 12px 36px rgba(139, 92, 246, 0.18);
    --radius: 22px;
    font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    min-height: 100vh;
    color: var(--ink);
    background: linear-gradient(165deg, #fff0f3 0%, #ede9fe 35%, #e0f2fe 70%, #ecfdf5 100%);
    position: relative;
    overflow-x: hidden;
}

.bg-blobs {
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 12% 20%, rgba(253, 164, 175, 0.35) 0%, transparent 42%),
        radial-gradient(circle at 88% 15%, rgba(196, 181, 253, 0.4) 0%, transparent 40%),
        radial-gradient(circle at 70% 80%, rgba(110, 231, 183, 0.25) 0%, transparent 45%);
    z-index: 0;
}

.app-wrap {
    position: relative;
    z-index: 1;
    max-width: 1180px;
    margin: 0 auto;
    padding: 28px 18px 48px;
}

.tabs--cute {
    padding: 5px;
    background: rgba(255, 255, 255, 0.62);
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.95);
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
}

.tabs--cute .tab {
    background: transparent;
}

.tabs--cute .tab.active {
    background: linear-gradient(135deg, var(--lilac-deep), var(--peach-deep));
    color: #fff;
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.35);
}

.hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 14px;
    margin-bottom: 22px;
    padding: 4px 12px 2px;
}

.hero-mascot {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: linear-gradient(145deg, #fef3c7, #fde68a);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    box-shadow: 0 6px 20px rgba(251, 191, 36, 0.35);
    flex-shrink: 0;
}

.hero-text h1 {
    font-family: "Fredoka", "Noto Sans SC", sans-serif;
    font-size: clamp(1.55rem, 4vw, 2rem);
    font-weight: 600;
    color: var(--ink);
    letter-spacing: 0.02em;
    line-height: 1.2;
}

.hero-tagline {
    margin-top: 6px;
    color: var(--ink-soft);
    font-size: 0.92rem;
}

.hero-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
    justify-content: center;
}

.hero-text {
    max-width: 38rem;
    width: 100%;
}

.pill {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 5px 11px;
    border-radius: 999px;
    color: #fff;
}
.pill-mint { background: linear-gradient(90deg, var(--mint-deep), #34d399); }
.pill-lilac { background: linear-gradient(90deg, var(--lilac-deep), #a78bfa); }
.pill-peach { background: linear-gradient(90deg, var(--peach-deep), #fb7185); }

.status-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: var(--card);
    border-radius: 14px;
    box-shadow: var(--shadow);
    font-size: 0.82rem;
    color: var(--ink-soft);
    margin-bottom: 16px;
    backdrop-filter: blur(8px);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--mint-deep);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.25);
}

.status-warn {
    display: block;
    margin-top: 8px;
    color: #b45309;
    font-weight: 600;
    line-height: 1.45;
}

.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.tab {
    font-family: inherit;
    border: none;
    cursor: pointer;
    padding: 11px 18px;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.55);
    color: var(--ink-soft);
    transition: transform 0.15s, box-shadow 0.15s, background 0.2s;
}

.tab:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.85);
}

.tab.active {
    background: linear-gradient(135deg, var(--lilac-deep), var(--peach-deep));
    color: #fff;
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.35);
}

.panel {
    display: none;
}
.panel.active {
    display: block;
    animation: fadeIn 0.35s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

.card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 22px 22px 26px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.65);
    margin-bottom: 18px;
}

.card-glow {
    box-shadow: var(--shadow), 0 0 0 1px rgba(196, 181, 253, 0.2);
}

.card-title {
    font-family: "Fredoka", "Noto Sans SC", sans-serif;
    font-size: 1.2rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.card-title.tight { margin-bottom: 6px; }

.spark { color: var(--peach-deep); }

.card-desc {
    font-size: 0.88rem;
    color: var(--ink-soft);
    line-height: 1.65;
    margin-bottom: 16px;
}

.input-shell {
    border-radius: 18px;
    padding: 3px;
    background: linear-gradient(135deg, var(--lilac), var(--peach), var(--mint));
}

.input-shell textarea {
    width: 100%;
    border: none;
    border-radius: 16px;
    padding: 16px;
    font-family: inherit;
    font-size: 0.95rem;
    resize: vertical;
    min-height: 120px;
    background: #fff;
    color: var(--ink);
}
.input-shell textarea:focus {
    outline: 2px solid var(--lilac-deep);
    outline-offset: 0;
}

.btn-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 16px;
}

.source-toolbar {
    margin-top: 8px;
    margin-bottom: 4px;
}
.source-toolbar-label {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--ink-soft);
    margin-bottom: 6px;
}
.source-toolbar-radios {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 8px;
    align-items: center;
}
.source-toolbar label.source-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.72rem;
    font-weight: 500;
    padding: 4px 10px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid #e2e8f0;
    cursor: pointer;
}
.source-toolbar label.source-chip input[type='radio'] {
    margin: 0;
    accent-color: var(--lilac-deep);
}
.source-toolbar label.source-chip:has(input:checked) {
    border-color: var(--lilac-deep);
    background: rgba(139, 92, 246, 0.12);
}

.btn {
    font-family: inherit;
    border: none;
    cursor: pointer;
    padding: 12px 22px;
    border-radius: 999px;
    font-size: 0.92rem;
    font-weight: 600;
    transition: transform 0.15s, box-shadow 0.15s;
}

.btn:active { transform: scale(0.98); }

.btn-soft {
    background: #fff;
    color: var(--lilac-deep);
    border: 2px solid var(--lilac);
}

.btn-primary {
    background: linear-gradient(135deg, var(--lilac-deep), var(--peach-deep));
    color: #fff;
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.35);
}

.btn-primary:hover { transform: translateY(-2px); }

.btn-ghost {
    background: rgba(255, 255, 255, 0.7);
    color: var(--ink-soft);
    border: 1px solid rgba(100, 116, 139, 0.2);
}

.btn-sm { padding: 8px 14px; font-size: 0.82rem; }

.preview-chips {
    margin-top: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: flex-start;
    padding: 10px 12px;
    background: linear-gradient(90deg, rgba(224, 231, 255, 0.5), rgba(254, 243, 199, 0.35));
    border-radius: 14px;
    font-size: 0.85rem;
}

.chip-addr { flex: 1; min-width: 200px; line-height: 1.45; }
.chip-addr--full {
    white-space: normal;
    word-break: break-word;
    overflow-wrap: anywhere;
    max-width: 100%;
}
.chip-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tag {
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}
.tag-p { background: #ddd6fe; color: #5b21b6; }
.tag-c { background: #a7f3d0; color: #065f46; }
.tag-d { background: #fce7f3; color: #9d174d; }

/* 查区：非阻塞任务状态（解析 / 后台查询） */
.query-job-status {
    margin-top: 12px;
    padding: 10px 14px;
    border-radius: 14px;
    font-size: 0.84rem;
    transition: background 0.2s, border-color 0.2s;
}
.query-job-status--idle {
    display: none;
}
.query-job-status--active {
    display: block;
    background: linear-gradient(135deg, rgba(224, 231, 255, 0.65), rgba(254, 243, 199, 0.45));
    border: 1px solid rgba(139, 92, 246, 0.22);
    box-shadow: 0 4px 14px rgba(139, 92, 246, 0.08);
}
.query-job-status--error {
    display: block;
    background: #fef2f2;
    border: 1px solid rgba(248, 113, 113, 0.45);
    color: #991b1b;
}
.query-job-status__row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.query-job-status__icon {
    color: var(--lilac-deep);
    font-size: 0.95rem;
    line-height: 1;
}
.query-job-status--error .query-job-status__icon {
    color: #dc2626;
}
.query-job-status__text {
    flex: 1;
    min-width: 120px;
    font-weight: 600;
    color: var(--ink);
}
.query-job-status--error .query-job-status__text {
    color: #991b1b;
}
.query-job-status__pct {
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    color: var(--lilac-deep);
    font-size: 0.8rem;
}
.query-job-status__track {
    margin-top: 8px;
    height: 8px;
    background: rgba(255, 255, 255, 0.75);
    border-radius: 999px;
    overflow: hidden;
}
.query-job-status__fill {
    height: 100%;
    width: 0%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--mint), var(--lilac-deep));
    transition: width 0.25s ease;
}

.result-origin-label {
    font-weight: 700;
    color: var(--lilac-deep);
    margin-right: 4px;
}

.result-origin-map {
    font-size: 0.78rem;
    margin-top: 6px;
    line-height: 1.45;
    color: var(--ink-soft);
}

.query-brand-counts {
    font-size: 0.78rem;
    margin: 6px 0 10px;
    line-height: 1.5;
}

.chaqu-legend {
    font-size: 0.76rem;
    margin: 6px 0 8px;
    line-height: 1.45;
}

.data-table tbody tr.chaqu-row--ok {
    background: rgba(255, 255, 255, 0.55);
}
.data-table tbody tr.chaqu-row--approx-walk {
    background: rgba(253, 230, 138, 0.42);
}
.data-table tbody tr.chaqu-row--straight-only {
    background: rgba(254, 215, 170, 0.48);
}
.data-table tbody tr.chaqu-row--approx-straight {
    background: rgba(251, 146, 60, 0.26);
}
.data-table tbody tr.chaqu-row--no-coord {
    background: rgba(203, 213, 225, 0.42);
    color: var(--ink-soft);
}
.data-table tbody tr.chaqu-row--no-store-addr {
    background: rgba(226, 232, 240, 0.55);
    color: var(--ink-soft);
}
/* 天吉人康：开店不晚于 2024-08-11（主结果表） */
.data-table tbody tr.chaqu-row--tjrk-legacy td {
    color: #b91c1c !important;
    font-weight: 600;
}

/* 门店地址解析区县与高德落点区县不一致（仅提示，不改正坐标） */
.data-table tbody tr.chaqu-row--district-mismatch {
    box-shadow: inset 5px 0 0 #f43f5e;
    background-color: rgba(255, 228, 235, 0.62) !important;
}

.chaqu-legend-strong {
    color: #e11d48;
    font-weight: 700;
}

.map-card .query-job-status--active {
    margin-top: 14px;
}

.result-section.hidden { display: none; }

.result-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 8px;
}

.toolbar-btns { display: flex; flex-wrap: wrap; gap: 8px; }

.rule-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}

.rule-toggle {
    border: 1px solid rgba(139, 92, 246, 0.25);
    background: rgba(255, 255, 255, 0.85);
    color: var(--lilac-deep);
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 0.74rem;
    line-height: 1.2;
    cursor: pointer;
}

.rule-toggle:hover {
    background: #f5f3ff;
}

.result-distance-filter {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 16px;
    margin: 12px 0 14px;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.75);
    border-radius: 14px;
    border: 1px solid rgba(226, 232, 240, 0.9);
}
.distance-filter-label {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--ink);
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}
.distance-filter-input {
    width: 5.5rem;
    padding: 6px 10px;
    border-radius: 10px;
    border: 1px solid #cbd5e1;
    font-size: 0.88rem;
}
.distance-filter-note {
    font-size: 0.78rem;
}

.mode-hint {
    font-size: 0.82rem;
    color: var(--lilac-deep);
    background: rgba(196, 181, 253, 0.2);
    padding: 10px 14px;
    border-radius: 12px;
    margin-bottom: 14px;
    line-height: 1.5;
}

.result-block {
    margin-bottom: 20px;
    padding: 16px;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(248, 250, 252, 0.9));
    border: 1px solid rgba(226, 232, 240, 0.8);
}

.result-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.result-head-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.result-origin {
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.45;
}

.badge-mode {
    font-size: 0.72rem;
    padding: 5px 10px;
    border-radius: 999px;
    font-weight: 700;
    white-space: nowrap;
}
.badge-lnglat { background: #ddd6fe; color: #4c1d95; }
.badge-city { background: #a7f3d0; color: #064e3b; }

.err-box {
    background: #fef2f2;
    color: #b91c1c;
    padding: 12px;
    border-radius: 12px;
    font-size: 0.88rem;
}

.table-wrap {
    overflow-x: auto;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
}

.table-wrap--scroll {
    max-height: min(70vh, 560px);
    overflow: auto;
    -webkit-overflow-scrolling: touch;
}

.table-scroll-hint {
    font-size: 0.76rem;
    margin-bottom: 6px;
}

.data-table {
    width: 100%;
    min-width: 1180px;
    border-collapse: collapse;
    font-size: 0.82rem;
}
.cell-center { text-align: center; }
.data-table-row--far { opacity: 0.72; }
.data-table th, .data-table td {
    padding: 10px 11px;
    text-align: left;
    border-bottom: 1px solid #f1f5f9;
}
.data-table th {
    background: linear-gradient(90deg, var(--lilac-deep), #a855f7);
    color: #fff;
    font-weight: 600;
}
.data-table tbody tr:hover { background: rgba(224, 231, 255, 0.35); }
.num { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--lilac-deep); }
.muted { color: var(--ink-soft); font-size: 0.8rem; }

.backfill-note {
    margin-top: 10px;
    font-size: 0.8rem;
    color: #b45309;
    background: #fffbeb;
    padding: 10px;
    border-radius: 10px;
}

.protect-preview {
    margin-bottom: 14px;
    padding: 12px 12px 6px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(226, 232, 240, 0.9);
}

.protect-preview-title {
    font-size: 0.92rem;
    margin-bottom: 8px;
    color: var(--ink);
}

.protect-preview--origin {
    background: linear-gradient(145deg, rgba(253, 242, 248, 0.95), rgba(237, 233, 254, 0.75));
    border: 2px solid rgba(236, 72, 153, 0.28);
    box-shadow: 0 6px 20px rgba(236, 72, 153, 0.12);
}
.protect-preview-title--origin {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}
.protect-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}
.protect-badge--origin {
    background: linear-gradient(135deg, #f9a8d4, #c4b5fd);
    color: #4c1d95;
    box-shadow: 0 2px 8px rgba(192, 132, 252, 0.35);
}
.protect-preview-sub {
    margin: -4px 0 10px;
    font-size: 0.78rem;
}
.protect-row--origin-hit {
    background: linear-gradient(90deg, rgba(251, 207, 232, 0.35), rgba(221, 214, 254, 0.25)) !important;
}
/* 天吉人康：开店不晚于 2024-08-11 的门店所在保护区预览行 */
.protect-row--tjrk-legacy td {
    color: #b91c1c !important;
    font-weight: 600;
}
.protect-origin-source {
    font-weight: 600;
    color: #86198f;
}

.data-table--compact {
    min-width: 680px;
}

.section-heading {
    font-family: "Fredoka", "Noto Sans SC", sans-serif;
    font-size: 1.35rem;
    margin-bottom: 14px;
}
.section-heading small {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--ink-soft);
}

.skill-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 14px;
}

.skill-card {
    background: var(--card);
    border-radius: 20px;
    padding: 18px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 255, 255, 0.7);
    transition: transform 0.2s;
}
.skill-card:hover { transform: translateY(-3px); }
.skill-card-featured {
    grid-column: 1 / -1;
    background: linear-gradient(135deg, rgba(196, 181, 253, 0.25), rgba(253, 164, 175, 0.2));
    border: 2px dashed var(--lilac-deep);
}
.skill-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--lilac), var(--peach));
    color: #fff;
    font-family: "Fredoka", sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
}
.skill-icon.featured {
    width: 48px;
    height: 48px;
    font-size: 1.1rem;
    background: linear-gradient(135deg, var(--mint-deep), var(--lilac-deep));
}
.skill-card h3 { font-size: 1rem; margin-bottom: 6px; }
.skill-card p { font-size: 0.85rem; color: var(--ink-soft); line-height: 1.55; }

.accordion details {
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.65);
    margin-bottom: 10px;
    padding: 4px 14px;
    border: 1px solid rgba(226, 232, 240, 0.9);
}
.accordion summary {
    cursor: pointer;
    font-weight: 600;
    padding: 12px 0;
    list-style: none;
}
.accordion summary::-webkit-details-marker { display: none; }
.accordion details p {
    padding-bottom: 12px;
    font-size: 0.88rem;
    color: var(--ink-soft);
    line-height: 1.65;
}

.footer {
    text-align: center;
    font-size: 0.78rem;
    color: var(--ink-soft);
    margin-top: 28px;
}

.loading-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(30, 27, 75, 0.35);
    backdrop-filter: blur(6px);
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.loading-overlay.show { display: flex; }

.loading-card {
    background: #fff;
    border-radius: 24px;
    padding: 28px 36px;
    text-align: center;
    max-width: 360px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
}
.loading-duck {
    font-size: 2.5rem;
    line-height: 1;
    animation: bounce 0.9s ease infinite;
    font-family: "Fredoka", sans-serif;
    color: var(--peach-deep);
}
@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}
.loading-card > p { margin-top: 12px; font-weight: 600; color: var(--ink); }

.progress-wrap { margin-top: 18px; display: none; }
.progress-wrap.show { display: block; }
.progress-track {
    height: 10px;
    background: #e2e8f0;
    border-radius: 999px;
    overflow: hidden;
}
.progress-fill {
    height: 100%;
    width: 0%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--mint), var(--lilac-deep));
    transition: width 0.3s ease;
}
.progress-msg {
    margin-top: 10px;
    font-size: 0.82rem;
    color: var(--ink-soft);
}

.hidden { display: none !important; }

@media (max-width: 600px) {
    .hero { padding-left: 8px; padding-right: 8px; }
    .tabs { gap: 8px; }
    .tab { padding: 10px 14px; font-size: 0.82rem; }
}

.bootstrap-hint { margin-bottom: 12px; }

.chat-box {
    min-height: 220px;
    max-height: 420px;
    overflow-y: auto;
    padding: 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(226, 232, 240, 0.9);
    margin-bottom: 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.chat-examples {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 10px;
    margin-bottom: 12px;
    padding: 10px 12px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.65);
    border: 1px dashed rgba(167, 139, 250, 0.45);
}

.chat-examples-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--ink-soft);
    width: 100%;
}

@media (min-width: 520px) {
    .chat-examples-label {
        width: auto;
    }
}

.chat-example-chip {
    font-family: inherit;
    font-size: 0.78rem;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: var(--lilac-deep);
    cursor: pointer;
    transition: transform 0.12s, box-shadow 0.12s;
}

.chat-example-chip:hover {
    border-color: var(--lilac-deep);
    box-shadow: 0 2px 10px rgba(139, 92, 246, 0.15);
}

.chat-example-chip:active {
    transform: scale(0.98);
}

.chat-bubble {
    max-width: 92%;
    padding: 12px 14px;
    border-radius: 16px;
    font-size: 0.9rem;
    line-height: 1.55;
    white-space: pre-wrap;
}

.chat-user {
    align-self: flex-end;
    background: linear-gradient(135deg, var(--lilac-deep), #a855f7);
    color: #fff;
}

.chat-assistant {
    align-self: flex-start;
    background: rgba(241, 245, 249, 0.95);
    color: var(--ink);
    border: 1px solid #e2e8f0;
}

.chat-input-row {
    display: flex;
    gap: 12px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.chat-input-row textarea {
    flex: 1;
    min-width: 200px;
    border-radius: 16px;
    padding: 14px;
    border: 2px solid var(--lilac);
    font-family: inherit;
    font-size: 0.95rem;
    resize: vertical;
}

.chat-input-row textarea:focus {
    outline: none;
    border-color: var(--lilac-deep);
}

.rules-pre {
    font-size: 0.86rem;
    line-height: 1.72;
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 280px;
    overflow-y: auto;
    padding: 14px;
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(245, 243, 255, 0.92));
    border: 1px solid rgba(196, 181, 253, 0.6);
    color: #4338ca;
    font-weight: 500;
}

.map-card { overflow: hidden; }

.map-layout {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin: 14px 0;
    align-items: stretch;
    min-height: 620px;
}

.amap-container {
    flex: 1 1 520px;
    min-height: 620px;
    height: 62vh;
    max-height: 820px;
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

.map-detail {
    flex: 1 1 300px;
    min-width: 280px;
    max-width: 420px;
    min-height: 620px;
    height: 62vh;
    max-height: 820px;
    padding: 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #e2e8f0;
    font-size: 0.88rem;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

.map-detail-title {
    font-size: 1.05rem;
    margin-bottom: 12px;
    color: var(--ink);
    line-height: 1.35;
}

.map-detail-dl dt {
    font-weight: 700;
    color: var(--lilac-deep);
    margin-top: 10px;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.map-detail-dl dd {
    margin: 4px 0 0 0;
    color: var(--ink-soft);
    line-height: 1.45;
}

.map-detail-dl--grid dt {
    margin-top: 12px;
}

.map-detail-dl--grid dt:first-of-type {
    margin-top: 0;
}

.map-match-hint {
    margin-top: 12px;
    font-size: 0.78rem;
    line-height: 1.5;
}

.map-detail-body {
    max-height: 320px;
    overflow-y: auto;
}

.data-table--nine {
    font-size: 0.72rem;
}

.data-table--nine th,
.data-table--nine td {
    padding: 8px 6px;
    max-width: 140px;
}

.data-table--ten {
    font-size: 0.7rem;
}

.data-table--ten th,
.data-table--ten td {
    padding: 6px 4px;
    max-width: 118px;
}

.cell-ellipsis {
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cell-wrap {
    white-space: normal;
    word-break: break-word;
    overflow-wrap: anywhere;
    vertical-align: top;
    line-height: 1.45;
    max-width: 22rem;
}

.map-footnote { margin-top: 10px; }

.skill-grid.compact {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

.map-form {
    margin-bottom: 16px;
}

.map-form-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 16px 22px;
    margin-top: 12px;
}

.map-origin-summary {
    flex: 1;
    min-width: 200px;
    max-width: 520px;
    line-height: 1.5;
}

.map-origin-summary-line {
    display: block;
}

.map-origin-summary-k {
    font-weight: 600;
    margin-right: 6px;
    color: var(--ink-soft);
}

.map-origin-summary-v {
    color: var(--ink);
    word-break: break-word;
}

.map-plot-hint {
    font-size: 0.74rem;
    margin: 0 0 8px;
    flex-shrink: 0;
}

.map-plot-tooltip {
    position: fixed;
    z-index: 9000;
    pointer-events: none;
    max-width: 300px;
}

.map-plot-tooltip-inner {
    border-radius: 18px;
    padding: 14px 16px 16px;
    background: linear-gradient(
        155deg,
        rgba(255, 255, 255, 0.97) 0%,
        rgba(248, 250, 252, 0.95) 55%,
        rgba(237, 233, 254, 0.35) 100%
    );
    border: 1px solid rgba(196, 181, 253, 0.55);
    box-shadow:
        0 14px 44px rgba(139, 92, 246, 0.16),
        0 2px 10px rgba(15, 23, 42, 0.06);
    backdrop-filter: blur(12px);
}

.map-plot-tooltip-rows {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.map-plot-tooltip-r {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.map-plot-tooltip-k {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--ink-soft);
    letter-spacing: 0.02em;
}

.map-plot-tooltip-v {
    font-size: 0.84rem;
    color: var(--ink);
    line-height: 1.38;
}

.map-plot-tooltip-inner--addr .map-plot-tooltip-addr {
    font-size: 0.86rem;
    line-height: 1.45;
    color: var(--ink);
    word-break: break-word;
}

.map-plot-tooltip-inner--addr .map-plot-tooltip-sub {
    margin-top: 8px;
    font-size: 0.72rem;
    color: var(--ink-soft);
}

.map-plot-tooltip-warn {
    margin-top: 10px;
    padding: 8px 10px;
    border-radius: 10px;
    background: rgba(253, 242, 248, 0.98);
    border: 1px solid rgba(244, 63, 94, 0.4);
    font-size: 0.78rem;
    line-height: 1.42;
    color: #9f1239;
}

.map-plot-tooltip-r--warn .map-plot-tooltip-k {
    color: #e11d48;
}

.map-plot-tooltip-r--warn .map-plot-tooltip-v {
    color: #9f1239;
}

.map-label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--ink-soft);
    margin-bottom: 6px;
    margin-top: 10px;
}

.map-label:first-child {
    margin-top: 0;
}

.map-input,
.map-textarea {
    width: 100%;
    border-radius: 14px;
    padding: 12px 14px;
    border: 1px solid #e2e8f0;
    font-family: inherit;
    font-size: 0.92rem;
    background: #fff;
}

.map-textarea {
    resize: vertical;
    min-height: 100px;
}

.map-aside-heading {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--ink-soft);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 8px;
    margin-top: 14px;
    flex-shrink: 0;
}

.map-aside-heading:first-child {
    margin-top: 0;
}

.map-plot-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    margin-bottom: 0;
}

.map-plot-item {
    text-align: left;
    font-family: inherit;
    font-size: 0.82rem;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    background: #fff;
    cursor: pointer;
    line-height: 1.45;
    color: var(--ink);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}

.map-plot-item-title {
    font-weight: 600;
}

.map-plot-item-query {
    font-size: 0.72rem;
    color: #64748b;
    line-height: 1.3;
}

.map-plot-item-meta {
    font-size: 0.78rem;
    color: var(--lilac-deep);
    font-weight: 700;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 2px 6px;
}

.map-plot-item-brand {
    color: var(--lilac-deep);
    font-weight: 700;
}

.map-plot-item-dist {
    font-size: 0.68rem;
    font-weight: 500;
    color: #64748b;
}

.map-plot-item:hover {
    border-color: var(--lilac-deep);
}

.map-plot-item--origin {
    border-color: var(--mint-deep);
    background: rgba(16, 185, 129, 0.08);
}

.map-plot-item--tjrk-legacy .map-plot-item-brand {
    color: #b91c1c;
}

.map-plot-item--district-mismatch {
    border-color: rgba(244, 63, 94, 0.65);
    background: linear-gradient(
        135deg,
        rgba(253, 242, 248, 0.92),
        rgba(255, 255, 255, 0.88)
    );
    box-shadow: inset 0 0 0 1px rgba(244, 63, 94, 0.28);
}

.map-plot-item--active {
    box-shadow: 0 0 0 2px var(--lilac-deep);
}

.map-plot-fail-cap {
    font-size: 0.75rem;
    font-weight: 700;
    color: #b45309;
    margin-top: 8px;
}

.map-plot-fail {
    font-size: 0.78rem;
    color: #94a3b8;
    padding: 6px 8px;
    line-height: 1.4;
}

.amap-pin-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    transform: translateY(-2px);
}

.amap-pin {
    min-width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, #64748b, #475569);
    color: #fff;
    font-weight: 800;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.45);
    border: 2px solid #fff;
}

.amap-pin--origin {
    background: linear-gradient(135deg, var(--mint-deep), #34d399);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.45);
}
.amap-pin--tjrk { background: linear-gradient(135deg, #7c3aed, #a855f7); }
.amap-pin--cyrs { background: linear-gradient(135deg, #ea580c, #fb923c); }
.amap-pin--zrsy { background: linear-gradient(135deg, #0ea5e9, #22d3ee); }
.amap-pin--dyyy { background: linear-gradient(135deg, #16a34a, #84cc16); }
.amap-pin--thrk { background: linear-gradient(135deg, var(--peach-deep), #fb7185); }
.amap-pin--other { background: linear-gradient(135deg, #64748b, #475569); }

.amap-pin--district-mismatch {
    box-shadow:
        0 0 0 3px rgba(244, 63, 94, 0.92),
        0 4px 12px rgba(139, 92, 246, 0.45);
}

.map-footnote--richtext .map-status-main {
    font-size: 0.88rem;
    line-height: 1.45;
}

.map-status-brands {
    margin-top: 8px;
    font-size: 0.72rem;
    line-height: 1.5;
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
    color: var(--ink-soft);
}

.map-brand-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.map-brand-chip::before {
    content: "";
    width: 9px;
    height: 9px;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.9);
}

.map-brand-chip--tjrk::before { background: linear-gradient(135deg, #7c3aed, #a855f7); }
.map-brand-chip--cyrs::before { background: linear-gradient(135deg, #ea580c, #fb923c); }
.map-brand-chip--zrsy::before { background: linear-gradient(135deg, #0ea5e9, #22d3ee); }
.map-brand-chip--dyyy::before { background: linear-gradient(135deg, #16a34a, #84cc16); }
.map-brand-chip--thrk::before { background: linear-gradient(135deg, var(--peach-deep), #fb7185); }
.map-brand-chip--other::before { background: linear-gradient(135deg, #64748b, #475569); }

.amap-pin-caption {
    margin-top: 4px;
    padding: 1px 6px;
    max-width: 220px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    color: #0f172a;
    font-size: 11px;
    line-height: 1.25;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.15);
}

.map-actual-addr {
    margin-top: 3px;
    font-size: 0.74rem;
    color: #64748b;
}
