:root{
    --bg:#ffffff;
    --text:#1b1b1b;
    --muted:#6b6b6b;
    --arrow:#4a4a4a;
    --arrow-hover:#161616;
    --select-bg:#0078d7;
    --select-text:#ffffff;
    --hover-bg: rgba(0,0,0,0.06);
    --ui: "Segoe UI","Yu Gothic UI","Hiragino Kaku Gothic ProN",system-ui,-apple-system,sans-serif;
    --mono: "Cascadia Code","Consolas","SF Mono",ui-monospace,monospace;
  }
  *{box-sizing:border-box;}
  html,body{margin:0;padding:0;}
  body{
    background:var(--bg);
    color:var(--text);
    font-family:var(--ui);
    -webkit-font-smoothing:antialiased;
  }
  a{color:inherit;text-decoration:none;}

  .page{
    max-width:820px;
    margin:0;
    padding:64px 40px 110px 56px;
  }

  /* ---------- profile ---------- */
  .profile{margin-bottom:42px;}
  .name-en{
    font-family:var(--mono);
    font-size:13.5px;
    letter-spacing:.08em;
    color:var(--muted);
    margin:0 0 8px;
  }
  .name-ja{
    font-size:38px;
    font-weight:600;
    margin:0 0 16px;
    letter-spacing:.02em;
  }
  .tagline{
    font-size:17px;
    line-height:1.75;
    max-width:60ch;
    margin:0 0 20px;
  }
  .affiliation{
    font-size:15px;
    line-height:1.85;
    color:var(--muted);
    margin:0;
  }

  /* ---------- registry-style tree ---------- */
  .reg-tree{
    padding-top:6px;
    opacity:0;
    transform:translateY(8px);
    animation:tree-in .5s ease forwards;
    animation-delay:.1s;
  }
  @keyframes tree-in{ to{ opacity:1; transform:translateY(0);} }

  .row{
    display:flex;
    align-items:center;
    gap:10px;
    padding:12px 10px;
    cursor:pointer;
    user-select:none;
    border-radius:5px;
    transition:background .12s ease;
  }
  .row:hover:not(.selected){
    background:var(--hover-bg);
  }
  .row.selected{background:var(--select-bg);color:var(--select-text);}
  .row:focus-visible{outline:2px solid var(--select-bg);outline-offset:-2px;}

  .tree-arrow{
    display:flex;align-items:center;justify-content:center;
    width:22px;height:22px;flex-shrink:0;
    color:var(--arrow);
    border-radius:3px;
  }
  .tree-arrow svg{
    width:11px;height:11px;
    transition:transform .15s ease, color .1s ease;
  }
  .row.open > .tree-arrow svg{transform:rotate(90deg);}
  .tree-arrow:hover{color:var(--arrow-hover);}
  .tree-arrow:hover svg{transform:scale(1.2);}
  .row.open > .tree-arrow:hover svg{transform:rotate(90deg) scale(1.2);}
  .arrow-spacer{width:22px;flex-shrink:0;}

  .row-icon{
    position:relative;
    width:32px;height:32px;flex-shrink:0;
    color:var(--muted);
    display:flex;align-items:center;justify-content:center;
  }
  .row.selected .row-icon{color:var(--select-text);}
  .icon-main{width:100%;height:100%;}
  .icon-main.icon-github{transform:scale(1.18);}
  .icon-img{
    width:100%;height:100%;
    object-fit:contain;
    display:block;
    border-radius:4px;
  }

  .badge{
    position:absolute;right:-5px;bottom:-5px;
    font-family:var(--mono);
    font-size:7.5px;font-weight:700;
    padding:2px 3px;border-radius:2px;
    color:#fff;line-height:1;letter-spacing:.01em;
  }
  .badge-txt{background:#8a8a8a;}
  .badge-doc{background:#2b579a;}
  .badge-ext{background:#46586b;}
  .badge-reg{background:#7b4fac;}

  .link-badge{
    width:14px;height:14px;
    flex-shrink:0;
    align-self:flex-start;
    margin-top:-3px;
    margin-left:1px;
    opacity:.85;
  }
  .link-badge img{width:100%;height:100%;display:block;}

  .row-name{
    font-size:17px;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
  }

  .children-wrap{
    display:grid;
    grid-template-rows:0fr;
    transition:grid-template-rows .2s ease;
  }
  .children-wrap.open{grid-template-rows:1fr;}
  .children-inner{overflow:hidden;}

  .page-footer{
    margin-top:42px;
    font-size:12.5px;
    color:var(--muted);
  }

  @media (max-width:520px){
    .page{padding:40px 20px 80px 24px;}
    .name-ja{font-size:28px;}
    .row-name{font-size:15.5px;}
  }

  @media (prefers-reduced-motion:reduce){
    *{animation-duration:.01ms !important;transition-duration:.01ms !important;}
  }
