    :root {
      color-scheme: dark;
      --bg: #10121b;
      --surface: #191c29;
      --surface-2: #202435;
      --surface-3: #262b3e;
      --line: rgba(220, 224, 255, .09);
      --text: #f1f2fa;
      --muted: #9da4ba;
      --soft: #c4c9da;
      --accent: #a99bff;
      --accent-2: #8ac9ff;
      --green: #8ce0bb;
      --radius: 20px;
      --shadow: 0 18px 50px rgba(0, 0, 0, .16);
    }
    * { box-sizing: border-box; }
    html { scroll-behavior: smooth; scroll-padding-top: 86px; }
    body {
      margin: 0;
      min-height: 100vh;
      background: #0b0f19;
      color: var(--text);
      font: 15px/1.65 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
      -webkit-font-smoothing: antialiased;
    }
    /* 固定的细网格与环境光：页面滚动时背景保持不动 */
    body::before {
      content: "";
      position: fixed;
      inset: 0;
      z-index: 0;
      pointer-events: none;
      background:
        radial-gradient(ellipse at 12% 8%, rgba(135, 119, 255, .27), transparent 34rem),
        radial-gradient(ellipse at 86% 24%, rgba(67, 151, 224, .22), transparent 32rem),
        radial-gradient(ellipse at 54% 88%, rgba(76, 95, 174, .17), transparent 38rem),
        linear-gradient(rgba(210, 220, 255, .035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(210, 220, 255, .035) 1px, transparent 1px);
      background-size: 100% 100%, 100% 100%, 100% 100%, 42px 42px, 42px 42px;
      mask-image: none;
    }
    .topbar, .layout, footer { position: relative; z-index: 1; }
    a { color: inherit; text-decoration: none; }
    button { font: inherit; }
    button, a { -webkit-tap-highlight-color: transparent; }
    .topbar {
      position: sticky; top: 0; z-index: 20;
      border-bottom: 1px solid var(--line);
      background: rgba(16, 18, 27, .82);
      backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
    }
    .topbar-inner {
      width: min(1180px, calc(100% - 36px)); min-height: 66px; margin: auto;
      display: flex; align-items: center; justify-content: space-between; gap: 20px;
    }
    .wordmark { font-weight: 850; font-size: 20px; letter-spacing: -.7px; }
    .wordmark span { color: var(--accent); }
    .top-note { color: var(--muted); font-size: 12px; }
    .top-nav { display: flex; align-items: center; gap: 8px; }
    .top-nav a {
      padding: 8px 12px; border-radius: 10px; color: var(--muted); font-size: 13px;
      transition: background .22s ease, color .22s ease;
    }
    .top-nav a:hover, .top-nav a:focus-visible { color: var(--text); background: var(--surface-2); outline: none; }
    .layout {
      width: min(1180px, calc(100% - 36px)); margin: 28px auto 64px;
      display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 22px; align-items: start;
    }
    .sidebar { display: grid; gap: 16px; position: sticky; top: 88px; }
    .panel {
      position: relative;
      isolation: isolate;
      overflow: hidden;
      background:
        linear-gradient(135deg, rgba(255,255,255,.085), rgba(255,255,255,.018) 42%, rgba(150,165,220,.035)),
        linear-gradient(155deg, rgba(34, 39, 59, .61), rgba(17, 21, 34, .56));
      border: 1px solid rgba(222, 228, 255, .14);
      border-top-color: rgba(238, 241, 255, .23);
      border-radius: var(--radius);
      box-shadow: 0 18px 55px rgba(0,0,0,.22), inset 0 1px 0 rgba(255,255,255,.08);
      backdrop-filter: blur(24px) saturate(155%);
      -webkit-backdrop-filter: blur(24px) saturate(155%);
    }
    .profile { padding: 24px; overflow: hidden; position: relative; }
    .avatar-row { display: flex; align-items: center; gap: 15px; position: relative; }
    /* 头像使用仓库根目录中的 Avatar.jpg，与本站同源加载。 */
    .avatar, .avatar-placeholder {
      width: 76px; height: 76px; flex: 0 0 76px; border-radius: 23px;
      border: 1px solid rgba(197, 188, 255, .35);
    }
    .avatar { display: block; object-fit: cover; }
    .avatar-placeholder {
      display: grid; place-items: center; overflow: hidden;
      background: linear-gradient(145deg, #b4a8ff, #657fc2 58%, #3a4569);
      color: #fff; font-size: 23px; font-weight: 900; letter-spacing: -1.5px;
      box-shadow: inset 0 0 25px rgba(255,255,255,.14);
    }
    .avatar-placeholder span { text-shadow: 0 2px 12px rgba(16, 18, 27, .3); }
    .name { font-size: 22px; font-weight: 820; letter-spacing: -.5px; line-height: 1.25; }
    .handle { margin-top: 5px; color: var(--muted); font-size: 12px; }
    .profile-bio { margin: 20px 0 18px; color: var(--soft); font-size: 13px; line-height: 1.9; }
    .profile-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
    .tag {
      display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px;
      border: 1px solid rgba(220,228,255,.12); border-top-color: rgba(255,255,255,.17);
      border-radius: 8px; color: #d1d5e8;
      background: linear-gradient(135deg, rgba(255,255,255,.075), rgba(255,255,255,.018));
      backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); font-size: 11px;
    }
    .tag-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px rgba(140,224,187,.5); }
    .social-title { margin: 0 0 10px; color: var(--muted); font-size: 11px; letter-spacing: 1.5px; font-weight: 750; }
    .social-list { display: grid; gap: 8px; }
    .social-link {
      display: flex; align-items: center; gap: 11px; min-height: 48px; padding: 8px 10px;
      border: 1px solid rgba(220, 228, 255, .11); border-top-color: rgba(255,255,255,.16);
      border-radius: 12px;
      background: linear-gradient(135deg, rgba(255,255,255,.065), rgba(255,255,255,.018));
      box-shadow: inset 0 1px 0 rgba(255,255,255,.035);
      backdrop-filter: blur(14px) saturate(145%); -webkit-backdrop-filter: blur(14px) saturate(145%);
      transition: transform .22s ease, border-color .22s ease, background .22s ease, box-shadow .22s ease;
    }
    .social-link:hover { transform: translateX(3px); border-color: rgba(169,155,255,.42); background: linear-gradient(135deg, rgba(169,155,255,.13), rgba(255,255,255,.025)); box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 8px 24px rgba(0,0,0,.12); }
    .social-icon {
      width: 30px; height: 30px; display: grid; place-items: center; flex: 0 0 30px;
      border-radius: 9px; background: var(--surface-3); color: #e2e4f4; font-size: 11px; font-weight: 850;
    }
    .social-copy { min-width: 0; flex: 1; }
    .social-name { font-size: 12px; font-weight: 700; }
    .social-id { color: var(--muted); font-size: 11px; overflow-wrap: anywhere; }
    .external { color: #707a97; font-size: 15px; }
    .side-card { padding: 18px 20px; }
    .side-card h2 { margin: 0 0 12px; font-size: 13px; font-weight: 750; }
    .side-links { display: grid; gap: 3px; }
    .side-links a { padding: 7px 0; color: var(--muted); font-size: 12px; transition: color .2s; }
    .side-links a:hover { color: var(--text); }
    .content { min-width: 0; display: grid; gap: 16px; }
    .cover {
      min-height: 176px; padding: 27px 30px; position: relative; overflow: hidden;
      background:
        radial-gradient(ellipse at 85% 10%, rgba(159, 148, 255, .28), transparent 45%),
        radial-gradient(ellipse at 100% 110%, rgba(107, 182, 235, .20), transparent 42%),
        linear-gradient(120deg, rgba(42, 45, 72, .74), rgba(27, 32, 49, .67) 60%, rgba(27, 37, 53, .7));
      backdrop-filter: blur(28px) saturate(160%);
      -webkit-backdrop-filter: blur(28px) saturate(160%);
      border-color: rgba(222,228,255,.18);
    }
    .cover-label { color: #c4bbff; font-size: 11px; letter-spacing: 2px; font-weight: 800; }
    .cover h1 { position: relative; z-index: 1; max-width: 580px; margin: 9px 0 4px; font-size: clamp(24px, 3.5vw, 34px); line-height: 1.3; letter-spacing: -.8px; }
    .cover p { position: relative; z-index: 1; margin: 0; color: #b3bad0; font-size: 13px; }
    .section-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 8px 3px 0; }
    .section-bar h2 { margin: 0; font-size: 16px; font-weight: 780; }
    .section-bar span { color: var(--muted); font-size: 11px; }
    .post { padding: 22px 24px; }
    .post-head { display: flex; align-items: center; gap: 11px; margin-bottom: 15px; }
    .mini-avatar {
      width: 38px; height: 38px; display: block; object-fit: cover; flex: 0 0 38px;
      border-radius: 13px; border: 1px solid rgba(220,228,255,.14);
    }
    .post-author { font-size: 12px; font-weight: 750; }
    .post-time { color: var(--muted); font-size: 11px; }
    .post-badge { margin-left: auto; padding: 4px 8px; border-radius: 7px; color: #c6bdff; background: rgba(169,155,255,.1); font-size: 10px; }
    .post h3 { margin: 0 0 8px; font-size: 16px; letter-spacing: -.2px; }
    .post p { margin: 0; color: #b2b8ce; font-size: 13px; line-height: 1.9; }
    .post p + p { margin-top: 8px; }
    .post-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 15px; }
    .post-tags span { padding: 4px 8px; border-radius: 7px; background: rgba(255,255,255,.045); color: #b5bad1; font-size: 10px; }
    .repo-card {
      margin-top: 16px; padding: 15px; display: flex; align-items: center; gap: 13px;
      border: 1px solid rgba(220,228,255,.12); border-top-color: rgba(255,255,255,.17);
      border-radius: 14px;
      background: linear-gradient(135deg, rgba(255,255,255,.065), rgba(255,255,255,.015));
      backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
      transition: border-color .2s, background .2s;
    }
    .repo-card:hover { border-color: rgba(169,155,255,.35); background: rgba(169,155,255,.04); }
    .repo-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; background: var(--surface-3); color: #d5d0ff; font-size: 18px; }
    .repo-info { min-width: 0; flex: 1; }
    .repo-name { font-size: 13px; font-weight: 750; overflow-wrap: anywhere; }
    .repo-desc { color: var(--muted); font-size: 11px; margin-top: 3px; }
    .repo-arrow { color: #858eab; }
    .feature-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .feature {
      padding: 19px;
      background:
        linear-gradient(145deg, rgba(255,255,255,.065), rgba(255,255,255,.012)),
        rgba(25, 29, 45, .48);
      border-color: rgba(220,228,255,.12);
    }
    .feature-icon { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 11px; background: rgba(169,155,255,.11); color: #c7bcff; font-size: 16px; }
    .feature h3 { margin: 12px 0 5px; font-size: 13px; }
    .feature p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.8; }
    .contact-strip { padding: 20px 23px; display: flex; align-items: center; justify-content: space-between; gap: 15px; }
    .contact-strip h2 { margin: 0; font-size: 14px; }
    .contact-strip p { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
    .button {
      display: inline-flex; align-items: center; justify-content: center; gap: 8px;
      min-height: 40px; padding: 9px 14px; border: 1px solid rgba(190,180,255,.25);
      border-top-color: rgba(255,255,255,.25);
      border-radius: 11px;
      background: linear-gradient(135deg, rgba(169,155,255,.19), rgba(169,155,255,.055));
      box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
      backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
      color: #e1dcff; font-size: 12px;
      white-space: nowrap; cursor: pointer; transition: transform .2s ease, background .2s ease;
    }
    .button:hover { transform: translateY(-2px); background: rgba(169,155,255,.17); }
    .button:active { transform: scale(.98); }
    a:focus-visible, button:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 3px; }
    footer { width: min(1180px, calc(100% - 36px)); margin: 0 auto; padding: 0 0 30px; color: #747d98; font-size: 11px; text-align: center; }
    footer .foot-line { height: 1px; background: var(--line); margin-bottom: 22px; }
    #toast {
      position: fixed; left: 50%; bottom: 24px; z-index: 50; transform: translate(-50%, 12px);
      padding: 10px 15px; border: 1px solid var(--line); border-radius: 12px;
      background: #262b3e; color: var(--text); box-shadow: var(--shadow); font-size: 12px;
      opacity: 0; pointer-events: none; transition: opacity .22s, transform .22s;
    }
    #toast.show { opacity: 1; transform: translate(-50%, 0); }
    .fade-in { animation: appear .55s ease both; }
    .content > :nth-child(2) { animation-delay: .05s; }
    .content > :nth-child(3) { animation-delay: .1s; }
    .content > :nth-child(4) { animation-delay: .15s; }
    @keyframes appear { from { opacity: 0; transform: translateY(9px); } to { opacity: 1; transform: translateY(0); } }
    @media (max-width: 850px) {
      .layout { grid-template-columns: 260px minmax(0, 1fr); gap: 15px; }
      .profile { padding: 19px; }
      .avatar, .avatar-placeholder { width: 64px; height: 64px; flex-basis: 64px; border-radius: 20px; }
      .name { font-size: 20px; }
      .cover { padding: 24px; }
      .post { padding: 19px; }
    }
    @media (max-width: 700px) {
      .topbar-inner { width: min(100% - 28px, 560px); min-height: 60px; }
      .top-note { display: none; }
      .top-nav { gap: 0; }
      .top-nav a { padding: 8px 9px; font-size: 12px; }
      .layout { width: min(100% - 28px, 560px); margin-top: 16px; grid-template-columns: minmax(0, 1fr); gap: 15px; }
      .sidebar { position: static; grid-row: 1; }
      .profile { padding: 20px; }
      .profile-bio { margin: 15px 0 13px; }
      .social-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
      .social-link { min-width: 0; padding: 8px; gap: 8px; }
      .social-icon { width: 28px; height: 28px; flex-basis: 28px; }
      .social-id { font-size: 10px; }
      .side-card { display: none; }
      .content { grid-row: 2; }
      .cover { min-height: 160px; padding: 23px 21px; }
      .feature-grid { gap: 9px; }
      .feature { padding: 15px; }
      .contact-strip { align-items: flex-start; flex-direction: column; }
    }
    @media (max-width: 390px) {
      .wordmark { font-size: 18px; }
      .top-nav a { padding: 7px; font-size: 11px; }
      .social-list { grid-template-columns: 1fr; }
      .social-link { padding: 8px 10px; }
      .cover h1 { font-size: 25px; }
      .feature-grid { grid-template-columns: 1fr; }
    }
    /* Real CSS/SVG refraction; the scene is static and does not parallax. */
    .panel.liquid-glass {
      --lg-blur: 12px;
      --lg-saturate: 190%;
      --lg-opacity: .16;
      --lg-radius: var(--radius);
      --lg-border-opacity: .62;
      --lg-tint: 205 216 255;
      --lg-edge-red: rgb(163 135 255 / .42);
      --lg-edge-cyan: rgb(82 218 255 / .42);
      --lg-shadow: 0 22px 65px rgb(0 0 0 / .28);
      --lg-scene-background: url("../images/background.svg");
      background: linear-gradient(135deg, rgba(255,255,255,.105), rgba(255,255,255,.025) 44%, rgba(120,145,255,.055));
      border-color: rgba(225,232,255,.22);
      border-top-color: rgba(255,255,255,.46);
      box-shadow: 0 22px 65px rgba(0,0,0,.28), inset 0 1px 0 rgba(255,255,255,.22);
      -webkit-backdrop-filter: var(--lg-filter) blur(var(--lg-blur)) saturate(var(--lg-saturate));
      backdrop-filter: var(--lg-filter) blur(var(--lg-blur)) saturate(var(--lg-saturate));
    }
    .panel.liquid-glass .liquid-glass__refraction { opacity: .95; }
    .panel.liquid-glass .liquid-glass__content { min-width: 0; }
    .topbar {
      background: rgba(10, 13, 24, .72);
      border-bottom-color: rgba(230,236,255,.12);
    }
    @media (prefers-reduced-motion: reduce) {
      *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .01ms !important; }
    }

    /* Adaptive layout for freely resized windows, ultrawide displays, and short landscape viewports. */
    html, body { width: 100%; }
    body { overflow-x: clip; }
    img, svg, video, canvas { max-width: 100%; }
    .topbar-inner, .layout, footer { min-width: 0; }
    .layout {
      grid-template-columns: clamp(220px, 25vw, 300px) minmax(0, 1fr);
      gap: clamp(12px, 1.8vw, 22px);
    }
    .sidebar, .content, .panel, .profile, .post, .cover, .contact-strip { min-width: 0; }
    .cover h1 { font-size: clamp(1.45rem, 2.6vw, 2.125rem); overflow-wrap: anywhere; }
    .post h3, .repo-name, .social-id { overflow-wrap: anywhere; }
    .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    @media (max-width: 980px) {
      .layout {
        width: min(calc(100% - 32px), 760px);
        grid-template-columns: minmax(0, 1fr);
      }
      .sidebar { position: static; top: auto; grid-row: 1; }
      .content { grid-row: 2; }
      .side-card { display: none; }
      .social-list { grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
      .profile { padding: clamp(16px, 3vw, 24px); }
      .cover { padding: clamp(18px, 3.5vw, 30px); }
    }
    @media (max-width: 560px) {
      .topbar-inner { width: calc(100% - 24px); gap: 8px; flex-wrap: wrap; padding: 8px 0; }
      .wordmark { flex: 0 0 auto; }
      .top-nav { margin-left: auto; max-width: 100%; flex-wrap: wrap; justify-content: flex-end; }
      .top-nav a { padding: 6px 8px; }
      .layout { width: calc(100% - 24px); margin: 12px auto 36px; }
      .avatar, .avatar-placeholder { width: 58px; height: 58px; flex-basis: 58px; }
      .name { font-size: clamp(18px, 5vw, 22px); }
      .profile-bio { font-size: 13px; }
      .social-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
      .social-link { min-width: 0; }
      .social-copy { min-width: 0; }
      .social-id { overflow-wrap: anywhere; }
      .feature-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); }
      .post { padding: clamp(15px, 4vw, 22px); }
      .contact-strip { padding: 17px; }
    }
    @media (max-width: 360px) {
      .topbar-inner { align-items: flex-start; }
      .top-nav { width: 100%; margin-left: 0; justify-content: flex-start; }
      .social-list, .feature-grid { grid-template-columns: minmax(0, 1fr); }
      .avatar-row { align-items: flex-start; }
      .cover h1 { font-size: 23px; }
      .post-head { gap: 8px; }
      .post-badge { padding: 3px 6px; }
    }
    @media (max-height: 620px) and (min-width: 981px) {
      .sidebar { position: static; }
      .layout { margin-top: 16px; margin-bottom: 36px; }
      .topbar-inner { min-height: 54px; }
      .profile { padding: 18px; }
      .profile-bio { margin: 12px 0; }
    }
    @media (orientation: landscape) and (max-height: 460px) {
      .topbar-inner { min-height: 48px; }
      .layout { margin-top: 10px; }
      .cover { min-height: 125px; }
    }

    /* Compact icon-only social buttons directly under the profile name. */
    .profile-identity { min-width: 0; }
    .social-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
    .social-action {
      position: relative; display: inline-grid; place-items: center; width: 36px; height: 36px; flex: 0 0 36px;
      padding: 0; border: 1px solid rgba(220,228,255,.16); border-top-color: rgba(255,255,255,.25);
      border-radius: 50%; color: #e2e4f4; cursor: pointer;
      background: linear-gradient(145deg, rgba(255,255,255,.105), rgba(255,255,255,.025));
      box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 5px 14px rgba(0,0,0,.1);
      backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
      transition: transform .2s ease, border-color .2s ease, color .2s ease, background .2s ease, box-shadow .2s ease;
    }
    .social-action svg { display: block; width: 17px; height: 17px; fill: currentColor; }
    .social-letter { display: block; color: currentColor; font-family: Georgia, "Times New Roman", serif; font-size: 18px; font-weight: 700; font-style: italic; line-height: 1; letter-spacing: -1.2px; transform: translateY(-.3px); user-select: none; }
    .social-letter--qq { font-size: 19px; transform: translate(-1px, -.3px); }
    .social-letter--bili { font-size: 18px; font-family: Georgia, "Times New Roman", serif; font-weight: 800; font-style: italic; transform: translate(-1px, 1px); }
    .social-action:nth-child(2) svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
    .social-action:nth-child(2) svg { width: 21px; height: 21px; }
    .social-action:nth-child(3) svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
    .social-action:nth-child(3):hover { color: #ff7fa8; border-color: rgba(255,127,168,.55); }
    .social-action:nth-child(3) svg, .social-action:nth-child(5) svg { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
    .social-action:nth-child(4) svg { fill: currentColor; }
    .social-action:hover, .social-action:focus-visible {
      transform: translateY(-3px); color: #fff; border-color: rgba(169,155,255,.6);
      background: linear-gradient(145deg, rgba(169,155,255,.25), rgba(110,174,255,.1));
      box-shadow: 0 8px 22px rgba(91,87,180,.2), inset 0 1px 0 rgba(255,255,255,.14);
    }
    .social-action::after {
      content: attr(data-tip); position: absolute; z-index: 30; left: 50%; bottom: calc(100% + 9px);
      width: max-content; max-width: min(190px, 70vw); padding: 6px 9px;
      border: 1px solid rgba(220,228,255,.16); border-radius: 8px;
      background: rgba(22,26,41,.96); color: #e7e9f8; font-size: 11px; font-weight: 550; line-height: 1.35;
      white-space: nowrap; box-shadow: 0 8px 24px rgba(0,0,0,.24);
      opacity: 0; pointer-events: none; transform: translate(-50%, 4px);
      transition: opacity .16s ease, transform .16s ease;
    }
    .social-action::before {
      content: ""; position: absolute; z-index: 31; left: 50%; bottom: calc(100% + 4px);
      width: 7px; height: 7px; border-right: 1px solid rgba(220,228,255,.16); border-bottom: 1px solid rgba(220,228,255,.16);
      background: rgba(22,26,41,.96); transform: translateX(-50%) rotate(45deg);
      opacity: 0; transition: opacity .16s ease;
    }
    .social-action:hover::after, .social-action:focus-visible::after,
    .social-action:hover::before, .social-action:focus-visible::before { opacity: 1; }
    .social-action:hover::after, .social-action:focus-visible::after { transform: translate(-50%, 0); }
    .qq-contact { text-align: center; }
    @media (max-width: 420px) {
      .avatar-row { align-items: flex-start; }
      .social-actions { gap: 7px; margin-top: 10px; }
      .social-action { width: 34px; height: 34px; flex-basis: 34px; }
      .social-action svg { width: 16px; height: 16px; }
    }

    /* Confirmation dialog for external navigation */
    .external-dialog[hidden] { display: none !important; }
    .external-dialog { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; }
    .external-dialog__backdrop { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: rgba(4, 7, 16, .72); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); cursor: default; animation: externalFade .18s ease both; }
    .external-dialog__card { position: relative; width: min(100%, 420px); padding: clamp(22px, 5vw, 30px); border: 1px solid rgba(222,228,255,.2); border-top-color: rgba(255,255,255,.34); border-radius: 22px; background: linear-gradient(145deg, rgba(38,43,65,.98), rgba(17,21,35,.98)); box-shadow: 0 28px 90px rgba(0,0,0,.48), inset 0 1px 0 rgba(255,255,255,.1); backdrop-filter: blur(28px); -webkit-backdrop-filter: blur(28px); animation: externalCardIn .24s cubic-bezier(.2,.8,.2,1) both; }
    .external-dialog__icon { width: 44px; height: 44px; display: grid; place-items: center; margin-bottom: 18px; border: 1px solid rgba(169,155,255,.28); border-radius: 14px; background: rgba(169,155,255,.12); color: #c9beff; font-size: 23px; }
    .external-dialog__eyebrow { color: #a99bff; font-size: 10px; font-weight: 800; letter-spacing: 1.8px; }
    .external-dialog__card h2 { margin: 7px 0 8px; color: var(--text); font-size: clamp(19px, 4vw, 22px); letter-spacing: -.4px; }
    .external-dialog__card > p { margin: 0; color: #b6bdd2; font-size: 13px; line-height: 1.85; }
    .external-dialog__destination { display: grid; gap: 5px; margin: 19px 0; padding: 12px 14px; border: 1px solid rgba(220,228,255,.12); border-radius: 12px; background: rgba(255,255,255,.035); }
    .external-dialog__destination-label { color: #858eaa; font-size: 10px; }
    .external-dialog__host { color: #e2deff; font-size: 13px; font-weight: 700; overflow-wrap: anywhere; }
    .external-dialog__actions { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 10px; }
    .external-dialog__actions button { min-width: 0; min-height: 43px; padding: 10px 12px; border: 1px solid rgba(220,228,255,.15); border-radius: 11px; color: var(--text); font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; transition: background .18s ease, transform .18s ease, border-color .18s ease; }
    .external-dialog__actions button:hover { transform: translateY(-1px); }
    .external-dialog__cancel { background: rgba(255,255,255,.045); }
    .external-dialog__cancel:hover { background: rgba(255,255,255,.09); }
    .external-dialog__continue { background: linear-gradient(135deg, rgba(169,155,255,.26), rgba(109,143,224,.16)); border-color: rgba(169,155,255,.35) !important; color: #e7e2ff !important; }
    .external-dialog__continue:hover { background: rgba(169,155,255,.24); }
    .external-dialog__note { margin-top: 14px !important; color: #818ba6 !important; font-size: 10px !important; }
    .external-dialog__destination { min-width: 0; }
    .external-dialog__url-row { display: flex; align-items: flex-start; gap: 10px; min-width: 0; }
    .external-dialog__host { flex: 1; min-width: 0; overflow-wrap: anywhere; word-break: break-word; font-size: 12px; line-height: 1.7; user-select: text; }
    .icon-copy { display: inline-grid; place-items: center; flex: 0 0 34px; width: 34px; height: 34px; padding: 7px; border: 1px solid rgba(220,228,255,.17); border-radius: 9px; background: rgba(255,255,255,.055); color: #d9d3ff; cursor: pointer; transition: background .18s ease, border-color .18s ease, transform .18s ease; }
    .icon-copy:hover { background: rgba(169,155,255,.16); border-color: rgba(169,155,255,.4); transform: translateY(-1px); }
    .icon-copy svg { display: block; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
    .qq-contact { width: 100%; text-align: left; color: inherit; cursor: pointer; font: inherit; }
    .qq-contact:hover { transform: translateX(3px); border-color: rgba(169,155,255,.42); background: linear-gradient(135deg, rgba(169,155,255,.13), rgba(255,255,255,.025)); box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 8px 24px rgba(0,0,0,.12); }
    .qq-contact .social-id { line-height: 1.7; }
    body.external-dialog-open { overflow: hidden; }
    @keyframes externalFade { from { opacity: 0; } to { opacity: 1; } }
    @keyframes externalCardIn { from { opacity: 0; transform: translateY(8px) scale(.985); } to { opacity: 1; transform: translateY(0) scale(1); } }
    @media (max-width: 360px) { .external-dialog { padding: 12px; } .external-dialog__card { padding: 20px; } .external-dialog__actions { grid-template-columns: 1fr; } }
    @media (prefers-reduced-motion: reduce) { .external-dialog__backdrop, .external-dialog__card { animation: none; } }


/* Global tactile feedback: quick compression, light bloom and a soft ripple. */
:where(button, a[href], [role="button"], input[type="button"], input[type="submit"]) {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition:
    transform 180ms cubic-bezier(.2,.8,.2,1),
    filter 180ms ease,
    box-shadow 220ms ease,
    border-color 220ms ease,
    background-color 220ms ease;
}
:where(button, a[href], [role="button"], input[type="button"], input[type="submit"]):active,
:where(button, a[href], [role="button"], input[type="button"], input[type="submit"]).feedback-pressed {
  transform: scale(.965);
  filter: brightness(1.22) saturate(1.12);
  box-shadow: 0 0 0 1px rgba(190,178,255,.18), 0 0 24px rgba(140,126,255,.16);
}
:where(button, a[href], [role="button"], input[type="button"], input[type="submit"]):focus-visible {
  outline: 2px solid rgba(181,169,255,.92);
  outline-offset: 4px;
  box-shadow: 0 0 0 5px rgba(169,155,255,.12), 0 0 24px rgba(140,126,255,.15);
}
:where(button, a[href], [role="button"], input[type="button"], input[type="submit"]) .feedback-ripple {
  position: absolute;
  z-index: 0;
  pointer-events: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(231,226,255,.58) 0%, rgba(169,155,255,.28) 38%, rgba(169,155,255,0) 72%);
  transform: translate(-50%, -50%) scale(0);
  animation: tactileRipple 620ms cubic-bezier(.15,.65,.3,1) forwards;
}
:where(button, a[href], [role="button"], input[type="button"], input[type="submit"]):not(.external-dialog__backdrop) {
  position: relative;
  isolation: isolate;
}
.external-dialog__backdrop:active {
  transform: none;
  filter: brightness(1.08);
  background-color: rgba(8, 10, 18, .76);
}
:where(button, a[href], [role="button"], input[type="button"], input[type="submit"]) > :not(.feedback-ripple) {
  position: relative;
}
@keyframes tactileRipple {
  0% { opacity: .9; transform: translate(-50%, -50%) scale(0); }
  65% { opacity: .34; }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(18); }
}
@keyframes tactileNudge {
  0% { transform: scale(1); }
  38% { transform: scale(.955); }
  72% { transform: scale(1.018); }
  100% { transform: scale(1); }
}
.feedback-confirmed { animation: tactileNudge 360ms cubic-bezier(.2,.8,.2,1); }
:where(button, a[href], [role="button"], input[type="button"], input[type="submit"]):disabled,
:where(button, a[href], [role="button"], input[type="button"], input[type="submit"])[aria-disabled="true"] {
  cursor: not-allowed;
}
:where(button, a[href], [role="button"], input[type="button"], input[type="submit"]):disabled:active,
:where(button, a[href], [role="button"], input[type="button"], input[type="submit"])[aria-disabled="true"]:active {
  filter: brightness(1.12);
}
@media (hover: hover) {
  :where(button, a[href], [role="button"], input[type="button"], input[type="submit"]):not(:disabled):not([aria-disabled="true"]):hover {
    filter: brightness(1.06);
  }
}
@media (prefers-reduced-motion: reduce) {
  :where(button, a[href], [role="button"], input[type="button"], input[type="submit"]),
  :where(button, a[href], [role="button"], input[type="button"], input[type="submit"])::before,
  :where(button, a[href], [role="button"], input[type="button"], input[type="submit"])::after {
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
  }
}


/* Softer, rounder visual language across the whole interface. */
:root { --radius: 26px; }
.panel,
.cover,
.post,
.feature,
.repo-card,
.repo-link,
.contact-card,
.profile-card {
  border-radius: 26px;
}
.avatar,
.avatar-placeholder {
  border-radius: 25px;
}
.social-action,
.button,
.pill,
.status-pill,
.tag,
.post-badge,
.post-tags span,
.feature-icon,
.repo-icon,
.external-dialog__icon {
  border-radius: 15px;
}
.topbar-inner,
.top-nav a,
.external-dialog__destination {
  border-radius: 18px;
}
.external-dialog__card {
  border-radius: 28px;
}
.external-dialog__actions button {
  border-radius: 15px;
}
.icon-copy {
  border-radius: 13px;
}
@media (max-width: 600px) {
  .panel,
  .cover,
  .post,
  .feature,
  .repo-card,
  .repo-link,
  .contact-card,
  .profile-card {
    border-radius: 23px;
  }
  .external-dialog__card { border-radius: 25px; }
}


/* Card motion: gentle lift on hover, tactile press feedback on activation. */
:where(.panel, .cover, .post, .feature, .contact-strip, .side-card, .profile-card, .contact-card) {
  transform: translate3d(0, 0, 0);
  transition:
    transform 260ms cubic-bezier(.2,.75,.25,1),
    box-shadow 280ms ease,
    border-color 240ms ease,
    filter 240ms ease;
  will-change: transform;
}
@media (hover: hover) and (pointer: fine) {
  :where(.panel, .cover, .post, .feature, .contact-strip, .side-card, .profile-card, .contact-card):hover {
    transform: translate3d(0, -5px, 0);
    border-color: rgba(169, 155, 255, .32);
    box-shadow:
      0 25px 68px rgba(0, 0, 0, .27),
      0 0 0 1px rgba(169, 155, 255, .045),
      0 0 28px rgba(122, 111, 255, .085),
      inset 0 1px 0 rgba(255, 255, 255, .12);
    filter: brightness(1.035);
  }
  .post:hover, .feature:hover, .contact-strip:hover, .side-card:hover {
    transform: translate3d(0, -4px, 0);
  }
}
:where(.panel, .cover, .post, .feature, .contact-strip, .side-card, .profile-card, .contact-card):active {
  transform: translate3d(0, -1px, 0) scale(.992);
  filter: brightness(1.08);
  transition-duration: 100ms;
}
@media (prefers-reduced-motion: reduce) {
  :where(.panel, .cover, .post, .feature, .contact-strip, .side-card, .profile-card, .contact-card) {
    transform: none !important;
    will-change: auto;
  }
}


/* SPA gallery view */
.gallery-promo {
  display: grid;
  grid-template-columns: minmax(150px, .8fr) minmax(0, 1.2fr);
  min-height: 190px;
  overflow: hidden;
  color: inherit;
  text-decoration: none;
  transition: transform 280ms cubic-bezier(.2,.75,.25,1), border-color 240ms ease, box-shadow 280ms ease, filter 240ms ease;
}
.gallery-promo-art {
  position: relative;
  min-height: 190px;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 48% 48%, rgba(159,148,255,.23), transparent 56%),
    linear-gradient(145deg, rgba(122,111,255,.12), rgba(89,174,255,.045));
}
.gallery-promo-art::before, .gallery-promo-art::after {
  content: ""; position: absolute; border: 1px solid rgba(210,211,255,.22); border-radius: 50%;
  width: 190px; height: 190px; left: 50%; top: 50%; transform: translate(-50%,-50%);
}
.gallery-promo-art::after { width: 130px; height: 130px; border-color: rgba(153,192,255,.25); }
.gallery-orb { position: absolute; display: block; border-radius: 50%; filter: blur(1px); }
.gallery-orb--one { width: 48px; height: 48px; left: 18%; top: 20%; background: radial-gradient(circle at 35% 30%, #e3ddff, #9d8bff 48%, rgba(157,139,255,.06)); box-shadow: 0 0 34px rgba(169,155,255,.28); }
.gallery-orb--two { width: 29px; height: 29px; right: 17%; bottom: 20%; background: radial-gradient(circle at 35% 30%, #c9efff, #77b7ff 50%, rgba(119,183,255,.08)); box-shadow: 0 0 26px rgba(119,183,255,.25); }
.gallery-orb--three { width: 13px; height: 13px; right: 24%; top: 18%; background: #d5ccff; box-shadow: 0 0 18px #a99bff; }
.gallery-promo-symbol { position: absolute; inset: 0; display: grid; place-items: center; color: rgba(239,236,255,.9); font-size: 62px; text-shadow: 0 0 36px rgba(169,155,255,.65); }
.gallery-promo-copy { align-self: center; padding: 25px clamp(18px, 4vw, 34px); }
.gallery-promo-kicker { color: #bcb2ff; font-size: 10px; letter-spacing: 2px; font-weight: 800; }
.gallery-promo-copy h2 { margin: 8px 0 5px; font-size: 22px; letter-spacing: -.5px; }
.gallery-promo-copy p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.8; }
.gallery-promo-cta { display: inline-flex; gap: 10px; align-items: center; margin-top: 15px; padding: 8px 12px; border: 1px solid rgba(169,155,255,.28); border-radius: 14px; background: rgba(169,155,255,.1); color: #e1dcff; font-size: 12px; font-weight: 700; }
.gallery-page { width: min(1180px, calc(100% - 36px)); margin: 28px auto 64px; position: relative; z-index: 1; animation: galleryViewIn 360ms cubic-bezier(.2,.75,.25,1) both; }
.gallery-page[hidden], .gallery-lightbox[hidden] { display: none !important; }
.gallery-hero { padding: clamp(20px, 4vw, 34px); margin-bottom: 18px; background:
  radial-gradient(ellipse at 90% 0%, rgba(159,148,255,.24), transparent 48%),
  linear-gradient(135deg, rgba(35,39,61,.8), rgba(17,21,34,.7)); }
.gallery-back { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; margin-bottom: 22px; border: 1px solid rgba(220,228,255,.13); border-radius: 14px; color: #d9d5f6; background: rgba(255,255,255,.045); cursor: pointer; }
.gallery-hero h1 { margin: 7px 0; font-size: clamp(28px, 5vw, 42px); letter-spacing: -1px; }
.gallery-hero > p { max-width: 650px; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.9; }
.gallery-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.gallery-status { color: #aeb6d0; font-size: 12px; }
.gallery-refresh, .gallery-more { min-height: 42px; }
.gallery-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; align-items: start; }
.gallery-item { position: relative; min-width: 0; overflow: hidden; padding: 0; border: 1px solid rgba(222,228,255,.14); border-radius: 22px; background: rgba(255,255,255,.035); cursor: zoom-in; text-align: left; box-shadow: 0 12px 35px rgba(0,0,0,.15); transition: transform 260ms cubic-bezier(.2,.75,.25,1), border-color 220ms ease, box-shadow 260ms ease; }
.gallery-item:nth-child(3n + 2) { margin-top: 20px; }
.gallery-item img { display: block; width: 100%; aspect-ratio: 3 / 4; object-fit: cover; background: linear-gradient(145deg, rgba(169,155,255,.1), rgba(138,201,255,.07)); transition: transform 420ms cubic-bezier(.2,.75,.25,1), filter 320ms ease; }
.gallery-item:hover { transform: translateY(-5px); border-color: rgba(169,155,255,.42); box-shadow: 0 22px 45px rgba(0,0,0,.26), 0 0 24px rgba(122,111,255,.08); }
.gallery-item:hover img { transform: scale(1.035); filter: saturate(1.08); }
.gallery-item-caption { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 12px; color: #d7d9eb; font-size: 11px; }
.gallery-item-caption span { color: #8d96b2; font-size: 10px; }
.gallery-item img.is-loading { opacity: .45; }
.gallery-item img.is-broken { opacity: .25; }
.gallery-empty { padding: 36px 20px; margin-top: 16px; border: 1px dashed rgba(220,228,255,.17); border-radius: 24px; text-align: center; background: rgba(255,255,255,.025); }
.gallery-empty[hidden] { display: none; }
.gallery-empty-icon { color: #bcb2ff; font-size: 38px; }
.gallery-empty h2 { margin: 7px 0; font-size: 17px; }
.gallery-empty p { max-width: 480px; margin: 0 auto 16px; color: var(--muted); font-size: 12px; line-height: 1.8; }
.gallery-bottom { display: flex; justify-content: center; padding: 24px 0 4px; }
.gallery-lightbox { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; }
.gallery-lightbox-backdrop { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: 0; background: rgba(4,6,13,.84); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); cursor: zoom-out; }
.gallery-lightbox-card { position: relative; z-index: 1; width: min(850px, 100%); max-height: min(92vh, 1000px); display: grid; justify-items: center; padding: 12px; border: 1px solid rgba(222,228,255,.2); border-radius: 25px; background: rgba(22,25,39,.9); box-shadow: 0 30px 100px rgba(0,0,0,.45); animation: galleryViewIn 220ms ease both; }
.gallery-lightbox-card img { display: block; max-width: 100%; max-height: calc(92vh - 70px); width: auto; height: auto; object-fit: contain; border-radius: 16px; }
.gallery-lightbox-close { position: absolute; z-index: 2; top: 18px; right: 18px; width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.24); border-radius: 14px; color: white; background: rgba(10,12,20,.72); font-size: 25px; cursor: pointer; }
.gallery-lightbox-caption { padding: 10px 0 2px; color: #aeb6d0; font-size: 10px; letter-spacing: 1.4px; }
.gallery-lightbox-caption span { color: #a99bff; }
body.gallery-open { overflow: hidden; }
@keyframes galleryViewIn { from { opacity: 0; transform: translateY(8px) scale(.995); } to { opacity: 1; transform: translateY(0) scale(1); } }
@media (hover: hover) and (pointer: fine) { .gallery-promo:hover { transform: translateY(-5px); border-color: rgba(169,155,255,.4); box-shadow: 0 25px 68px rgba(0,0,0,.27), 0 0 28px rgba(122,111,255,.085); } }
@media (max-width: 760px) { .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; } .gallery-item:nth-child(3n + 2) { margin-top: 0; } .gallery-item:nth-child(even) { margin-top: 16px; } }
@media (max-width: 520px) { .gallery-promo { grid-template-columns: 112px minmax(0,1fr); min-height: 165px; } .gallery-promo-art { min-height: 165px; } .gallery-promo-art::before { width: 140px; height: 140px; } .gallery-promo-art::after { width: 95px; height: 95px; } .gallery-promo-symbol { font-size: 45px; } .gallery-promo-copy { padding: 18px 14px; } .gallery-promo-copy h2 { font-size: 18px; } .gallery-promo-copy p { font-size: 11px; } .gallery-promo-cta { margin-top: 10px; padding: 7px 9px; } .gallery-page { width: calc(100% - 24px); margin-top: 16px; } .gallery-grid { gap: 9px; } .gallery-item { border-radius: 17px; } .gallery-item-caption { padding: 8px 9px; font-size: 10px; } .gallery-lightbox { padding: 10px; } }
@media (prefers-reduced-motion: reduce) { .gallery-page, .gallery-lightbox-card, .gallery-item, .gallery-item img, .gallery-promo { animation: none !important; transition-duration: .01ms !important; } }


/* The layout has an explicit display:grid, so enforce the native hidden state
   when switching between the home view and the SPA gallery. */
.layout[hidden],
.gallery-page[hidden],
.gallery-lightbox[hidden] {
  display: none !important;
}


/* Pixiv gallery source switch */
.gallery-mode-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}
.gallery-mode {
  appearance: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 16px;
  color: var(--muted);
  background: rgba(255,255,255,.035);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  transition: color .22s ease, background .22s ease, border-color .22s ease, transform .22s ease;
}
.gallery-mode:hover { transform: translateY(-2px); color: var(--text); border-color: rgba(169,155,255,.45); }
.gallery-mode.is-active {
  color: var(--text);
  background: linear-gradient(120deg, rgba(169,155,255,.22), rgba(138,201,255,.13));
  border-color: rgba(169,155,255,.5);
  box-shadow: 0 5px 22px rgba(100,95,210,.12);
}
.gallery-mode:disabled { opacity: .55; cursor: wait; transform: none; }
.gallery-item-caption strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.gallery-item-caption span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.gallery-lightbox-caption a {
  color: var(--accent-2);
  text-decoration: none;
  margin-left: 8px;
}
.gallery-lightbox-caption a:hover { text-decoration: underline; }


.gallery-private-access {
  margin-top: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(12,15,28,.42);
}
.gallery-private-access label { display: block; margin-bottom: 8px; color: var(--soft); font-size: 13px; }
.gallery-private-access-row { display: flex; gap: 8px; }
.gallery-private-access input {
  flex: 1; min-width: 0; padding: 10px 13px;
  border: 1px solid var(--line); border-radius: 12px;
  background: rgba(255,255,255,.045); color: var(--text); font: inherit;
}
.gallery-private-access input:focus { outline: 2px solid rgba(169,155,255,.5); outline-offset: 2px; }
.gallery-private-access p { margin: 8px 0 0; color: var(--muted); font-size: 12px; }
