  :root { --ink:#0f172a; --muted:#64748b; --line:#334155; --accent:#0f6b78; }
  * { 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; }
  #app.cards-view { height:auto; min-height:100vh; }
  #app.cards-view main { flex:none; }
  #app.cards-view #list-view { position:static; overflow:visible; }
  #app.cards-view .about-cue { position:fixed; }
  .about-cue.hidden { display:none; }

  header { background:#fff; border-bottom:1px solid #e2e8f0; display:flex; flex-direction:column; z-index:20; }
  .row { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:12px; }
  .header-main { gap:12px; padding:8px 20px; background:linear-gradient(90deg,#062c33,#0f6b78 60%,#155e75); }
  .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; align-items:center; gap:8px; }
  .header-logo { display:flex; align-items:center; justify-content:center; width:40px; height:40px; border-radius:10px; }
  .header-logo img { width:100%; height:100%; object-fit:contain; }
  .header-logo:focus-visible { outline:3px solid #4aa3af; outline-offset:2px; }
  .header-action { display:inline-flex; align-items:center; gap:8px; border:1px solid rgba(255,255,255,.3); border-radius:8px; background:rgba(2,6,23,.35); padding:6px 14px; color:#e2e8f0; font-size:14px; line-height:20px; font-weight:500; text-decoration:none; }
  .header-action:hover { border-color:rgba(255,255,255,.6); background:rgba(2,6,23,.55); color:#fff; }
  .header-action svg { width:16px; height:16px; }
  .header-action:focus-visible { outline:3px solid #4aa3af; 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:rgba(255,255,255,.16); border:1px solid rgba(255,255,255,.35); color:#fff; display:flex; align-items:center; justify-content:center; font-weight:800; font-size:20px; }
    h1 { font-size:22px; font-weight:800; color:#fff; line-height:1.2; }
    .sub { font-size:14px; color:#cbd5e1; margin-top:2px; }
    .toolbar-hint { margin-left:8px; padding-left:10px; border-left:1px solid #cbd5e1; color:var(--muted); font-size:13px; white-space:nowrap; }
  .toolbar-hint 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:#e9f5f6; border-radius:999px; padding:2px 9px; font-size:11px; text-decoration:none; margin-left:8px; 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:#4aa3af; background:#fff; box-shadow:0 0 0 3px #d9eef0; }
  #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 #4aa3af; 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:#aed7db; }
  .btn.primary:hover { background:#e9f5f6; }
  .toolbar-row { padding:8px 20px; }
  .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); }

  html { scroll-behavior:smooth; }
  main { position:relative; flex:1; min-height:0; }
  .about-cue { position:absolute; left:50%; bottom:12px; transform:translateX(-50%); z-index:25; padding:6px 14px; border:1px solid #aed7db; border-radius:999px; background:rgba(255,255,255,.92); color:var(--accent); font-size:12.5px; font-weight:700; text-decoration:none; box-shadow:0 4px 10px rgba(15,23,42,.12); }
  .about-cue:hover { background:#e9f5f6; }
  .about-cue:focus-visible { outline:3px solid #86c3ca; outline-offset:2px; }
  .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:#155e75; background:#e9f5f6; 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:#c9e2e5; background:#f2f9f9; }
  .seo-browse summary, .seo-faq summary { padding:12px 16px; color:var(--ink); font-weight:700; cursor:pointer; }
  .seo-browse[open] { padding:0; background:#f2f9f9; }
  .seo-browse[open] summary { border-bottom:1px solid #c9e2e5; background:#f2f9f9; }
  .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:#c9e2e5; background:#f2f9f9; }
  .seo-faq summary { background:#f2f9f9; }
  .seo-faq details[open] { background:#f2f9f9; }
  .seo-faq details[open] summary { border-bottom:1px solid #c9e2e5; }
  .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,#062c33,#0f6b78 60%,#155e75); border-top:1px solid rgba(15,107,120,.4); color:#cbd5e1; 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 { scrollbar-width:none; }
  #tree-view::-webkit-scrollbar { display:none; }
  #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,#0f6b78,#147b8a); border-color:#0b5660; 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; }
  .fn.spot { box-shadow:0 0 0 4px #f59e0b, 0 8px 24px -6px rgba(245,158,11,.6); }
  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:#0f6b78; 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:48px 24px; margin:40px auto; max-width:560px; font-size:16px; border:2px dashed #cbd5e1; border-radius:20px; background:rgba(255,255,255,.55); }
  .empty-ico { width:56px; height:56px; color:#64748b; margin:0 auto 14px; display:block; }
  .empty p { font-weight:700; font-size:22px; color:var(--ink); margin:0; }
  .suggestions { margin-top:10px; }
  .suggestions button { border:0; padding: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; }
  #share { position:absolute; top:20px; right:72px; width:40px; height:40px; border:0; border-radius:50%; background:transparent; color:#64748b; display:flex; align-items:center; justify-content:center; cursor:pointer; }
  #share:hover { background:#f1f5f9; color:#334155; }
  #share:focus-visible { outline:3px solid #86c3ca; outline-offset:2px; }
  #share::after { content:attr(data-tip); position:absolute; top:46px; right:0; white-space:nowrap; background:#0f172a; color:#fff; font-size:12px; font-weight:600; padding:6px 10px; border-radius:6px; opacity:0; pointer-events:none; transition:opacity .15s; z-index:5; }
  #share:hover::after, #share:focus-visible::after { opacity:1; }
  #link-toast { position:absolute; bottom:92px; right:calc(min(100vw, 560px) / 2); transform:translate(50%,12px); max-width:calc(100vw - 40px); font-size:14px; font-weight:700; color:#fff; background:#047857; border-radius:999px; padding:10px 18px; box-shadow:0 8px 20px rgba(0,0,0,.25); opacity:0; pointer-events:none; transition:opacity .2s, transform .2s; z-index:10; }
  #link-toast.show { opacity:1; transform:translate(50%,0); }
  #link-toast.err { background:#b91c1c; }
  #share .ico-done { display:none; }
  #share.done { background:#d1fae5; color:#047857; }
  #share.done .ico-share { display:none; }
  #share.done .ico-done { display:inline; }
  #share.done::after { opacity:0; }
  .d-head { display:flex; gap:14px; align-items:flex-start; margin:16px 0 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; }
  .d-title { flex:1; min-width:0; min-height:48px; display:flex; flex-direction:column; justify-content:flex-end; }
  .d-title h2 { margin-top:0 !important; overflow-wrap:anywhere; }
  .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:""; flex-shrink:0; width:8px; height:8px; margin:6px 5px 0; border-radius:50%; background:#94a3b8; }
  .colors { margin-bottom:24px; }
.colors h4 { color:#047857; font-size:16px; font-weight:700; margin-bottom:12px; }
.colors-bar { display:flex; align-items:center; gap:12px; margin-bottom:10px; }
#color-filter { flex:1; min-width:0; border:1px solid #cbd5e1; border-radius:8px; padding:8px 10px; font:inherit; font-size:14px; }
#color-count { font-size:12px; color:var(--muted); white-space:nowrap; }
.colors-wrap { max-height:420px; overflow:auto; border:1px solid #e2e8f0; border-radius:10px; }
.colors-table { width:100%; border-collapse:collapse; font-size:12.5px; }
.colors-table thead th { position:sticky; top:0; z-index:1; background:#f1f5f9; text-align:left; padding:8px 10px; font-size:11px; font-weight:800; color:#334155; border-bottom:1px solid #e2e8f0; white-space:nowrap; }
.colors-table td, .colors-table tbody th { padding:6px 10px; border-bottom:1px solid #f1f5f9; vertical-align:middle; text-align:left; font-weight:400; }
.color-copy { display:block; border:0; background:none; padding:2px 0; font:inherit; font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace; color:var(--ink); text-align:left; cursor:pointer; white-space:nowrap; }
.colors-table tbody th .color-copy { font-weight:700; }
.color-copy:hover { color:var(--accent); text-decoration:underline; }
.color-copy:focus-visible, #color-filter:focus-visible, .colors-wrap:focus-visible { outline:3px solid #86c3ca; outline-offset:2px; }
.color-swatch { display:block; width:44px; height:24px; border-radius:6px; border:1px solid rgba(15,23,42,.25); }
.color-none { text-align:center; color:var(--muted); padding:20px; }
.colors-hint { font-size:12px; color:var(--muted); margin-top:6px; }
.learn-link { display:inline-block; margin-top:4px; color:#475f8c; font-size:12.5px; font-weight:400; text-decoration:none; }
  .learn-link:hover { text-decoration:underline; color:#334a73; }
  .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:#64748b; font-size:12px; 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 #86c3ca; outline-offset:2px; }

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

  @media (max-width:700px) {
    .header-main { padding:8px 14px; }
    .toolbar-row { padding:6px 14px 8px; }
    .header-actions { align-items:flex-start; margin-left:0; }
    .header-links { justify-content:flex-start; }
    h1 { font-size:18px; }
    .pill { font-size:10px; padding:2px 7px; 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 { padding:14px 20px; }
    .foot-title { white-space:nowrap; }
  }

  @media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration:.01ms !important; animation-iteration-count:1 !important; scroll-behavior:auto !important; transition-duration:.01ms !important; }
  }
  .impl li code { font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace; font-size:13px; background:#f1f5f9; border:1px solid #e2e8f0; border-radius:5px; padding:1px 6px; color:#0f172a; word-break:break-word; }
