:root{--bg-primary: #f8fafc;--bg-secondary: #ffffff;--bg-tertiary: #f1f5f9;--bg-quaternary: #e2e8f0;--text-primary: #1e293b;--text-secondary: #475569;--text-tertiary: #64748b;--text-quaternary: #94a3b8;--border-primary: #e2e8f0;--border-secondary: #cbd5e1;--border-tertiary: #94a3b8;--shadow-light: rgba(15, 23, 42, .08);--shadow-medium: rgba(15, 23, 42, .12);--shadow-heavy: rgba(15, 23, 42, .16);--accent-primary: #3b82f6;--accent-hover: #2563eb;--accent-light: #dbeafe;--accent-lighter: #eff6ff;--success: #10b981;--success-light: #d1fae5;--warning: #f59e0b;--warning-light: #fef3c7;--error: #ef4444;--error-light: #fee2e2;--overlay: rgba(15, 23, 42, .7);--font-size-xs: .75rem;--font-size-sm: .875rem;--font-size-base: 1rem;--font-size-md: 1.125rem;--font-size-lg: 1.25rem;--font-size-xl: 1.5rem;--font-size-2xl: 1.875rem;--font-size-3xl: 2.25rem;--font-size-4xl: 3rem;--font-size-5xl: 3.75rem;--font-weight-light: 300;--font-weight-normal: 400;--font-weight-medium: 500;--font-weight-semibold: 600;--font-weight-bold: 700;--font-weight-extrabold: 800;--font-weight-black: 900;--line-height-tight: 1.1;--line-height-snug: 1.2;--line-height-normal: 1.5;--line-height-relaxed: 1.6;--line-height-loose: 1.8;--letter-spacing-tighter: -.05em;--letter-spacing-tight: -.025em;--letter-spacing-normal: 0;--letter-spacing-wide: .025em;--letter-spacing-wider: .05em;--letter-spacing-widest: .1em;--space-1: .25rem;--space-2: .5rem;--space-3: .75rem;--space-4: 1rem;--space-5: 1.25rem;--space-6: 1.5rem;--space-8: 2rem;--space-10: 2.5rem;--space-12: 3rem;--space-16: 4rem;--space-20: 5rem;--radius-sm: .375rem;--radius-md: .5rem;--radius-lg: .75rem;--radius-xl: 1rem;--radius-2xl: 1.5rem;--transition-fast: .15s ease;--transition-normal: .3s ease;--transition-slow: .5s ease}[data-theme=dark]{--bg-primary: #0f172a;--bg-secondary: #1e293b;--bg-tertiary: #334155;--bg-quaternary: #475569;--text-primary: #f8fafc;--text-secondary: #cbd5e1;--text-tertiary: #94a3b8;--text-quaternary: #64748b;--border-primary: #334155;--border-secondary: #475569;--border-tertiary: #64748b;--shadow-light: rgba(0, 0, 0, .3);--shadow-medium: rgba(0, 0, 0, .4);--shadow-heavy: rgba(0, 0, 0, .5);--accent-primary: #60a5fa;--accent-hover: #3b82f6;--accent-light: #1e3a8a;--accent-lighter: #1e40af;--success: #34d399;--success-light: #064e3b;--warning: #fbbf24;--warning-light: #78350f;--error: #f87171;--error-light: #7f1d1d;--overlay: rgba(0, 0, 0, .8)}.text-xs{font-size:var(--font-size-xs)}.text-sm{font-size:var(--font-size-sm)}.text-base{font-size:var(--font-size-base)}.text-md{font-size:var(--font-size-md)}.text-lg{font-size:var(--font-size-lg)}.text-xl{font-size:var(--font-size-xl)}.text-2xl{font-size:var(--font-size-2xl)}.text-3xl{font-size:var(--font-size-3xl)}.text-4xl{font-size:var(--font-size-4xl)}.text-5xl{font-size:var(--font-size-5xl)}.font-light{font-weight:var(--font-weight-light)}.font-normal{font-weight:var(--font-weight-normal)}.font-medium{font-weight:var(--font-weight-medium)}.font-semibold{font-weight:var(--font-weight-semibold)}.font-bold{font-weight:var(--font-weight-bold)}.font-extrabold{font-weight:var(--font-weight-extrabold)}.font-black{font-weight:var(--font-weight-black)}.leading-tight{line-height:var(--line-height-tight)}.leading-snug{line-height:var(--line-height-snug)}.leading-normal{line-height:var(--line-height-normal)}.leading-relaxed{line-height:var(--line-height-relaxed)}.leading-loose{line-height:var(--line-height-loose)}.tracking-tighter{letter-spacing:var(--letter-spacing-tighter)}.tracking-tight{letter-spacing:var(--letter-spacing-tight)}.tracking-normal{letter-spacing:var(--letter-spacing-normal)}.tracking-wide{letter-spacing:var(--letter-spacing-wide)}.tracking-wider{letter-spacing:var(--letter-spacing-wider)}.tracking-widest{letter-spacing:var(--letter-spacing-widest)}.font-mono{font-family:JetBrains Mono,SF Mono,Monaco,Cascadia Code,Roboto Mono,Consolas,Courier New,monospace}body{font-family:Inter,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,sans-serif;background:var(--bg-primary);margin:0;padding:0;color:var(--text-primary);font-size:var(--font-size-base);line-height:1.6;font-weight:400;transition:background-color var(--transition-normal),color var(--transition-normal);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;overflow:hidden;letter-spacing:-.01em;font-display:swap;transform:scale(.75);transform-origin:top left;width:133.33vw;height:133.33vh}.dashboard-container{display:grid;grid-template-areas:"header header header" "sidebar-left main sidebar-right";grid-template-columns:1fr 3sfr 1fr;grid-template-rows:auto 1fr;min-height:133.33vh;gap:0;background:linear-gradient(135deg,var(--bg-primary) 0%,var(--bg-tertiary) 100%)}.dashboard-header{grid-area:header;z-index:1000}.dashboard-sidebar-left{grid-area:sidebar-left;background:linear-gradient(180deg,var(--bg-secondary) 0%,var(--bg-tertiary) 100%);border-right:1px solid var(--border-primary);overflow:hidden;z-index:100;box-shadow:2px 0 8px var(--shadow-light);height:100%;min-height:100%;display:flex;flex-direction:column}.dashboard-main{grid-area:main;background:var(--bg-primary);overflow:hidden;position:relative;box-shadow:inset 0 0 20px var(--shadow-light);height:100%;min-height:100%;display:flex;flex-direction:column}.dashboard-sidebar-right{grid-area:sidebar-right;background:linear-gradient(180deg,var(--bg-secondary) 0%,var(--bg-tertiary) 100%);border-left:1px solid var(--border-primary);overflow-y:auto;z-index:100;box-shadow:-2px 0 8px var(--shadow-light)}.main-header{background:linear-gradient(135deg,var(--bg-secondary) 0%,var(--bg-tertiary) 100%);border-bottom:1px solid var(--border-primary);box-shadow:0 8px 32px var(--shadow-light);backdrop-filter:blur(20px);-webkit-backdrop-filter:blur(20px);overflow:hidden;position:relative;z-index:1000}.main-header:before{content:"";position:absolute;inset:0;background:linear-gradient(90deg,transparent 0%,rgba(59,130,246,.05) 25%,rgba(59,130,246,.1) 50%,rgba(59,130,246,.05) 75%,transparent 100%);pointer-events:none}.header-content{display:flex;align-items:center;justify-content:space-between;padding:var(--space-6) var(--space-8);max-width:1400px;margin:0 auto;gap:var(--space-8)}.header-left{flex:0 0 auto}.header-center{flex:1;max-width:600px;margin:0 var(--space-6)}.header-right{flex:0 0 auto}.logo-section{display:flex;align-items:center;gap:var(--space-4)}.logo-icon{color:var(--accent-primary);flex-shrink:0;filter:drop-shadow(0 2px 8px rgba(59,130,246,.3));transition:all var(--transition-normal)}.logo-icon:hover{transform:scale(1.05);filter:drop-shadow(0 4px 12px rgba(59,130,246,.4))}.title-section h1{margin:0;font-size:var(--font-size-2xl);font-weight:var(--font-weight-bold);color:var(--text-primary);line-height:var(--line-height-tight);letter-spacing:var(--letter-spacing-tight);background:linear-gradient(135deg,var(--text-primary) 0%,var(--accent-primary) 100%);-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text}.subtitle{margin:0;font-size:var(--font-size-sm);color:var(--text-secondary);font-weight:var(--font-weight-medium);line-height:var(--line-height-snug);opacity:.9;margin-top:var(--space-1);letter-spacing:var(--letter-spacing-wide)}.header-controls{display:flex;align-items:center;gap:var(--space-4)}.control-group{display:flex;align-items:center;gap:var(--space-1);padding:var(--space-1);background:var(--bg-tertiary);border-radius:var(--radius-lg);border:1px solid var(--border-primary);box-shadow:0 1px 3px var(--shadow-light)}.header-btn{display:flex;align-items:center;gap:var(--space-2);padding:var(--space-2) var(--space-3);background:var(--bg-tertiary);border:1px solid var(--border-primary);border-radius:var(--radius-xl);color:var(--text-secondary);cursor:pointer;transition:all var(--transition-normal) cubic-bezier(.4,0,.2,1);font-size:var(--font-size-sm);font-weight:var(--font-weight-semibold);white-space:nowrap;position:relative;overflow:hidden;min-height:40px;box-shadow:0 2px 8px var(--shadow-light);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);letter-spacing:var(--letter-spacing-wide)}.header-btn:hover{background:var(--bg-secondary);color:var(--accent-primary);border-color:var(--accent-primary);transform:translateY(-2px);box-shadow:0 8px 24px #3b82f633}.header-btn:active{transform:translateY(0);box-shadow:0 2px 8px #3b82f633}.header-btn:focus{outline:2px solid var(--accent-primary);outline-offset:2px}.btn-label{font-size:var(--font-size-xs);font-weight:500}.theme-icon{transition:transform var(--transition-normal)}.header-btn:hover .theme-icon{transform:rotate(180deg)}.header-btn.active{background:var(--accent-light);color:var(--accent-primary);border-color:var(--accent-primary);box-shadow:0 2px 8px #3b82f633}.header-btn.clicked{background:var(--accent-light);color:var(--accent-primary);border-color:var(--accent-primary);box-shadow:0 0 0 3px #3b82f633}#search-input{padding:var(--space-3);border:1px solid var(--border-primary);border-radius:var(--radius-md);width:200px;background:var(--bg-secondary);color:var(--text-primary);transition:border-color var(--transition-normal),background-color var(--transition-normal),color var(--transition-normal);font-size:var(--font-size-sm)}button{padding:var(--space-3) var(--space-4);background:var(--accent-primary);color:#fff;border:none;border-radius:var(--radius-md);cursor:pointer;transition:background-color var(--transition-normal);font-size:var(--font-size-sm);font-weight:500;min-height:40px}button:hover{background:var(--accent-hover);transform:translateY(-1px);box-shadow:0 4px 12px #3b82f64d}#tree-container{width:100%;height:100%;min-height:100%;background:var(--bg-primary);overflow:hidden;transition:background-color var(--transition-normal);position:relative;display:flex;flex-direction:column}#tree-container svg{z-index:1;position:relative;width:100%;height:100%;min-height:100%;flex:1}#legend{padding:var(--space-6);background:var(--bg-secondary);height:calc(100% - 120px);transition:background-color var(--transition-normal),border-color var(--transition-normal)}#legend.hidden{display:none}#legend h3{font-size:var(--font-size-base);font-weight:700;color:var(--text-primary);margin:0 0 var(--space-4) 0;padding-bottom:var(--space-2);border-bottom:2px solid var(--accent-primary);text-align:center;position:relative}.legend-toggle-btn+* #legend{top:84px;right:var(--space-6)}#legend ul{list-style:none;padding:0;margin:0}.link{fill:none;stroke-width:2;transition:all var(--transition-normal) cubic-bezier(.4,0,.2,1);stroke-dasharray:0;stroke-dashoffset:0}.link.animate-in{stroke-dasharray:1000;stroke-dashoffset:1000;animation:drawLine 1s ease-in-out forwards}@keyframes drawLine{to{stroke-dashoffset:0}}.node:hover~.link,.node:hover+.link{stroke-width:3px;stroke:var(--accent-primary);opacity:.8}.node{cursor:pointer;transition:filter var(--transition-normal)}.node:hover{filter:drop-shadow(0 2px 8px rgba(0,0,0,.1))}.node circle,.node rect{transition:stroke-width var(--transition-normal),stroke var(--transition-normal)}.node:hover circle,.node:hover rect{stroke-width:3px;stroke:var(--accent-primary)}.node.root-node{animation:pulse 2s infinite}@keyframes pulse{0%{filter:drop-shadow(0 2px 8px rgba(0,0,0,.1))}50%{filter:drop-shadow(0 4px 16px rgba(59,130,246,.3))}to{filter:drop-shadow(0 2px 8px rgba(0,0,0,.1))}}.node.highlighted circle,.node.highlighted rect{stroke:orange;stroke-width:3}.generation-header{cursor:default;-webkit-user-select:none;user-select:none}.generation-title{font-family:Inter,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,sans-serif;font-size:var(--font-size-xl);font-weight:var(--font-weight-bold);fill:var(--text-primary);text-anchor:middle;dominant-baseline:middle;letter-spacing:var(--letter-spacing-tight);text-shadow:0 2px 4px rgba(0,0,0,.1)}.generation-subtitle{font-family:Inter,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,sans-serif;font-size:var(--font-size-sm);font-weight:var(--font-weight-medium);fill:var(--text-secondary);text-anchor:middle;dominant-baseline:middle;letter-spacing:var(--letter-spacing-wide);text-shadow:0 1px 2px rgba(0,0,0,.1)}.generation-separator{stroke:var(--border-primary);stroke-width:1;opacity:.3}.generation-0 .generation-title{fill:var(--accent-primary)}.generation-1 .generation-title{fill:var(--success)}.generation-2 .generation-title{fill:var(--warning)}.generation-3 .generation-title{fill:var(--error)}.generation-4 .generation-title{fill:#8b5cf6}.generation-5 .generation-title{fill:#06b6d4}[data-theme=dark] .generation-separator{stroke:var(--border-secondary);opacity:.5}text{font-size:var(--font-size-xs);-webkit-user-select:none;user-select:none;fill:var(--text-primary);font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,sans-serif}.node-text{font-size:var(--font-size-sm);font-weight:var(--font-weight-semibold);fill:var(--text-primary);pointer-events:none;text-shadow:0 2px 4px rgba(0,0,0,.2);dominant-baseline:central;text-anchor:middle;line-height:var(--line-height-tight);font-family:Inter,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,sans-serif;transition:all var(--transition-normal);letter-spacing:var(--letter-spacing-tight)}.text-background{pointer-events:none;transition:all var(--transition-normal);filter:drop-shadow(0 2px 8px rgba(0,0,0,.1))}.node:hover .text-background{fill:var(--bg-primary);stroke:var(--accent-primary);stroke-width:2px;filter:drop-shadow(0 4px 12px rgba(59,130,246,.2))}.node:hover .node-text{fill:var(--accent-primary);font-weight:var(--font-weight-bold)}.node:focus{outline:2px solid var(--accent-primary);outline-offset:4px}.node:focus circle,.node:focus rect{stroke-width:3px;stroke:var(--accent-primary);filter:drop-shadow(0 2px 8px rgba(59,130,246,.3))}.legend-item{display:flex;align-items:center;gap:var(--space-2);margin-bottom:var(--space-2);font-weight:500;font-size:var(--font-size-base);color:var(--text-primary)}.legend-item svg{color:var(--text-primary);flex-shrink:0}.legend-section{margin-top:var(--space-3);font-weight:600;font-size:var(--font-size-base);color:var(--text-primary)}.line-sample{width:30px;height:2px;display:inline-block;border-top:2px dashed}.blue-dash{border-color:#00f}.pink-dash{border-color:pink}#color-legend li{display:flex;align-items:center;gap:8px;margin-bottom:5px}.node.highlighted{filter:drop-shadow(0 0 5px orange)}.node.highlighted circle,.node.highlighted rect{stroke:orange!important;stroke-width:3px}.node-enter{opacity:0;transform:scale(.8)}.node-enter-active{opacity:1;transform:scale(1);transition:opacity .5s ease,transform .5s ease}.node-exit{opacity:1;transform:scale(1)}.node-exit-active{opacity:0;transform:scale(.8);transition:opacity .3s ease,transform .3s ease}#detail-modal{-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);transition:opacity var(--transition-normal),visibility var(--transition-normal);z-index:9999!important;position:fixed!important;inset:0!important;display:flex!important;align-items:flex-end!important;justify-content:center!important;cursor:pointer}#detail-modal .modal-content{cursor:default}#detail-modal.hidden{opacity:0;visibility:hidden}#detail-modal:not(.hidden){opacity:1;visibility:visible}.modal-content{transform:translateY(100%);transition:transform var(--transition-normal);width:100%;max-width:100vw;max-height:75vh;overflow-y:auto;margin:0;z-index:10000;box-shadow:0 -20px 40px -10px #0000004d;border:none;border-top:4px solid var(--accent-primary);border-radius:var(--radius-2xl) var(--radius-2xl) 0 0;backdrop-filter:blur(20px);-webkit-backdrop-filter:blur(20px)}#detail-modal:not(.hidden) .modal-content{transform:translateY(0)}.modal-close-btn{position:absolute;top:var(--space-4);right:var(--space-4);background:none;border:none;font-size:var(--font-size-2xl);cursor:pointer;color:var(--text-tertiary);width:32px;height:32px;display:flex;align-items:center;justify-content:center;border-radius:50%;transition:all var(--transition-fast)}.modal-close-btn:hover{background:var(--bg-tertiary);color:var(--text-primary)}.modal-header{margin-bottom:var(--space-4);padding-bottom:var(--space-4);border-bottom:1px solid var(--border-primary)}.modal-title{font-size:var(--font-size-4xl);font-weight:var(--font-weight-black);color:var(--text-primary);margin:0;line-height:var(--line-height-tight);letter-spacing:var(--letter-spacing-tighter);background:linear-gradient(135deg,var(--text-primary) 0%,var(--accent-primary) 100%);-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text;text-shadow:0 2px 4px rgba(0,0,0,.1)}.modal-relation{font-size:var(--font-size-lg);color:var(--text-secondary);margin-top:var(--space-3);font-weight:var(--font-weight-semibold);text-transform:uppercase;letter-spacing:var(--letter-spacing-wider);line-height:var(--line-height-snug)}.modal-details{display:flex;flex-direction:column;gap:var(--space-2);margin:var(--space-4) 0}.modal-detail-item{display:flex;align-items:center;gap:var(--space-3);font-size:var(--font-size-base);color:var(--text-primary);padding:var(--space-3) 0;border-bottom:1px solid var(--border-primary);transition:all var(--transition-fast);font-weight:var(--font-weight-normal);line-height:var(--line-height-normal)}.modal-detail-item:hover{background:var(--bg-tertiary);margin:0 calc(-1 * var(--space-4));padding:var(--space-2) var(--space-4);border-radius:var(--radius-md);border-bottom-color:transparent}.modal-detail-label{font-weight:var(--font-weight-bold);min-width:100px;color:var(--text-secondary);text-transform:uppercase;font-size:var(--font-size-sm);letter-spacing:var(--letter-spacing-wider);line-height:var(--line-height-snug)}.modal-story{margin-top:var(--space-6);padding:var(--space-5);background:linear-gradient(135deg,var(--bg-tertiary) 0%,var(--bg-quaternary) 100%);border-radius:var(--radius-xl);font-style:italic;color:var(--text-secondary);line-height:1.6;border-left:4px solid var(--accent-primary);box-shadow:0 4px 16px var(--shadow-light);position:relative;overflow:hidden}.modal-story:before{content:'"';position:absolute;top:var(--space-2);left:var(--space-3);font-size:4rem;color:var(--accent-primary);opacity:.3;font-family:serif;line-height:1}.search-container{position:relative;display:flex;flex-direction:row;align-items:center;gap:var(--space-3);width:100%;z-index:10000;isolation:isolate}.search-input-wrapper{position:relative;display:flex;align-items:center;flex:1;z-index:9999}.search-icon{position:absolute;left:12px;color:var(--text-tertiary);pointer-events:none;z-index:1;font-size:var(--font-size-sm)}#search-input{padding:var(--space-3) var(--space-10) var(--space-3) var(--space-10);border:2px solid var(--border-primary);border-radius:var(--radius-xl);width:100%;max-width:400px;font-size:var(--font-size-sm);font-weight:var(--font-weight-normal);transition:all var(--transition-normal) cubic-bezier(.4,0,.2,1);background:var(--bg-secondary);color:var(--text-primary);box-shadow:0 2px 8px var(--shadow-light);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);letter-spacing:var(--letter-spacing-normal);line-height:var(--line-height-normal)}#search-input:focus{outline:none;border-color:var(--accent-primary);box-shadow:0 0 0 3px #3b82f61a,0 4px 12px var(--shadow-light)}#search-input::placeholder{color:var(--text-tertiary);transition:color var(--transition-normal)}#search-input:focus::placeholder{color:var(--text-secondary)}.search-clear-btn{position:absolute;right:var(--space-3);background:none;border:none;color:var(--text-tertiary);cursor:pointer;padding:var(--space-2);border-radius:var(--radius-md);display:none;align-items:center;justify-content:center;transition:all var(--transition-normal) cubic-bezier(.4,0,.2,1);width:24px;height:24px}.search-clear-btn:hover{background:var(--bg-secondary);color:var(--text-primary);transform:scale(1.1);box-shadow:0 2px 8px var(--shadow-light)}.search-clear-btn:active{transform:scale(.95)}.search-clear-btn.visible{display:flex}#search-input::-webkit-calendar-picker-indicator{display:none}.custom-dropdown{position:fixed;background:var(--bg-secondary);border:1px solid var(--border-primary);border-radius:var(--radius-lg);max-height:200px;overflow-y:auto;z-index:999999;box-shadow:0 4px 6px var(--shadow-light);transition:background-color .3s ease,border-color .3s ease;min-width:200px;width:auto}.dropdown-option{padding:8px 12px;cursor:pointer;border-bottom:1px solid var(--border-primary);transition:background-color .2s ease;color:var(--text-primary)}.dropdown-option:hover{background:var(--bg-tertiary)}.dropdown-option:last-child{border-bottom:none}.search-results-count{font-size:var(--font-size-xs);color:var(--text-secondary);background:var(--bg-tertiary);padding:var(--space-2) var(--space-3);border-radius:var(--radius-2xl);white-space:nowrap;transition:all var(--transition-normal) cubic-bezier(.4,0,.2,1);border:1px solid var(--border-primary);box-shadow:0 2px 8px var(--shadow-light);font-weight:500}.search-results-count.highlighted{background:linear-gradient(135deg,var(--accent-primary),var(--accent-hover));color:#fff;border-color:var(--accent-primary);box-shadow:0 4px 12px #3b82f64d;transform:scale(1.05)}.search-results-count:empty{display:none}.search-shortcut{font-size:11px;color:#999;background:#f8f9fa;padding:2px 6px;border-radius:4px;border:1px solid #e0e0e0}.filter-panel{background:var(--bg-secondary);height:100%;min-height:100%;overflow:hidden;transition:all var(--transition-normal);position:relative;display:flex;flex-direction:column}.filter-panel:before{content:"";position:absolute;top:0;left:0;right:0;height:4px;background:linear-gradient(90deg,var(--accent-primary),var(--success),var(--warning));z-index:1}.filter-panel:hover{box-shadow:0 16px 48px var(--shadow-heavy)}.filter-header{padding:var(--space-6) var(--space-6) var(--space-4) var(--space-6);border-bottom:1px solid var(--border-primary);background:linear-gradient(135deg,var(--bg-secondary) 0%,var(--bg-tertiary) 100%)}.filter-main-title{font-size:var(--font-size-lg);font-weight:700;color:var(--text-primary);margin:0 0 var(--space-2) 0;display:flex;align-items:center;gap:var(--space-2)}.filter-summary{font-size:var(--font-size-xs);color:var(--text-secondary);background:var(--accent-light);padding:var(--space-1) var(--space-2);border-radius:var(--radius-md);display:inline-block;border:1px solid var(--accent-primary)}.filter-tabs{display:flex;background:var(--bg-tertiary);border-bottom:1px solid var(--border-primary);padding:0 var(--space-1)}.filter-tab{flex:1;padding:var(--space-3) var(--space-2);border:none;background:transparent;color:var(--text-secondary);cursor:pointer;transition:all var(--transition-fast);border-radius:var(--radius-lg) var(--radius-lg) 0 0;margin:var(--space-1) var(--space-1) 0 var(--space-1);display:flex;flex-direction:column;align-items:center;gap:var(--space-1);font-size:var(--font-size-xs);font-weight:500}.filter-tab:hover{background:var(--bg-secondary);color:var(--text-primary);transform:translateY(-1px)}.filter-tab.active{background:var(--bg-secondary);color:var(--accent-primary);border-bottom:2px solid var(--accent-primary);margin-bottom:-1px;box-shadow:0 2px 8px var(--shadow-light)}.tab-icon{font-size:var(--font-size-base)}.tab-label{font-size:var(--font-size-xs);font-weight:600;text-transform:uppercase;letter-spacing:.5px}.filter-content{flex:1;overflow-y:auto;padding:var(--space-6);min-height:0}.filter-tab-content{display:none}.filter-tab-content.active{display:block}.filter-group{margin-bottom:var(--space-10)}.filter-group:last-child{margin-bottom:0}.filter-group-header{margin-bottom:var(--space-4)}.filter-group-title{font-size:var(--font-size-sm);font-weight:600;color:var(--text-primary);margin:0 0 var(--space-1) 0}.filter-group-description{font-size:var(--font-size-xs);color:var(--text-tertiary);line-height:1.4}.slider-container{margin:var(--space-4) 0}.modern-slider{width:100%;height:6px;border-radius:var(--radius-sm);background:var(--border-primary);outline:none;-webkit-appearance:none;appearance:none;cursor:pointer;margin-bottom:var(--space-2)}.modern-slider::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:20px;height:20px;border-radius:50%;background:var(--accent-primary);cursor:pointer;border:3px solid var(--bg-secondary);box-shadow:0 4px 12px var(--shadow-light);transition:all var(--transition-fast)}.modern-slider::-webkit-slider-thumb:hover{transform:scale(1.1);box-shadow:0 6px 16px var(--shadow-medium)}.modern-slider::-moz-range-thumb{width:20px;height:20px;border-radius:50%;background:var(--accent-primary);cursor:pointer;border:3px solid var(--bg-secondary);box-shadow:0 4px 12px var(--shadow-light);transition:all var(--transition-fast)}.slider-value{display:flex;align-items:center;justify-content:center;gap:var(--space-1);margin-top:var(--space-2)}.slider-value-number{font-size:var(--font-size-base);font-weight:700;color:var(--accent-primary)}.slider-value-label{font-size:var(--font-size-xs);color:var(--text-secondary);text-transform:uppercase;letter-spacing:.5px}.country-grid{display:grid;grid-template-columns:1fr 1fr;gap:var(--space-2);margin-bottom:var(--space-4)}.country-card{position:relative}.country-checkbox{position:absolute;opacity:0;pointer-events:none}.country-card-label{display:flex;align-items:center;gap:var(--space-2);padding:var(--space-3);border:1px solid var(--border-primary);border-radius:var(--radius-lg);cursor:pointer;transition:all var(--transition-fast);background:var(--bg-tertiary);min-height:48px;height:48px}.country-card-label:hover{border-color:var(--accent-primary);background:var(--accent-light);transform:translateY(-1px);box-shadow:0 4px 12px var(--shadow-light)}.country-checkbox:checked+.country-card-label{border-color:var(--accent-primary);background:var(--accent-light);box-shadow:0 4px 12px #3b82f633}.country-flag{width:24px;height:24px;border-radius:var(--radius-sm);overflow:hidden;flex-shrink:0}.country-flag img{width:100%;height:100%;object-fit:cover}.country-info{flex:1;min-width:0}.country-name{font-size:var(--font-size-xs);font-weight:600;color:var(--text-primary);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.country-count{font-size:var(--font-size-xs);color:var(--text-tertiary)}.country-actions{display:flex;gap:var(--space-2);margin-top:var(--space-4)}.range-container{margin:var(--space-4) 0}.range-row{display:flex;align-items:end;gap:12px}.range-field{flex:1;min-width:0}.range-label{display:block;font-size:var(--font-size-xs);color:var(--text-secondary);margin-bottom:var(--space-1);font-weight:500;text-transform:uppercase;letter-spacing:.5px}.modern-input{width:100%;padding:var(--space-2) var(--space-3);border:1px solid var(--border-primary);border-radius:var(--radius-md);background:var(--bg-tertiary);color:var(--text-primary);font-size:var(--font-size-sm);font-weight:500;transition:all var(--transition-fast);box-shadow:0 1px 3px #0000000d;box-sizing:border-box}.modern-input:focus{outline:none;border-color:var(--accent-primary);box-shadow:0 0 0 3px #3b82f61a}.range-to{font-size:14px;color:var(--text-tertiary);font-weight:500;display:flex;align-items:center;height:40px;padding:0 8px;flex-shrink:0}.checkbox-grid{display:grid;grid-template-columns:1fr 1fr;gap:var(--space-2)}.checkbox-card{position:relative}.modern-checkbox{position:absolute;opacity:0;pointer-events:none}.checkbox-label{display:flex;align-items:center;gap:var(--space-3);padding:var(--space-3);border:1px solid var(--border-primary);border-radius:var(--radius-lg);cursor:pointer;transition:all var(--transition-fast);background:var(--bg-tertiary);min-height:48px;height:48px}.checkbox-label:hover{border-color:var(--accent-primary);background:var(--accent-light);transform:translateY(-1px);box-shadow:0 4px 12px var(--shadow-light)}.modern-checkbox:checked+.checkbox-label{border-color:var(--accent-primary);background:var(--accent-light);box-shadow:0 4px 12px #3b82f633}.checkbox-icon{font-size:var(--font-size-lg);width:24px;text-align:center;flex-shrink:0}.checkbox-text{flex:1;min-width:0;overflow:hidden}.checkbox-title{font-size:var(--font-size-xs);font-weight:600;color:var(--text-primary);margin-bottom:var(--space-1)}.checkbox-description{font-size:var(--font-size-xs);color:var(--text-tertiary);line-height:1.3;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.action-btn{display:flex;align-items:center;gap:var(--space-2);padding:var(--space-2) var(--space-3);border:1px solid var(--border-secondary);border-radius:var(--radius-md);background:var(--bg-secondary);color:var(--text-secondary);font-size:var(--font-size-xs);font-weight:500;cursor:pointer;transition:all var(--transition-fast);text-decoration:none}.action-btn:hover{background:var(--bg-tertiary);border-color:var(--accent-primary);color:var(--accent-primary);transform:translateY(-1px);box-shadow:0 4px 12px var(--shadow-light)}.action-btn.primary{background:var(--accent-primary);color:#fff;border-color:var(--accent-primary)}.action-btn.primary:hover{background:var(--accent-hover);border-color:var(--accent-hover);box-shadow:0 4px 12px #3b82f64d}.action-btn.secondary{background:var(--bg-tertiary);color:var(--text-primary)}.btn-icon{font-size:var(--font-size-sm)}.filter-footer{flex-shrink:0;padding:var(--space-4) var(--space-6);border-top:1px solid var(--border-primary);background:var(--bg-tertiary)}.filter-actions{display:flex;gap:var(--space-2);margin-bottom:var(--space-2)}.filter-stats{text-align:center}.filter-count{font-size:var(--font-size-xs);color:var(--text-tertiary);font-style:italic}@media (max-width: 768px){.dashboard-container{grid-template-areas:"header" "main";grid-template-columns:1fr 3fr 1fr;grid-template-rows:auto 1fr}.dashboard-sidebar-left,.dashboard-sidebar-right{position:fixed;inset:0;z-index:2000;transform:translate(-100%);transition:transform var(--transition-normal)}.dashboard-sidebar-right{transform:translate(100%)}.dashboard-sidebar-left.active,.dashboard-sidebar-right.active{transform:translate(0)}body{font-size:var(--font-size-sm)}.main-header{margin-bottom:var(--space-4)}.header-content{flex-direction:column;gap:var(--space-4);padding:var(--space-4)}.header-left,.header-center,.header-right{width:100%}.header-center{order:2;margin:0}.header-right{order:3}.header-left{order:1}.logo-section{justify-content:center}.title-section h1{font-size:var(--font-size-xl);text-align:center}.subtitle{text-align:center}.header-controls{justify-content:center;flex-wrap:wrap;gap:var(--space-4)}.control-group{flex-wrap:wrap;justify-content:center}.header-btn{padding:var(--space-2) var(--space-3);font-size:var(--font-size-xs)}.btn-label{display:none}.search-container{width:100%;justify-content:center;flex-direction:row;gap:var(--space-2)}#search-input{width:100%;max-width:300px;padding:var(--space-3) var(--space-10) var(--space-3) var(--space-10);font-size:var(--font-size-base)}.view-controls{top:80px;right:var(--space-3);flex-wrap:wrap;gap:var(--space-2)}.view-control-btn{width:36px;height:36px;font-size:var(--font-size-base)}#tree-container{margin-top:var(--space-6);border-radius:var(--radius-lg)}.modal-content{margin:0;max-width:100vw;max-height:80vh;overflow-y:auto;border-top:3px solid var(--accent-primary);border-radius:var(--radius-xl) var(--radius-xl) 0 0}.modal-title{font-size:var(--font-size-xl)}.modal-detail-item{flex-direction:column;align-items:flex-start;gap:var(--space-1)}.modal-detail-label{min-width:auto;font-weight:700}#legend{position:fixed;top:60px;right:var(--space-3);left:auto;max-width:200px;font-size:var(--font-size-xs);padding:var(--space-2);max-height:120px;overflow-y:auto;-webkit-overflow-scrolling:touch}#legend ul{display:flex;flex-direction:column;gap:var(--space-1);margin:0;padding:0}#legend .legend-item{display:flex;align-items:center;gap:var(--space-2);margin-bottom:var(--space-1);font-size:var(--font-size-sm);line-height:1.2}#legend .legend-section{font-size:var(--font-size-sm);font-weight:700;margin-top:var(--space-2);margin-bottom:var(--space-1)}#legend .line-sample{width:20px;height:1px}.filter-panel{width:calc(100vw - var(--space-6));left:var(--space-3);right:var(--space-3);top:60px;max-height:calc(100vh - 80px);border-radius:var(--radius-lg)}.filter-content{flex:1;overflow-y:auto;padding:var(--space-4);min-height:0}.country-grid,.checkbox-grid{grid-template-columns:1fr}.range-row{flex-direction:column;gap:8px;align-items:stretch}.range-field{min-width:unset}.range-to{line-height:1;padding:8px 0;text-align:center}.filter-tabs{flex-wrap:wrap}.filter-tab{min-width:60px;padding:var(--space-2) var(--space-1)}.tab-label{font-size:var(--font-size-xs)}.stats-dashboard{top:60px;left:var(--space-3);right:var(--space-3);max-width:none;max-height:calc(133.33vh - 80px)}.timeline-panel{bottom:var(--space-3);right:var(--space-3);left:var(--space-3);max-width:none;max-height:calc(133.33vh - 120px)}.node{cursor:pointer}.node circle,.node rect{stroke-width:2px}.node:hover circle,.node:hover rect{stroke-width:3px;stroke:var(--accent-primary);filter:drop-shadow(0 2px 8px rgba(59,130,246,.3))}.node:hover{filter:drop-shadow(0 4px 12px rgba(0,0,0,.15))}.node:hover .node-text{fill:var(--accent-primary);font-weight:700}.node-text{font-size:var(--font-size-xs)}.generation-title{font-size:var(--font-size-sm)}.generation-subtitle{font-size:var(--font-size-xs)}.generation-separator{stroke-width:.5;opacity:.2}text{font-size:var(--font-size-xs)}}@media (max-width: 480px){body{padding:var(--space-1)}h1{font-size:var(--font-size-lg)}#search-input{padding:var(--space-3) var(--space-8) var(--space-3) var(--space-8);font-size:var(--font-size-base)}.view-controls{gap:var(--space-1)}.view-control-btn{width:32px;height:32px;font-size:var(--font-size-sm)}.filter-panel{width:calc(100vw - var(--space-3));left:var(--space-1);right:var(--space-1);top:50px}.filter-header{padding:var(--space-4)}.filter-main-title{font-size:var(--font-size-base)}.filter-content{flex:1;overflow-y:auto;padding:var(--space-4);min-height:0}.filter-group{margin-bottom:var(--space-4)}.country-card-label,.checkbox-label{padding:var(--space-2)}.checkbox-icon{font-size:var(--font-size-base);width:20px}.checkbox-title,.checkbox-description{font-size:var(--font-size-xs)}.modal-content{margin:var(--space-1);max-width:calc(100vw - var(--space-3));max-height:calc(100vh - var(--space-3))}.modal-title{font-size:var(--font-size-lg)}.stats-dashboard{left:var(--space-1);right:var(--space-1);top:50px}.timeline-panel{left:var(--space-1);right:var(--space-1);bottom:var(--space-1)}#legend{right:var(--space-1);left:auto;top:50px;max-width:150px;max-height:100px;font-size:var(--font-size-xs);padding:var(--space-2)}#legend .legend-item{font-size:var(--font-size-sm);gap:var(--space-1);margin-bottom:var(--space-1)}#legend .legend-section{font-size:var(--font-size-sm);margin-top:var(--space-1);margin-bottom:var(--space-1)}#legend .line-sample{width:15px;height:1px}.node-text,.generation-title,.generation-subtitle{font-size:var(--font-size-xs)}.generation-separator{stroke-width:.5;opacity:.15}text{font-size:var(--font-size-xs)}}@media (max-width: 768px) and (orientation: landscape){.filter-panel,.stats-dashboard,.timeline-panel,.migration-panel{max-height:calc(133.33vh - 60px)}.filter-content{flex:1;overflow-y:auto;min-height:0}.modal-content{max-height:calc(100vh - 40px)}}.modern-checkbox:focus+.checkbox-label,.country-checkbox:focus+.country-card-label{outline:2px solid var(--accent-primary);outline-offset:2px}.modern-slider:focus{outline:2px solid var(--accent-primary);outline-offset:2px}.modern-input:focus{outline:2px solid var(--accent-primary);outline-offset:2px}.action-btn:focus{outline:2px solid var(--accent-primary);outline-offset:2px}.filter-tab:focus{outline:2px solid var(--accent-primary);outline-offset:2px}@media (prefers-contrast: high){.filter-panel,.country-card-label,.checkbox-label{border:2px solid var(--text-primary)}.modern-checkbox:checked+.checkbox-label,.country-checkbox:checked+.country-card-label{border:2px solid var(--accent-primary);background:var(--accent-primary);color:#fff}}@media (prefers-reduced-motion: reduce){.filter-panel,.country-card-label,.checkbox-label,.action-btn,.modern-slider{transition:none}.country-card-label:hover,.checkbox-label:hover,.action-btn:hover{transform:none}}.view-controls{position:absolute;top:var(--space-4);right:var(--space-4);display:flex;gap:var(--space-2);z-index:1100}.zoom-controls{display:flex;flex-direction:column;gap:var(--space-2);background:linear-gradient(135deg,var(--bg-secondary) 0%,var(--bg-tertiary) 100%);border:1px solid var(--border-secondary);border-radius:var(--radius-xl);padding:var(--space-4);box-shadow:0 8px 24px var(--shadow-light);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px)}.view-control-btn{width:44px;height:44px;border:1px solid var(--border-secondary);border-radius:var(--radius-lg);background:var(--bg-secondary);color:var(--text-secondary);cursor:pointer;display:flex;align-items:center;justify-content:center;transition:all var(--transition-normal) cubic-bezier(.4,0,.2,1);box-shadow:0 4px 12px var(--shadow-light);position:relative;overflow:hidden}.view-control-btn:hover{background:var(--bg-tertiary);border-color:var(--accent-primary);color:var(--accent-primary);transform:translateY(-1px);box-shadow:0 6px 16px #3b82f626}.view-control-btn:active{transform:translateY(0);box-shadow:0 4px 12px #3b82f64d}.view-control-btn:focus{outline:2px solid var(--accent-primary);outline-offset:2px}.view-control-btn.clicked{background:var(--accent-light);color:var(--accent-primary);border-color:var(--accent-primary);box-shadow:0 0 0 3px #3b82f633}.stats-dashboard{background:var(--bg-secondary);height:100%;max-height:100%;padding:var(--space-6);overflow:hidden;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,sans-serif;transition:background-color var(--transition-normal),border-color var(--transition-normal);position:relative;box-sizing:border-box;display:flex;flex-direction:column}.stats-dashboard:before{content:"";position:absolute;top:0;left:0;right:0;height:4px;background:linear-gradient(90deg,var(--success),var(--accent-primary),var(--warning));z-index:1}.stats-dashboard.hidden{display:none}.stats-content{height:calc(100% - 60px);max-height:calc(133.33vh - 220px);overflow-y:auto;overflow-x:hidden;flex:1}.stats-title{font-size:var(--font-size-lg);font-weight:700;margin-bottom:var(--space-4);color:var(--text-primary);border-bottom:2px solid var(--accent-primary);padding-bottom:var(--space-2)}.stats-section{margin-bottom:var(--space-4)}.stats-section-title{font-size:var(--font-size-sm);font-weight:600;color:var(--text-primary);margin-bottom:var(--space-2)}.stats-section-title.collapsible{cursor:pointer;-webkit-user-select:none;user-select:none;display:flex;justify-content:space-between;align-items:center;padding:var(--space-1) 0;border-radius:var(--radius-sm);transition:background-color var(--transition-fast)}.stats-section-title.collapsible:hover{background-color:var(--bg-tertiary)}.collapse-icon{font-size:var(--font-size-xs);color:var(--text-tertiary);transition:transform var(--transition-fast)}.stats-section-content{display:block}.stats-grid{display:grid;grid-template-columns:1fr 1fr;gap:var(--space-2);margin-bottom:var(--space-3)}.stat-item{background:var(--bg-tertiary);padding:var(--space-2);border-radius:var(--radius-md);text-align:center;border:1px solid var(--border-primary)}.stat-value{font-size:var(--font-size-base);font-weight:700;color:var(--accent-primary)}.stat-label{font-size:var(--font-size-xs);color:var(--text-secondary);margin-top:var(--space-1)}.dna-breakdown{background:var(--bg-tertiary);border-radius:var(--radius-lg);padding:var(--space-3);margin-top:var(--space-3)}.dna-item{display:flex;align-items:center;margin-bottom:var(--space-2);font-size:var(--font-size-xs);gap:var(--space-2)}.dna-label{min-width:120px;width:120px;white-space:nowrap;flex-shrink:0;overflow:hidden;text-overflow:ellipsis}.dna-bar{flex:1;height:8px;background:var(--border-primary);border-radius:var(--radius-sm);overflow:hidden;min-width:60px}.dna-percent{min-width:40px;text-align:right;flex-shrink:0}.dna-fill{height:100%;background:linear-gradient(90deg,var(--accent-primary),#7bb3f0);transition:width var(--transition-slow)}.filter-panel.hidden{display:none}.timeline-panel{background:var(--bg-secondary);height:100%;min-height:100%;padding:var(--space-6);overflow-y:auto;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,sans-serif;transition:background-color var(--transition-normal),border-color var(--transition-normal);position:relative;display:flex;flex-direction:column}.timeline-panel:before{content:"";position:absolute;top:0;left:0;right:0;height:4px;background:linear-gradient(90deg,var(--warning),var(--accent-primary),var(--success));z-index:1}.timeline-panel.hidden{display:none}.migration-panel{background:var(--bg-secondary);height:100%;min-height:100%;padding:var(--space-6);overflow-y:auto;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,sans-serif;transition:background-color var(--transition-normal),border-color var(--transition-normal);position:relative;display:flex;flex-direction:column}.migration-panel:before{content:"";position:absolute;top:0;left:0;right:0;height:4px;background:linear-gradient(90deg,var(--accent-primary),var(--success),var(--warning));z-index:1}.migration-panel.hidden{display:none}.migration-title{font-size:var(--font-size-lg);font-weight:var(--font-weight-semibold);color:var(--text-primary);margin-bottom:var(--space-4);display:flex;align-items:center;gap:var(--space-2)}.migration-content{display:flex;flex-direction:column;gap:var(--space-4)}.migration-stats{display:flex;gap:var(--space-4);justify-content:space-around}.migration-stats .stat-item{text-align:center;padding:var(--space-3);background:var(--bg-tertiary);border-radius:var(--radius-md);border:1px solid var(--border-primary)}.migration-stats .stat-number{font-size:var(--font-size-lg);font-weight:var(--font-weight-bold);color:var(--accent-primary);line-height:1}.migration-stats .stat-label{font-size:var(--font-size-sm);color:var(--text-secondary);margin-top:var(--space-1)}.migration-map-container{background:var(--bg-primary);border:1px solid var(--border-primary);border-radius:var(--radius-md);overflow:hidden;min-height:300px;display:flex;align-items:center;justify-content:center}.no-migration-data,.migration-error{text-align:center;padding:var(--space-8);color:var(--text-secondary)}.no-data-icon,.error-icon{font-size:var(--font-size-4xl);margin-bottom:var(--space-3)}.no-data-text,.error-text{font-size:var(--font-size-lg);font-weight:var(--font-weight-medium);color:var(--text-primary);margin-bottom:var(--space-2)}.no-data-subtext{font-size:var(--font-size-sm);color:var(--text-tertiary)}.migration-legend{display:flex;flex-direction:column;gap:var(--space-2);padding:var(--space-3);background:var(--bg-tertiary);border-radius:var(--radius-md);border:1px solid var(--border-primary)}.migration-legend .legend-item{display:flex;align-items:center;gap:var(--space-2);font-size:var(--font-size-sm);color:var(--text-secondary)}.legend-dot{width:12px;height:12px;border-radius:50%;border:2px solid var(--bg-secondary)}.legend-dot.migration-point{background:var(--accent-primary)}.legend-line{width:20px;height:2px;background:var(--accent-primary);position:relative}.legend-line.migration-route:after{content:"";position:absolute;right:-2px;top:-1px;width:0;height:0;border-left:4px solid var(--accent-primary);border-top:2px solid transparent;border-bottom:2px solid transparent}.migration-tooltip{font-family:inherit;font-size:var(--font-size-sm);line-height:var(--line-height-normal);max-width:200px;word-wrap:break-word}.map-panel{position:fixed;top:130px;right:20px;background:var(--bg-secondary);border:1px solid var(--border-secondary);border-radius:12px;padding:20px;box-shadow:0 4px 20px var(--shadow-medium);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);z-index:1100;max-width:500px;max-height:calc(100vh - 160px);overflow-y:auto;font-family:Segoe UI,Tahoma,Geneva,Verdana,sans-serif;transition:background-color .3s ease,border-color .3s ease}.map-panel.hidden{display:none}.map-title{font-size:18px;font-weight:700;margin-bottom:15px;color:var(--text-primary);border-bottom:2px solid var(--accent-primary);padding-bottom:8px}.map-content{display:flex;flex-direction:column;gap:16px}.map-controls{display:flex;gap:8px;flex-wrap:wrap}.map-btn{padding:8px 12px;border:1px solid var(--border-primary);border-radius:6px;background:var(--bg-tertiary);color:var(--text-secondary);cursor:pointer;transition:all .2s ease;font-size:12px;font-weight:500}.map-btn:hover{background:var(--bg-secondary);border-color:var(--accent-primary);color:var(--accent-primary)}.map-btn.active{background:var(--accent-primary);color:#fff;border-color:var(--accent-primary)}.map-container{min-height:300px;background:var(--bg-tertiary);border-radius:8px;border:1px solid var(--border-primary);padding:16px;transition:background-color .3s ease,border-color .3s ease}.map-placeholder{display:flex;align-items:center;justify-content:center;height:100%;min-height:250px}.map-placeholder-content{text-align:center;color:var(--text-secondary)}.map-placeholder-content svg{color:var(--text-tertiary);margin-bottom:16px}.map-placeholder-content h3{margin:0 0 8px;color:var(--text-primary)}.map-placeholder-content p{margin:0;font-size:14px}.map-visualization h4{margin:0 0 16px;color:var(--text-primary);font-size:16px;font-weight:600}.location-stats{margin-top:16px}.location-stats h4{margin:0 0 12px;color:var(--text-primary);font-size:14px;font-weight:600}.location-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}.location-stat-item{display:flex;align-items:center;gap:8px;padding:8px;background:var(--bg-tertiary);border-radius:6px;border:1px solid var(--border-primary);transition:all .2s ease}.location-stat-item:hover{background:var(--bg-secondary);border-color:var(--accent-primary)}.location-flag{flex-shrink:0}.location-info{flex:1;min-width:0}.location-name{font-size:12px;font-weight:600;color:var(--text-primary);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.location-count{font-size:10px;color:var(--text-secondary)}.country-locations{display:flex;flex-direction:column;gap:12px}.country-location-group{background:var(--bg-tertiary);border-radius:8px;border:1px solid var(--border-primary);overflow:hidden}.country-header{display:flex;align-items:center;gap:8px;padding:12px;background:var(--bg-secondary);border-bottom:1px solid var(--border-primary)}.country-name{font-weight:600;color:var(--text-primary);flex:1}.country-count{font-size:12px;color:var(--text-secondary);background:var(--accent-light);padding:2px 8px;border-radius:12px;border:1px solid var(--accent-primary)}.people-list{padding:8px}.person-location{display:flex;align-items:center;gap:8px;padding:6px 8px;border-radius:4px;cursor:pointer;transition:all .2s ease;margin-bottom:4px}.person-location:hover{background:var(--accent-light);border:1px solid var(--accent-primary)}.person-location .person-name{font-weight:500;color:var(--text-primary);flex:1}.person-location .person-place{font-size:11px;color:var(--text-secondary);flex:1}.person-location .person-year{font-size:10px;color:var(--text-tertiary);background:var(--bg-primary);padding:2px 6px;border-radius:10px}.migration-patterns{display:flex;flex-direction:column;gap:12px}.stats-section .migration-content{display:flex;flex-direction:column;gap:var(--space-4)}.stats-section .migration-stats{display:flex;gap:var(--space-4);justify-content:space-around}.stats-section .migration-stats .stat-item{text-align:center;padding:var(--space-3);background:var(--bg-tertiary);border-radius:var(--radius-md);border:1px solid var(--border-primary)}.stats-section .migration-stats .stat-number{font-size:var(--font-size-lg);font-weight:var(--font-weight-bold);color:var(--accent-primary);line-height:1}.stats-section .migration-stats .stat-label{font-size:var(--font-size-sm);color:var(--text-secondary);margin-top:var(--space-1)}.stats-section .migration-map-container{background:var(--bg-primary);border:1px solid var(--border-primary);border-radius:var(--radius-md);overflow:hidden;min-height:300px;display:flex;align-items:center;justify-content:center}.stats-section .migration-legend{display:flex;flex-direction:column;gap:var(--space-2);padding:var(--space-3);background:var(--bg-tertiary);border-radius:var(--radius-md);border:1px solid var(--border-primary)}.stats-section .migration-legend .legend-item{display:flex;align-items:center;gap:var(--space-2);font-size:var(--font-size-sm);color:var(--text-secondary)}.stats-section .migration-patterns-breakdown{margin-top:var(--space-4)}.stats-section .migration-patterns-breakdown h4{font-size:var(--font-size-sm);font-weight:var(--font-weight-semibold);color:var(--text-primary);margin-bottom:var(--space-2)}.zoom-controls{pointer-events:all}.zoom-control{transition:opacity .2s ease}.zoom-control text{-webkit-user-select:none;user-select:none;pointer-events:none}.migration-pattern{background:var(--bg-tertiary);border-radius:8px;border:1px solid var(--border-primary);overflow:hidden}.migration-header{display:flex;align-items:center;gap:8px;padding:12px;background:var(--bg-secondary);border-bottom:1px solid var(--border-primary)}.migration-from,.migration-to{display:flex;align-items:center;gap:4px;font-weight:500;color:var(--text-primary)}.migration-arrow{color:var(--accent-primary);font-weight:700;font-size:14px}.migration-count{font-size:12px;color:var(--text-secondary);background:var(--accent-light);padding:2px 8px;border-radius:12px;border:1px solid var(--accent-primary);margin-left:auto}.migration-people{padding:8px}.migration-person{display:flex;align-items:center;gap:8px;padding:4px 8px;border-radius:4px;margin-bottom:2px}.migration-person .person-name{font-weight:500;color:var(--text-primary);flex:1}.migration-year{font-size:10px;color:var(--text-tertiary);background:var(--bg-primary);padding:2px 6px;border-radius:10px}.distance-calculator{display:flex;flex-direction:column;gap:16px}.distance-controls{display:flex;flex-direction:column;gap:12px}.location-selector{display:flex;flex-direction:column;gap:4px}.location-selector label{font-size:12px;font-weight:600;color:var(--text-primary)}.location-selector select{padding:8px 12px;border:1px solid var(--border-primary);border-radius:6px;background:var(--bg-secondary);color:var(--text-primary);font-size:14px;transition:all .2s ease}.location-selector select:focus{outline:none;border-color:var(--accent-primary);box-shadow:0 0 0 3px #4a9eff1a}.calculate-btn{padding:10px 16px;background:var(--accent-primary);color:#fff;border:none;border-radius:6px;cursor:pointer;font-weight:500;transition:all .2s ease}.calculate-btn:hover{background:var(--accent-hover);transform:translateY(-1px)}.distance-result{padding:16px;background:var(--bg-tertiary);border-radius:8px;border:1px solid var(--border-primary)}.distance-info h5{margin:0 0 12px;color:var(--text-primary);font-size:14px;font-weight:600}.distance-info p{margin:0 0 8px;font-size:13px;color:var(--text-secondary)}.distance-note{font-size:11px!important;color:var(--text-tertiary)!important;font-style:italic}.timeline-title{font-size:var(--font-size-lg);font-weight:700;margin-bottom:var(--space-4);color:var(--text-primary);border-bottom:2px solid var(--accent-primary);padding-bottom:var(--space-2)}.timeline-content{height:calc(100% - 60px);max-height:calc(133.33vh - 220px);overflow-y:auto}.timeline-decade{margin-bottom:var(--space-6);border-left:3px solid var(--accent-primary);padding-left:var(--space-4)}.decade-header{font-size:var(--font-size-base);font-weight:600;color:var(--accent-primary);margin-bottom:var(--space-3);background:var(--accent-light);padding:var(--space-1) var(--space-3);border-radius:var(--radius-sm);display:inline-block}.decade-people{display:flex;flex-direction:column;gap:var(--space-2)}.timeline-person{background:var(--bg-tertiary);border:1px solid var(--border-primary);border-radius:var(--radius-md);padding:var(--space-2);cursor:pointer;transition:all var(--transition-fast)}.timeline-person:hover{background:var(--accent-light);border-color:var(--accent-primary);transform:translate(var(--space-1));box-shadow:0 4px 12px var(--shadow-light)}.person-year{font-size:var(--font-size-xs);font-weight:700;color:var(--accent-primary)}.person-name{font-size:var(--font-size-sm);font-weight:600;color:var(--text-primary);margin:var(--space-1) 0}.person-place{font-size:var(--font-size-xs);color:var(--text-secondary)}.person-country{font-size:var(--font-size-xs);color:var(--text-tertiary);font-style:italic}.more-people{font-size:var(--font-size-xs);color:var(--text-secondary);font-style:italic;text-align:center;padding:var(--space-1);background:var(--bg-tertiary);border-radius:var(--radius-sm)}[data-theme=dark] .modal-content{background:var(--bg-secondary);color:var(--text-primary)}[data-theme=dark] .modal-close-btn{color:var(--text-secondary)}[data-theme=dark] .modal-close-btn:hover{background:var(--bg-tertiary);color:var(--text-primary)}[data-theme=dark] .main-header{background:linear-gradient(135deg,var(--bg-secondary) 0%,var(--bg-tertiary) 100%);border-bottom-color:var(--border-secondary)}[data-theme=dark] .header-btn:before{background:linear-gradient(90deg,transparent,rgba(255,255,255,.05),transparent)}[data-theme=dark] .view-control-btn:before{background:linear-gradient(90deg,transparent,rgba(255,255,255,.05),transparent)}[data-theme=dark] .logo-icon{filter:drop-shadow(0 2px 4px rgba(74,158,255,.4))}[data-theme=dark] .logo-icon:hover{filter:drop-shadow(0 4px 8px rgba(74,158,255,.6))}.minimap-container{transition:background-color .3s ease,border-color .3s ease}.mobile-device{-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent}.mobile-device .node{-webkit-tap-highlight-color:rgba(74,158,255,.3)}@media (max-width: 768px){button{min-height:44px;min-width:44px;touch-action:manipulation}.view-control-btn,.stats-toggle-btn,.timeline-toggle-btn,.filter-toggle-btn,.theme-toggle-btn{min-height:44px;min-width:44px}input,select,textarea{font-size:16px}.country-card-label,.checkbox-label{min-height:44px;display:flex;align-items:center}.filter-tab{min-height:44px;display:flex;align-items:center;justify-content:center}.modal-content{-webkit-overflow-scrolling:touch;overscroll-behavior:contain}.filter-content,.timeline-content,.stats-content,.modal-content{-webkit-overflow-scrolling:touch;scrollbar-width:thin}.filter-content::-webkit-scrollbar,.timeline-content::-webkit-scrollbar,.stats-content::-webkit-scrollbar,.modal-content::-webkit-scrollbar{width:4px}.filter-content::-webkit-scrollbar-thumb,.timeline-content::-webkit-scrollbar-thumb,.stats-content::-webkit-scrollbar-thumb,.modal-content::-webkit-scrollbar-thumb{background:var(--border-primary);border-radius:2px}.custom-dropdown{max-height:200px;-webkit-overflow-scrolling:touch}.dropdown-option{min-height:44px;display:flex;align-items:center}#legend,.stats-dashboard,.stats-content{-webkit-overflow-scrolling:touch;overscroll-behavior:contain}.stat-item,.timeline-person{min-height:44px;display:flex;flex-direction:column;justify-content:center}.search-input-wrapper{position:relative}.search-clear-btn{min-height:44px;min-width:44px}.modern-slider{height:8px;-webkit-appearance:none;appearance:none}.modern-slider::-webkit-slider-thumb{width:24px;height:24px;border:3px solid var(--bg-secondary)}.modern-slider::-moz-range-thumb{width:24px;height:24px;border:3px solid var(--bg-secondary)}.action-btn{min-height:44px;padding:12px 16px}.modal-close-btn{width:44px;height:44px;font-size:20px}.modal-title{line-height:1.3}.modal-detail-item{padding:8px 0}.filter-group{margin-bottom:20px}.filter-group:last-child{margin-bottom:0}.country-grid,.checkbox-grid{gap:12px}.modern-input{min-height:44px;padding:12px 16px;font-size:16px}.range-input{margin-bottom:16px}.dna-item{min-height:44px;padding:8px 0}.dna-bar{height:12px}.lifespan-chart-container{padding:var(--space-3)}.chart-header{flex-direction:column;align-items:flex-start;gap:var(--space-3)}.chart-legend{gap:var(--space-3)}.stats-grid{grid-template-columns:repeat(2,1fr);gap:var(--space-2)}.stat-item{padding:var(--space-2)}.stat-value{font-size:var(--font-size-md)}.lifespan-line-chart{min-width:300px}.view-controls{gap:8px}.minimap-container{bottom:16px;right:16px;width:160px;height:120px;border-radius:8px}.filter-panel,.stats-dashboard,.timeline-panel,.migration-panel{transition:transform .3s ease,opacity .3s ease}.filter-panel.hidden,.stats-dashboard.hidden,.timeline-panel.hidden,.migration-panel.hidden{transform:translate(-100%);opacity:0}.legend-item{min-height:32px;padding:4px 0}.node-text{text-shadow:1px 1px 2px rgba(0,0,0,.8)}.generation-title{font-size:13px;text-shadow:1px 1px 2px rgba(0,0,0,.8)}.generation-subtitle{font-size:10px;text-shadow:1px 1px 2px rgba(0,0,0,.8)}.generation-separator{stroke-width:.8;opacity:.3}}.chart-tooltip{position:absolute;background:var(--bg-primary);color:var(--text-primary);padding:8px 12px;border-radius:6px;font-size:12px;font-weight:500;pointer-events:none;z-index:1300;box-shadow:0 4px 12px #0000004d;border:1px solid var(--border-primary);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);max-width:200px;line-height:1.4}.chart-tooltip strong{color:var(--accent-primary);font-weight:600}.stats-section-content{transition:all .3s ease}.stats-section-content.collapsed{display:none}#timeline-visualization,#country-pie-chart,#dna-pie-chart,#gender-pie-chart,#archaic-ancestry-pie-chart{background:var(--bg-tertiary);border-radius:8px;border:1px solid var(--border-primary);padding:10px;margin:10px 0;transition:background-color .3s ease,border-color .3s ease}.stats-dashboard svg{font-family:Segoe UI,Tahoma,Geneva,Verdana,sans-serif}.stats-dashboard .axis text{fill:var(--text-secondary);font-size:10px}.stats-dashboard .axis path,.stats-dashboard .axis line{stroke:var(--border-primary)}.stats-dashboard .grid line{stroke:var(--border-primary);stroke-opacity:.3}.pie-legend .legend-item text{fill:var(--text-primary)!important;font-size:10px!important;font-weight:500}.pie-legend .legend-item rect{stroke:var(--border-primary);stroke-width:1}.stats-dashboard .axis text{fill:var(--text-secondary)!important}.stats-dashboard .axis-bottom text{transform-origin:center}.dna-item{position:relative;transition:all .2s ease}.dna-item:hover{transform:translate(2px)}.dna-item:hover .dna-bar{box-shadow:0 2px 8px #0000001a}.name-analysis .dna-fill{background:linear-gradient(90deg,#6f42c1,#9c27b0)!important}.data-quality .dna-fill[style*="background: #28a745"]{background:linear-gradient(90deg,#28a745,#20c997)!important}.data-quality .dna-fill[style*="background: #ffc107"]{background:linear-gradient(90deg,#ffc107,#fd7e14)!important}.data-quality .dna-fill[style*="background: #dc3545"]{background:linear-gradient(90deg,#dc3545,#e83e8c)!important}.lifespan-chart-container{background:var(--bg-tertiary);border-radius:var(--radius-lg);padding:var(--space-4);margin-top:var(--space-3)}.chart-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:var(--space-4);flex-wrap:wrap;gap:var(--space-2)}.chart-header h4{margin:0;color:var(--text-primary);font-size:var(--font-size-lg);font-weight:600}.chart-legend{display:flex;gap:var(--space-4);flex-wrap:wrap}.legend-item{display:flex;align-items:center;gap:var(--space-2);font-size:var(--font-size-base);color:var(--text-secondary)}.legend-color{width:16px;height:16px;border-radius:var(--radius-sm)}.line-chart-wrapper{width:100%;overflow-x:auto;margin-bottom:var(--space-4)}.lifespan-line-chart{display:block;max-width:100%;height:auto}.lifespan-line{stroke-linecap:round;stroke-linejoin:round;filter:drop-shadow(0 2px 4px rgba(0,0,0,.1))}.lifespan-point{cursor:pointer;transition:all .2s ease;opacity:.8}.lifespan-point:hover{opacity:1;filter:drop-shadow(0 2px 4px rgba(0,0,0,.15))}.lifespan-area{opacity:.6}.lifespan-range{opacity:.4}.dna-line{stroke-linecap:round;stroke-linejoin:round;filter:drop-shadow(0 2px 4px rgba(0,0,0,.1))}.dna-point{cursor:pointer;transition:all .2s ease;opacity:.8}.dna-point:hover{opacity:1;filter:drop-shadow(0 2px 4px rgba(0,0,0,.15))}.dna-area{opacity:.6}.chart-tooltip div{margin-bottom:2px}.chart-tooltip div:last-child{margin-bottom:0}.stats-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(120px,1fr));gap:var(--space-3);margin-top:var(--space-3)}.stat-item{text-align:center;padding:var(--space-2);background:var(--bg-secondary);border-radius:var(--radius-md);border:1px solid var(--border-primary)}.stat-value{font-size:var(--font-size-lg);font-weight:700;color:var(--accent-primary);margin-bottom:var(--space-1)}.stat-label{font-size:var(--font-size-xs);color:var(--text-secondary);text-transform:uppercase;letter-spacing:.5px}.no-data{text-align:center;color:var(--text-tertiary);font-style:italic;padding:var(--space-4)}.stats-dashboard rect,.stats-dashboard path{transition:all .2s ease;cursor:pointer}.stats-dashboard rect:hover,.stats-dashboard path:hover{filter:brightness(1.1)}.stats-section-title{position:relative;overflow:hidden}.stats-section-title:before{content:"";position:absolute;top:0;left:-100%;width:100%;height:100%;background:linear-gradient(90deg,transparent,rgba(74,158,255,.1),transparent);transition:left .5s ease}.stats-section-title:hover:before{left:100%}.minimap-container{cursor:pointer}@media (max-width: 768px){#timeline-visualization,#country-pie-chart{height:200px!important;padding:8px}.chart-tooltip{font-size:11px;padding:6px 10px;max-width:150px}.stats-dashboard .axis text{font-size:9px}.stats-dashboard svg{overflow:visible}.migration-map-container{min-height:200px}.migration-stats{flex-direction:column;gap:var(--space-2)}.migration-stats .stat-item{padding:var(--space-2)}.migration-stats .stat-number{font-size:var(--font-size-lg)}.pie-legend .legend-item text{font-size:9px!important}.pie-legend .legend-item rect{width:10px;height:10px}.stats-dashboard .axis-bottom text{font-size:8px!important}.map-panel{right:10px;top:120px;max-width:calc(100vw - 20px);max-height:calc(100vh - 150px);padding:16px}.map-title{font-size:16px}.map-controls{flex-direction:column;gap:6px}.map-btn{font-size:11px;padding:6px 10px}.map-container{min-height:250px;padding:12px}.location-grid{grid-template-columns:1fr;gap:6px}.location-stat-item{padding:6px}.location-name{font-size:11px}.location-count{font-size:9px}.country-header{padding:8px}.country-name{font-size:13px}.country-count{font-size:10px}.person-location{padding:4px 6px}.person-location .person-name{font-size:11px}.person-location .person-place{font-size:10px}.person-location .person-year{font-size:9px}.migration-header{padding:8px}.migration-from,.migration-to,.migration-arrow{font-size:12px}.migration-count{font-size:10px}.migration-person .person-name{font-size:11px}.migration-year{font-size:9px}.distance-controls{gap:8px}.location-selector select{font-size:13px;padding:6px 10px}.calculate-btn{padding:8px 12px;font-size:13px}.distance-result{padding:12px}.distance-info h5{font-size:13px}.distance-info p{font-size:12px}}@media (max-width: 360px){.view-controls{flex-direction:column;gap:4px}.view-control-btn,.stats-toggle-btn,.timeline-toggle-btn,.filter-toggle-btn,.theme-toggle-btn{width:36px;height:36px;font-size:14px}.modal-content{margin:0;padding:16px;max-height:85vh;border-radius:var(--radius-lg) var(--radius-lg) 0 0}.filter-panel,.stats-dashboard,.timeline-panel,.migration-panel{width:calc(100vw - 10px);left:5px;right:5px}#legend{left:5px;right:5px}.country-grid,.checkbox-grid{grid-template-columns:1fr;gap:8px}}
