/*
 * Visual Family Tree - Horizontal Pedigree
 * Left-to-right layout matching webtrees standard pedigree chart
 */

/* ── Canvas ── */
#visual-tree {
    position: relative;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    background-color: #faf6ee;
    background-image: radial-gradient(circle, #e8e0cd 0.8px, transparent 0.8px);
    background-size: 28px 28px;
}

/* Tree watermark */
#visual-tree::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 500px;
    height: 500px;
    transform: translate(-50%, -50%);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'%3E%3Cpath d='M100 180 L100 90' stroke='%23d5d0c5' stroke-width='6' fill='none'/%3E%3Cpath d='M100 90 Q100 60 75 45 Q50 30 40 50 Q30 70 50 80 Q70 90 85 75' stroke='%23d5d0c5' stroke-width='3' fill='none'/%3E%3Cpath d='M100 90 Q100 55 120 40 Q140 25 155 45 Q170 65 150 78 Q130 90 115 72' stroke='%23d5d0c5' stroke-width='3' fill='none'/%3E%3Cpath d='M100 110 Q85 80 60 70 Q35 60 30 80 Q25 100 45 105 Q65 110 80 95' stroke='%23d5d0c5' stroke-width='3' fill='none'/%3E%3Cpath d='M100 110 Q115 80 140 70 Q165 60 170 80 Q175 100 155 105 Q135 110 120 95' stroke='%23d5d0c5' stroke-width='3' fill='none'/%3E%3Cpath d='M100 70 Q100 40 85 25 Q70 10 80 30 Q90 50 100 45' stroke='%23d5d0c5' stroke-width='3' fill='none'/%3E%3Cpath d='M100 70 Q100 40 115 25 Q130 10 120 30 Q110 50 100 45' stroke='%23d5d0c5' stroke-width='3' fill='none'/%3E%3Ccircle cx='100' cy='185' r='8' fill='%23d5d0c5'/%3E%3Ccircle cx='100' cy='185' r='4' fill='%23c8c3b5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    opacity: 0.3;
    pointer-events: none;
    z-index: 0;
}


