
    :root { --bg-base: #080f1c;
    --bg-deep: #060c17; --bg-card: #0f1a2e; --bg-card2: #0c1525; --bg-hover: #141e35; --bg-input: #0a1428; --border: rgba(30,58,95,0.7); --border-em: rgba(16,185,129,0.3); --accent: #10b981; --accent2: #06b6d4; --accent-dim: rgba(16,185,129,0.12);
    --text-primary: #e2e8f0; --text-secondary: #7a9abd; --text-muted: #3b5a7a; --text-accent: #10b981; --text-cyan: #06b6d4; --text-warn: #f59e0b; --text-danger: #ef4444; --radius-sm: 6px; --radius-md: 8px; --radius-lg: 12px;
    --radius-xl: 16px; --font: 'JetBrains Mono','Courier New',monospace; --sidebar-w: 220px; --nav-h: 64px; }
    *, *::before, *::after { box-sizing: border-box;
    margin: 0; padding: 0; }
    html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; text-size-adjust: 100%;
    }
    body { font-family: var(--font); font-size: 14px; color: var(--text-primary); background: var(--bg-base); overflow-x: hidden; -webkit-font-smoothing: antialiased;
    }
    ::selection { background: rgba(16,185,129,0.25); color: #e2e8f0; }
    a { color: inherit; text-decoration: none;
    }
    ::-webkit-scrollbar { width: 6px; height: 6px; }
    ::-webkit-scrollbar-track { background: transparent;
    }
    ::-webkit-scrollbar-thumb { background: rgba(16,185,129,0.2); border-radius: 3px; }
    ::-webkit-scrollbar-thumb:hover { background: rgba(16,185,129,0.4);
    }

    .grad-text { background: linear-gradient(90deg,var(--accent),var(--accent2)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
    }
    .grad-btn { background: linear-gradient(90deg,var(--accent) 0%,var(--accent2) 100%); color: #fff; border: none; cursor: pointer; font-family: var(--font); font-weight: 700;
    transition: opacity .2s, transform .1s; }
    .grad-btn:hover { opacity: .9; } .grad-btn:active { transform: scale(.98);
    }

    #landing { display: block; } #tools-app { display: none;
    }
    #navbar { position: fixed; top: 0; left: 0; right: 0; z-index: 100; height: var(--nav-h); display: flex;
    align-items: center; justify-content: space-between; padding: 0 32px; background: rgba(8,15,28,0.92); border-bottom: 1px solid var(--border); backdrop-filter: blur(10px);
    }
    .nav-logo { display: flex; align-items: center; gap: 10px; cursor: pointer;
    }
    .nav-logo-icon { width: 36px; height: 36px; border-radius: var(--radius-md); border: 1px solid var(--accent); background: var(--accent-dim); display: flex;
    align-items: center; justify-content: center; }
    .nav-logo-icon svg { width: 18px; height: 18px;
    }
    .logo-icon { width: 32px; height: 32px; border-radius: var(--radius-md); border: 1px solid var(--accent); background: var(--accent-dim); display: flex;
    align-items: center; justify-content: center; flex-shrink: 0; }
    .logo-icon svg { width: 16px; height: 16px;
    }
    
    .nav-logo-text { display: flex; flex-direction: column;
    }
    .nav-logo-name { font-size: 14px; font-weight: 700; letter-spacing: 2px; color: var(--text-primary);
    }
    .nav-logo-ver { font-size: 9px; letter-spacing: 1.5px; color: var(--text-muted); }
    #nav-links { display: flex;
    align-items: center; gap: 8px; }
    .nav-link { padding: 8px 16px; border-radius: var(--radius-md); font-size: 13px; font-weight: 500;
    color: var(--text-secondary); background: none; border: none; cursor: pointer; transition: background .15s, color .15s; font-family: var(--font); min-height: 40px;
    }
    .nav-link:hover { background: var(--bg-hover); color: var(--text-primary); }
    .nav-cta { padding: 10px 20px;
    border-radius: var(--radius-md); font-size: 13px; letter-spacing: .5px; min-height: 40px; }
    #nav-hamburger { display: none; background: none;
    border: 1px solid var(--border); border-radius: var(--radius-md); padding: 8px; cursor: pointer; color: var(--text-secondary); min-width: 44px; min-height: 44px; align-items: center; justify-content: center;
    }
    #nav-hamburger svg { width: 20px; height: 20px; }

    #hero { min-height: 100vh;
    display: flex; align-items: center; justify-content: center; text-align: center; padding: 120px 24px 80px; position: relative; overflow: hidden;
    background: linear-gradient(180deg, #060c17 0%, #0a1628 60%, #080f1c 100%); }
    #hero-canvas { position: absolute; inset: 0; width: 100%;
    height: 100%; opacity: .45; pointer-events: none; }
    .hero-content { position: relative; z-index: 2; max-width: 700px;
    }
    .hero-badge { display: inline-flex; align-items: center; gap: 8px; background: var(--accent-dim); border: 1px solid var(--border-em); border-radius: 99px;
    padding: 6px 14px; font-size: 11px; font-weight: 700; letter-spacing: 1.5px; color: var(--accent); margin-bottom: 24px;
    }
    .hero-badge-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent);
    }
    .hero-title { font-size: clamp(28px,5vw,52px); font-weight: 700; line-height: 1.15; color: var(--text-primary); margin-bottom: 18px; letter-spacing: -.5px;
    }
    .hero-title .accent-word { color: var(--accent); }
    .hero-title .brand-word { background: linear-gradient(90deg,var(--accent),var(--accent2)); -webkit-background-clip: text;
    -webkit-text-fill-color: transparent; background-clip: text; }
    .hero-sub { font-size: 15px; color: var(--text-secondary); margin-bottom: 36px; line-height: 1.7; max-width: 520px;
    margin-left: auto; margin-right: auto; }
    .hero-cta { padding: 14px 36px; border-radius: var(--radius-lg); font-size: 14px; letter-spacing: 1px;
    }

    .landing-section { padding: 80px 32px; max-width: 1100px; margin: 0 auto;
    }
    .section-label { font-size: 11px; font-weight: 700; letter-spacing: 3px; color: var(--text-muted); margin-bottom: 10px;
    }
    .section-title { font-size: 22px; font-weight: 700; color: var(--text-primary); margin-bottom: 36px;
    }
    #section-tools { scroll-margin-top: 80px; }
    .tools-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 760px; margin: 0 auto;
    gap: 16px; }
    .tool-card { background: linear-gradient(180deg,var(--bg-card) 0%,var(--bg-card2) 100%); border: 1px solid var(--border); border-radius: var(--radius-lg);
    padding: 24px 20px; transition: border-color .2s, transform .15s; cursor: default; }
    .tool-card:hover { border-color: rgba(16,185,129,.35); transform: translateY(-2px);
    }
    .tool-card-icon { width: 48px; height: 48px; margin-bottom: 14px; border-radius: var(--radius-md); background: var(--accent-dim); display: flex; align-items: center;
    justify-content: center; }
    .tool-card-icon svg { width: 24px; height: 24px; color: var(--accent);
    }
    .tool-card-name { font-size: 14px; font-weight: 700; color: var(--text-primary); margin-bottom: 6px;
    }
    .tool-card-desc { font-size: 12px; color: var(--text-secondary); line-height: 1.6; }

    #section-ai { scroll-margin-top: 80px;
    }
    .ai-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px;
    }
    .ai-card { background: linear-gradient(180deg,var(--bg-card) 0%,var(--bg-card2) 100%); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px 20px;
    text-align: center; transition: border-color .2s, transform .15s; }
    .ai-card:hover { border-color: rgba(16,185,129,.35); transform: translateY(-2px);
    }
    .ai-card-logo { display: flex; align-items: center; justify-content: center; height: 32px; margin-bottom: 10px;
    }
    .ai-card-logo svg, .ai-card-logo img { height: 36px; width: 36px; display: block; object-fit: contain;
    }
    .ai-card-name { font-size: 14px; font-weight: 700; color: var(--text-primary); margin-bottom: 4px;
    }
    .ai-card-role { font-size: 11px; color: var(--text-secondary); }

    #section-footer { scroll-margin-top: 0;
    background: linear-gradient(180deg,var(--bg-card) 0%,var(--bg-deep) 100%); border-top: 1px solid var(--border); padding: 40px 32px; }
    .footer-inner { max-width: 1100px;
    margin: 0 auto; display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 24px;
    }
    .footer-contact { font-size: 12px; color: var(--text-muted); line-height: 1.9;
    }
    .footer-contact strong { font-size: 10px; letter-spacing: 2px; color: var(--text-secondary); display: block; margin-bottom: 4px;
    }
    .footer-credit { font-size: 12px; color: var(--text-secondary); text-align: center;
    }
    .footer-credit strong { color: var(--accent); }
    .footer-social { display: flex; gap: 10px;
    align-items: center; }
    .social-icon { width: 36px; height: 36px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-md);
    display: flex; align-items: center; justify-content: center; color: var(--text-muted); font-size: 14px; transition: background .15s, border-color .15s, color .15s; cursor: pointer;
    }
    .social-icon:hover { background: var(--accent-dim); border-color: var(--border-em); color: var(--accent2);
    }
    .social-icon svg { width: 18px; height: 18px; fill: currentColor;
    }
    .footer-bottom { max-width: 1100px; margin: 20px auto 0; border-top: 1px solid var(--border); padding-top: 16px; font-size: 10px;
    color: var(--text-muted); text-align: center; letter-spacing: 1px; }

    .modal-overlay { display: none; position: fixed; inset: 0; background: rgba(4,8,18,0.88);
    backdrop-filter: blur(6px); z-index: 200; align-items: center; justify-content: center; padding: 16px; }
    .modal-overlay.visible { display: flex;
    }
    .modal-box { background: linear-gradient(180deg,#0f1a2e 0%,#0c1525 100%); border: 1px solid rgba(16,185,129,.25); border-top: 2px solid var(--accent); border-radius: var(--radius-xl);
    width: 100%; max-width: 420px; padding: 28px; position: relative; max-height: 90vh; overflow-y: auto; }
    .modal-close { position: absolute;
    top: 14px; right: 14px; background: none; border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text-muted); cursor: pointer; width: 30px; height: 30px;
    display: flex; align-items: center; justify-content: center; transition: color .15s, border-color .15s; }
    .modal-close:hover { color: var(--text-danger);
    border-color: rgba(239,68,68,.4); }
    .modal-close svg { width: 14px; height: 14px;
    }
    .modal-tabs { display: flex; gap: 6px; margin-bottom: 24px; }
    .modal-tab { flex: 1;
    padding: 10px; background: var(--bg-input); border: 1px solid var(--border); border-radius: var(--radius-md); font-family: var(--font); font-size: 12px; font-weight: 700; letter-spacing: 1px; color: var(--text-muted);
    cursor: pointer; transition: all .15s; min-height: 44px; }
    .modal-tab.active { background: linear-gradient(90deg,var(--accent),var(--accent2)); border-color: transparent; color: #fff;
    }
    .modal-tab:not(.active):hover { background: var(--bg-hover); color: var(--text-secondary); }
    .input-group { position: relative; margin-bottom: 12px;
    }
    .input-group-icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--text-muted); pointer-events: none;
    }
    .input-group-icon svg { width: 15px; height: 15px; }
    .modal-input { width: 100%;
    padding: 12px 14px 12px 40px; background: var(--bg-input); border: 1px solid var(--border); border-radius: var(--radius-md); color: var(--text-primary); font-family: var(--font); font-size: 12px;
    outline: none; transition: border-color .2s, box-shadow .2s; min-height: 46px; }
    .modal-input::placeholder { color: var(--text-muted);
    }
    .modal-input:focus { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(16,185,129,.15);
    }
    .modal-submit { width: 100%; padding: 13px; border-radius: var(--radius-md); font-size: 13px; letter-spacing: 1.5px; margin-top: 6px; margin-bottom: 14px;
    min-height: 46px; }
    .modal-forgot { display: flex; justify-content: space-between; align-items: center; font-size: 11px; margin-bottom: 14px;
    }
    .modal-forgot a { color: var(--text-accent); cursor: pointer; }
    .modal-forgot a:hover { text-decoration: underline;
    }
    .modal-tos { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--text-secondary);
    }
    .modal-tos input { accent-color: var(--accent); width: 15px; height: 15px;
    }
    .modal-tos a { color: var(--accent); }
    #signup-notice { font-size: 11px; color: var(--text-muted);
    background: var(--bg-input); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 10px 12px; margin-bottom: 12px; line-height: 1.6; display: none;
    }
    #auth-err { font-size: 11px; color: var(--text-danger); min-height: 16px; text-align: center; margin-top: 8px;
    }

    #nav-drawer-overlay { display: none; position: fixed; inset: 0; background: rgba(4,8,18,.7); z-index: 40;
    }
    #nav-drawer-overlay.open { display: block; }
    #nav-drawer { position: fixed; top: 0; left: 0;
    width: 260px; height: 100vh; background: linear-gradient(180deg,#0b1322,#080f1c); border-right: 1px solid var(--border); z-index: 50; transform: translateX(-100%); transition: transform .25s ease; display: flex;
    flex-direction: column; overflow-y: auto; }
    #nav-drawer.open { transform: translateX(0);
    }
    .drawer-logo { padding: 20px 16px 14px; border-bottom: 1px solid var(--border);
    }
    .drawer-nav { flex: 1; padding: 12px 8px; display: flex; flex-direction: column; gap: 2px;
    }
    #app { display: flex; min-height: 100vh; background: linear-gradient(135deg,#0f1629 0%,#080f1c 100%);
    }
    #sidebar { width: var(--sidebar-w); min-height: 100vh; background: linear-gradient(180deg,#0b1322 0%,#080f1c 100%); border-right: 1px solid var(--border); display: flex;
    flex-direction: column; flex-shrink: 0; position: sticky; top: 0; height: 100vh; overflow-y: auto; z-index: 30;
    }
    .sidebar-logo { padding: 20px 16px 14px; border-bottom: 1px solid var(--border);
    }
    .sidebar-logo-mark { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; cursor: pointer;
    }
    .logo-name { font-size: 13px; font-weight: 700; letter-spacing: 2px; color: var(--text-primary);
    }
    .logo-version { font-size: 9px; letter-spacing: 1.5px; color: var(--text-muted); }
    #auth-badge { display: none;
    align-items: center; gap: 6px; margin-top: 8px; font-size: 9px; font-weight: 700; letter-spacing: 1px; padding: 4px 10px; border-radius: 99px; cursor: pointer;
    transition: opacity .2s; }
    #auth-badge.visible { display: inline-flex; }
    #auth-badge.status-admin { color: var(--accent);
    background: var(--accent-dim); border: 1px solid rgba(16,185,129,.3); }
    #auth-badge.status-visitor { color: var(--text-warn); background: rgba(245,158,11,.1); border: 1px solid rgba(245,158,11,.3);
    }
    #auth-badge:hover { opacity: .75; }
    .sidebar-nav { flex: 1; padding: 12px 8px;
    display: flex; flex-direction: column; gap: 2px; }
    .nav-label-sm { font-size: 9px; font-weight: 700; letter-spacing: 2px; color: var(--text-muted);
    padding: 8px 8px 4px; }
    .nav-item { display: flex; align-items: center; gap: 10px; padding: 9px 10px;
    border-radius: var(--radius-md); border: 1px solid transparent; color: var(--text-muted); font-size: 12px; font-weight: 500; cursor: pointer;
    transition: background .15s, color .15s, border-color .15s; background: none; width: 100%; text-align: left; font-family: var(--font); min-height: 44px;
    }
    .nav-item:hover { background: var(--bg-hover); color: var(--text-secondary); }
    .nav-item.active { background: var(--accent-dim); border-color: rgba(16,185,129,.35);
    color: var(--accent); position: relative; }
    .nav-item.active::before { content: ''; position: absolute; left: -8px; top: 50%; transform: translateY(-50%);
    width: 3px; height: 60%; border-radius: 0 2px 2px 0; background: linear-gradient(180deg,var(--accent),var(--accent2)); }
    .nav-icon { width: 20px;
    height: 20px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
    .nav-icon svg { width: 16px;
    height: 16px; }
    .sidebar-footer { padding: 12px 16px; border-top: 1px solid var(--border); font-size: 9px; color: var(--text-muted);
    }
    .sidebar-back { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: var(--radius-md); font-size: 11px;
    color: var(--text-muted); cursor: pointer; transition: color .15s; background: none; border: none; width: 100%; font-family: var(--font); margin-top: auto; margin-bottom: 4px;
    }
    .sidebar-back:hover { color: var(--text-secondary); }

    #main { flex: 1; min-width: 0; display: flex;
    flex-direction: column; }
    #topbar { height: 48px; background: rgba(11,18,34,.9); border-bottom: 1px solid var(--border); display: flex; align-items: center;
    gap: 12px; padding: 0 20px; position: sticky; top: 0; z-index: 20; backdrop-filter: blur(8px);
    }
    #hamburger { display: none; background: none; border: none; cursor: pointer; padding: 4px; color: var(--text-secondary); align-items: center;
    justify-content: center; min-width: 44px; min-height: 44px; }
    #hamburger svg { width: 20px; height: 20px;
    }
    #path-indicator { font-size: 11px; font-weight: 700; letter-spacing: 1.5px; color: var(--accent); flex: 1;
    }
    #path-indicator span { color: var(--text-muted); }
    #topbar-badge { display: none; font-size: 9px;
    font-weight: 700; padding: 3px 8px; border-radius: 99px; }
    #topbar-badge.visible { display: inline-flex; align-items: center; gap: 5px;
    }
    #topbar-badge.status-admin { color: var(--accent); background: var(--accent-dim); border: 1px solid rgba(16,185,129,.3);
    }
    #topbar-badge.status-visitor { color: var(--text-warn); background: rgba(245,158,11,.1); border: 1px solid rgba(245,158,11,.3);
    }

    #mobile-tabbar { display: none; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; background: rgba(11,18,34,.95); border-bottom: 1px solid var(--border);
    padding: 6px 10px; gap: 4px; }
    #mobile-tabbar::-webkit-scrollbar { display: none;
    }
    .m-tab { flex-shrink: 0; display: flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: var(--radius-md);
    border: 1px solid transparent; color: var(--text-muted); font-size: 11px; font-weight: 600; cursor: pointer; background: none; white-space: nowrap; transition: background .15s,color .15s;
    min-height: 36px; font-family: var(--font); }
    .m-tab:hover { background: var(--bg-hover); color: var(--text-secondary);
    }
    .m-tab.active { background: var(--accent-dim); border-color: rgba(16,185,129,.35); color: var(--accent); }
    .m-tab-icon { width: 14px;
    height: 14px; }

    #content { flex: 1; padding: 20px; max-width: 1100px; width: 100%;
    }
    #input-row { display: flex; gap: 10px; margin-bottom: 20px; }
    #targetIn { flex: 1;
    background: var(--bg-input); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 12px 16px; color: var(--text-primary); font-family: var(--font); font-size: 13px; outline: none;
    transition: border-color .2s, box-shadow .2s; min-height: 44px; }
    #targetIn::placeholder { color: var(--text-muted);
    }
    #targetIn:focus { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(16,185,129,.15);
    }
    #scanBtn { padding: 12px 24px; border-radius: var(--radius-lg); font-size: 12px; letter-spacing: 1.5px; min-height: 44px; outline: none;
    }
    #scanBtn:focus-visible { box-shadow: 0 0 0 2px var(--bg-base), 0 0 0 4px var(--accent);
    }
    #scanBtn.probing { animation: btn-pulse 1.5s ease-in-out infinite; cursor: not-allowed; opacity: .75;
    }
    @keyframes btn-pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(16,185,129,0);
    } 50% { box-shadow: 0 0 18px 4px rgba(16,185,129,.35); } }

    .card { background: linear-gradient(180deg,var(--bg-card) 0%,var(--bg-card2) 100%);
    border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
    .card-accent-top { height: 2px; background: linear-gradient(90deg,var(--accent),var(--accent2)); opacity: .5;
    }
    .dash-grid { display: none; }
    .dash-grid.visible { display: grid; grid-template-columns: 300px 1fr;
    gap: 16px; align-items: start; margin-bottom: 16px; }
    #dash-left { display: flex; flex-direction: column; gap: 12px;
    }
    #summary-card { position: relative; }
    #summary-card .card-accent-side { position: absolute; left: 0;
    top: 0; bottom: 0; width: 3px; border-radius: 12px 0 0 12px; background: linear-gradient(180deg,var(--accent),var(--accent2));
    }
    .summary-body { padding: 14px 14px 14px 18px; }
    .summary-row { display: flex;
    justify-content: space-between; align-items: baseline; margin-bottom: 8px; font-size: 12px; }
    .summary-row:last-child { margin-bottom: 0;
    }
    .summary-key { color: var(--text-secondary); }
    .summary-val { font-weight: 700; font-size: 13px; color: var(--text-primary);
    text-align: right; word-break: break-all; max-width: 60%; }
    .summary-val.accent { color: var(--accent); } .summary-val.cyan { color: var(--accent2);
    } .summary-val.warn { color: var(--text-warn); } .summary-val.big { font-size: 22px; }
    .summary-divider { border: none;
    border-top: 1px solid var(--border); margin: 8px 0; }
    .card-label { font-size: 9px; font-weight: 700; letter-spacing: 2px;
    color: var(--text-muted); text-transform: uppercase; }

    #sources-details summary { list-style: none; display: flex; align-items: center; justify-content: space-between;
    padding: 11px 14px; cursor: pointer; font-size: 9px; font-weight: 700; letter-spacing: 2px; color: var(--text-muted); user-select: none; outline: none; transition: background .15s;
    }
    #sources-details summary::-webkit-details-marker { display: none; }
    #sources-details summary:hover { background: var(--bg-hover);
    }
    .sources-chevron { width: 18px; height: 18px; background: var(--accent-dim); border-radius: 4px; display: flex; align-items: center; justify-content: center;
    transition: transform .25s; }
    .sources-chevron svg { width: 10px; height: 10px; color: var(--accent);
    }
    #sources-details[open] .sources-chevron { transform: rotate(180deg); }
    .sources-body { padding: 10px 14px 14px;
    border-top: 1px solid var(--border); }
    .sources-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 10px;
    }
    .source-item { display: flex; justify-content: space-between; align-items: center; background: var(--bg-deep); border: 1px solid var(--border); border-radius: var(--radius-sm);
    padding: 6px 8px; font-size: 11px; color: var(--text-secondary); }
    .source-item b { color: var(--accent); font-weight: 700;
    }
    .sources-actions { display: flex; gap: 6px; margin-top: 8px; }

    #dash-right { display: flex;
    flex-direction: column; }
    .results-toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 10px;
    }
    #filt { flex: 1; min-width: 140px; background: var(--bg-input); border: 1px solid var(--border); border-radius: var(--radius-md);
    padding: 8px 12px; color: var(--text-primary); font-family: var(--font); font-size: 12px; outline: none; min-height: 36px; transition: border-color .2s;
    }
    #filt::placeholder { color: var(--text-muted); } #filt:focus { border-color: var(--accent);
    }
    .btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; background: var(--bg-card);
    border: 1px solid var(--border); border-radius: var(--radius-md); color: var(--text-secondary); font-family: var(--font); font-size: 11px; font-weight: 600; cursor: pointer;
    transition: background .15s,border-color .15s,color .15s; white-space: nowrap; outline: none; min-height: 36px; }
    .btn:hover { background: var(--bg-hover);
    color: var(--text-primary); border-color: rgba(16,185,129,.3); }
    .btn:focus-visible { box-shadow: 0 0 0 2px var(--accent);
    }
    .btn.btn-accent { color: var(--accent); } .btn.btn-accent:hover { border-color: var(--accent);
    }
    .btn.btn-danger { color: var(--text-danger); } .btn.btn-danger:hover { background: rgba(239,68,68,.08); border-color: rgba(239,68,68,.3);
    }
    .btn.btn-primary { background: linear-gradient(90deg,var(--accent),var(--accent2)); color: #fff; border-color: transparent; } .btn.btn-primary:hover { opacity: .9;
    }
    .btn svg { width: 13px; height: 13px; flex-shrink: 0;
    }
    .rtabs { display: none; gap: 8px; margin-bottom: 10px; } .rtabs.visible { display: flex;
    }
    .rtab { flex: 1; padding: 7px 10px; background: var(--bg-deep); border: 1px solid var(--border); border-radius: var(--radius-md);
    color: var(--text-muted); font-family: var(--font); font-size: 11px; font-weight: 700; cursor: pointer; text-align: center; transition: all .15s; outline: none; min-height: 36px;
    }
    .rtab:hover { background: var(--bg-hover); }
    .rtab.active { background: var(--accent-dim); border-color: rgba(16,185,129,.4); color: var(--accent);
    }
    .rtab.warn.active { background: rgba(245,158,11,.1); border-color: rgba(245,158,11,.4); color: var(--text-warn); }
    .results-list-wrap { max-height: 60vh;
    overflow-y: auto; border-radius: var(--radius-lg); }
    .res-container { display: none; flex-direction: column; width: 100%;
    } .res-container.active-container { display: flex; }
    .res-item { padding: 10px 14px; border-bottom: 1px solid rgba(30,58,95,.5); font-family: var(--font);
    font-size: 12px; color: var(--text-cyan); word-break: break-all; line-height: 1.4; transition: background .15s; display: flex; align-items: center; gap: 8px;
    }
    .res-item:last-child { border-bottom: none; } 
    .res-item::before { content: ''; width: 8px;
    height: 8px; border-radius: 50%; flex-shrink: 0; border: 1px solid var(--accent); background: var(--accent); }
    .res-item.infra-item { color: var(--text-warn);
    } .res-item.infra-item::before { border-color: var(--text-warn); background: var(--text-warn); }
    .res-empty { padding: 48px 20px; text-align: center; color: var(--text-muted);
    font-size: 12px; line-height: 1.8; }
    .res-empty svg { width: 36px; height: 36px; margin: 0 auto 12px;
    display: block; opacity: .3; }

    /* --- PIVOT ACTION SHEET --- */
    #pivot-overlay { display: none;
    position: fixed; inset: 0; background: rgba(4,8,18,0.6); backdrop-filter: blur(4px); z-index: 400; align-items: flex-end; justify-content: center; padding: 0; opacity: 0;
    transition: opacity 0.2s ease; }
    #pivot-overlay.visible { display: flex; opacity: 1;
    }
    #pivot-sheet { background: linear-gradient(180deg,#0f1a2e 0%,#0c1525 100%); border-top: 1px solid var(--border); border-radius: 24px 24px 0 0;
    width: 100%; max-width: 500px; padding: 24px 24px 32px; transform: translateY(100%); transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); display: flex;
    flex-direction: column; gap: 12px; box-shadow: 0 -10px 40px rgba(0,0,0,0.5); }
    #pivot-overlay.visible #pivot-sheet { transform: translateY(0);
    }
    .pivot-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px;
    }
    .pivot-title { font-size: 10px; font-weight: 700; letter-spacing: 2px; color: var(--text-muted); text-transform: uppercase;
    }
    .pivot-target { font-family: var(--font); font-size: 15px; font-weight: 700; color: var(--accent); word-break: break-all; margin-bottom: 16px; padding-bottom: 16px;
    border-bottom: 1px solid var(--border); }
    .pivot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px;
    }
    .pivot-btn { display: flex; align-items: center; gap: 10px; padding: 12px 16px; background: var(--bg-deep);
    border: 1px solid var(--border); border-radius: var(--radius-md); color: var(--text-primary); font-family: var(--font); font-size: 12px; font-weight: 600; cursor: pointer; transition: all .15s;
    outline: none; text-align: left; }
    .pivot-btn:hover { background: var(--bg-hover); border-color: var(--accent); color: var(--accent); transform: translateY(-2px);
    }
    .pivot-btn svg { width: 16px; height: 16px; color: var(--text-muted); transition: color .15s;
    }
    .pivot-btn:hover svg { color: var(--accent); }
    .pivot-close { background: var(--bg-input);
    border: 1px solid var(--border); border-radius: 50%; width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; color: var(--text-muted); cursor: pointer;
    transition: color .15s, border-color .15s; }
    .pivot-close:hover { color: var(--text-danger); border-color: rgba(239,68,68,.4);
    }
    .res-item.clickable { cursor: pointer; transition: background 0.2s, padding-left 0.2s;
    }
    .res-item.clickable:hover { background: var(--bg-hover); padding-left: 20px; border-left: 2px solid var(--accent);
    }

    .share-panel { display: none; margin-top: 12px; } 
    .share-panel.visible { display: block;
    }
    .share-inner { padding: 14px; background: linear-gradient(180deg,var(--bg-card),var(--bg-card2)); border: 1px solid rgba(16,185,129,.2); border-radius: var(--radius-lg);
    }
    .share-title { font-size: 9px; font-weight: 700; letter-spacing: 2px; color: var(--text-muted); display: flex; align-items: center; gap: 8px;
    margin-bottom: 10px; }
    .share-badge { font-size: 9px; color: var(--text-warn); background: rgba(245,158,11,.1); border: 1px solid rgba(245,158,11,.25);
    padding: 2px 6px; border-radius: 99px; }
    .share-row { display: flex; gap: 6px; align-items: center;
    }
    #share-link { flex: 1; background: var(--bg-deep); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 8px 10px;
    font-family: var(--font); font-size: 11px; color: var(--accent); cursor: pointer; outline: none; }
    #share-link:focus { border-color: var(--accent);
    }
    #share-exp { font-size: 10px; color: var(--text-muted); margin-top: 8px;
    }

    #notes-view { display: none;
    }
    .notes-layout { display: flex; gap: 14px; height: 68vh; min-height: 400px;
    }
    .notes-list-panel { width: 280px; flex-shrink: 0; display: flex; flex-direction: column; background: linear-gradient(180deg,var(--bg-card),var(--bg-card2)); border: 1px solid var(--border);
    border-radius: var(--radius-lg); overflow: hidden; }
    .notes-list-header { padding: 10px 12px; border-bottom: 1px solid var(--border); display: flex;
    align-items: center; justify-content: space-between; background: rgba(15,26,46,.7); flex-shrink: 0; }
    .notes-list-title { font-size: 9px; font-weight: 700; letter-spacing: 2px;
    color: var(--text-muted); display: flex; align-items: center; gap: 6px; }
    .notes-list-title svg { width: 13px; height: 13px;
    color: var(--accent); }
    .notes-controls { display: flex; gap: 4px; align-items: center;
    }
    #note-sort { background: var(--bg-deep); border: 1px solid var(--border); color: var(--text-secondary); font-family: var(--font); font-size: 10px; border-radius: var(--radius-sm);
    padding: 4px 6px; outline: none; cursor: pointer; min-height: 30px; }
    #note-sort:focus { border-color: var(--accent);
    }
    .note-icon-btn { display: flex; align-items: center; justify-content: center; width: 30px; height: 30px; background: none;
    border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text-muted); cursor: pointer; transition: background .15s,color .15s,border-color .15s; font-size: 14px; line-height: 1;
    }
    .note-icon-btn:hover { background: var(--bg-hover); color: var(--accent); border-color: var(--border-em); }
    .note-add-btn { width: 30px;
    height: 30px; background: var(--accent-dim); border: 1px solid rgba(16,185,129,.3); border-radius: var(--radius-sm); color: var(--accent); font-size: 18px; line-height: 1; font-weight: 700; cursor: pointer;
    display: flex; align-items: center; justify-content: center; transition: background .15s; }
    .note-add-btn:hover { background: rgba(16,185,129,.2);
    }
    #notes-list { flex: 1; overflow-y: auto; padding: 6px; }
    .note-list-item { padding: 10px;
    border-radius: var(--radius-md); cursor: pointer; border: 1px solid transparent; transition: background .15s,border-color .15s; margin-bottom: 2px;
    }
    .note-list-item:hover { background: var(--bg-hover); }
    .note-list-item.active { background: var(--accent-dim); border-color: rgba(16,185,129,.3);
    }
    .note-list-item-title { font-size: 12px; font-weight: 700; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    }
    .note-list-item.active .note-list-item-title { color: var(--accent); }
    .note-list-item-date { font-size: 10px; color: var(--text-muted);
    margin-top: 2px; }
    
    #note-editor-card { flex: 1; min-width: 0; display: flex; flex-direction: column;
    background: linear-gradient(180deg,var(--bg-card),var(--bg-card2)); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; position: relative; }
    #note-fs-bar { display: none;
    }
    #note-editor-card:fullscreen, #note-editor-card:-webkit-full-screen { display: flex !important; flex-direction: column !important; width: 100vw !important; height: 100vh !important;
    max-width: 100vw !important; box-sizing: border-box !important; padding: 0 !important; margin: 0 !important; border-radius: 0 !important; border: none !important;
    overflow: hidden !important; background: linear-gradient(135deg,#0f1629,#080f1c) !important; }
    #note-editor-card:fullscreen #note-fs-bar, #note-editor-card:-webkit-full-screen #note-fs-bar { display: flex !important;
    position: static !important; flex-shrink: 0; align-items: center; gap: 8px; padding: 8px 14px; background: rgba(11,18,34,.95); border-bottom: 1px solid var(--border); flex-wrap: nowrap;
    overflow-x: auto; }
    #note-editor-card:fullscreen #note-content, #note-editor-card:-webkit-full-screen #note-content { flex: 1 1 auto !important; white-space: pre-wrap !important;
    word-wrap: break-word !important; overflow-wrap: break-word !important; overflow-x: hidden !important; overflow-y: auto !important; width: 100% !important; max-width: 100% !important;
    box-sizing: border-box !important; font-size: clamp(.9rem,1.8vw,1.05rem) !important; padding: 1.25rem clamp(1rem,5vw,3rem) !important; resize: none !important;
    }
    
    #note-editor-overlay { position: absolute; inset: 0; background: rgba(8,15,28,.88); z-index: 10; display: flex;
    align-items: center; justify-content: center; color: var(--text-muted); font-size: 13px; backdrop-filter: blur(4px); border-radius: var(--radius-lg);
    }
    .note-editor-header { padding: 10px 12px; border-bottom: 1px solid var(--border); background: rgba(15,26,46,.7); flex-shrink: 0;
    }
    #note-title { background: transparent; border: none; outline: none; color: var(--text-primary); font-family: var(--font); font-size: 15px; font-weight: 700;
    width: 100%; padding: 4px 6px; border-radius: var(--radius-sm); }
    #note-title:focus { box-shadow: 0 0 0 1px var(--accent);
    }
    .note-editor-meta { display: flex; align-items: center; justify-content: space-between; padding: 6px 6px 0;
    }
    #note-meta { font-size: 10px; color: var(--text-muted); }
    #note-save-status { font-size: 10px; font-weight: 700;
    opacity: 0; transition: opacity .3s; }
    #note-save-status.saving { color: var(--text-warn); opacity: 1;
    }
    #note-save-status.saved  { color: var(--accent);    opacity: 1; }
    #note-save-status.error  { color: var(--text-danger);
    opacity: 1; }
    #note-content { flex: 1; background: transparent; border: none; outline: none; resize: none; color: var(--text-secondary);
    font-family: var(--font); font-size: 13px; padding: 14px; line-height: 1.7; white-space: pre-wrap; word-wrap: break-word; overflow-wrap: break-word; transition: background .2s, color .2s;
    }
    #note-content::placeholder { color: var(--text-muted); }
    .note-editor-footer { padding: 8px 12px;
    border-top: 1px solid var(--border); display: flex; align-items: center; gap: 8px; background: rgba(15,26,46,.5); flex-shrink: 0;
    }
    .note-shortcut-hint { font-size: 9px; color: var(--text-muted); letter-spacing: .5px; margin-left: auto; display: flex; align-items: center; gap: 4px;
    }
    .kbd { display: inline-flex; align-items: center; background: var(--bg-deep); border: 1px solid var(--border); border-radius: 4px;
    padding: 1px 5px; font-size: 9px; color: var(--text-secondary); }
    
    #saved-view { display: none;
    } #saved-view.visible { display: block; }
    .saved-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px;
    }
    .saved-title { font-size: 11px; font-weight: 700; letter-spacing: 2px; color: var(--text-muted); text-transform: uppercase;
    }
    #saved-count { color: var(--accent); margin-left: 6px; }
    .file-toolbar { display: flex; gap: 8px;
    flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
    .file-toolbar .push { margin-left: auto;
    }
    #saved-selection-info { font-size: 11px; color: var(--text-muted); }
    #saved-list { display: grid; grid-template-columns: repeat(auto-fill,minmax(280px,1fr));
    gap: 12px; }
    .file-card { background: linear-gradient(180deg,var(--bg-card),var(--bg-card2)); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 14px;
    transition: border-color .2s; }
    .file-card:hover { border-color: rgba(16,185,129,.25); } .file-card.selected { border-color: rgba(16,185,129,.5);
    box-shadow: 0 0 0 1px rgba(16,185,129,.15) inset; }
    .file-card-top { display: flex; gap: 10px; align-items: flex-start;
    }
    .file-check { margin-top: 2px; width: 15px; height: 15px; accent-color: var(--accent); cursor: pointer; flex-shrink: 0;
    }
    .file-card-name { font-size: 12px; font-weight: 700; color: var(--text-primary); margin-bottom: 4px; word-break: break-all; display: flex; align-items: center;
    gap: 6px; }
    .file-icon { color: var(--accent); font-size: 13px; }
    .file-card-meta { font-size: 11px;
    color: var(--text-muted); margin-bottom: 10px; line-height: 1.6; }
    .file-card-actions { display: flex; gap: 6px; flex-wrap: wrap;
    }
    .file-card-actions button { flex: 1; padding: 6px 8px; background: var(--bg-deep); border: 1px solid var(--border); border-radius: var(--radius-sm);
    color: var(--text-secondary); font-family: var(--font); font-size: 11px; cursor: pointer; transition: background .15s,border-color .15s;
    }
    .file-card-actions button:hover { background: var(--bg-hover); border-color: rgba(16,185,129,.3); }
    .file-empty { grid-column: 1/-1;
    text-align: center; color: var(--text-muted); padding: 48px 20px; font-size: 12px; line-height: 1.8; }
    .exp-ok { color: var(--accent);
    } .exp-soon { color: var(--text-warn); } .exp-gone { color: var(--text-danger); }

    #tools-auth-modal .modal-overlay { z-index: 300;
    }
    *:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px;
    }

    @media (max-width: 900px) { .dash-grid.visible { grid-template-columns: 1fr;
    } }
    @media (max-width: 768px) { #nav-links { display: none; } #nav-hamburger { display: flex;
    } #sidebar { display: none; } #hamburger { display: flex; } #mobile-tabbar { display: flex; } #content { padding: 14px;
    } #topbar { padding: 0 12px; } #input-row { flex-direction: column; } #scanBtn { width: 100%;
    } .notes-layout { flex-direction: column; height: auto; } .notes-list-panel { width: 100%; max-height: 220px;
    } button, input, select { min-height: 44px; } .btn { min-height: 40px; } .dash-grid.visible { grid-template-columns: 1fr;
    } .sources-grid { grid-template-columns: 1fr; } #saved-list { grid-template-columns: 1fr; } .footer-inner { flex-direction: column; align-items: center; text-align: center;
    } }
    @media (max-width: 480px) { #content { padding: 10px;
    } .landing-section { padding: 60px 16px; } #navbar { padding: 0 16px; } .file-toolbar { flex-direction: column; align-items: stretch;
    } .file-toolbar .push { margin-left: 0; } }
    .hidden { display: none !important;
    }

    body.light-theme { --bg-base: #f0f4f8; --bg-deep: #e2e8f0; --bg-card: #ffffff; --bg-card2: #f8fafc; --bg-hover: #e2e8f0; --bg-input: #ffffff;
    --border: rgba(100, 116, 139, 0.3); --text-primary: #0f172a; --text-secondary: #334155; --text-muted: #64748b;
    }
    body.light-theme #navbar { background: rgba(255, 255, 255, 0.92);
    } body.light-theme #mobile-nav-panel { background: rgba(255, 255, 255, 0.98); border-bottom: 1px solid rgba(100, 116, 139, 0.3);
    } body.light-theme #mobile-nav-panel .nav-link { color: #334155; } body.light-theme #mobile-nav-panel .nav-link:hover { color: #0f172a; background: #e2e8f0;
    } body.light-theme #nav-hamburger { color: #0f172a; border-color: rgba(100, 116, 139, 0.3);
    } body.light-theme #hero { background: linear-gradient(180deg, #e2e8f0 0%, #f0f4f8 60%, #f8fafc 100%);
    } body.light-theme #section-footer { background: linear-gradient(180deg, #ffffff 0%, #e2e8f0 100%);
    } body.light-theme .modal-overlay, body.light-theme #nav-drawer-overlay, body.light-theme #note-editor-overlay { background: rgba(255, 255, 255, 0.88);
    } body.light-theme .modal-box { background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    } body.light-theme #nav-drawer, body.light-theme #sidebar { background: linear-gradient(180deg, #f8fafc 0%, #f0f4f8 100%);
    } body.light-theme #app { background: linear-gradient(135deg, #f8fafc 0%, #f0f4f8 100%);
    } body.light-theme #topbar, body.light-theme #mobile-tabbar, body.light-theme #note-fs-bar { background: rgba(255, 255, 255, 0.95) !important;
    } body.light-theme .notes-list-header, body.light-theme .note-editor-header, body.light-theme .note-editor-footer { background: rgba(240, 244, 248, 0.7);
    } body.light-theme #note-editor-card:fullscreen, body.light-theme #note-editor-card:-webkit-full-screen { background: #f8fafc !important; } body.light-theme #note-editor-card:fullscreen #note-fs-bar, body.light-theme #note-editor-card:-webkit-full-screen #note-fs-bar { border-bottom: 1px solid rgba(100, 116, 139, 0.3) !important;
    } body.light-theme #note-editor-card:fullscreen #note-content, body.light-theme #note-editor-card:-webkit-full-screen #note-content { color: #334155 !important; }
    .theme-toggle-btn { background: none;
    border: none; cursor: pointer; color: var(--text-secondary); display: flex; align-items: center; justify-content: center; padding: 8px; border-radius: var(--radius-md);
    transition: background .15s, color .15s; }
    .theme-toggle-btn:hover { background: var(--bg-hover); color: var(--accent);
    } .theme-toggle-btn svg { width: 18px; height: 18px; }
  

.file-upload-panel {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 12px 14px;
  margin-bottom: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-raised);
}
.file-upload-panel input[type="file"] {
  min-width: 220px;
  flex: 1;
  color: var(--text-secondary);
  font: 11px var(--font);
}
#temp-file-upload-status {
  color: var(--text-muted);
  font-size: 10px;
}

/* v7.2 scan and landing fixes */
.dns-badge { display:inline-flex; margin-left:6px; padding:2px 5px; border:1px solid var(--border); border-radius:4px; color:var(--text-muted); font-size:8px; letter-spacing:.8px; vertical-align:middle; }
.dns-badge-warn { color:var(--text-warn); border-color:rgba(245,158,11,.35); background:rgba(245,158,11,.08); }
.social-icon svg { fill: currentColor; }
.social-icon svg[fill="none"] { fill: none; }
@media (max-width: 720px) { .tools-grid { grid-template-columns: 1fr; } }
