  :root { --ink:#0f172a; --muted:#64748b; --line:#334155; --accent:#4338ca; }
  * { box-sizing: border-box; }
  body { margin:0; font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif; color:#1e293b; background:#eef2f7; }
  h1,h2,h3,h4,p,ul { margin:0; padding:0; }
  ul { list-style:none; }
  button { font-family:inherit; cursor:pointer; }
  #app { display:flex; flex-direction:column; height:100vh; background:#f8fafc; }

  header { background:#fff; border-bottom:1px solid #e2e8f0; padding:8px 20px; display:flex; flex-direction:column; gap:6px; z-index:20; }
  .row { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:12px; }
  .header-main { gap:12px; }
  .brand { display:flex; align-items:center; gap:12px; min-width:0; }
  .header-actions { display:flex; flex-direction:column; align-items:flex-end; gap:6px; margin-left:auto; }
  .header-links { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:8px; }
  .header-action { display:inline-flex; align-items:center; gap:6px; border:1px solid #334155; border-radius:7px; background:#0f172a; padding:4px 10px; color:#e2e8f0; font-size:12px; font-weight:600; text-decoration:none; }
  .header-action:hover { border-color:#64748b; background:#1e293b; color:#fff; }
  .header-action svg { width:14px; height:14px; }
  .header-action:focus-visible { outline:3px solid #818cf8; outline-offset:2px; }
  .privacy-badge { display:inline-flex; align-items:center; gap:7px; border:1px solid #a7f3d0; border-radius:999px; background:#ecfdf5; padding:3px 9px; color:#047857; font-size:11px; font-weight:600; }
  .search-group { flex:0 1 320px; min-width:200px; margin-left:auto; }
  .logo { width:44px; height:44px; border-radius:12px; background:#631c68; color:#fff; display:flex; align-items:center; justify-content:center; font-weight:800; font-size:20px; }
  h1 { font-size:22px; font-weight:800; color:var(--ink); line-height:1.2; }
  .sub { font-size:14px; color:var(--muted); margin-top:2px; }
  .sub .zoom-hint { margin-left:8px; padding-left:10px; border-left:1px solid #cbd5e1; font-size:13px; }
  .sub kbd { font:600 11px/1 inherit; font-family:inherit; padding:2px 6px; border:1px solid #cbd5e1; border-bottom-width:2px; border-radius:4px; background:#f8fafc; color:#475569; }
  .mobile-hint { display:none; }
  .pill { display:inline-flex; align-items:center; gap:6px; font-weight:700; color:var(--accent); background:#eef2ff; border-radius:999px; padding:5px 12px; font-size:13px; text-decoration:none; margin-left:10px; vertical-align:middle; }
  .pill.beta { color:#92400e; background:#fef3c7; }
  a.pill { cursor:pointer; }
  a.pill:hover { filter:brightness(.95); text-decoration:underline; }
  .search { position:relative; width:100%; }
  .search svg { position:absolute; left:10px; top:50%; transform:translateY(-50%); width:16px; height:16px; color:#94a3b8; }
  .search input { width:100%; height:36px; border:1px solid #cbd5e1; border-radius:8px; background:#f8fafc; padding:0 34px; font-size:14px; outline:none; color:#1e293b; transition:border-color .15s,box-shadow .15s,background .15s; }
  .search input:hover { border-color:#94a3b8; background:#fff; }
  .search input:focus { border-color:#818cf8; background:#fff; box-shadow:0 0 0 3px #e0e7ff; }
  #clear-search { position:absolute; right:7px; top:50%; transform:translateY(-50%); border:0; background:none; color:#94a3b8; font-size:16px; display:none; }
  #clear-search:hover { color:#334155; }
  #clear-search:focus-visible { outline:2px solid #818cf8; outline-offset:1px; border-radius:4px; }
  .btn { background:#fff; border:1px solid #cbd5e1; color:#475569; padding:6px 12px; border-radius:7px; font-size:13px; font-weight:700; }
  .btn:hover { background:#f1f5f9; }
  .btn.primary { color:var(--accent); border-color:#c7d2fe; }
  .btn.primary:hover { background:#eef2ff; }
  .toolbar-row { border-top:1px solid #f1f5f9; padding-top:6px; }
  .toolbar-left { display:flex; flex-wrap:nowrap; gap:8px; align-items:center; }
  .seg { display:flex; background:#e2e8f0; border:1px solid #cbd5e1; border-radius:8px; padding:2px; gap:2px; }
  .seg button { border:0; background:transparent; color:#475569; padding:5px 14px; border-radius:6px; font-size:13px; font-weight:600; }
  .seg button.active { background:#fff; color:var(--accent); font-weight:700; box-shadow:0 2px 4px rgba(0,0,0,.08); }
  #status { font-size:13px; color:var(--muted); }

  main { position:relative; flex:1; min-height:0; }
  .sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
  .seo-content { padding:48px 24px; background:#fff; border-top:1px solid #e2e8f0; }
  .seo-inner { max-width:900px; margin:0 auto; }
  .seo-content h2 { margin-bottom:12px; color:var(--ink); font-size:26px; font-weight:800; }
  .seo-content h3 { margin:28px 0 10px; color:var(--ink); font-size:19px; font-weight:700; }
  .seo-content p { margin:0 0 12px; color:#475569; font-size:15px; line-height:1.7; }
  .seo-content code { color:#312e81; background:#eef2ff; padding:2px 5px; border-radius:4px; }
  .seo-browse, .seo-faq details { border:1px solid #e2e8f0; border-radius:8px; margin:10px 0; }
  .seo-browse { border-color:#ead8ed; background:#faf5fb; }
  .seo-browse summary, .seo-faq summary { padding:12px 16px; color:var(--ink); font-weight:700; cursor:pointer; }
  .seo-browse[open] { padding:0; background:#faf5fb; }
  .seo-browse[open] summary { border-bottom:1px solid #ead8ed; background:#faf5fb; }
  .seo-browse-content { padding:1px 16px 16px; border-radius:0 0 7px 7px; background:#fff; }
  .seo-browse h3 { margin:20px 0 6px; font-size:16px; }
  .seo-browse p { margin-bottom:8px; font-size:14px; }
  .seo-browse ul { padding-left:20px; list-style:disc; }
  .seo-browse li { margin:6px 0; color:#475569; font-size:14px; line-height:1.6; }
  .seo-browse a, .seo-more-tools a { color:var(--accent); text-decoration:underline; text-underline-offset:3px; }
  .seo-faq details { border-color:#ead8ed; background:#faf5fb; }
  .seo-faq summary { background:#faf5fb; }
  .seo-faq details[open] { background:#faf5fb; }
  .seo-faq details[open] summary { border-bottom:1px solid #ead8ed; }
  .seo-faq-content { padding:1px 16px 14px; border-radius:0 0 7px 7px; background:#fff; }
  .seo-faq details p { margin:0; }
  .seo-more-tools { margin-top:28px !important; }
  #disclaimer { padding:10px 16px; background:linear-gradient(90deg,#020617,#0f172a 60%,#1e1b4b); border-top:1px solid rgba(49,46,129,.4); color:#94a3b8; text-align:center; font-size:12px; line-height:1.5; }
  #disclaimer .f-line { display:flex; flex-wrap:wrap; justify-content:center; gap:4px 10px; font-size:13px; color:#e2e8f0; font-weight:600; }
  #disclaimer .f-note { max-width:900px; margin:4px auto 0; font-size:11px; color:#94a3b8; }
  #disclaimer a { color:#cbd5e1; text-decoration:none; }
  #disclaimer .f-note a { text-decoration:underline; text-underline-offset:3px; }
  #disclaimer a:hover { color:#fff; }
  #tree-view, #list-view { position:absolute; inset:0; }
  #tree-view { overflow:auto; cursor:grab; user-select:none; background-image:radial-gradient(#cbd5e1 1.2px, transparent 1.2px); background-size:24px 24px; }
  #tree-view.dragging { cursor:grabbing; }
  #sizer { position:relative; }
  #canvas { position:absolute; left:0; top:0; transform-origin:0 0; padding:60px; width:max-content; }
  #connections { position:absolute; left:0; top:0; pointer-events:none; overflow:visible; }
  .connector { fill:none; stroke:var(--line); stroke-width:3; stroke-linejoin:round; }
  #nodes { position:relative; display:flex; align-items:center; gap:90px; }
  .cats { display:flex; flex-direction:column; gap:36px; }
  .cat-row { display:flex; align-items:center; gap:90px; }
  .children { display:flex; flex-direction:column; gap:20px; }

  .node { background:#fff; border:2px solid #cbd5e1; border-radius:14px; }
  .root { display:flex; align-items:center; gap:16px; padding:20px 24px; width:340px; background:linear-gradient(135deg,#631c68,#7b2b80); border-color:#53175a; cursor:pointer; position:relative; }
  .root h2, .root p { color:#fff; }
  .root h2 { font-size:20px; font-weight:800; }
  .root p { font-size:13px; opacity:.9; }
  .root .badge { background:rgba(255,255,255,.2); }
  .badge { width:50px; height:50px; border-radius:12px; flex-shrink:0; display:flex; align-items:center; justify-content:center; color:#fff; font-weight:800; font-size:22px; }
  .cat { display:flex; align-items:center; gap:14px; width:400px; padding:16px; cursor:pointer; position:relative; transition:box-shadow .2s, transform .2s; }
  .cat:hover { box-shadow:0 8px 20px -6px rgba(0,0,0,.2); transform:translateY(-1px); }
  .cat .txt { flex:1; min-width:0; }
  .cat h3 { font-size:17px; font-weight:700; color:var(--ink); }
  .cat p { font-size:13px; color:var(--muted); margin-top:3px; line-height:1.35; }
  .count { display:flex; align-items:center; gap:6px; background:#f8fafc; border:1px solid #e2e8f0; border-radius:8px; padding:8px 10px; font-weight:700; color:#475569; }
  .count svg { width:14px; height:14px; transition:transform .2s; }
  .cat.open .count svg { transform:rotate(180deg); }
  .fn { display:flex; align-items:center; width:450px; min-height:62px; padding:10px 16px 10px 18px; cursor:pointer; border-radius:10px; border-width:1px; position:relative; overflow:hidden; text-align:left; transition:box-shadow .2s, transform .2s; animation:scaleIn .35s cubic-bezier(.175,.885,.32,1.275) both; }
  .fn::before { content:""; position:absolute; left:0; top:0; bottom:0; width:6px; background:var(--c); }
  .fn:hover { box-shadow:0 8px 20px -6px rgba(0,0,0,.2); transform:translateX(3px); }
  .fn .txt { flex:1; min-width:0; }
  .fn h4 { font-size:17px; font-weight:600; color:var(--ink); }
  .fn p { font-size:12.5px; color:#334155; margin-top:2px; line-height:1.3; }
  .fn svg { width:18px; height:18px; color:#94a3b8; flex-shrink:0; margin-left:10px; }
  .fn.hit { box-shadow:0 0 0 3px #fde68a; }
  mark { background:#fde68a; color:inherit; border-radius:3px; }
  @keyframes scaleIn { from { transform:scale(.85); opacity:0; } to { transform:scale(1); opacity:1; } }
  .tip { position:absolute; left:50%; top:100%; transform:translateX(-50%); margin-top:8px; background:#4338ca; color:#fff; padding:8px 14px; border-radius:8px; font-size:13px; font-weight:600; white-space:nowrap; opacity:0; visibility:hidden; transition:opacity .2s; pointer-events:none; z-index:50; }
  .cat:hover .tip, .root:hover .tip { opacity:1; visibility:visible; transition-delay:.3s; }

  #controls { position:absolute; top:20px; right:24px; z-index:30; display:flex; flex-direction:column; gap:4px; background:#fff; padding:6px; border-radius:8px; border:1px solid #cbd5e1; box-shadow:0 10px 15px -3px rgba(0,0,0,.1); }
  #controls button { border:0; background:#fff; width:36px; height:36px; border-radius:6px; font-size:20px; font-weight:700; color:#475569; }
  #controls button:hover { background:#f1f5f9; color:var(--ink); }
  #zoom-level { text-align:center; font-size:12px; font-weight:700; color:#475569; padding:4px 0; }
  #controls hr { border:0; border-top:1px solid #e2e8f0; width:100%; margin:2px 0; }

  #list-view { display:none; overflow-y:auto; padding:32px; }
  .list-cat { max-width:1300px; margin:0 auto 36px; }
  .list-cat > header { all:unset; display:flex; align-items:center; gap:14px; margin-bottom:16px; }
  .list-cat h3 { font-size:20px; font-weight:800; color:var(--ink); }
  .list-cat .d { font-size:14px; color:var(--muted); }
  .grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(320px,1fr)); gap:16px; }
  .grid .fn { width:auto; }
  .empty { text-align:center; color:var(--muted); padding:80px 20px; font-size:16px; }
  .empty p { font-weight:700; color:var(--ink); }
  .suggestions { margin-top:10px; }
  .suggestions button { border:0; background:none; color:var(--accent); font:inherit; font-weight:700; text-decoration:underline; cursor:pointer; }

  #drawer { position:fixed; inset:0; z-index:100; display:none; }
  #backdrop { position:absolute; inset:0; background:rgba(15,23,42,.55); opacity:0; transition:opacity .3s; }
  #panel { position:absolute; top:0; bottom:0; right:0; width:100%; max-width:560px; background:#fff; box-shadow:-10px 0 25px -5px rgba(0,0,0,.15); transform:translateX(100%); transition:transform .3s cubic-bezier(.16,1,.3,1); display:flex; flex-direction:column; }
  #drawer.show #backdrop { opacity:1; }
  #drawer.show #panel { transform:none; }
  #panel .body { flex:1; overflow-y:auto; padding:40px; position:relative; }
  #close { position:absolute; top:20px; right:20px; width:40px; height:40px; border:0; border-radius:50%; background:#f1f5f9; color:#64748b; font-size:20px; }
  .d-head { display:flex; gap:14px; align-items:flex-start; margin-bottom:28px; }
  .d-ico { width:48px; height:48px; border-radius:12px; flex-shrink:0; display:flex; align-items:center; justify-content:center; color:#fff; font-weight:800; font-size:20px; }
  .chip { display:inline-block; background:#f1f5f9; border:1px solid #e2e8f0; border-radius:999px; padding:4px 12px; font-size:11px; font-weight:800; letter-spacing:.05em; color:#475569; text-transform:uppercase; }
  .d-head h2 { font-size:26px; font-weight:800; color:var(--ink); margin-top:8px; font-family:Consolas,Menlo,monospace; }
  .box { border-radius:12px; padding:18px 20px; margin-bottom:24px; border:1px solid #e2e8f0; border-left-width:5px; }
  .box .lbl { font-size:11px; font-weight:800; letter-spacing:.06em; text-transform:uppercase; margin-bottom:8px; }
  .obj { background:#f8fafc; border-left-color:#94a3b8; }
  .obj .lbl { color:#64748b; }
  .obj p { font-size:16px; font-weight:500; color:var(--ink); }
  .ex { background:#fef9db; border-color:#fde68a; border-left-color:#f59e0b; }
  .ex .lbl { color:#b45309; font-size:13px; letter-spacing:0; text-transform:none; }
  .ex pre { margin:0; font-family:Consolas,Menlo,monospace; font-size:13px; color:#7c2d12; white-space:pre-wrap; word-break:break-word; }
  #copy-example { margin-top:12px; border:1px solid #f59e0b; border-radius:6px; background:#fff; color:#92400e; padding:6px 10px; font-size:12px; font-weight:700; }
  #copy-example:hover { background:#fffbeb; }
  #copy-status { margin-left:8px; font-size:12px; color:#047857; }
  .impl h4 { color:#047857; font-size:16px; font-weight:700; margin-bottom:12px; }
  .impl li { display:flex; gap:12px; align-items:flex-start; border:1px solid #e2e8f0; border-radius:10px; padding:14px 16px; margin-bottom:10px; font-size:14px; color:#334155; }
  .impl li::before { content:"✓"; color:#10b981; font-weight:800; }
  .learn-link { display:inline-block; margin-top:4px; color:var(--accent); font-size:14px; font-weight:700; text-decoration:none; }
  .learn-link:hover { text-decoration:underline; }
  .foot { background:#f8fafc; border-top:1px solid #e2e8f0; display:grid; grid-template-columns:auto minmax(0,1fr) auto; align-items:center; gap:16px; padding:20px 24px; font-size:14px; }
  .foot-title { color:var(--muted); font-weight:500; text-align:center; white-space:nowrap; }
  .foot-prev { justify-self:start; }
  .foot-next { justify-self:end; }
  .drawer-nav { border:0; background:none; color:var(--accent); font:inherit; font-weight:700; padding:4px; }
  .drawer-nav:disabled { color:#cbd5e1; cursor:not-allowed; }
  .drawer-nav:focus-visible, #close:focus-visible, #copy-example:focus-visible, .suggestions button:focus-visible { outline:3px solid #a5b4fc; outline-offset:2px; }

  @media (min-width:701px) and (max-width:1100px) {
    header { padding:6px 16px; gap:4px; }
    .toolbar-row { padding-top:4px; }
  }

  @media (max-width:700px) {
    header { padding:8px 14px; gap:6px; }
    .header-actions { align-items:flex-start; margin-left:0; }
    .header-links { justify-content:flex-start; }
    h1 { font-size:18px; }
    .pill { font-size:11px; padding:4px 8px; margin-left:4px; }
    .zoom-hint { display:none; }
    .mobile-hint { display:inline; margin-left:8px; }
    .header-main { gap:6px; }
    .search-group { flex:1 0 100%; min-width:0; margin-left:0; order:-1; }
    .toolbar-row { gap:6px; }
    .toolbar-left { gap:6px; }
    .toolbar-left .btn { padding:6px 8px; font-size:12px; }
    .seg button { padding:5px 10px; font-size:12px; }
    .privacy-badge { max-width:100%; align-items:flex-start; }
    #list-view { padding:20px 14px; }
    .grid { grid-template-columns:1fr; }
    #panel .body { padding:28px 20px; }
    .seo-content { padding:32px 16px; }
    .seo-content h2 { font-size:22px; }
    .foot { grid-template-columns:1fr 1fr; padding:14px 20px; gap:8px 12px; }
    .foot-title { grid-column:1 / -1; grid-row:1; white-space:normal; text-align:center; }
    .foot-prev { grid-column:1; grid-row:2; }
    .foot-next { grid-column:2; grid-row:2; }
  }

  @media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration:.01ms !important; animation-iteration-count:1 !important; scroll-behavior:auto !important; transition-duration:.01ms !important; }
  }