.vt-user-badge {
    display: inline-block;
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    background: #589869;
    padding: 3px 10px;
    border-radius: 12px;
    margin-top: 6px;
    cursor: pointer;
    transition: all 150ms;
}
.vt-user-badge:hover { background: #3d6b4a; }
.vt-logout-btn {
    border: none;
    background: #e0e0e0;
    color: #666;
    font-size: 10px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 150ms;
}
.vt-logout-btn:hover { background: #d32f2f; color: #fff; }

/* Session Timer — compact pill, bottom right */
.vt-timer-float {
    position: fixed;
    bottom: 16px;
    right: 16px;
    z-index: 10001;
    display: flex;
    align-items: center;
}
.vt-timer-clock-bubble {
    background: rgba(255,253,247,0.92);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border: 1px solid #e8dfc8;
    padding: 4px 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.vt-timer-clock-icon {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}
.vt-timer-controls {
    display: flex;
    align-items: center;
    gap: 4px;
}
.vt-timer-toggle {
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: #4a3728;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 150ms;
}
.vt-timer-toggle:hover { background: #e8f5e9; }
.vt-timer-display {
    font-size: 12px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: #4a3728;
    min-width: 48px;
    text-align: center;
}
.vt-timer-push { display: none; }
.vt-timer-reset {
    width: 28px; height: 28px; border: none; border-radius: 8px;
    background: transparent; color: #4a3728; font-size: 11px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background 150ms;
}
.vt-timer-reset:hover { background: #e8f5e9; }
.vt-timer-hide {
    width: 28px; height: 28px; border: none; border-radius: 8px;
    background: transparent; color: #999; font-size: 11px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background 150ms;
}
.vt-timer-hide:hover { background: #fee2e2; color: #d32f2f; }

.vt-canvas {
    position: absolute;
    top: 46px;
    bottom: 50px;
    left: 0;
    right: 0;
    bottom: 0;
    cursor: grab;
    overflow: hidden;
}

.vt-canvas:active { cursor: grabbing; }

.vt-inner {
    position: absolute;
    transform-origin: 0 0;
    overflow: visible;
}

/* ── Search (in toolbar) ── */
.vt-toolbar-search {
    position: relative;
}

.vt-toolbar-search-input {
    width: 140px;
    padding: 7px 10px;
    border: 1px solid #e0ddd5;
    border-radius: 8px;
    background: #fff;
    font-size: 12px;
    font-family: 'Inter', sans-serif;
    color: #2c2c2c;
    outline: none;
    transition: all 200ms;
}

.vt-toolbar-search-input:focus {
    width: 200px;
    border-color: #589869;
    box-shadow: 0 0 0 2px rgba(88,152,105,0.15);
}

.vt-toolbar-search-input::placeholder { color: #bbb; }

.vt-search-results {
    display: none;
    position: absolute;
    top: 42px;
    right: 0;
    width: 280px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
    overflow: hidden;
    max-height: 350px;
    overflow-y: auto;
    z-index: 200;
}

.vt-search-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    cursor: pointer;
    transition: background 100ms;
    border-bottom: 1px solid #f5f5f5;
}

.vt-search-item:hover { background: #e8f5e9; }
.vt-search-item:last-child { border-bottom: none; }

.vt-search-item-name { font-weight: 600; font-size: 13px; color: #2c2c2c; }
.vt-search-item-life { font-size: 11px; color: #999; }

.vt-search-empty {
    padding: 16px;
    text-align: center;
    font-size: 12px;
    color: #999;
}

/* Search highlight on person card */
.vt-search-highlight {
    outline: 3px solid #589869 !important;
    outline-offset: 4px;
    box-shadow: 0 0 0 8px rgba(88,152,105,0.2) !important;
    animation: vtPulseSearch 1s ease-in-out 3;
}

@keyframes vtPulseSearch {
    0%, 100% { box-shadow: 0 0 0 8px rgba(88,152,105,0.2); }
    50% { box-shadow: 0 0 0 14px rgba(88,152,105,0.1); }
}

/* ── Toolbar ── */
.vt-toolbar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(255,253,247,0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 6px 12px;
    box-shadow: 0 1px 4px rgba(107,66,38,0.06);
    border-bottom: 1px solid #eceae4;
}

.vt-toolbar-brand {
    font-family: 'Great Vibes', cursive;
    font-size: 28px;
    font-weight: 700;
    color: #2d5038;
    line-height: 1;
    white-space: nowrap;
}
.vt-toolbar-spacer { flex: 1; }

/* ── Clean Toolbar Buttons ── */
.vt-tb-btn {
    height: 34px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: #4a3728;
    font-size: 12px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    transition: all 150ms;
    padding: 0 10px;
    white-space: nowrap;
}
.vt-tb-btn:hover { background: rgba(88,152,105,0.1); }
.vt-tb-btn:active { background: rgba(88,152,105,0.2); }
.vt-tb-back { color: #777; font-weight: 500; }
.vt-tb-primary { background: #2d5038; color: #fff; border-radius: 8px; }
.vt-tb-primary:hover { background: #3d6b4a; }
.vt-tb-case { color: #999; font-weight: 500; font-size: 11px; }
.vt-tb-divider { width: 1px; height: 20px; background: #e0ddd5; margin: 0 4px; flex-shrink: 0; }
/* Legacy .vt-btn kept for compatibility */
.vt-toolbar .vt-btn {
    height: 34px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: #4a3728;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 150ms;
    padding: 0 10px;
    white-space: nowrap;
}

.vt-toolbar .vt-btn:hover, .vt-toolbar .vt-btn-active {
    background: #3da35a;
    color: #fff;
    border-color: #3da35a;
    box-shadow: 0 2px 8px rgba(61,163,90,0.25);
    transform: translateY(-1px);
}

.vt-undo-btn, .vt-redo-btn { opacity: 0.4; transition: all 200ms; }

.vt-toolbar .vt-btn.vt-btn-round {
    width: 48px;
    height: 48px;
    padding: 0;
    border-radius: 50%;
    font-size: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    min-width: 44px;
    background: #faf8f2;
    border-color: #d4cdb8;
}

.vt-layout-toggle {
    padding: 0 8px !important;
    display: flex;
    align-items: center;
}

.vt-layout-toggle:hover svg circle { fill: #fff; }
.vt-layout-toggle:hover svg line { stroke: #fff; }

/* DNA platform toggle in edit modal */
.vt-dna-switch {
    display: flex;
    gap: 0;
    margin-bottom: 12px;
    background: #f0ede8;
    border-radius: 8px;
    padding: 3px;
}
.vt-dna-sw-btn {
    flex: 1;
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    background: transparent;
    font-size: 13px;
    font-weight: 600;
    color: #888;
    cursor: pointer;
    transition: all 200ms;
}
.vt-dna-sw-btn.vt-dna-sw-active {
    background: #fff;
    color: #1a1a1a;
    box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}
.vt-dna-sw-btn:hover:not(.vt-dna-sw-active) {
    color: #555;
}

/* ── Pedigree Layout (horizontal bracket) ── */
.vt-pedigree {
    display: flex;
    align-items: center;
}

.vt-generation {
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
}

.vt-pair {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    position: relative;
}

/* ── Person Card ── */
.vt-person {
    width: 130px;
    max-width: 130px;
    min-height: 56px;
    height: 56px;
    background: #fffdf8;
    border-radius: 10px;
    border: 1.5px solid #ddd5bf;
    padding: 6px 7px;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    transition: all 250ms cubic-bezier(0.4,0,0.2,1);
    box-shadow: 0 2px 8px rgba(107,66,38,0.08);
    position: relative;
    z-index: 1;
}

.vt-person:hover {
    border-color: #6bc77d !important;
    box-shadow: 0 0 20px rgba(107,199,125,0.4), 0 6px 20px rgba(107,66,38,0.1) !important;
    transform: translateY(-3px) scale(1.01);
}

.vt-selected {
    border-color: #3da35a !important;
    border-width: 3px !important;
    box-shadow: 0 0 24px rgba(61,163,90,0.45), 0 0 48px rgba(61,163,90,0.12) !important;
    transform: translateY(-3px) scale(1.02);
}
/* Card tags — colored tabs on right side */
.vt-card-tags {
    position: absolute;
    left: calc(100% - 12px);
    top: 4px;
    display: flex;
    flex-direction: column;
    gap: 3px;
    z-index: 2;
}
.vt-card-tag {
    display: inline-block;
    padding: 2px 8px 2px 6px;
    font-size: 8px;
    font-weight: 700;
    color: #fff;
    border-radius: 4px 8px 8px 4px;
    white-space: nowrap;
    letter-spacing: 0.3px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.15);
    transform: rotate(-2deg);
    animation: vtTagFloat 3s ease-in-out infinite;
}
.vt-card-tag:nth-child(2) { animation-delay: 0.5s; transform: rotate(-1deg); }
.vt-card-tag:nth-child(3) { animation-delay: 1s; transform: rotate(-3deg); }
@keyframes vtTagFloat {
    0%, 100% { transform: rotate(-2deg) translateY(0); }
    50% { transform: rotate(0deg) translateY(-1px); }
}
    box-shadow: 1px 1px 4px rgba(0,0,0,0.15);
    text-transform: uppercase;
}

/* Tag modal */
.vt-tag-colors {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.vt-tag-color-btn {
    width: 28px;
    height: 28px;
    border: 2px solid transparent;
    border-radius: 50%;
    cursor: pointer;
    transition: all 150ms;
}
.vt-tag-color-btn:hover { transform: scale(1.2); }
.vt-tag-color-active { border-color: #1a1a1a !important; box-shadow: 0 0 0 2px #fff, 0 0 0 4px #1a1a1a; }

/* Tag edit popup */
.vt-tag-edit-popup {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
    padding: 12px 14px;
    min-width: 200px;
}
.vt-tag-edit-popup .vt-tag-color-btn { width: 22px; height: 22px; }
.vt-card-tag { cursor: pointer; }

/* Highlight popup */
/* Highlight select mode */
.vt-hl-select-mode .vt-person {
    cursor: crosshair !important;
}
.vt-hl-select-mode .vt-person:hover {
    border-color: #da77f2 !important;
}
.vt-hl-picked {
    border-style: dashed !important;
}
.vt-hl-bar {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 30000;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.vt-hl-bar-color {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    transition: transform 100ms;
}
.vt-hl-bar-color:hover { transform: scale(1.2); }
.vt-hl-bar-color.active { border-color: #333; box-shadow: 0 0 0 2px #fff, 0 0 0 4px #333; }

.vt-highlight-popup {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
    padding: 12px 14px;
}
.vt-tag-preview {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    margin: 2px;
}
.vt-tag-preview button {
    border: none;
    background: rgba(255,255,255,0.3);
    color: #fff;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    font-size: 12px;
    cursor: pointer;
    margin-left: 4px;
    vertical-align: middle;
}
.vt-tag-preview button:hover { background: rgba(255,255,255,0.6); }

/* Tag filter buttons in People List */
.vt-tag-filter {
    padding: 4px 10px;
    border: 1.5px solid #d4cdb8;
    border-radius: 12px;
    background: #fffdf8;
    font-size: 11px;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    transition: all 150ms;
}
.vt-tag-filter:hover { background: #f0ede8; }
.vt-tag-filter.active { background: #2d5038; color: #fff; border-color: #2d5038; }

.vt-card-dup {
    position: absolute;
    bottom: 4px;
    right: 4px;
    font-size: 14px;
    z-index: 3;
    cursor: pointer;
}



.vt-root-person {
    position: relative;
}

/* No ROOT label needed — every tab root is treated equally */

/* DNA Match cards — bright yellow border */
/* DNA Tester — bright yellow */
.vt-match-person {
    border-color: #eab308 !important;
    background: #fefce8 !important;
    box-shadow: 0 0 0 1px #eab308, 0 2px 8px rgba(234,179,8,0.2) !important;
}

.vt-match-person:hover { border-color: #ca8a04 !important; box-shadow: 0 0 0 2px #eab308, 0 4px 12px rgba(234,179,8,0.3) !important; }

.vt-match-person .vt-avatar {
    background: linear-gradient(135deg, #eab308, #facc15) !important;
    font-size: 18px;
}

/* Doe / Missing Person — red border, light red background */
.vt-doe-person {
    border: 3px solid #dc2626 !important;
    background: #fef2f2 !important;
    box-shadow: 0 0 0 1px #dc2626, 0 2px 8px rgba(220,38,38,0.15) !important;
}
.vt-doe-person .vt-name { color: #1a1a1a !important; font-weight: 700 !important; }
.vt-doe-person .vt-lifespan { color: #555 !important; }
.vt-doe-person .vt-avatar {
    background: #dc2626 !important;
    font-size: 18px;
    color: #fff !important;
}
.vt-doe-person .vt-badges,
.vt-doe-person .vt-card-tags { color: #333 !important; }
.vt-doe-person:hover { border-color: #991b1b !important; }

/* PER — turquoise with letter icon */
.vt-per-person {
    border-color: #0891b2 !important;
    background: #ecfeff !important;
    box-shadow: 0 0 0 1px #0891b2, 0 2px 8px rgba(8,145,178,0.15) !important;
}

.vt-per-person:hover { border-color: #0e7490 !important; }

.vt-per-person .vt-avatar {
    background: linear-gradient(135deg, #0891b2, #22d3ee) !important;
    font-size: 18px;
}

.vt-female { border-color: #e8b4c8; background: linear-gradient(135deg, #fffdf8 40%, #fff0f5); }
.vt-female:hover { border-color: #6bc77d !important; }
.vt-male { border-color: #a8c4e8; background: linear-gradient(135deg, #fffdf8 40%, #eef4ff); }
.vt-male:hover { border-color: #6bc77d !important; }
.vt-unknown { border-color: #d4cdb8; background: #fffdf8; }

/* Avatar */
.vt-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
    flex-shrink: 0;
    color: #fff;
}
.vt-avatar svg { width: 20px; height: 20px; }

.vt-female .vt-avatar { background: linear-gradient(135deg, #d48aaa, #e8b4c8); }
.vt-male .vt-avatar { background: linear-gradient(135deg, #6a9fd8, #a8c4e8); }
.vt-unknown .vt-avatar { background: linear-gradient(135deg, #999, #bbb); }

.vt-info { flex: 1; min-width: 0; }

.vt-name {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 10px;
    color: #1a1a1a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}
.vt-surname {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 9px;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.vt-lifespan {
    font-size: 10px;
    color: #777;
    margin-top: 1px;
}

/* Badges */
.vt-badges {
    display: flex;
    flex-wrap: nowrap;
    gap: 3px;
    margin-top: 2px;
    font-size: 9px;
    white-space: nowrap;
    overflow: hidden;
}
.vt-info {
    overflow: hidden;
    flex: 1;
    min-width: 0;
}

.vt-badge-dna, .vt-badge-src, .vt-badge-note, .vt-badge-fan {
    font-size: 8px;
    padding: 2px 5px;
    border-radius: 50px;
    font-weight: 600;
}

.vt-badge-dna { background: #fdf6e3; color: #78350f; font-weight: 700; letter-spacing: 0.3px; }
.vt-dna-plat { font-size: 7px; color: #fff; background: #78350f; padding: 1px 3px; border-radius: 3px; margin-right: 2px; }
.vt-dna-cm { color: #b45309; }
.vt-dna-x { color: #0369a1; }
.vt-dna-lg { color: #16a34a; }
.vt-badge-src { background: #e8f5e9; color: #1b5e20; }
.vt-badge-note { background: #fdf6e3; color: #78350f; }
.vt-badge-fan { background: #e0f2fe; color: #0c4a6e; }
.vt-badge-adopt { background: #ede9fe; color: #5b21b6; }
.vt-badge-step { background: #fef3c7; color: #78350f; }
.vt-badge-foster { background: #e0f2fe; color: #0c4a6e; }
.vt-badge-kids { background: #f0fdf4; color: #166534; cursor: pointer; font-size: 10px; padding: 2px 6px; border-radius: 8px; }
.vt-expand-kids:hover { background: #dcfce7; transform: scale(1.1); }
/* ── Match ID Helper ── */
.vt-matchid-row {
    padding: 12px;
    border-bottom: 1px solid #f0ede8;
}
.vt-matchid-row:last-child { border-bottom: none; }
.vt-matchid-name { font-weight: 600; font-size: 13px; margin-bottom: 6px; }
.vt-matchid-links { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 6px; }
.vt-matchid-link {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    background: #f0f0f0;
    color: #333;
    font-size: 10px;
    font-weight: 500;
    text-decoration: none;
    transition: all 150ms;
}
.vt-matchid-link:hover { background: #589869; color: #fff; }
.vt-matchid-actions { margin-top: 4px; }

.vt-map-pin {
    border: none;
    background: none;
    cursor: pointer;
    font-size: 12px;
    padding: 0 2px;
    opacity: 0.7;
    transition: all 150ms;
}
.vt-map-pin:hover { opacity: 1; transform: scale(1.2); }


/* ── Name Autocomplete ── */
.vt-name-suggest {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #e0ddd5;
    border-top: none;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    z-index: 100;
    max-height: 200px;
    overflow-y: auto;
}
.vt-name-suggest-item {
    padding: 8px 12px;
    font-size: 12px;
    cursor: pointer;
    transition: background 100ms;
}
.vt-name-suggest-item:hover {
    background: #e8f5e9;
}

.vt-card-dna-icon { display: none; }

.vt-card-advisory {
    position: absolute;
    top: -10px;
    left: -10px;
    font-size: 24px;
    z-index: 3;
    filter: drop-shadow(0 1px 3px rgba(0,0,0,0.2));
}
.vt-badge-divorced { background: #fde8e8; color: #c62828; }
.vt-badge-widowed { background: #f3f4f6; color: #4b5563; }
.vt-badge-src { background: #e8f5e9; color: #2d5038; }
.vt-badge-note { background: #e8f0fe; color: #1a56db; }
.vt-badge-fan { background: #fdf6e3; color: #92400e; }

/* Actions */
.vt-actions {
    position: absolute;
    top: 4px;
    right: 4px;
    display: flex;
    gap: 2px;
    opacity: 0;
    transition: opacity 150ms;
}

.vt-person:hover .vt-actions { opacity: 1; }

.vt-act-btn {
    width: 22px;
    height: 22px;
    border: none;
    border-radius: 4px;
    background: rgba(0,0,0,0.05);
    color: #6b6b6b;
    cursor: pointer;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 150ms;
}

.vt-act-btn:hover { background: #589869; color: #fff; }

/* ── Pedigree Layouts ── */

/* Horizontal: person left, parents branch right */
.vt-horiz {
    display: flex;
    align-items: center;
    position: relative;
    flex-wrap: wrap;
}

.vt-h-parents {
    display: flex;
    align-items: center;
    margin-left: 0;
    position: relative;
}

/* Lines drawn by JS SVG overlay */

.vt-h-stack {
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
    margin-left: 40px;
}

/* Spacing from person card to parents */
.vt-horiz > .vt-person {
    margin-right: 0;
    position: relative;
}

/* Vertical layout — traditional tree form */
.vt-vert {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.vt-v-parents {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
    position: relative;
}

/* ── Zoom Controls ── */
.vt-zoom-controls {
    position: absolute;
    top: 56px;
    right: 16px;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(255,253,247,0.92);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 10px;
    padding: 4px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border: 1px solid #e8dfc8;
}
.vt-zoom-btn {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: #4a3728;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 150ms;
}
.vt-zoom-btn:hover { background: #e8f5e9; }
.vt-zoom-btn:active { background: #c8e6c9; }
.vt-zoom-fit {
    font-size: 11px;
    font-weight: 600;
    width: auto;
    padding: 0 10px;
}
.vt-zoom-level {
    font-size: 11px;
    font-weight: 600;
    color: #999;
    min-width: 36px;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

/* ── Empty State (blank tree) ── */
.vt-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    gap: 12px;
    min-width: 300px;
    min-height: 200px;
}
.vt-empty-icon {
    font-size: 48px;
    opacity: 0.6;
}
.vt-empty-text {
    font-family: 'Playfair Display', serif;
    font-size: 18px;
    color: #8a7e6b;
    font-weight: 500;
}
.vt-empty-add-btn {
    margin-top: 8px;
    padding: 12px 28px;
    background: #589869;
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all 200ms;
    box-shadow: 0 2px 10px rgba(88,152,105,0.3);
}
.vt-empty-add-btn:hover {
    background: #3d6b4a;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(88,152,105,0.4);
}

/* ── Pure CSS Pedigree Tree ── */
.vt-css-tree {
    transform: scaleY(-1);  /* Flip so ancestors are on top, focal at bottom */
    padding: 10px 10px 0 10px;
}
.vt-css-tree ul {
    display: flex;
    justify-content: center;
    padding-top: 14px;
    position: relative;
    list-style: none;
    margin: 0;
    padding-left: 0;
    padding-right: 0;
    overflow: visible;
}
.vt-css-tree > ul { padding-top: 0; }
.vt-css-tree li {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    padding: 14px 2px 0;
    list-style: none;
}
/* Root node: no connector going up */
.vt-css-tree > ul > li { padding-top: 0; }
.vt-css-tree > ul > li::before,
.vt-css-tree > ul > li::after { display: none; }

/* Vertical line going up from node to bracket */
.vt-css-tree li::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    width: 2px;
    height: 14px;
    background: #b8b4ac;
    margin-left: -1px;
}

/* Horizontal bracket connecting siblings */
.vt-css-tree li::after {
    content: '';
    position: absolute;
    top: 0;
    width: 50%;
    height: 2px;
    background: #b8b4ac;
    right: 0;
}
.vt-css-tree li:first-child::after {
    left: 50%;
    right: auto;
    width: 50%;
}
.vt-css-tree li:last-child::after {
    right: 50%;
    left: auto;
    width: 50%;
}
.vt-css-tree li:first-child:last-child::after {
    display: none;
}

/* Vertical line from parent card down to children bracket */
.vt-css-tree ul ul::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    width: 2px;
    height: 14px;
    background: #b8b4ac;
    margin-left: -1px;
    margin-top: -30px;
}

/* Couple row — person + spouses side by side */
.vt-couple-inline {
    display: flex;
    align-items: center;
    gap: 4px;
}
/* Flip cards back right-side-up (since tree is flipped) */
.vt-css-tree .vt-person,
.vt-css-tree .vt-add-card {
    transform: scaleY(-1);
    margin: 0;
}

/* ── Horizontal Tree (focal left, ancestors right) ── */
.vt-css-tree-horiz {
    transform: scaleX(-1); /* flip so focal is on left, ancestors fan right */
}
.vt-css-tree-horiz.vt-css-tree {
    transform: scaleX(-1); /* override the scaleY(-1) from vertical */
}
.vt-css-tree-horiz ul {
    flex-direction: column;
    padding-top: 0;
    padding-left: 20px;
}
.vt-css-tree-horiz > ul { padding-left: 0; }
.vt-css-tree-horiz li {
    flex-direction: row;
    padding: 4px 0 4px 20px;
}
.vt-css-tree-horiz > ul > li { padding-left: 0; }

/* Horizontal connectors */
.vt-css-tree-horiz li::before {
    top: 50%;
    left: 0;
    width: 20px;
    height: 2px;
    margin-left: 0;
    margin-top: -1px;
}
.vt-css-tree-horiz li::after {
    top: 0;
    left: 0;
    width: 2px;
    height: 50%;
    right: auto;
}
.vt-css-tree-horiz li:first-child::after {
    top: 50%;
    left: 0;
    width: 2px;
    height: 50%;
}
.vt-css-tree-horiz li:last-child::after {
    top: 0;
    left: 0;
    width: 2px;
    height: 50%;
    right: auto;
}
.vt-css-tree-horiz li:first-child:last-child::after {
    display: none;
}
.vt-css-tree-horiz ul ul::before {
    top: 50%;
    left: 0;
    width: 20px;
    height: 2px;
    margin-top: -1px;
    margin-left: -20px;
}
/* Flip cards back */
.vt-css-tree-horiz .vt-person,
.vt-css-tree-horiz .vt-add-card {
    transform: scaleX(-1);
}

/* ── Full Family Vertical Layout ── */
.vt-full-family {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    padding: 10px;
}
.vt-ancestors-only {
    /* Ancestor tree flipped — parents at top */
}
.vt-ancestors-only > ul > li {
    /* Hide the invisible connector node card */
}
.vt-ancestors-only > ul > li > .vt-person {
    display: none;
}
.vt-focal-center {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: center;
}
/* Connector from ancestors down to focal */
.vt-focal-center::before {
    content: '';
    position: absolute;
    top: -20px;
    left: 50%;
    width: 2px;
    height: 14px;
    background: #b8b4ac;
    margin-left: -1px;
}
.vt-add-parents-row {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
}

/* ── Descendant Tree (not flipped) ── */
.vt-css-tree-desc {
    padding: 0;
}
.vt-css-tree-desc ul {
    display: flex;
    justify-content: center;
    padding-top: 20px;
    position: relative;
    list-style: none;
    margin: 0;
    padding-left: 0;
    padding-right: 0;
    overflow: visible;
}
.vt-css-tree-desc li {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    padding: 20px 4px 0;
    list-style: none;
}
.vt-css-tree-desc li::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    width: 2px;
    height: 14px;
    background: #b8b4ac;
    margin-left: -1px;
}
.vt-css-tree-desc li::after {
    content: '';
    position: absolute;
    top: 0;
    width: 50%;
    height: 2px;
    background: #b8b4ac;
    right: 0;
}
.vt-css-tree-desc li:first-child::after {
    left: 50%;
    right: auto;
    width: 50%;
}
.vt-css-tree-desc li:last-child::after {
    right: 50%;
    left: auto;
    width: 50%;
}
.vt-css-tree-desc li:first-child:last-child::after {
    display: none;
}
.vt-css-tree-desc ul ul::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    width: 2px;
    height: 14px;
    background: #b8b4ac;
    margin-left: -1px;
    margin-top: -20px;
}
/* Connector from focal down to descendants */
.vt-css-tree-desc::before {
    content: '';
    display: block;
    width: 2px;
    height: 6px;
    background: #b8b4ac;
    margin: 0 auto;
}

/* Person-ref cards (for seen/duplicate references) */
.vt-person-ref {
    width: 80px;
    padding: 8px 10px;
    background: #f0ede8;
    border: 2px dashed #ccc7b8;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    color: #999;
    text-align: center;
    cursor: default;
}

/* ── Add Card ── */
.vt-add-card {
    width: 130px;
    min-height: 56px;
    background: #faf8f2;
    border: 2px dashed #d4cdb8;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 200ms;
    gap: 6px;
    margin: 0;
    font-size: 11px;
    color: #999;
    font-weight: 500;
    box-sizing: border-box;
}

.vt-add-card:hover {
    border-color: #589869;
    background: #e8f5e9;
    color: #589869;
}

.vt-add-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #f0f0f0;
    color: #999;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all 200ms;
}

.vt-add-card:hover .vt-add-icon { background: #589869; color: #fff; }

/* ── Bracket Connector Lines ── */
.vt-bracket {
    width: 30px;
    position: relative;
    flex-shrink: 0;
}

.vt-bracket svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
}

.vt-bracket line, .vt-bracket path {
    stroke: #c8c4bc;
    stroke-width: 2;
    fill: none;
}

/* ── Context Menu ── */
.vt-context-menu {
    background: #fffdf8;
    border-radius: 14px;
    box-shadow: 0 8px 30px rgba(107,66,38,0.15);
    z-index: 20000;
    min-width: 200px;
    overflow: visible;
    animation: vtSlideIn 150ms ease;
    position: fixed;
}

@keyframes vtSlideIn {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.vt-ctx-title {
    padding: 12px 16px 6px;
    font-size: 14px;
    font-weight: 700;
    color: #2c2c2c;
    line-height: 1.3;
    word-wrap: break-word;
}

.vt-ctx-section {
    padding: 6px 16px 2px;
    font-size: 10px;
    font-weight: 600;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-top: 1px solid #eceae4;
    margin-top: 2px;
}

.vt-ctx-item {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 10px 16px;
    border: none;
    background: none;
    font-size: 14px;
    color: #1a1a1a;
    cursor: pointer;
    transition: background 100ms;
    text-align: left;
    min-height: 44px;
}

.vt-ctx-item:hover { background: #e8f5e9; color: #589869; }
.vt-ctx-disabled { opacity: 0.4; cursor: default; pointer-events: none; }


.vt-ctx-fan:hover { background: #fdf6e3; color: #92400e; }

/* Expandable sections in context menu */
.vt-ctx-expand-header {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: #2c2c2c;
    border-top: 1px solid #eceae4;
    transition: background 100ms;
}
.vt-ctx-expand-header:hover { background: #f5f3ee; }
.vt-ctx-badge {
    background: #589869;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}
.vt-ctx-arrow {
    margin-left: auto;
    font-size: 10px;
    color: #999;
}
.vt-ctx-expand-body {
    display: none;
    padding: 0 8px 4px;
}
.vt-ctx-expand-body.vt-ctx-open {
    display: block;
}

/* Relationship rows inside expandable panel */
.vt-ctx-rel-row {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    font-size: 12px;
    border-radius: 6px;
}
.vt-ctx-rel-row:hover { background: #f9f7f2; }
.vt-ctx-rel-type {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    color: #999;
    min-width: 46px;
}
.vt-ctx-rel-name {
    flex: 1;
    font-weight: 600;
    color: #2c2c2c;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px;
}
.vt-ctx-rel-x {
    width: 20px;
    height: 20px;
    border: none;
    border-radius: 50%;
    background: #fee2e2;
    color: #d32f2f;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.vt-ctx-rel-x:hover { background: #fca5a5; }
.vt-ctx-rel-add {
    border: 1px dashed #b8b4ac;
    background: none;
    color: #589869;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 6px;
    cursor: pointer;
}
.vt-ctx-rel-add:hover { background: #e8f5e9; border-color: #589869; }

/* Inline relationship items in context menu (legacy) */
.vt-ctx-rel {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 16px;
    font-size: 12px;
}
.vt-ctx-rel-type {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    color: #999;
    min-width: 42px;
}
.vt-ctx-rel-name {
    flex: 1;
    font-weight: 600;
    color: #2c2c2c;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.vt-ctx-rel-x {
    width: 20px;
    height: 20px;
    border: none;
    border-radius: 50%;
    background: #fee2e2;
    color: #d32f2f;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.vt-ctx-rel-x:hover { background: #fca5a5; }

/* ── Modal ── */
.vt-modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(4px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: vtFadeIn 200ms ease;
}

@keyframes vtFadeIn { from { opacity: 0; } to { opacity: 1; } }

.vt-modal {
    background: #fff;
    border-radius: 16px;
    width: 480px;
    max-width: 90vw;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}

.vt-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #eceae4;
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 1;
}

.vt-modal-header h3 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 16px;
    font-weight: 600;
    margin: 0;
}

.vt-modal-close {
    width: 28px; height: 28px;
    border: none; border-radius: 6px;
    background: #f5f5f5; color: #666;
    font-size: 16px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
}

.vt-modal-close:hover { background: #e0e0e0; }

.vt-modal-body { padding: 20px; }

.vt-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 12px 20px;
    border-top: 1px solid #eceae4;
    background: #faf9f6;
    position: sticky;
    bottom: 0;
}

/* Tabs in modal */
.vt-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid #eceae4;
    margin-bottom: 16px;
}

.vt-tab {
    padding: 8px 16px;
    border: none;
    background: none;
    font-size: 12px;
    font-weight: 600;
    color: #999;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 150ms;
}

.vt-tab:hover { color: #589869; }
.vt-tab.active { color: #589869; border-bottom-color: #589869; }

.vt-tab-panel { display: none; }
.vt-tab-panel.active { display: block; }

.vt-form-group { margin-bottom: 14px; }

.vt-form-group label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: #6b6b6b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.vt-input, .vt-textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #e0ddd5;
    border-radius: 8px;
    font-size: 13px;
    font-family: 'Inter', sans-serif;
    color: #2c2c2c;
    transition: all 150ms;
    box-sizing: border-box;
}

.vt-textarea {
    resize: vertical;
    min-height: 60px;
}

.vt-input:focus, .vt-textarea:focus {
    outline: none;
    border-color: #589869;
    box-shadow: 0 0 0 3px rgba(88,152,105,0.15);
}

.vt-form-row { display: flex; gap: 10px; }
.vt-form-row .vt-form-group { flex: 1; }

.vt-gender-select { display: flex; gap: 6px; }

.vt-gender-btn {
    flex: 1;
    padding: 7px;
    border: 1px solid #e0ddd5;
    border-radius: 8px;
    background: #fff;
    color: #6b6b6b;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 150ms;
}

.vt-gender-btn:hover { border-color: #589869; color: #589869; }
.vt-gender-btn.active { background: #589869; border-color: #589869; color: #fff; }

.vt-modal-footer .vt-btn {
    padding: 8px 18px;
    border: none;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 150ms;
}

.vt-btn-cancel { background: #f0f0f0; color: #666; }
.vt-btn-cancel:hover { background: #e0e0e0; }
.vt-btn-save { background: #589869; color: #fff; }
.vt-btn-save:hover { background: #3d6b4a; }

/* Relationship items in edit modal */
.vt-rel-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border: 1px solid #eceae4;
    border-radius: 10px;
    margin-bottom: 6px;
}
.vt-rel-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    color: #999;
    min-width: 50px;
}
.vt-rel-name {
    flex: 1;
    font-size: 13px;
    font-weight: 600;
    color: #2c2c2c;
}
.vt-rel-remove {
    width: 24px;
    height: 24px;
    border: none;
    border-radius: 50%;
    background: #fee2e2;
    color: #d32f2f;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.vt-rel-remove:hover { background: #fca5a5; }

/* Source list in modal */
.vt-source-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    background: #faf9f6;
    border: 1px solid #eceae4;
    border-radius: 8px;
    margin-bottom: 6px;
    font-size: 12px;
}

.vt-source-item .vt-source-title { flex: 1; font-weight: 500; color: #2c2c2c; }
.vt-source-item .vt-source-type { font-size: 10px; color: #589869; font-weight: 600; }

.vt-note-item {
    padding: 8px 10px;
    background: #fdf6e3;
    border: 1px solid #f5ecd7;
    border-radius: 8px;
    margin-bottom: 6px;
    font-size: 12px;
    color: #4a4a4a;
    line-height: 1.5;
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 6px;
}

.vt-delete-item-btn {
    width: 22px;
    height: 22px;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: #ccc;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 150ms;
    line-height: 1;
}
.vt-delete-item-btn:hover {
    background: #d32f2f;
    color: #fff;
}

.vt-note-date {
    font-size: 10px;
    color: #999;
    margin-top: 4px;
}

.vt-add-item-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 16px;
    border: none;
    border-radius: 14px;
    background: #3da35a;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    transition: all 200ms;
    box-shadow: 0 2px 8px rgba(61,163,90,0.25);
}

.vt-add-item-btn:hover { background: #2d8044; transform: translateY(-1px); }
.vt-add-advisory-btn { border-color: #d32f2f !important; color: #d32f2f !important; }
.vt-add-advisory-btn:hover { background: #d32f2f !important; color: #fff !important; }
.vt-advisory-item { padding:8px 10px; background:#fff; border:1px solid #e0ddd5; border-radius:8px; margin-bottom:6px; font-size:12px; color:#2c2c2c; line-height:1.5; font-weight:500; display:flex; align-items:flex-start; gap:6px; }

/* Link source to people checklist */
.vt-link-list {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #eceae4;
    border-radius: 8px;
    padding: 4px 0;
}

.vt-link-person {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    cursor: pointer;
    transition: background 100ms;
    font-size: 13px;
}

.vt-link-person:hover {
    background: #e8f5e9;
}

.vt-link-person input[type="checkbox"] {
    accent-color: #589869;
    width: 16px;
    height: 16px;
}

.vt-link-name {
    font-weight: 600;
    color: #2c2c2c;
}

.vt-link-dates {
    font-size: 11px;
    color: #999;
    margin-left: auto;
}

/* ── Image Upload Widget ── */
.vt-upload-widget { margin-bottom: 14px; }

.vt-upload-dropzone {
    border: 2px dashed #ccc;
    border-radius: 10px;
    padding: 24px;
    text-align: center;
    cursor: pointer;
    transition: all 200ms;
    background: #faf9f6;
}

.vt-upload-dropzone:hover, .vt-upload-dropzone.vt-dragover {
    border-color: #589869;
    background: #e8f5e9;
}

.vt-upload-icon { font-size: 28px; margin-bottom: 6px; }
.vt-upload-text { font-size: 13px; font-weight: 600; color: #2c2c2c; }
.vt-upload-hint { font-size: 10px; color: #999; margin-top: 4px; }

.vt-upload-preview { text-align: center; }

.vt-upload-preview img {
    max-width: 100%;
    max-height: 200px;
    border-radius: 8px;
    border: 1px solid #eceae4;
    margin-bottom: 8px;
}

.vt-upload-stats {
    display: flex;
    justify-content: center;
    gap: 12px;
    font-size: 10px;
    color: #999;
    margin-bottom: 8px;
}

.vt-progress-bar {
    height: 4px;
    background: #eceae4;
    border-radius: 2px;
    overflow: hidden;
}

.vt-progress-fill {
    height: 100%;
    background: #589869;
    border-radius: 2px;
    transition: width 300ms;
}

.vt-progress-text {
    font-size: 10px;
    color: #589869;
    margin-top: 4px;
}

.vt-source-thumb {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
}

/* ── DNA Alert ── */
.vt-dna-alert {
    position: absolute;
    top: 16px;
    left: 16px;
    z-index: 100;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.12);
    border-left: 4px solid #c4a35a;
    max-width: 380px;
    animation: vtSlideIn 300ms ease;
    overflow: hidden;
}

.vt-dna-alert-header {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 14px;
    background: linear-gradient(to right, #fdf6e3, #fff);
    border-bottom: 1px solid #eceae4;
    font-size: 12px;
}

.vt-dna-count { font-size: 10px; color: #c4a35a; font-weight: 600; background: #fdf6e3; padding: 2px 6px; border-radius: 50px; margin-left: auto; }

.vt-dna-close {
    width: 22px; height: 22px; border: none; background: transparent;
    color: #999; font-size: 14px; cursor: pointer; border-radius: 4px;
    display: flex; align-items: center; justify-content: center;
}

.vt-dna-close:hover { background: #f0f0f0; }

.vt-dna-alert-body { padding: 10px 14px; font-size: 11px; color: #4a4a4a; line-height: 1.6; }

.vt-dna-surname { font-weight: 700; color: #c4a35a; background: #fdf6e3; padding: 1px 6px; border-radius: 4px; }

.vt-dna-highlight-btn {
    width: 100%;
    padding: 6px 12px;
    border: 1px solid #c4a35a;
    border-radius: 8px;
    background: #fff;
    color: #c4a35a;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 150ms;
    margin-top: 6px;
}

.vt-dna-highlight-btn:hover, .vt-dna-highlight-btn.active { background: #c4a35a; color: #fff; }

.vt-dna-match-person { outline: 3px solid #c4a35a !important; outline-offset: 2px; animation: vtPulse 2s ease-in-out infinite; }

@keyframes vtPulse {
    0%, 100% { box-shadow: 0 0 0 6px rgba(196,163,90,0.2); }
    50% { box-shadow: 0 0 0 10px rgba(196,163,90,0.1); }
}

/* ── Tools Dropdown ── */
.vt-toolbar-menu { position: relative; }

.vt-tools-dropdown {
    display: none;
    position: absolute;
    top: 42px;
    right: 0;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
    min-width: 200px;
    overflow: hidden;
    z-index: 200;
}

.vt-tools-dropdown.open { display: block; animation: vtSlideIn 150ms ease; }

.vt-tools-item {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 10px 16px;
    border: none;
    background: none;
    font-size: 13px;
    color: #2c2c2c;
    cursor: pointer;
    text-align: left;
    transition: background 100ms;
}

.vt-tools-item:hover { background: #e8f5e9; color: #589869; }

/* ── Tree Tabs ── */

/* Sheet panel */
.vt-sheet-panel {
    position: fixed;
    right: 0;
    top: 0;
    width: 45vw;
    height: 100vh;
    min-width: 320px;
    min-height: 200px;
    z-index: 10002;
    background: #fff;
    box-shadow: -4px 0 20px rgba(0,0,0,0.15);
    display: flex;
    flex-direction: column;
    border-radius: 0;
    overflow: hidden;
}
.vt-sheet-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 10px;
    background: #0f9d58;
    color: #fff;
    cursor: grab;
    user-select: none;
}
.vt-sheet-header:active { cursor: grabbing; }
.vt-sheet-resize {
    position: absolute;
    left: 0;
    top: 0;
    width: 6px;
    height: 100%;
    cursor: ew-resize;
    z-index: 1;
}
.vt-sheet-resize-corner {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 16px;
    height: 16px;
    cursor: nesw-resize;
    z-index: 2;
}

/* ── Gemini AI Assistant ── */
.vt-gemini-btn {
    position: fixed;
    bottom: 60px;
    left: 20px;
    z-index: 10001;
    background: linear-gradient(135deg, #4285f4, #8b5cf6);
    color: #fff;
    border: none;
    border-radius: 24px;
    padding: 10px 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(66,133,244,0.3);
    transition: all 200ms;
}
.vt-gemini-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 24px rgba(66,133,244,0.4); }

.vt-gemini-panel {
    position: fixed;
    bottom: 110px;
    left: 20px;
    z-index: 10002;
    width: 380px;
    max-height: 500px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    flex-direction: column;
    overflow: hidden;
}
.vt-gemini-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: linear-gradient(135deg, #4285f4, #8b5cf6);
    color: #fff;
    font-weight: 600;
    font-size: 14px;
}
.vt-gemini-close { border: none; background: rgba(255,255,255,0.2); color: #fff; border-radius: 50%; width: 28px; height: 28px; font-size: 16px; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.vt-gemini-close:hover { background: rgba(255,255,255,0.4); }

.vt-gemini-prompts {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 8px 10px;
    border-bottom: 1px solid #eceae4;
}
.vt-gemini-prompt {
    padding: 5px 10px;
    border: 1px solid #d4cdb8;
    border-radius: 12px;
    background: #faf8f2;
    font-size: 11px;
    font-weight: 500;
    color: #4a3728;
    cursor: pointer;
    transition: all 150ms;
}
.vt-gemini-prompt:hover { background: #e8f5e9; border-color: #3da35a; color: #2d5038; }

.vt-gemini-messages {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    max-height: 320px;
    min-height: 100px;
}
.vt-gemini-msg {
    margin-bottom: 10px;
    padding: 8px 12px;
    border-radius: 12px;
    font-size: 12px;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
}
.vt-gemini-user { background: #e8f5e9; color: #2c2c2c; margin-left: 40px; border-bottom-right-radius: 4px; }
.vt-gemini-ai { background: #f3f0ff; color: #2c2c2c; margin-right: 40px; border-bottom-left-radius: 4px; }

.vt-gemini-input-row {
    display: flex;
    gap: 8px;
    padding: 10px 12px;
    border-top: 1px solid #eceae4;
}
.vt-gemini-input {
    flex: 1;
    border: 1px solid #e0ddd5;
    border-radius: 10px;
    padding: 8px 10px;
    font-size: 12px;
    font-family: 'Inter', sans-serif;
    resize: none;
    outline: none;
}
.vt-gemini-input:focus { border-color: #4285f4; }
.vt-gemini-send {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: linear-gradient(135deg, #4285f4, #8b5cf6);
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    align-self: flex-end;
}
.vt-gemini-send:hover { opacity: 0.9; }
.vt-gemini-key-row {
    display: flex;
    gap: 6px;
    padding: 8px 12px;
    border-top: 1px solid #eceae4;
    background: #faf9f6;
}
.vt-gemini-save-key {
    padding: 4px 12px;
    border: none;
    border-radius: 6px;
    background: #4285f4;
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    cursor: pointer;
}

.vt-tree-tabs {
    position: fixed;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10001;
    display: flex;
    gap: 4px;
    align-items: flex-end;
    background: rgba(250,246,238,0.94);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-radius: 22px;
    padding: 6px;
    box-shadow: 0 4px 24px rgba(107,66,38,0.12);
    max-width: 95vw;
    overflow-x: auto;
    padding-bottom: max(6px, env(safe-area-inset-bottom));
    border: 1px solid rgba(212,205,184,0.5);
}

.vt-tree-tab {
    padding: 8px 16px;
    border: none;
    border-radius: 14px;
    background: transparent;
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 600;
    color: #8a7e6b;
    cursor: pointer;
    transition: all 200ms;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 34px;
}

.vt-tree-tab:hover {
    background: rgba(107,66,38,0.06);
    color: #4a3728;
}

.vt-tree-tab.active {
    background: #3da35a;
    color: #fff;
    box-shadow: 0 2px 10px rgba(61,163,90,0.3);
}

.vt-tree-tab-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    color: transparent;
    background: transparent;
    transition: all 150ms;
    flex-shrink: 0;
}

/* Show X on hover for inactive tabs */
.vt-tree-tab:hover .vt-tree-tab-close {
    color: #777;
    background: rgba(255,255,255,0.15);
}

.vt-tree-tab:hover .vt-tree-tab-close:hover {
    color: #fff;
    background: #d32f2f;
}

/* Always show X on active tab */
.vt-tree-tab.active .vt-tree-tab-close {
    color: #999;
    background: rgba(0,0,0,0.1);
}

.vt-tree-tab.active .vt-tree-tab-close:hover {
    color: #fff;
    background: #d32f2f;
}

.vt-group-label {
    padding: 10px 12px;
    border: none;
    border-radius: 0;
    background: #2c2c2c;
    font-family: 'Inter', sans-serif;
    font-size: 9px;
    font-weight: 700;
    color: #888;
    cursor: pointer;
    white-space: nowrap;
    margin-left: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 200ms;
    min-height: 38px;
    display: inline-flex;
    align-items: center;
}
.vt-group-label:hover { background: rgba(0,0,0,0.1); color: #1a1a1a; }

.vt-group-menu {
    position: fixed;
    z-index: 20000;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 6px 24px rgba(0,0,0,0.15);
    min-width: 180px;
    overflow: hidden;
}
.vt-group-menu-item {
    display: block;
    width: 100%;
    padding: 8px 14px;
    border: none;
    background: none;
    text-align: left;
    font-size: 12px;
    cursor: pointer;
    transition: background 100ms;
}
.vt-group-menu-item:hover { background: #e8f5e9; }
.vt-group-menu-new { color: #589869; font-weight: 600; border-top: 1px solid #f0ede8; }

/* Tab group sections */
.vt-tab-group {
    display: flex;
    flex-direction: column;
    border: 1px solid;
    border-radius: 12px;
    padding: 2px 4px 4px;
    margin: 0 2px;
    position: relative;
    transition: all 200ms;
}
.vt-tab-group-label {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    padding: 2px 8px 0;
    cursor: pointer;
    text-align: center;
}
.vt-tab-group-tabs {
    display: flex;
    gap: 2px;
}

.vt-group-menu {
    position: fixed;
    z-index: 20000;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 6px 24px rgba(0,0,0,0.15);
    min-width: 180px;
    overflow: hidden;
}
.vt-group-menu-item {
    display: block;
    width: 100%;
    padding: 10px 14px;
    border: none;
    background: none;
    text-align: left;
    font-size: 13px;
    cursor: pointer;
}
.vt-group-menu-item:hover { background: #e8f5e9; }
.vt-group-menu-new { color: #589869; font-weight: 600; border-top: 1px solid #f0ede8; }

/* Tree search bar in tab row */
.vt-tree-search-wrap {
    position: relative;
    margin-left: auto;
}
.vt-tree-search-input {
    width: 160px;
    padding: 6px 10px;
    border: 1px solid #d4cdb8;
    border-radius: 8px;
    background: #fff;
    font-size: 11px;
    font-family: 'Inter', sans-serif;
    color: #2c2c2c;
    outline: none;
    transition: all 200ms;
}
.vt-tree-search-input:focus {
    width: 220px;
    border-color: #589869;
    box-shadow: 0 0 0 2px rgba(88,152,105,0.15);
}
.vt-tree-search-input::placeholder { color: #bbb; }
.vt-tree-search-results {
    display: none;
    position: absolute;
    bottom: 40px;
    left: 0;
    right: 0;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 6px 24px rgba(0,0,0,0.15);
    overflow: hidden;
    max-height: 260px;
    overflow-y: auto;
    z-index: 200;
}
.vt-tree-search-item {
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 500;
    color: #2c2c2c;
    cursor: pointer;
    border-bottom: 1px solid #f5f5f5;
    transition: background 100ms;
}
.vt-tree-search-item:hover { background: #e8f5e9; }
.vt-tree-search-item:last-child { border-bottom: none; }

/* ── Case Badge ── */
.vt-case-badge {
    padding: 6px 12px;
    background: linear-gradient(135deg, #2d5038, #589869);
    color: #fff;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-right: 4px;
}

/* ── Profile Panel ── */
.vt-profile-panel {
    position: fixed;
    z-index: 10000;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.18);
    width: 300px;
    overflow: hidden;
    animation: vtSlideIn 200ms ease;
}

.vt-profile-header {
    display: flex;
    gap: 12px;
    padding: 16px;
    background: linear-gradient(135deg, #faf9f6, #fff);
    border-bottom: 1px solid #eceae4;
    position: relative;
}

.vt-profile-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    color: #fff;
    flex-shrink: 0;
}

.vt-profile-f { background: linear-gradient(135deg, #d48aaa, #e8b4c8); }
.vt-profile-m { background: linear-gradient(135deg, #6a9fd8, #a8c4e8); }
.vt-profile-u { background: linear-gradient(135deg, #999, #bbb); }

.vt-profile-info { flex: 1; min-width: 0; }
.vt-profile-name { font-family: 'Playfair Display', Georgia, serif; font-size: 15px; font-weight: 700; color: #2c2c2c; }
.vt-profile-life { font-size: 11px; color: #999; margin-top: 2px; }
.vt-profile-place, .vt-profile-occ { font-size: 11px; color: #6b6b6b; margin-top: 2px; }

.vt-profile-close {
    position: absolute; top: 10px; right: 10px;
    width: 24px; height: 24px; border: none; background: transparent;
    color: #999; font-size: 16px; cursor: pointer; border-radius: 4px;
}
.vt-profile-close:hover { background: #f0f0f0; }

.vt-profile-body { padding: 12px 16px; max-height: 200px; overflow-y: auto; }
.vt-profile-section { margin-bottom: 10px; }
.vt-profile-section-title { font-size: 10px; font-weight: 700; color: #999; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px; }

.vt-profile-actions {
    display: flex; flex-direction: column; gap: 6px;
    padding: 12px 16px; border-top: 1px solid #eceae4; background: #faf9f6;
}

.vt-profile-btn {
    padding: 8px 12px; border: 1px solid #e0ddd5; border-radius: 8px;
    background: #fff; font-size: 12px; font-weight: 600; cursor: pointer;
    transition: all 150ms; text-align: left; color: #2c2c2c;
}
.vt-profile-btn:hover { border-color: #589869; color: #589869; background: #e8f5e9; }
.vt-profile-edit { color: #589869; border-color: #589869; }
.vt-profile-edit:hover { background: #589869; color: #fff; }

/* ── Search Portal ── */
.vt-search-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.vt-search-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border: 2px solid #e0ddd5;
    border-radius: 10px;
    background: #fff;
    text-decoration: none;
    transition: all 150ms;
    font-size: 14px;
    font-weight: 600;
}

.vt-search-btn:hover {
    background: #faf9f6;
    transform: translateX(4px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.vt-search-icon { font-size: 20px; width: 28px; text-align: center; }
.vt-search-name { flex: 1; }
.vt-search-arrow { font-size: 14px; opacity: 0.4; }
.vt-search-btn:hover .vt-search-arrow { opacity: 1; }

/* ── Duplicate Alert ── */
.vt-dup-alert {
    position: absolute;
    bottom: 60px;
    left: 16px;
    z-index: 100;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.12);
    border-left: 4px solid #e67e22;
    max-width: 350px;
    animation: vtSlideIn 300ms ease;
    overflow: hidden;
}

.vt-dup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: #fef3e2;
    border-bottom: 1px solid #f5e6cc;
    font-size: 12px;
    font-weight: 700;
    color: #92400e;
}

.vt-dup-body { padding: 10px 14px; }

.vt-dup-item {
    font-size: 12px;
    color: #4a4a4a;
    margin-bottom: 6px;
    padding: 6px 8px;
    background: #fef9f0;
    border-radius: 6px;
}

/* ── Toast ── */
.vt-toast {
    position: fixed;
    top: 60px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    background: #2c2c2c;
    color: #fff;
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 500;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
    z-index: 10001;
    opacity: 0;
    transition: all 300ms;
    pointer-events: none;
}

.vt-toast-show { opacity: 1; transform: translateX(-50%) translateY(0); }


/* ── FAN Panel ── */
.vt-fan-panel {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
    z-index: 10000;
    width: 280px;
    overflow: hidden;
    position: fixed;
    animation: vtSlideIn 200ms ease;
}

.vt-fan-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: linear-gradient(to right, #fdf6e3, #fff);
    border-bottom: 1px solid #eceae4;
    font-size: 12px;
    font-weight: 600;
}

.vt-fan-panel-close { width: 22px; height: 22px; border: none; background: transparent; color: #999; font-size: 14px; cursor: pointer; border-radius: 4px; }

.vt-fan-item {
    display: flex;
    gap: 8px;
    padding: 8px 14px;
    font-size: 12px;
}

.vt-fan-item-icon { font-size: 14px; }
.vt-fan-item-name { font-weight: 600; color: #2c2c2c; }
.vt-fan-item-type { font-size: 10px; color: #c4a35a; text-transform: capitalize; }
.vt-fan-item-context { font-size: 10px; color: #6b6b6b; }

/* ── Mobile / iPhone ── */
@media (max-width: 768px) {
    /* Hide brand on mobile - toolbar is enough */
    .vt-toolbar-brand { font-size: 20px; }

    /* Save indicator: smaller on mobile */
    .vt-save-indicator {
        bottom: 70px !important;
        font-size: 9px;
        padding: 3px 10px;
    }

    /* Toolbar: wrap and compact */
    .vt-toolbar {
        flex-wrap: wrap;
        padding: 6px 8px;
        gap: 4px;
    }
    .vt-toolbar .vt-btn {
        height: 36px;
        min-height: 36px;
        padding: 0 8px;
        font-size: 12px;
    }
    .vt-toolbar .vt-btn.vt-btn-round {
        width: 36px;
        height: 36px;
    }
    .vt-toolbar-spacer { flex: 0 0 auto; width: 0; }

    /* Cards: narrower on mobile */
    .vt-person {
        width: 200px;
        padding: 6px 8px;
    }
    .vt-add-card { width: 200px; }
    .vt-name { font-size: 12px; }
    .vt-lifespan { font-size: 10px; }
    .vt-avatar { width: 36px; height: 36px; font-size: 13px; }
    .vt-badges { gap: 2px; }
    .vt-badge-dna, .vt-badge-src, .vt-badge-note, .vt-badge-fan { font-size: 8px; padding: 1px 5px; }

    /* Tabs on mobile */
    .vt-tree-tab {
        padding: 6px 10px;
        font-size: 10px;
        min-height: 32px;
        border-radius: 8px !important;
        margin-top: 0 !important;
    }
    .vt-canvas {
        top: 50px !important;
    }
    .vt-group-label {
        padding: 4px 8px;
        font-size: 9px;
        min-height: 32px;
    }

    /* Gemini button: smaller on mobile */
    .vt-gemini-btn {
        padding: 6px 10px;
        font-size: 10px;
        bottom: auto;
        top: 50px;
        right: 8px;
    }
    .vt-gemini-panel {
        width: 90vw;
        right: 5vw;
        bottom: 120px;
        max-height: 60vh;
    }

    /* Context menu and profile panel: full width on mobile */
    .vt-context-menu {
        position: fixed !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        top: auto !important;
        width: 100vw !important;
        min-width: 100vw !important;
        border-radius: 16px 16px 0 0 !important;
        max-height: 70vh;
        overflow-y: auto;
    }
    .vt-profile-panel {
        width: 100vw !important;
        max-width: 100vw !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        top: auto !important;
        border-radius: 16px 16px 0 0 !important;
        max-height: 75vh;
        overflow-y: auto;
    }

    /* Canvas starts lower to accommodate wrapped toolbar */
    .vt-canvas {
        top: 80px !important;
    }

    /* Keep toolbar visible in both layouts */
    .vt-toolbar {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        z-index: 10000 !important;
    }

    /* Modal: full width on mobile */
    .vt-modal {
        width: 95vw !important;
        max-width: none !important;
        max-height: 85vh;
    }
    .vt-modal-body {
        max-height: 60vh;
        overflow-y: auto;
    }
}
