  :root {
    --bg: #14161a;
    --surface: #1a1d22;
    --surface-2: #23272e;
    --border: #31363e;
    --border-hover: #404752;
    --text-primary: #e8e8ec;
    --text-secondary: #9a9aa5;
    --text-muted: #6a6a75;
    --accent: #c4f04d;
    --accent-glow: #8bcc20;
    --accent-dim: #c4f04d18;
    --accent-mid: #c4f04d33;
    --accent-contrast: #111317;
    --page-bg:
      radial-gradient(circle at 18% 18%, rgba(196,240,77,0.09), transparent 30%),
      radial-gradient(circle at 82% 16%, rgba(120,170,255,0.07), transparent 24%),
      radial-gradient(circle at 78% 78%, rgba(255,255,255,0.04), transparent 22%),
      linear-gradient(180deg, #191c22 0%, #13161b 100%);
    --header-bg: rgba(21, 24, 29, 0.86);
    --header-shadow: 0 10px 26px rgba(0,0,0,0.14);
    --header-shine: linear-gradient(180deg, rgba(255,255,255,0.02), transparent);
    --ambient-glow-bg: radial-gradient(circle, var(--accent-dim) 0%, transparent 70%);
    --ambient-opacity: 0.42;
    --orb-one-bg: radial-gradient(circle at 35% 30%, rgba(196,240,77,0.34), rgba(196,240,77,0.09) 58%, transparent 74%);
    --orb-two-bg: radial-gradient(circle at 62% 38%, rgba(120,170,255,0.22), rgba(120,170,255,0.08) 58%, transparent 74%);
    --orb-three-bg: radial-gradient(circle at 45% 45%, rgba(255,255,255,0.18), rgba(255,255,255,0.05) 60%, transparent 76%);
    --glass-border: rgba(255,255,255,0.1);
    --glass-border-strong: rgba(255,255,255,0.12);
    --glass-fill: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.035));
    --glass-fill-soft: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.04));
    --glass-highlight: inset 0 0 0 1px rgba(255,255,255,0.03);
    --control-bg: rgba(30,34,40,0.86);
    --control-bg-soft: rgba(28,32,38,0.82);
    --control-bg-strong: rgba(34,38,45,0.84);
    --overlay-bg: rgba(10, 12, 16, 0.62);
    --lightbox-bg: rgba(10, 12, 16, 0.78);
    --tour-overlay-bg: rgba(10, 12, 16, 0.5);
    --elevation-1: 0 8px 22px rgba(0,0,0,0.22);
    --elevation-2: 0 14px 36px rgba(0,0,0,0.26);
    --elevation-3: 0 18px 42px rgba(0,0,0,0.32);
    --elevation-card: 0 20px 60px rgba(0,0,0,0.4);
    --elevation-card-soft: 0 8px 18px rgba(0,0,0,0.18);
    --elevation-modal: 0 18px 48px rgba(0,0,0,0.45);
    --elevation-modal-expanded: 0 28px 72px rgba(0,0,0,0.56), 0 0 0 1px rgba(196,240,77,0.08);
    --elevation-story: 0 14px 34px rgba(0,0,0,0.28);
    --elevation-story-hover: 0 20px 44px rgba(0,0,0,0.36);
    --project-shell-bg: linear-gradient(135deg, rgba(33,37,43,0.98), rgba(24,28,34,0.96));
    --project-shell-inset:
      inset 0 0 0 1px rgba(255,255,255,0.045),
      inset 0 0 24px rgba(196,240,77,0.06);
    --button-shell-bg:
      linear-gradient(180deg, rgba(53,58,68,0.96), rgba(33,37,43,0.96)),
      linear-gradient(120deg, transparent 0%, rgba(196,240,77,0.14) 38%, transparent 70%);
    --answer-surface: linear-gradient(180deg, rgba(29,33,39,0.96), rgba(24,28,34,0.84));
    --answer-panel-bg: rgba(255,255,255,0.045);
    --answer-panel-border: rgba(255,255,255,0.07);
    --answer-section-bg: linear-gradient(180deg, rgba(196, 240, 77, 0.1), rgba(255, 255, 255, 0.03));
    --wizard-shell-bg: linear-gradient(135deg, rgba(34,38,45,0.98), rgba(28,32,38,0.95));
    --wizard-shell-inset:
      inset 0 0 0 1px rgba(255,255,255,0.05),
      inset 0 0 28px rgba(196,240,77,0.07);
    --tooltip-bg: linear-gradient(180deg, rgba(34,38,45,0.98), rgba(27,31,37,0.97));
    --tooltip-border: rgba(212,184,150,0.24);
    --tooltip-action-bg: rgba(255,255,255,0.04);
    --tooltip-header-bg: linear-gradient(135deg, rgba(196,240,77,0.1), rgba(34,38,45,0));
    --tooltip-section-border: rgba(255,255,255,0.07);
    --tooltip-section-bg: linear-gradient(180deg, rgba(255,255,255,0.045), rgba(255,255,255,0.025));
    --hero-media-bg: #171b22;
    --hero-embed-bg: #191d24;
    --gallery-caption-bg: linear-gradient(180deg, rgba(20,22,26,0) 0%, rgba(20,22,26,0.9) 72%);
    --story-caption-bg: linear-gradient(180deg, rgba(20,22,26,0) 0%, rgba(20,22,26,0.88) 70%);
    --portrait-media-bg: linear-gradient(180deg, #20242b 0%, #181c23 100%);
    --theme-toggle-bg: transparent;
    --theme-toggle-border: var(--glass-border);
    --theme-toggle-shadow: none;
    --theme-toggle-icon-bg: var(--accent-dim);
    --theme-toggle-icon-color: var(--accent);
    --response-icon-fg: var(--accent-contrast);
    --tour-dialog-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 0 40px rgba(196, 240, 77, 0.08);
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 16px;
    --font-display: 'Instrument Serif', Georgia, serif;
    --font-body: 'DM Sans', -apple-system, sans-serif;
    --font-mono: 'Space Mono', monospace;
  }
  html[data-theme="light"] {
    color-scheme: light;
    --bg: #f6f1e8;
    --surface: #fffdfa;
    --surface-2: #efe7da;
    --border: #d9cfbf;
    --border-hover: #c6bba6;
    --text-primary: #17150f;
    --text-secondary: #5e574b;
    --text-muted: #867d6f;
    --accent: #667d22;
    --accent-glow: #879b47;
    --accent-dim: rgba(102,125,34,0.16);
    --accent-mid: rgba(102,125,34,0.3);
    --accent-contrast: #f8f5ef;
    --page-bg:
      radial-gradient(circle at 18% 18%, rgba(102,125,34,0.14), transparent 30%),
      radial-gradient(circle at 82% 14%, rgba(82,117,186,0.13), transparent 23%),
      radial-gradient(circle at 78% 76%, rgba(198,184,170,0.52), transparent 24%),
      linear-gradient(180deg, #f8f4ec 0%, #efe7d9 100%);
    --header-bg: rgba(248, 244, 236, 0.82);
    --header-shadow: 0 12px 32px rgba(87, 67, 32, 0.08);
    --header-shine: linear-gradient(180deg, rgba(255,255,255,0.88), rgba(255,255,255,0));
    --ambient-glow-bg: radial-gradient(circle, rgba(102,125,34,0.24) 0%, transparent 72%);
    --ambient-opacity: 0.58;
    --orb-one-bg: radial-gradient(circle at 35% 30%, rgba(102,125,34,0.34), rgba(102,125,34,0.12) 58%, transparent 72%);
    --orb-two-bg: radial-gradient(circle at 62% 38%, rgba(82,117,186,0.3), rgba(82,117,186,0.12) 58%, transparent 72%);
    --orb-three-bg: radial-gradient(circle at 45% 45%, rgba(173,149,127,0.34), rgba(173,149,127,0.1) 60%, transparent 74%);
    --glass-border: rgba(23,21,15,0.1);
    --glass-border-strong: rgba(23,21,15,0.12);
    --glass-fill: linear-gradient(180deg, rgba(255,255,255,0.92), rgba(245,239,229,0.88));
    --glass-fill-soft: linear-gradient(180deg, rgba(255,255,255,0.88), rgba(244,238,229,0.84));
    --glass-highlight: inset 0 0 0 1px rgba(255,255,255,0.72);
    --control-bg: rgba(252,250,245,0.88);
    --control-bg-soft: rgba(251,248,242,0.84);
    --control-bg-strong: rgba(249,245,238,0.9);
    --overlay-bg: rgba(242, 236, 226, 0.76);
    --lightbox-bg: rgba(240, 233, 223, 0.92);
    --tour-overlay-bg: rgba(240, 233, 223, 0.76);
    --elevation-1: 0 10px 24px rgba(87, 67, 32, 0.09);
    --elevation-2: 0 18px 42px rgba(87, 67, 32, 0.10);
    --elevation-3: 0 22px 52px rgba(87, 67, 32, 0.12);
    --elevation-card: 0 22px 52px rgba(87, 67, 32, 0.12);
    --elevation-card-soft: 0 10px 24px rgba(87, 67, 32, 0.09);
    --elevation-modal: 0 24px 56px rgba(87, 67, 32, 0.14);
    --elevation-modal-expanded: 0 30px 80px rgba(87, 67, 32, 0.16), 0 0 0 1px rgba(117,143,31,0.08);
    --elevation-story: 0 14px 34px rgba(87, 67, 32, 0.12);
    --elevation-story-hover: 0 22px 48px rgba(87, 67, 32, 0.14);
    --project-shell-bg: linear-gradient(135deg, rgba(255,255,255,0.97), rgba(243,236,225,0.95));
    --project-shell-inset:
      inset 0 0 0 1px rgba(255,255,255,0.88),
      inset 0 0 30px rgba(117,143,31,0.05);
    --button-shell-bg:
      linear-gradient(180deg, rgba(255,255,255,0.95), rgba(243,237,228,0.94)),
      linear-gradient(120deg, transparent 0%, rgba(117,143,31,0.1) 38%, rgba(108,138,210,0.08) 58%, transparent 74%);
    --answer-surface: linear-gradient(180deg, rgba(255,255,255,0.97), rgba(243,237,228,0.92));
    --answer-panel-bg: rgba(117,143,31,0.06);
    --answer-panel-border: rgba(23,21,15,0.08);
    --answer-section-bg: linear-gradient(180deg, rgba(117,143,31,0.12), rgba(255,255,255,0.58));
    --wizard-shell-bg: linear-gradient(135deg, rgba(255,255,255,0.97), rgba(243,236,225,0.95));
    --wizard-shell-inset:
      inset 0 0 0 1px rgba(255,255,255,0.88),
      inset 0 0 30px rgba(117,143,31,0.05);
    --tooltip-bg: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(243,236,225,0.96));
    --tooltip-border: rgba(117,143,31,0.18);
    --tooltip-action-bg: rgba(255,255,255,0.75);
    --tooltip-header-bg: linear-gradient(135deg, rgba(117,143,31,0.14), rgba(255,255,255,0.4));
    --tooltip-section-border: rgba(23,21,15,0.08);
    --tooltip-section-bg: linear-gradient(180deg, rgba(255,255,255,0.86), rgba(243,236,225,0.82));
    --hero-media-bg: #ece4d7;
    --hero-embed-bg: #ede5d9;
    --gallery-caption-bg: linear-gradient(180deg, rgba(248,244,236,0) 0%, rgba(248,244,236,0.94) 72%);
    --story-caption-bg: linear-gradient(180deg, rgba(248,244,236,0) 0%, rgba(248,244,236,0.92) 70%);
    --portrait-media-bg: linear-gradient(180deg, #fcfaf5 0%, #ede4d7 100%);
    --theme-toggle-bg: rgba(255,255,255,0.42);
    --theme-toggle-border: rgba(23,21,15,0.1);
    --theme-toggle-shadow: 0 8px 22px rgba(87, 67, 32, 0.08);
    --theme-toggle-icon-bg: rgba(117,143,31,0.12);
    --theme-toggle-icon-color: var(--accent);
    --response-icon-fg: var(--accent-contrast);
    --tour-dialog-shadow: 0 24px 62px rgba(87, 67, 32, 0.16), 0 0 38px rgba(117, 143, 31, 0.05);
  }
  * { margin: 0; padding: 0; box-sizing: border-box; }
  html { font-size: 16px; color-scheme: dark; }
  body {
    background: var(--page-bg);
    color: var(--text-primary);
    font-family: var(--font-body);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    transition: background 0.45s ease, color 0.3s ease;
  }
  body::before {
    content: none;
  }
  .ambient-glow {
    position: fixed; width: 600px; height: 600px; border-radius: 50%;
    background: var(--ambient-glow-bg);
    top: -200px; right: -100px; pointer-events: none; z-index: 1;
    opacity: var(--ambient-opacity);
    transition: opacity 0.35s ease, background 0.35s ease;
    animation: ambientFloat 18s ease-in-out infinite alternate;
  }
  .bg-objects {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
  }
  .bg-orb {
    position: absolute;
    border-radius: 48% 52% 60% 40% / 52% 46% 54% 48%;
    filter: blur(16px);
    opacity: 0.11;
    mix-blend-mode: normal;
    will-change: auto;
  }
  .bg-orb.one {
    width: 320px;
    height: 286px;
    left: -82px;
    top: 20vh;
    background: var(--orb-one-bg);
    animation: orbDriftOne 22s ease-in-out infinite alternate;
  }
  .bg-orb.two {
    width: 252px;
    height: 312px;
    right: -1vw;
    top: 62vh;
    background: var(--orb-two-bg);
    animation: orbDriftTwo 26s ease-in-out infinite alternate;
  }
  .bg-orb.three {
    width: 220px;
    height: 220px;
    right: 14vw;
    top: 10vh;
    background: var(--orb-three-bg);
    animation: orbDriftThree 20s ease-in-out infinite alternate;
  }
  @keyframes ambientFloat {
    0% { transform: translate3d(0, 0, 0) scale(1); }
    50% { transform: translate3d(-28px, 18px, 0) scale(1.06); }
    100% { transform: translate3d(18px, -20px, 0) scale(0.98); }
  }
  @keyframes orbDriftOne {
    0% { transform: translate3d(0, 0, 0) scale(1) rotate(0deg); }
    50% { transform: translate3d(26px, -12px, 0) scale(1.08) rotate(6deg); }
    100% { transform: translate3d(8px, 28px, 0) scale(0.96) rotate(-4deg); }
  }
  @keyframes orbDriftTwo {
    0% { transform: translate3d(0, 0, 0) scale(1) rotate(0deg); }
    50% { transform: translate3d(-20px, 26px, 0) scale(1.05) rotate(-6deg); }
    100% { transform: translate3d(24px, -18px, 0) scale(1.1) rotate(5deg); }
  }
  @keyframes orbDriftThree {
    0% { transform: translate3d(0, 0, 0) scale(1) rotate(0deg); }
    50% { transform: translate3d(-16px, 18px, 0) scale(1.04) rotate(5deg); }
    100% { transform: translate3d(20px, -14px, 0) scale(0.94) rotate(-6deg); }
  }
  .app { display: flex; flex-direction: column; min-height: 100vh; position: relative; z-index: 3; }

  /* --- Header --- */
  header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 24px 40px;
    background: var(--header-bg);
    position: sticky; top: 0; z-index: 100;
    box-shadow: var(--header-shadow);
    isolation: isolate;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    transition: background 0.35s ease, box-shadow 0.35s ease;
  }
  header::after {
    content: '';
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 14px;
    background: var(--header-shine);
    pointer-events: none;
    opacity: 0.6;
  }
  .logo {
    font-family: var(--font-mono); font-size: 0.8rem; letter-spacing: 0.08em;
    color: var(--text-secondary); text-transform: uppercase; cursor: pointer; transition: color 0.3s;
  }
  .logo:hover { color: var(--text-primary); }
  .logo span { color: var(--accent); }
  .header-meta { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
  .status-dot {
    width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
    animation: statusBlink 3s ease-in-out infinite; display: flex; flex-shrink: 0; margin-top: 1px;
  }
  .status-dot.offline {
    background: #ff6b6b;
    animation: none;
  }
  @keyframes statusBlink { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }
  .header-link {
    font-family: var(--font-mono); font-size: 0.7rem; color: var(--text-muted);
    text-decoration: none; letter-spacing: 0.05em; text-transform: uppercase;
    transition: color 0.3s; cursor: pointer; display: flex; align-items: center; gap: 6px;
  }
  .header-link:hover { color: var(--text-secondary); }
  .theme-toggle {
    appearance: none;
    border: 1px solid var(--theme-toggle-border);
    background: var(--theme-toggle-bg);
    color: var(--text-secondary);
    border-radius: 999px;
    padding: 7px 12px;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    box-shadow: var(--theme-toggle-shadow);
    transition: border-color 0.25s ease, color 0.25s ease, background 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
  }
  .theme-toggle:hover {
    color: var(--text-primary);
    border-color: var(--accent-mid);
    transform: translateY(-1px);
  }
  .theme-toggle:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(196,240,77,0.16), var(--theme-toggle-shadow);
  }
  .theme-toggle-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--theme-toggle-icon-bg);
    color: var(--theme-toggle-icon-color);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
  }
  .theme-icon {
    width: 13px;
    height: 13px;
    position: absolute;
    inset: 50% auto auto 50%;
    transform: translate(-50%, -50%) scale(0.8);
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
  }
  .theme-toggle[data-theme="dark"] .theme-icon-moon,
  .theme-toggle[data-theme="light"] .theme-icon-sun {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
  .theme-toggle-label { line-height: 1; }

  /* --- Hero --- */
  .hero {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 100px 40px 60px; text-align: center; animation: fadeUp 1s ease-out;
  }
  @keyframes fadeUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
  @keyframes gentleButtonDrift {
    0% { background-position: 0 0, 0% 50%; }
    50% { background-position: 0 0, 100% 50%; }
    100% { background-position: 0 0, 0% 50%; }
  }
  .hero-label {
    font-family: var(--font-mono); font-size: 0.65rem; letter-spacing: 0.2em;
    text-transform: uppercase; color: var(--text-muted); margin-bottom: 24px;
    animation: fadeUp 1s ease-out 0.1s both;
  }
  .hero h1 {
    font-family: var(--font-display); font-size: clamp(2.8rem, 6vw, 4.5rem);
    font-weight: 400; line-height: 1.1; margin-bottom: 20px;
    animation: fadeUp 1s ease-out 0.2s both;
  }
  .hero h1 em { font-style: italic; color: var(--accent); }
  .hero-sub {
    font-size: 1.1rem; color: var(--text-secondary); max-width: 500px;
    line-height: 1.7; font-weight: 300; animation: fadeUp 1s ease-out 0.3s both;
  }

  /* --- Category Pills --- */
  .categories {
    display: flex; justify-content: center; gap: 10px; padding: 0 40px 40px;
    flex-wrap: wrap; animation: fadeUp 1s ease-out 0.4s both;
  }
  .cat-pill {
    font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.06em;
    text-transform: uppercase; padding: 10px 20px; border: 1px solid var(--glass-border);
    border-radius: 100px;
    background:
      var(--glass-fill),
      linear-gradient(120deg, transparent 0%, rgba(196,240,77,0.09) 32%, rgba(120,170,255,0.05) 50%, transparent 72%);
    background-size: 100% 100%, 220% 100%;
    animation: gentleButtonDrift 18s ease-in-out infinite;
    will-change: background-position;
    color: var(--text-primary);
    cursor: pointer; transition: all 0.35s cubic-bezier(0.22, 1, 0.36, 1);
    position: relative; overflow: hidden; font-weight: 500;
    box-shadow: var(--glass-highlight);
  }
  .cat-pill::before {
    content: ''; position: absolute; inset: 0; background: var(--accent);
    opacity: 0; transition: opacity 0.35s; border-radius: 100px;
  }
  .cat-pill:hover {
    border-color: var(--accent-mid); color: var(--text-primary);
    transform: translateY(-2px); box-shadow: var(--elevation-1), 0 4px 20px var(--accent-dim);
  }
  .cat-pill:hover::before { opacity: 0.1; }
  .cat-pill:focus-visible {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(196,240,77,0.18), 0 8px 24px rgba(0,0,0,0.2);
  }
  .cat-pill:active { transform: translateY(0) scale(0.985); }
  .cat-pill.active {
    border-color: var(--accent); color: var(--accent-contrast); background: var(--accent);
    animation: none;
    box-shadow: 0 10px 24px rgba(196,240,77,0.24);
  }
  .cat-pill .pill-count { margin-left: 6px; opacity: 0.82; font-size: 0.6rem; }

  /* --- Chat Input --- */
  .chat-input-wrap {
    display: flex; justify-content: center; padding: 0 40px 20px;
    animation: fadeUp 1s ease-out 0.5s both;
  }
  .chat-input-container {
    width: 100%;
    max-width: 640px;
    position: relative;
    border-radius: calc(var(--radius) + 2px);
    overflow: hidden;
    isolation: isolate;
    box-shadow: var(--elevation-2);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
  }
  .chat-input-container::before {
    content: '';
    position: absolute;
    inset: -58%;
    border-radius: 42%;
    background:
      conic-gradient(
        from 0deg,
        transparent 0deg,
        rgba(196,240,77,0.08) 42deg,
        rgba(196,240,77,0.9) 106deg,
        rgba(120,170,255,0.42) 176deg,
        rgba(196,240,77,0.18) 244deg,
        transparent 320deg
      );
    animation: pmAiNeonFlow 6.2s linear infinite;
    opacity: 0.72;
    pointer-events: none;
    z-index: 0;
  }
  .chat-input-container::after {
    content: '';
    position: absolute;
    inset: 1px;
    border-radius: inherit;
    background: var(--project-shell-bg);
    box-shadow: var(--project-shell-inset);
    pointer-events: none;
    z-index: 1;
  }
  .chat-input-container:hover,
  .chat-input-container:focus-within {
    box-shadow: var(--elevation-3);
  }
  .chat-input-container:hover::before,
  .chat-input-container:focus-within::before {
    opacity: 0.95;
    animation-duration: 4s;
  }
  .chat-input {
    width: 100%; padding: 16px 56px 16px 20px; font-family: var(--font-body);
    font-size: 1rem; background: transparent; border: 1px solid transparent;
    border-radius: var(--radius); color: var(--text-primary); outline: none;
    transition: color 0.35s, border-color 0.35s, box-shadow 0.35s; caret-color: var(--accent);
    position: relative;
    z-index: 2;
  }
  .chat-input::placeholder { color: var(--text-muted); font-weight: 300; }
  .chat-input:focus {
    border-color: rgba(196,240,77,0.16);
    box-shadow: none;
  }
  .chat-submit {
    position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
    width: 38px; height: 38px; border-radius: var(--radius-sm); border: 1px solid var(--glass-border-strong);
    background: var(--button-shell-bg);
    background-size: 100% 100%, 220% 100%;
    animation: gentleButtonDrift 20s ease-in-out infinite;
    color: var(--text-secondary); cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.25s;
    box-shadow: var(--elevation-1);
    z-index: 3;
  }
  .chat-submit.active {
    border-color: rgba(196,240,77,0.35);
    background:
      linear-gradient(180deg, var(--accent) 0%, var(--accent) 100%),
      linear-gradient(120deg, transparent 0%, rgba(255,255,255,0.24) 35%, transparent 72%);
    background-size: 100% 100%, 220% 100%;
    color: var(--accent-contrast);
    box-shadow: 0 10px 26px rgba(196,240,77,0.28);
  }
  .chat-submit:hover {
    transform: translateY(-50%) scale(1.05);
    color: var(--text-primary);
    border-color: var(--accent-mid);
  }
  .chat-submit.active:hover { color: var(--accent-contrast); }
  .chat-submit:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(196,240,77,0.18), 0 10px 26px rgba(196,240,77,0.24);
  }
  .chat-submit:active { transform: translateY(-50%) scale(0.97); }
  .chat-submit svg { width: 16px; height: 16px; }

  /* --- Suggested Prompts --- */
  .suggested {
    display: flex; justify-content: center; gap: 8px; padding: 0 40px 60px;
    flex-wrap: wrap; animation: fadeUp 1s ease-out 0.6s both;
  }
  .suggested.category-prompts {
    display: block;
    max-width: 980px;
    margin: 0 auto;
  }
  .suggested.category-prompts .suggest-chip {
    white-space: normal;
    text-align: center;
    line-height: 1.35;
    max-width: 320px;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .suggested-row {
    display: flex;
    justify-content: center;
    gap: 8px;
    width: 100%;
  }
  .suggested-row + .suggested-row { margin-top: 8px; }
  .suggest-chip {
    font-family: var(--font-body); font-size: 0.85rem; color: var(--text-primary);
    padding: 8px 16px; border: 1px solid var(--glass-border); border-radius: 100px;
    background:
      var(--glass-fill-soft),
      linear-gradient(120deg, transparent 0%, rgba(196,240,77,0.07) 34%, rgba(120,170,255,0.04) 52%, transparent 72%);
    background-size: 100% 100%, 220% 100%;
    animation: gentleButtonDrift 22s ease-in-out infinite;
    will-change: background-position;
    cursor: pointer; transition: all 0.3s; white-space: nowrap;
    font-weight: 400;
    position: relative;
    overflow: hidden;
  }
  .suggest-chip:hover {
    color: var(--text-primary); border-color: var(--accent-mid); background: rgba(196,240,77,0.08);
    transform: translateY(-1px);
    box-shadow: var(--elevation-card-soft);
  }
  .suggest-chip:focus-visible {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(196,240,77,0.15);
  }
  .suggest-chip:active { transform: translateY(0) scale(0.985); }

  /* --- AI Answer Container --- */
  .ai-answer-container {
    width: 100%;
    max-width: 840px;
    margin: 0 auto 28px;
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--answer-surface);
    box-shadow: var(--elevation-2);
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.25s ease, transform 0.25s ease;
  }
  .ai-answer-container.visible {
    opacity: 1;
    transform: translateY(0);
  }
  .ai-answer-main {
    display: block;
  }
  .ai-answer-main.profile-mode {
    display: grid;
    grid-template-columns: minmax(180px, 220px) minmax(0, 1fr);
    gap: 20px;
    align-items: start;
  }
  .ai-answer-label {
    font-family: var(--font-mono);
    font-size: 0.66rem;
    letter-spacing: 0.11em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 10px;
  }
  .ai-asked {
    color: var(--text-secondary);
    font-size: 0.92rem;
    margin-bottom: 14px;
    line-height: 1.6;
  }
  .ai-asked strong {
    color: var(--text-primary);
    font-weight: 500;
  }
  .ai-answer-title {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 400;
    margin-bottom: 10px;
  }
  .ai-profile-panel {
    display: none;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: calc(var(--radius) - 4px);
    background: var(--answer-section-bg);
  }
  .ai-answer-main.profile-mode .ai-profile-panel {
    display: block;
  }
  .ai-profile-image-shell {
    width: 100%;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    border-radius: calc(var(--radius) - 8px);
    border: 1px solid var(--answer-panel-border);
    background: var(--answer-panel-bg);
  }
  .ai-profile-image-shell img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }
  .ai-profile-meta {
    margin-top: 14px;
  }
  .ai-profile-name {
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 4px;
  }
  .ai-profile-role,
  .ai-profile-location {
    color: var(--text-secondary);
    font-size: 0.84rem;
    line-height: 1.55;
  }
  .ai-profile-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
  }
  .ai-profile-links a {
    font-family: var(--font-mono);
    font-size: 0.64rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--text-secondary);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 7px 10px;
    transition: all 0.22s ease;
  }
  .ai-profile-links a:hover {
    color: var(--text-primary);
    border-color: var(--accent-mid);
    background: var(--accent-dim);
  }
  .ai-answer-text {
    color: var(--text-primary);
    font-size: 0.96rem;
    line-height: 1.72;
    min-height: 1.6em;
    white-space: pre-line;
  }
  .ai-answer-text.loading {
    color: var(--text-secondary);
  }
  .ai-related-project {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
  }
  .ai-related-project-label {
    font-family: var(--font-mono);
    font-size: 0.62rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 10px;
  }
  .ai-related-project-card {
    width: 100%;
    border: 1px solid var(--border);
    background: var(--answer-panel-bg);
    border-radius: calc(var(--radius) - 6px);
    padding: 12px;
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.22s ease, background 0.22s ease, transform 0.22s ease, box-shadow 0.22s ease;
  }
  .ai-related-project-card:hover {
    border-color: var(--accent-mid);
    background: var(--answer-section-bg);
    transform: translateY(-1px);
    box-shadow: var(--elevation-card-soft);
  }
  .ai-related-project-card:focus-visible {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(196,240,77,0.14);
  }
  .ai-related-project-thumb {
    width: 72px;
    height: 72px;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--answer-panel-border);
    background: var(--answer-section-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-family: var(--font-mono);
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }
  .ai-related-project-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }
  .ai-related-project-meta {
    min-width: 0;
    display: grid;
    gap: 4px;
  }
  .ai-related-project-title {
    font-family: var(--font-mono);
    font-size: 0.62rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent);
  }
  .ai-related-project-name {
    color: var(--text-primary);
    font-size: 0.96rem;
    font-weight: 500;
    line-height: 1.35;
  }
  .ai-related-project-cats,
  .ai-related-project-desc {
    color: var(--text-secondary);
    line-height: 1.5;
  }
  .ai-related-project-cats {
    font-size: 0.74rem;
  }
  .ai-related-project-desc {
    font-size: 0.81rem;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
  }
  .ai-related-project-action {
    justify-self: end;
    font-family: var(--font-mono);
    font-size: 0.62rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-primary);
    border: 1px solid var(--glass-border);
    border-radius: 999px;
    padding: 8px 11px;
    white-space: nowrap;
  }
  .ai-followups {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
  }
  .ai-followups-label {
    font-family: var(--font-mono);
    font-size: 0.62rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 10px;
  }
  .ai-followup-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }
  .ai-followup-chip {
    border: 1px solid var(--glass-border);
    background: var(--answer-panel-bg);
    color: var(--text-primary);
    border-radius: 100px;
    padding: 7px 13px;
    font-size: 0.82rem;
    cursor: pointer;
    transition: all 0.22s ease;
    font-weight: 400;
  }
  .ai-followup-chip:hover {
    border-color: var(--accent-mid);
    color: var(--text-primary);
    background: rgba(196,240,77,0.08);
    transform: translateY(-1px);
    box-shadow: var(--elevation-card-soft);
  }
  .ai-followup-chip:focus-visible {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(196,240,77,0.14);
  }
  .ai-followup-chip:active { transform: translateY(0) scale(0.985); }
  @media (max-width: 768px) {
    .ai-answer-main.profile-mode {
      grid-template-columns: 1fr;
    }
    .ai-profile-panel {
      max-width: 320px;
    }
    .ai-related-project-card {
      grid-template-columns: 64px minmax(0, 1fr);
    }
    .ai-related-project-action {
      grid-column: 2;
      justify-self: start;
      margin-top: 2px;
    }
  }

  /* --- Response Area --- */
  .response-area { padding: 0 40px 60px; max-width: 1200px; margin: 0 auto; width: 100%; min-height: 200px; }
  .response-header {
    display: flex; align-items: center; gap: 12px; margin-bottom: 28px;
    opacity: 0; transform: translateY(10px); transition: all 0.5s ease-out;
  }
  .response-header.visible { opacity: 1; transform: translateY(0); }
  .response-icon {
    width: 28px; height: 28px; border-radius: 50%; background: var(--accent);
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
    color: var(--response-icon-fg);
  }
  .response-icon svg { width: 14px; height: 14px; }
  .response-text { font-size: 0.95rem; color: var(--text-secondary); font-weight: 300; }
  .response-text strong { color: var(--text-primary); font-weight: 500; }

  /* --- Project Grid --- */
  .project-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 20px; }
  .project-card {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
    overflow: hidden; cursor: pointer; transition: all 0.45s cubic-bezier(0.22, 1, 0.36, 1);
    opacity: 0; transform: translateY(20px);
  }
  .project-card.visible { opacity: 1; transform: translateY(0); }
  .project-card:hover {
    border-color: var(--border-hover); transform: translateY(-4px);
    box-shadow: var(--elevation-card);
  }
  .card-thumbnail {
    width: 100%; aspect-ratio: 16/10; background: var(--surface-2);
    position: relative; overflow: hidden;
  }
  .card-thumbnail-img {
    position: absolute; inset: 0; width: 100%; height: 100%;
    object-fit: cover; transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.5s;
  }
  .project-card:hover .card-thumbnail-img { transform: scale(1.06); }
  .card-thumbnail-inner {
    position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
    font-family: var(--font-mono); font-size: 2rem; opacity: 0.12; transition: all 0.5s;
  }
  .project-card:hover .card-thumbnail-inner { opacity: 0.2; transform: scale(1.05); }
  .card-gradient {
    position: absolute; inset: 0;
    background: linear-gradient(135deg, var(--accent-dim) 0%, transparent 60%);
    opacity: 0; transition: opacity 0.5s;
  }
  .project-card:hover .card-gradient { opacity: 1; }
  .card-body { padding: 20px; }
  .card-tags { display: flex; gap: 6px; margin-bottom: 12px; flex-wrap: wrap; }
  .card-tag {
    font-family: var(--font-mono); font-size: 0.65rem; letter-spacing: 0.08em;
    text-transform: uppercase; color: var(--accent); background: var(--accent-dim);
    padding: 4px 10px; border-radius: 4px;
  }
  .card-title { font-family: var(--font-display); font-size: 1.4rem; font-weight: 400; margin-bottom: 10px; line-height: 1.25; }
  .card-desc { font-size: 0.9rem; color: var(--text-secondary); line-height: 1.6; font-weight: 300; }
  .card-meta {
    display: flex; justify-content: space-between; align-items: center;
    margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border);
  }
  .card-tools-wrap { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
  .card-tools { font-family: var(--font-mono); font-size: 0.68rem; color: var(--text-muted); letter-spacing: 0.04em; }
  .card-year {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    color: var(--text-secondary);
    letter-spacing: 0.04em;
    white-space: nowrap;
  }
  .card-arrow {
    width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--border);
    display: flex; align-items: center; justify-content: center;
    transition: all 0.3s; color: var(--text-muted);
  }
  .project-card:hover .card-arrow { border-color: var(--accent); color: var(--accent); transform: translateX(2px); }
  .card-arrow svg { width: 12px; height: 12px; }
  .related-works {
    margin-top: 16px; border-top: 1px solid var(--border); padding-top: 14px;
  }
  .related-works h4 {
    font-family: var(--font-mono); font-size: 0.62rem; color: var(--text-muted);
    letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 10px;
  }
  .related-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px;
  }
  .related-card {
    border: 1px solid var(--border); border-radius: 10px; overflow: hidden;
    background: var(--surface); cursor: pointer; transition: all 0.25s;
  }
  .related-card:hover { border-color: var(--accent-mid); transform: translateY(-2px); }
  .related-thumb { width: 100%; aspect-ratio: 16/10; background: var(--surface-2); }
  .related-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
  .related-name { padding: 8px 10px; font-size: 0.76rem; color: var(--text-secondary); line-height: 1.35; }

  /* --- Typing --- */
  .typing-indicator { display: flex; gap: 4px; padding: 20px 0; justify-content: center; }
  .typing-dot {
    width: 6px; height: 6px; border-radius: 50%; background: var(--text-muted);
    animation: typingBounce 1.4s ease-in-out infinite;
  }
  .typing-dot:nth-child(2) { animation-delay: 0.2s; }
  .typing-dot:nth-child(3) { animation-delay: 0.4s; }
  @keyframes typingBounce {
    0%, 100% { opacity: 0.3; transform: translateY(0); }
    50% { opacity: 1; transform: translateY(-4px); }
  }

  .initial-state { text-align: center; padding: 40px 0; color: var(--text-muted); font-size: 0.95rem; font-weight: 300; }
  .initial-state .keystroke {
    display: inline-flex; padding: 3px 8px; background: var(--surface);
    border: 1px solid var(--border); border-radius: 4px; font-family: var(--font-mono);
    font-size: 0.65rem; margin: 0 3px; vertical-align: middle; color: var(--text-secondary);
  }
  .no-results { text-align: center; padding: 60px 20px; }
  .no-results h3 { font-family: var(--font-display); font-size: 1.4rem; margin-bottom: 8px; font-weight: 400; }
  .no-results p { color: var(--text-muted); font-size: 0.95rem; font-weight: 300; }

  /* --- Footer --- */
  footer {
    margin-top: auto; padding: 24px 40px; border-top: 1px solid var(--border);
    display: flex; justify-content: space-between; align-items: center;
  }
  .footer-left { font-family: var(--font-mono); font-size: 0.65rem; color: var(--text-muted); letter-spacing: 0.05em; }
  .footer-links { display: flex; gap: 20px; }
  .footer-links a {
    font-family: var(--font-mono); font-size: 0.65rem; color: var(--text-muted);
    text-decoration: none; letter-spacing: 0.05em; text-transform: uppercase; transition: color 0.3s;
  }
  .footer-links a:hover { color: var(--accent); }

  /* =========== ABOUT MODAL =========== */
  .modal-overlay {
    position: fixed; inset: 0; background: var(--overlay-bg);
    backdrop-filter: blur(12px); z-index: 1000;
    display: flex; align-items: center; justify-content: center;
    opacity: 0; pointer-events: none; transition: opacity 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    padding: 20px;
  }
  .modal-overlay.open { opacity: 1; pointer-events: all; }
  .modal {
    background: var(--surface); border: 1px solid var(--border); border-radius: 20px;
    width: 100%; max-width: 520px; overflow: hidden; position: relative;
    transform: translateY(30px) scale(0.96);
    transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
  }
  .modal-overlay.open .modal { transform: translateY(0) scale(1); }
  .modal-close {
    position: absolute; top: 20px; right: 20px; width: 36px; height: 36px;
    border-radius: 50%; border: 1px solid var(--border); background: var(--surface-2);
    color: var(--text-secondary); cursor: pointer; display: flex; align-items: center;
    justify-content: center; transition: all 0.3s; z-index: 10;
  }
  .modal-close:hover { border-color: var(--text-muted); color: var(--text-primary); transform: rotate(90deg); }
  .modal-close svg { width: 16px; height: 16px; }
  .modal-header {
    position: relative; padding: 40px 36px 0;
    display: flex; flex-direction: column; align-items: center; text-align: center;
  }
  .modal-avatar {
    width: 100px; height: 100px; border-radius: 50%; border: 2px solid var(--border);
    overflow: hidden; margin-bottom: 20px; background: var(--surface-2); position: relative;
  }
  .modal-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
  .modal-avatar-placeholder {
    width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
    font-family: var(--font-display); font-size: 2.2rem; color: var(--accent);
    background: linear-gradient(135deg, var(--accent-dim) 0%, var(--surface-2) 100%);
  }
  .modal-name { font-family: var(--font-display); font-size: 1.8rem; font-weight: 400; margin-bottom: 6px; }
  .modal-title {
    font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.1em;
    text-transform: uppercase; color: var(--accent); margin-bottom: 20px;
  }
  .modal-body { padding: 0 36px 32px; }
  .modal-bio {
    font-size: 0.95rem; color: var(--text-secondary); line-height: 1.8; font-weight: 300;
    text-align: center; margin-bottom: 28px; padding-bottom: 28px; border-bottom: 1px solid var(--border);
  }
  .modal-links { display: flex; flex-direction: column; gap: 8px; }
  .modal-link {
    display: flex; align-items: center; gap: 14px; padding: 14px 16px;
    border: 1px solid var(--border); border-radius: var(--radius); text-decoration: none;
    color: var(--text-primary); transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1); cursor: pointer;
  }
  .modal-link:hover { border-color: var(--accent-mid); background: var(--accent-dim); transform: translateX(4px); }
  .modal-link-icon {
    width: 36px; height: 36px; border-radius: 10px; background: var(--surface-2);
    border: 1px solid var(--border); display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; transition: all 0.3s;
  }
  .modal-link:hover .modal-link-icon { background: var(--accent); border-color: var(--accent); }
  .modal-link-icon svg {
    width: 16px; height: 16px; stroke: var(--text-muted); fill: none;
    stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: stroke 0.3s;
  }
  .modal-link:hover .modal-link-icon svg { stroke: var(--accent-contrast); }
  .modal-link-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
  .modal-link-label {
    font-family: var(--font-mono); font-size: 0.6rem; letter-spacing: 0.1em;
    text-transform: uppercase; color: var(--text-muted);
  }
  .modal-link-value {
    font-size: 0.9rem; font-weight: 400; color: var(--text-primary);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  .modal-link-arrow { margin-left: auto; color: var(--text-muted); transition: all 0.3s; flex-shrink: 0; }
  .modal-link:hover .modal-link-arrow { color: var(--accent); transform: translateX(3px); }
  .modal-link-arrow svg {
    width: 14px; height: 14px; stroke: currentColor; fill: none;
    stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
  }

  /* =========== PROJECT DETAIL MODAL =========== */
  .project-overlay {
    position: fixed; inset: 0; background: var(--overlay-bg);
    backdrop-filter: blur(12px); z-index: 1000;
    display: flex; align-items: center; justify-content: center;
    opacity: 0; pointer-events: none; transition: opacity 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    padding: 20px;
  }
  .project-overlay.open { opacity: 1; pointer-events: all; }
  .project-modal {
    background: var(--surface); border: 1px solid var(--border); border-radius: 20px;
    width: 100%; max-width: 680px; max-height: 90vh; overflow-y: auto; position: relative;
    transform: translateY(30px) scale(0.96);
    transform-origin: 50% 8%;
    box-shadow: var(--elevation-modal);
    will-change: transform, max-width, max-height;
    transition:
      transform 0.58s cubic-bezier(0.16, 1, 0.3, 1),
      max-width 0.52s cubic-bezier(0.16, 1, 0.3, 1),
      max-height 0.52s cubic-bezier(0.16, 1, 0.3, 1),
      box-shadow 0.52s cubic-bezier(0.16, 1, 0.3, 1);
  }
  .project-overlay.open .project-modal { transform: translateY(0) scale(1); }
  .project-modal::-webkit-scrollbar { width: 4px; }
  .project-modal::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
  .pm-close {
    position: absolute; top: 16px; right: 16px; width: 36px; height: 36px;
    border-radius: 50%; border: 1px solid var(--border); background: var(--control-bg-soft);
    backdrop-filter: blur(8px); color: var(--text-secondary); cursor: pointer;
    display: flex; align-items: center; justify-content: center; transition: all 0.3s; z-index: 10;
  }
  .pm-close:hover { border-color: var(--text-muted); color: var(--text-primary); transform: rotate(90deg); }
  .pm-close svg { width: 16px; height: 16px; }
  .pm-ai-wrap {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin: 18px 0 22px;
  }
  .pm-ai-wizard {
    position: relative; min-height: 52px; width: 100%; padding: 0 18px 0 14px;
    border: 1px solid rgba(196,240,77,0.16); border-radius: 18px; background: transparent;
    backdrop-filter: blur(10px); color: var(--text-primary); cursor: pointer;
    display: inline-flex; align-items: center; justify-content: flex-start; gap: 12px;
    transition: transform 0.3s ease, box-shadow 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    z-index: 1;
    box-shadow: var(--elevation-1);
    overflow: hidden; isolation: isolate;
    text-align: left;
  }
  .pm-ai-wizard > * { position: relative; z-index: 2; }
  .pm-ai-wizard::before {
    content: '';
    position: absolute; inset: -55%;
    border-radius: 42%;
    background:
      conic-gradient(
        from 0deg,
        transparent 0deg,
        rgba(196,240,77,0.10) 38deg,
        rgba(196,240,77,0.95) 102deg,
        rgba(120,170,255,0.58) 176deg,
        rgba(196,240,77,0.22) 244deg,
        transparent 320deg
      );
    animation: pmAiNeonFlow 5.2s linear infinite;
    z-index: 0;
    opacity: 0.95;
    pointer-events: none;
  }
  .pm-ai-wizard::after {
    content: '';
    position: absolute; inset: 1px;
    border-radius: inherit;
    background: var(--wizard-shell-bg);
    box-shadow: var(--wizard-shell-inset);
    z-index: 1;
    pointer-events: none;
  }
  .pm-ai-wizard:hover { 
    color: var(--text-primary);
    border-color: rgba(196,240,77,0.34);
    transform: translateY(-1px) scale(1.015);
    box-shadow: var(--elevation-3);
  }
  .pm-ai-wizard:hover::before {
    animation-duration: 3.2s;
    opacity: 1;
  }
  .pm-ai-wizard:focus-visible {
    outline: none;
    border-color: rgba(196,240,77,0.38);
    box-shadow: 0 0 0 3px rgba(196,240,77,0.16), var(--elevation-3);
  }
  .pm-ai-icon {
    width: 26px; height: 26px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--accent-dim); border: 1px solid var(--accent-mid); color: var(--accent);
    flex-shrink: 0;
    box-shadow:
      0 0 18px rgba(196,240,77,0.14),
      inset 0 0 12px rgba(196,240,77,0.08);
    transition: transform 0.28s ease, background 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease, color 0.28s ease;
  }
  .pm-ai-icon svg { width: 14px; height: 14px; }
  .pm-ai-label {
    font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.1em;
    text-transform: uppercase; color: var(--text-primary); white-space: normal;
    font-weight: 400;
    text-shadow: 0 0 16px rgba(196,240,77,0.10);
    transition: color 0.28s ease, letter-spacing 0.28s ease, transform 0.28s ease;
  }
  .pm-ai-wizard:hover .pm-ai-icon,
  .pm-ai-wizard:focus-visible .pm-ai-icon {
    transform: translateY(-1px) scale(1.06);
    background: rgba(196,240,77,0.18);
    border-color: rgba(196,240,77,0.38);
    box-shadow:
      0 0 22px rgba(196,240,77,0.18),
      inset 0 0 14px rgba(196,240,77,0.12);
  }
  .pm-ai-wizard:hover .pm-ai-label,
  .pm-ai-wizard:focus-visible .pm-ai-label {
    color: var(--accent);
    letter-spacing: 0.12em;
  }
  html[data-theme="light"] .pm-ai-wizard {
    border-color: rgba(117,143,31,0.28);
    box-shadow: 0 14px 34px rgba(117,143,31,0.10);
  }
  html[data-theme="light"] .pm-ai-wizard:hover,
  html[data-theme="light"] .pm-ai-wizard:focus-visible {
    border-color: rgba(117,143,31,0.42);
  }
  html[data-theme="light"] .pm-ai-wizard::before {
    opacity: 1;
    animation-duration: 4.4s;
  }
  html[data-theme="light"] .pm-ai-wizard::after {
    background: linear-gradient(135deg, rgba(255,255,255,0.98), rgba(241,234,221,0.96));
    box-shadow:
      inset 0 0 0 1px rgba(255,255,255,0.9),
      inset 0 0 36px rgba(117,143,31,0.10);
  }
  html[data-theme="light"] .pm-ai-icon {
    background: rgba(117,143,31,0.18);
    border-color: rgba(117,143,31,0.32);
    color: #6f861c;
    box-shadow:
      0 0 18px rgba(117,143,31,0.10),
      inset 0 0 12px rgba(117,143,31,0.07);
  }
  html[data-theme="light"] .pm-ai-label {
    color: #576813;
    font-weight: 400;
    text-shadow: 0 0 10px rgba(117,143,31,0.08);
  }
  html[data-theme="light"] .pm-ai-wizard:hover .pm-ai-icon,
  html[data-theme="light"] .pm-ai-wizard:focus-visible .pm-ai-icon {
    background: rgba(117,143,31,0.24);
    border-color: rgba(117,143,31,0.42);
    color: #667d18;
    box-shadow:
      0 0 18px rgba(117,143,31,0.14),
      inset 0 0 12px rgba(117,143,31,0.10);
  }
  html[data-theme="light"] .pm-ai-wizard:hover .pm-ai-label,
  html[data-theme="light"] .pm-ai-wizard:focus-visible .pm-ai-label {
    color: #4f6211;
  }
  .pm-ai-wizard.loading .pm-ai-icon svg {
    animation: spin 0.8s linear infinite;
  }
  @keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
  }
  @keyframes pmAiNeonFlow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
  }
  @media (prefers-reduced-motion: reduce) {
    .chat-input-container::before,
    .pm-ai-wizard::before,
    .pm-ai-wizard.loading .pm-ai-icon svg {
      animation: none;
    }
  }
  .pm-ai-tooltip {
    position: relative;
    display: none;
    width: 100%;
    min-width: 0;
    min-height: 0;
    max-width: none;
    max-height: none;
    background: var(--tooltip-bg);
    border: 1px solid var(--tooltip-border);
    border-radius: 18px;
    color: var(--text-secondary);
    line-height: 1.7;
    overflow: hidden;
    box-shadow: var(--elevation-2);
    overscroll-behavior: contain;
    user-select: text;
    flex-direction: column;
  }
  .pm-ai-tooltip.show { display: flex; }
  .pm-ai-tooltip::-webkit-scrollbar { width: 6px; height: 6px; }
  .pm-ai-tooltip::-webkit-scrollbar-thumb {
    background: rgba(196,240,77,0.28);
    border-radius: 999px;
  }
  .pm-ai-tooltip-head {
    display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
    padding: 16px 18px 12px;
    border-bottom: 1px solid var(--tooltip-border);
    background: var(--tooltip-header-bg);
    flex-wrap: wrap;
  }
  .pm-ai-tooltip-title {
    font-family: var(--font-mono); font-size: 0.64rem; letter-spacing: 0.12em;
    text-transform: uppercase; color: var(--accent);
  }
  .pm-ai-tooltip-actions {
    display: inline-flex; align-items: center; gap: 8px; margin-left: auto;
  }
  .pm-ai-tooltip-action {
    width: 30px; height: 30px; border-radius: 8px;
    border: 1px solid var(--tooltip-border);
    background: var(--tooltip-action-bg); color: var(--text-secondary);
    display: inline-flex; align-items: center; justify-content: center;
    cursor: pointer; transition: all 0.25s;
  }
  .pm-ai-tooltip-action:hover {
    border-color: var(--accent-mid); color: var(--text-primary);
    background: rgba(196,240,77,0.08);
  }
  .pm-ai-tooltip-action svg { width: 15px; height: 15px; }
  .pm-ai-tooltip-body {
    padding: 18px;
    overflow: auto;
    max-height: 18rem;
    white-space: normal;
    font-size: clamp(0.95rem, 0.92rem + 0.28vw, 1.02rem);
    line-height: 1.85;
  }
  .pm-ai-tooltip.expanded .pm-ai-tooltip-body {
    max-height: 32rem;
  }
  .pm-ai-tooltip::before {
    content: none;
  }
  .pm-ai-tooltip-status {
    color: var(--text-secondary);
  }
  .pm-ai-summary-plain,
  .pm-ai-summary-copy {
    color: var(--text-primary);
  }
  .pm-ai-summary-plain p,
  .pm-ai-summary-copy p,
  .pm-ai-tooltip-intro p {
    margin: 0;
  }
  .pm-ai-summary-plain p + p,
  .pm-ai-summary-copy p + p,
  .pm-ai-tooltip-intro p + p {
    margin-top: 0.85em;
  }
  .pm-ai-tooltip-intro {
    margin-bottom: 14px;
    color: var(--text-secondary);
  }
  .pm-ai-summary-grid {
    display: grid;
    gap: 12px;
  }
  .pm-ai-summary-section {
    padding: 14px 15px;
    border: 1px solid var(--tooltip-section-border);
    border-radius: 14px;
    background: var(--tooltip-section-bg);
  }
  .pm-ai-summary-kicker {
    font-family: var(--font-mono);
    font-size: 0.64rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 8px;
  }
  @media (min-width: 769px) {
    .pm-ai-wrap {
      margin: 20px 0 24px;
    }
    .pm-ai-wizard {
      width: min(100%, 260px);
      max-width: 260px;
      align-self: flex-start;
    }
    .pm-ai-tooltip-body {
      max-height: 22rem;
    }
    .pm-ai-tooltip.expanded .pm-ai-tooltip-body {
      max-height: 36rem;
    }
    .pm-ai-summary-grid {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }
  }
  @media (max-width: 768px) {
    .pm-ai-wizard {
      min-height: 50px;
      padding-right: 16px;
    }
    .pm-ai-icon {
      width: 24px;
      height: 24px;
    }
    .pm-ai-label {
      font-size: 0.64rem;
    }
    .pm-ai-tooltip-head {
      padding: 14px 15px 10px;
    }
    .pm-ai-tooltip-actions {
      gap: 6px;
    }
    .pm-ai-tooltip-action {
      width: 30px;
      height: 30px;
    }
    .pm-ai-tooltip-body {
      padding: 15px;
      max-height: 16rem;
      word-wrap: break-word;
      overflow-wrap: break-word;
      hyphens: auto;
    }
    .pm-ai-tooltip.expanded .pm-ai-tooltip-body {
      max-height: 28rem;
    }
  }
  .pm-hero {
    width: 100%; aspect-ratio: 16/9; background: var(--surface-2); position: relative;
    border-radius: 20px 20px 0 0; overflow: hidden;
    display: flex; align-items: center; justify-content: center;
    transition:
      aspect-ratio 0.52s cubic-bezier(0.16, 1, 0.3, 1),
      transform 0.52s cubic-bezier(0.16, 1, 0.3, 1),
      filter 0.52s cubic-bezier(0.16, 1, 0.3, 1);
  }
  .pm-hero-img {
    position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  }
  .pm-hero-video {
    position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
    background: var(--hero-media-bg);
  }
  .pm-hero-emoji { font-size: 4rem; opacity: 0.15; }
  .pm-hero-embed {
    position: absolute; inset: 0; width: 100%; height: 100%;
    background: var(--hero-embed-bg);
  }
  .pm-hero-embed > script {
    display: block;
    width: 100%;
    height: 100%;
  }
  .pm-hero-gradient {
    position: absolute; inset: 0;
    background: linear-gradient(135deg, var(--accent-dim) 0%, transparent 50%);
  }
  .pm-body {
    padding: 28px 32px 32px;
    transition: padding 0.52s cubic-bezier(0.16, 1, 0.3, 1), transform 0.52s cubic-bezier(0.16, 1, 0.3, 1);
  }
  .pm-tags { display: flex; gap: 6px; margin-bottom: 16px; flex-wrap: wrap; }
  .pm-tag {
    font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.08em;
    text-transform: uppercase; color: var(--accent); background: var(--accent-dim);
    padding: 5px 12px; border-radius: 4px;
  }
  .pm-year {
    font-family: var(--font-mono); font-size: 0.6rem; color: var(--text-muted);
    letter-spacing: 0.06em; margin-left: auto; padding: 4px 0;
  }
  .pm-title {
    font-family: var(--font-display); font-size: 2rem; font-weight: 400;
    line-height: 1.25; margin-bottom: 16px;
  }
  .pm-title-row {
    display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px;
  }
  .pm-title-row .pm-title { margin-bottom: 0; }
  .pm-gallery-chip {
    font-family: var(--font-mono); font-size: 0.58rem; letter-spacing: 0.1em;
    text-transform: uppercase; color: var(--text-muted);
    border: 1px solid var(--border); border-radius: 999px; padding: 6px 10px; white-space: nowrap;
  }
  .pm-desc {
    font-size: 1rem; color: var(--text-secondary); line-height: 1.8; font-weight: 300;
    margin-bottom: 28px;
  }
  .pm-details { display: flex; flex-direction: column; gap: 16px; }
  .pm-detail-row {
    display: flex; gap: 16px; padding: 16px; background: var(--bg);
    border: 1px solid var(--border); border-radius: var(--radius);
  }
  .pm-detail-label {
    font-family: var(--font-mono); font-size: 0.65rem; letter-spacing: 0.12em;
    text-transform: uppercase; color: var(--text-muted); min-width: 70px; padding-top: 2px;
  }
  .pm-detail-value { font-size: 0.9rem; color: var(--text-primary); font-weight: 400; line-height: 1.5; }
  .pm-detail-value .tool-chip {
    display: inline-block; padding: 4px 12px; background: var(--surface);
    border: 1px solid var(--border); border-radius: 6px; font-size: 0.82rem;
    margin: 2px 4px 2px 0; color: var(--text-secondary);
  }
  .pm-embed-block {
    margin-top: 16px;
    padding: 16px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
  }
  .pm-embed-title {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 10px;
  }
  .pm-embed-host {
    width: 100%;
    min-height: 640px;
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    background: var(--hero-embed-bg);
  }
  .pm-embed-host > script { display: block; width: 100%; height: 100%; }
  .pm-embed-host > iframe {
    display: block;
    width: 100%;
    height: 100%;
    min-height: inherit;
    border: 0;
  }
  .pm-embed-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .pm-embed-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
  }
  .pm-embed-credit {
    font-family: var(--font-mono);
    font-size: 0.62rem;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    text-transform: uppercase;
  }
  .pm-tags-list { display: flex; flex-wrap: wrap; gap: 4px; }
  .pm-tags-list span {
    font-family: var(--font-mono); font-size: 0.6rem; letter-spacing: 0.04em;
    color: var(--text-muted); padding: 3px 8px; border: 1px solid var(--border);
    border-radius: 4px;
  }
  .pm-nav {
    display: flex; justify-content: space-between; align-items: center;
    margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--border);
  }
  .pm-nav-btn {
    font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.06em;
    text-transform: uppercase; color: var(--text-muted); background: none; border: 1px solid var(--border);
    padding: 8px 16px; border-radius: 100px; cursor: pointer; transition: all 0.3s;
    display: flex; align-items: center; gap: 8px;
  }
  .pm-nav-btn:hover { color: var(--text-primary); border-color: var(--accent-mid); }
  .pm-nav-btn svg { width: 14px; height: 14px; }
  .pm-hero-controls {
    position: absolute; left: 14px; right: 14px; bottom: 14px; z-index: 3;
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
  }
  .pm-hero-left { display: flex; align-items: center; gap: 8px; }
  .pm-hero-btn {
    width: 34px; height: 34px; border-radius: 50%;
    border: 1px solid var(--border); background: var(--control-bg);
    color: var(--text-secondary); cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.25s;
  }
  .pm-hero-btn:hover { border-color: var(--accent-mid); color: var(--text-primary); }
  .pm-hero-btn svg { width: 14px; height: 14px; }
  .pm-image-count {
    font-family: var(--font-mono); font-size: 0.64rem; letter-spacing: 0.08em;
    color: var(--text-primary); background: var(--control-bg);
    border: 1px solid var(--border); border-radius: 999px;
    padding: 8px 12px; min-width: 56px; text-align: center;
  }
  .pm-preview-close {
    display: none;
    font-family: var(--font-mono); font-size: 0.64rem; letter-spacing: 0.08em;
    text-transform: uppercase; color: var(--text-primary);
    background: var(--control-bg); border: 1px solid var(--border);
    border-radius: 999px; padding: 8px 12px; cursor: pointer; transition: all 0.25s;
  }
  .pm-preview-close:hover { border-color: var(--accent-mid); color: var(--accent); }
  .pm-expand-btn {
    font-family: var(--font-mono); font-size: 0.64rem; letter-spacing: 0.08em;
    text-transform: uppercase; color: var(--text-primary);
    background: var(--control-bg); border: 1px solid var(--border);
    border-radius: 999px; padding: 8px 12px; cursor: pointer; transition: all 0.25s;
  }
  .pm-expand-btn:hover { border-color: var(--accent-mid); color: var(--accent); }
  .project-overlay.expanded .project-modal {
    max-width: min(1120px, 96vw); max-height: 96vh;
    transform: translateY(-3px) scale(1.01);
    box-shadow: var(--elevation-modal-expanded);
  }
  .project-overlay.expanded .pm-hero { aspect-ratio: 16/8.55; transform: translateY(-2px); filter: saturate(1.03); }
  .project-overlay.expanded .pm-body { padding: 30px 36px 34px; transform: translateY(-1px); }

  .pm-gallery {
    display: flex; gap: 8px; overflow-x: auto;
    padding: 12px 32px 0;
  }
  .pm-gallery-thumb {
    width: 76px; height: 52px; border-radius: 8px; overflow: hidden;
    border: 1px solid var(--border); background: var(--surface-2);
    flex: 0 0 auto; cursor: pointer; transition: all 0.25s;
    position: relative;
  }
  .pm-gallery-thumb.active { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent-dim) inset; }
  .pm-gallery-thumb:hover { border-color: var(--accent-mid); transform: translateY(-1px); }
  .pm-gallery-thumb img,
  .pm-gallery-thumb video { width: 100%; height: 100%; object-fit: cover; display: block; }
  .pm-gallery-caption {
    position: absolute; left: 0; right: 0; bottom: 0;
    padding: 5px 6px;
    font-size: 0.58rem; line-height: 1.3; color: var(--text-primary);
    background: var(--gallery-caption-bg);
    opacity: 0; transform: translateY(5px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    pointer-events: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .pm-gallery-thumb:hover .pm-gallery-caption { opacity: 1; transform: translateY(0); }

  .pm-story {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
    margin-top: 18px;
    position: relative;
  }
  .pm-story-item {
    position: relative;
    display: flex;
    justify-content: center;
    padding: 2px 0;
    flex: 0 0 100%;
  }
  .pm-story-item::before {
    content: '';
    position: absolute;
    inset: -4px 8%;
    border-radius: 16px;
    background: radial-gradient(circle at 50% 20%, rgba(196,240,77,0.08), transparent 65%);
    opacity: 0;
    transition: opacity 0.25s ease;
    pointer-events: none;
  }
  .pm-story-item:hover::before { opacity: 1; }
  .pm-story-media {
    width: min(88%, 860px);
    aspect-ratio: 16/10;
    border-radius: 14px;
    object-fit: cover;
    display: block;
    border: 1px solid var(--border);
    cursor: pointer;
    box-shadow: var(--elevation-story);
    transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.28s cubic-bezier(0.22, 1, 0.36, 1);
  }
  .pm-story-item:nth-child(odd) .pm-story-media { transform: rotate(-0.35deg); }
  .pm-story-item:nth-child(even) .pm-story-media { transform: rotate(0.35deg); }
  .pm-story-item:hover .pm-story-media {
    transform: rotate(0deg) translateY(-2px);
    box-shadow: var(--elevation-story-hover);
  }
  .pm-story-item.is-portrait .pm-story-media {
    width: 100%;
    aspect-ratio: auto;
    max-height: min(72vh, 760px);
    object-fit: contain;
    background: var(--portrait-media-bg);
    border-radius: 22px;
    padding: 8px;
    transform: none;
  }
  .pm-story-item.is-portrait {
    flex: 0 1 calc((100% - 32px) / 3);
    max-width: 260px;
    min-width: 180px;
    padding: 0;
  }
  .pm-story-item.is-portrait:hover .pm-story-media { transform: translateY(-2px); }
  .pm-story-item.is-portrait .pm-story-caption {
    width: 100%;
    border-radius: 0 0 22px 22px;
  }
  .pm-story-caption {
    position: absolute; left: 50%; bottom: 0; transform: translate(-50%, 4px);
    width: min(88%, 860px);
    padding: 10px 12px; border-radius: 0 0 10px 10px;
    background: var(--story-caption-bg);
    font-size: 0.76rem; color: var(--text-primary);
    opacity: 0;
    transition: opacity 0.22s ease, transform 0.22s ease;
    pointer-events: none;
  }
  .pm-story-item:hover .pm-story-caption { opacity: 1; transform: translate(-50%, 0); }
  .pm-story-shell {
    margin-top: 18px;
    position: relative;
  }
  .pm-story-shell .pm-story {
    margin-top: 12px;
  }
  .pm-story-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }
  .pm-story-toolbar-title {
    font-family: var(--font-mono);
    font-size: 0.62rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
  }
  .pm-story-toolbar-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
  }
  .pm-story-status {
    min-width: 62px;
    padding: 8px 10px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--control-bg-soft);
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 0.62rem;
    letter-spacing: 0.08em;
    text-align: center;
  }
  .pm-story-nav-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--control-bg-strong);
    color: var(--text-secondary);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.22s ease;
  }
  .pm-story-nav-btn:hover {
    border-color: var(--accent-mid);
    color: var(--text-primary);
    transform: translateY(-1px);
  }
  .pm-story-nav-btn svg {
    width: 14px;
    height: 14px;
  }
  .pm-story.is-carousel {
    justify-content: flex-start;
    flex-wrap: nowrap;
    gap: 14px;
    overflow-x: auto;
    padding: 6px 4px 12px;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    overscroll-behavior-x: contain;
  }
  .pm-story.is-carousel::-webkit-scrollbar {
    display: none;
  }
  .pm-story.is-carousel .pm-story-item {
    flex: 0 0 min(78%, 760px);
    scroll-snap-align: center;
    scroll-snap-stop: always;
    padding: 4px 0 8px;
  }
  .pm-story.is-carousel .pm-story-item::before {
    inset: -4px;
  }
  .pm-story.is-carousel .pm-story-media {
    width: 100%;
    transform: none !important;
  }
  .pm-story.is-carousel .pm-story-item.is-portrait {
    flex: 0 0 clamp(220px, 27vw, 320px);
    max-width: none;
    min-width: 220px;
    padding: 2px 0 8px;
  }
  .pm-story.is-carousel .pm-story-item.active::before {
    opacity: 1;
  }
  .pm-story.is-carousel .pm-story-item.active .pm-story-media {
    border-color: var(--accent-mid);
    box-shadow: var(--elevation-3), 0 0 0 1px rgba(196,240,77,0.16);
  }
  .image-lightbox {
    position: fixed; inset: 0; z-index: 11000; background: var(--lightbox-bg);
    display: none; align-items: center; justify-content: center; padding: 24px;
  }
  .image-lightbox.open { display: flex; }
  .image-lightbox img,
  .image-lightbox video {
    max-width: min(94vw, 1400px); max-height: 90vh; border-radius: 12px;
    border: 1px solid var(--border);
  }
  .image-lightbox-nav {
    position: absolute; top: 50%; transform: translateY(-50%);
    width: 42px; height: 42px; border-radius: 50%;
    border: 1px solid var(--border); background: var(--control-bg);
    color: var(--text-primary); cursor: pointer; font-size: 1.45rem;
    display: inline-flex; align-items: center; justify-content: center;
    z-index: 2;
  }
  .image-lightbox-nav.prev { left: 16px; }
  .image-lightbox-nav.next { right: 16px; }
  .image-lightbox-close {
    position: absolute; top: 18px; right: 18px; width: 36px; height: 36px;
    border-radius: 50%; border: 1px solid var(--border);
    background: var(--control-bg-soft); color: var(--text-primary); cursor: pointer;
    z-index: 3;
  }

  /* --- Responsive --- */
  @media (max-width: 768px) {
    header { padding: 16px 20px; }
    .hero { padding: 60px 20px 40px; }
    .categories, .suggested { padding-left: 20px; padding-right: 20px; }
    .chat-input-wrap { padding: 0 20px 16px; }
    .ai-answer-container { margin: 0 20px 20px; width: auto; }
    .response-area { padding: 0 20px 40px; }
    .project-grid { grid-template-columns: 1fr; }
    footer { padding: 16px 20px; flex-direction: column; gap: 12px; text-align: center; }
    .modal-header { padding: 32px 24px 0; }
    .modal-body { padding: 0 24px 24px; }
    .header-meta { gap: 14px; }
    .theme-toggle { padding: 7px; }
    .theme-toggle-label { display: none; }
    .pm-gallery { padding: 10px 20px 0; }
    .pm-body { padding: 22px 20px 22px; }
    .pm-title-row { flex-direction: column; align-items: flex-start; }
    .pm-story-media { width: 100%; border-radius: 10px; transform: none !important; }
    .pm-story-item.is-portrait { flex: 0 1 calc((100% - 12px) / 2); max-width: 260px; min-width: 140px; }
    .pm-story-item.is-portrait .pm-story-media { width: 100%; border-radius: 16px; padding: 6px; }
    .pm-story-caption { width: 100%; left: 50%; }
    .pm-story-item.is-portrait .pm-story-caption { width: 100%; border-radius: 0 0 16px 16px; }
    .pm-story-toolbar { align-items: flex-start; }
    .pm-story-status { min-width: 56px; padding: 7px 9px; }
    .pm-story.is-carousel { gap: 12px; padding: 4px 2px 10px; }
    .pm-story.is-carousel .pm-story-item { flex-basis: min(86vw, 560px); }
    .pm-story.is-carousel .pm-story-item.is-portrait {
      flex-basis: min(68vw, 300px);
      min-width: 180px;
    }
    .pm-hero-controls { left: 10px; right: 10px; bottom: 10px; }
    .pm-embed-host { min-height: 440px; }
    .pm-embed-grid { grid-template-columns: 1fr; }
    .pm-image-count, .pm-preview-close, .pm-expand-btn { font-size: 0.58rem; }
    .image-lightbox { padding: 12px; }
    .image-lightbox-nav { width: 38px; height: 38px; font-size: 1.25rem; }
    .image-lightbox-nav.prev { left: 8px; }
    .image-lightbox-nav.next { right: 8px; }
    .image-lightbox-close { top: 10px; right: 10px; }
    .project-overlay.expanded .project-modal { transform: translateY(0) scale(1); }
    .project-overlay.expanded .pm-body { padding: 22px 20px 24px; transform: none; }
  }
  @media (max-width: 480px) {
    .hero h1 { font-size: 2.2rem; }
    .cat-pill { padding: 8px 14px; font-size: 0.65rem; }
    .suggest-chip { font-size: 0.72rem; padding: 6px 12px; }
    .suggested-row { flex-wrap: wrap; }
    .ai-followup-chip { font-size: 0.74rem; padding: 6px 11px; }
    .pm-ai-wizard { padding: 0 14px 0 12px; }
    .pm-ai-tooltip-body {
      font-size: 0.94rem;
      line-height: 1.78;
    }
    .pm-ai-summary-section { padding: 13px 14px; }
  }
  ::-webkit-scrollbar { width: 6px; }
  ::-webkit-scrollbar-track { background: transparent; }
  ::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
  ::-webkit-scrollbar-thumb:hover { background: var(--border-hover); }

  /* =========== NEON STAR PARTICLES =========== */
  .neon-stars-canvas {
    position: fixed; inset: 0; z-index: 2; pointer-events: none; opacity: 0.78;
    filter: saturate(1.08) contrast(1.05);
  }
  html[data-theme="light"] .neon-stars-canvas {
    opacity: 0.76;
    filter: saturate(1.02) contrast(1.08);
  }
  html[data-theme="light"] .bg-orb {
    opacity: 0.24;
    filter: blur(17px);
  }
  @media (prefers-reduced-motion: reduce) {
    .neon-stars-canvas { display: none; }
    .ambient-glow, .bg-orb { animation: none !important; }
  }

  /* =========== 3D NEON CURSOR =========== */
  body.cursor-enabled * { cursor: none !important; }
  .neon-cursor {
    position: fixed; pointer-events: none; z-index: 99999;
    width: 20px; height: 20px;
    transform: translate(-50%, -50%);
    transition: width 0.2s, height 0.2s, filter 0.2s;
  }
  .neon-cursor-core {
    position: absolute; inset: 0;
    border-radius: 50%;
    background: radial-gradient(circle, #c4f04d 0%, #a0d030 40%, transparent 70%);
    box-shadow:
      0 0 8px 2px rgba(196, 240, 77, 0.8),
      0 0 20px 6px rgba(196, 240, 77, 0.4),
      0 0 40px 12px rgba(196, 240, 77, 0.15);
    animation: neonPulse 2s ease-in-out infinite;
  }
  .neon-cursor-ring {
    position: absolute; inset: -8px;
    border: 1.5px solid rgba(196, 240, 77, 0.35);
    border-radius: 50%;
    animation: neonRingSpin 4s linear infinite;
    box-shadow: 0 0 10px 1px rgba(196, 240, 77, 0.1);
  }
  .neon-cursor-ring::before {
    content: ''; position: absolute; top: -2px; left: 50%; width: 4px; height: 4px;
    background: var(--accent); border-radius: 50%;
    box-shadow: 0 0 6px 2px rgba(196, 240, 77, 0.6);
    transform: translateX(-50%);
  }
  .neon-cursor.hovering .neon-cursor-core {
    transform: scale(1.5);
    background: radial-gradient(circle, #e0ff80 0%, #c4f04d 40%, transparent 70%);
    box-shadow:
      0 0 12px 4px rgba(196, 240, 77, 1),
      0 0 30px 10px rgba(196, 240, 77, 0.5),
      0 0 60px 20px rgba(196, 240, 77, 0.2);
  }
  .neon-cursor.hovering .neon-cursor-ring {
    border-color: rgba(196, 240, 77, 0.6);
    animation-duration: 1.5s;
  }
  .neon-cursor.clicking .neon-cursor-core {
    transform: scale(0.5);
    transition: transform 0.1s;
  }
  .neon-cursor-trail {
    position: fixed; pointer-events: none; z-index: 99998;
    width: 6px; height: 6px; border-radius: 50%;
    background: rgba(196, 240, 77, 0.5);
    box-shadow: 0 0 8px 2px rgba(196, 240, 77, 0.3);
    transform: translate(-50%, -50%);
    transition: opacity 0.4s ease-out;
  }
  html[data-theme="light"] .neon-cursor-core {
    background: radial-gradient(circle, rgba(117,143,31,0.92) 0%, rgba(157,177,78,0.5) 42%, transparent 72%);
    box-shadow:
      0 0 8px 2px rgba(117,143,31,0.36),
      0 0 20px 6px rgba(117,143,31,0.18),
      0 0 34px 10px rgba(117,143,31,0.08);
  }
  html[data-theme="light"] .neon-cursor-ring {
    border-color: rgba(117,143,31,0.28);
    box-shadow: 0 0 10px 1px rgba(117,143,31,0.08);
  }
  html[data-theme="light"] .neon-cursor-ring::before {
    box-shadow: 0 0 6px 2px rgba(117,143,31,0.22);
  }
  html[data-theme="light"] .neon-cursor.hovering .neon-cursor-core {
    background: radial-gradient(circle, rgba(145,167,58,0.95) 0%, rgba(117,143,31,0.58) 42%, transparent 74%);
    box-shadow:
      0 0 12px 4px rgba(117,143,31,0.4),
      0 0 26px 10px rgba(117,143,31,0.2),
      0 0 42px 18px rgba(117,143,31,0.1);
  }
  html[data-theme="light"] .neon-cursor.hovering .neon-cursor-ring {
    border-color: rgba(117,143,31,0.42);
  }
  html[data-theme="light"] .neon-cursor-trail {
    background: rgba(117,143,31,0.26);
    box-shadow: 0 0 8px 2px rgba(117,143,31,0.14);
  }
  @keyframes neonPulse {
    0%, 100% { opacity: 0.9; }
    50% { opacity: 1; }
  }
  @keyframes neonRingSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
  }

  /* =========== SKELETON LOADING =========== */
  .skeleton-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 20px;
  }
  .skeleton-card {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
    overflow: hidden; opacity: 0; transform: translateY(20px);
    animation: fadeUp 0.5s ease-out forwards;
  }
  .skeleton-card:nth-child(1) { animation-delay: 0s; }
  .skeleton-card:nth-child(2) { animation-delay: 0.08s; }
  .skeleton-card:nth-child(3) { animation-delay: 0.16s; }
  .skeleton-thumb {
    width: 100%; aspect-ratio: 16/10; background: var(--surface-2);
    position: relative; overflow: hidden;
  }
  .skeleton-thumb::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(196, 240, 77, 0.04) 50%, transparent 100%);
    animation: shimmer 1.8s ease-in-out infinite;
  }
  .skeleton-body { padding: 20px; }
  .skeleton-line {
    height: 12px; border-radius: 6px; background: var(--surface-2);
    position: relative; overflow: hidden; margin-bottom: 10px;
  }
  .skeleton-line::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(196, 240, 77, 0.06) 50%, transparent 100%);
    animation: shimmer 1.8s ease-in-out infinite;
  }
  .skeleton-line.w60 { width: 60%; }
  .skeleton-line.w80 { width: 80%; }
  .skeleton-line.w40 { width: 40%; }
  .skeleton-line.title { height: 20px; width: 70%; margin-bottom: 14px; }
  .skeleton-meta {
    display: flex; justify-content: space-between; align-items: center;
    margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border);
  }
  .skeleton-meta-line { height: 10px; width: 100px; border-radius: 5px; background: var(--surface-2); position: relative; overflow: hidden; }
  .skeleton-meta-line::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(196, 240, 77, 0.06) 50%, transparent 100%);
    animation: shimmer 1.8s ease-in-out infinite;
  }
  .skeleton-circle { width: 28px; height: 28px; border-radius: 50%; background: var(--surface-2); }
  @keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
  }

  /* =========== ONBOARDING BOT TOUR =========== */
  .tour-overlay {
    position: fixed; inset: 0; z-index: 10000;
    background: var(--tour-overlay-bg);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    clip-path: none;
    opacity: 0; pointer-events: none;
    transition: opacity 0.32s ease, clip-path 0.28s cubic-bezier(0.22, 1, 0.36, 1);
  }
  .tour-overlay.active {
    opacity: 1; pointer-events: all;
    -webkit-mask:
      linear-gradient(#000 0 0) 0 0 / 100% var(--tour-top, 100%) no-repeat,
      linear-gradient(#000 0 0) 0 var(--tour-top, 0) / var(--tour-left, 0) calc(var(--tour-bottom, 100%) - var(--tour-top, 0)) no-repeat,
      linear-gradient(#000 0 0) var(--tour-right, 100%) var(--tour-top, 0) / calc(100% - var(--tour-right, 100%)) calc(var(--tour-bottom, 100%) - var(--tour-top, 0)) no-repeat,
      linear-gradient(#000 0 0) 0 var(--tour-bottom, 100%) / 100% calc(100% - var(--tour-bottom, 100%)) no-repeat;
    mask:
      linear-gradient(#000 0 0) 0 0 / 100% var(--tour-top, 100%) no-repeat,
      linear-gradient(#000 0 0) 0 var(--tour-top, 0) / var(--tour-left, 0) calc(var(--tour-bottom, 100%) - var(--tour-top, 0)) no-repeat,
      linear-gradient(#000 0 0) var(--tour-right, 100%) var(--tour-top, 0) / calc(100% - var(--tour-right, 100%)) calc(var(--tour-bottom, 100%) - var(--tour-top, 0)) no-repeat,
      linear-gradient(#000 0 0) 0 var(--tour-bottom, 100%) / 100% calc(100% - var(--tour-bottom, 100%)) no-repeat;
  }
  .tour-focus {
    position: fixed; z-index: 10001; pointer-events: none;
    border: 2px solid var(--accent); border-radius: 10px;
    box-shadow:
      0 0 16px rgba(196,240,77,0.45),
      0 0 28px rgba(196,240,77,0.2),
      inset 0 0 0 1px rgba(196,240,77,0.45);
    opacity: 0; transition: all 0.28s cubic-bezier(0.22, 1, 0.36, 1);
  }
  .tour-focus.active { opacity: 1; }
  .tour-focus::before {
    content: '';
    position: absolute;
    inset: -6px;
    border: 1px solid rgba(196, 240, 77, 0.55);
    border-radius: inherit;
    box-shadow: 0 0 14px rgba(196, 240, 77, 0.35);
  }
  .tour-bot {
    position: fixed; z-index: 10001;
    bottom: 96px; right: 24px;
    perspective: 800px;
  }
  .tour-bot.floating {
    position: fixed; bottom: 96px; right: 24px;
  }
  .tour-bot.pinned .tour-bot-avatar {
    animation: none;
    transform: none;
  }
  .tour-bot-avatar {
    width: 64px; height: 64px; border-radius: 20px;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-glow) 100%);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; position: relative;
    transform-style: preserve-3d;
    animation: botFloat 3s ease-in-out infinite, botEntry 0.6s cubic-bezier(0.22, 1, 0.36, 1);
    box-shadow:
      0 4px 15px rgba(196, 240, 77, 0.3),
      0 0 30px rgba(196, 240, 77, 0.15),
      inset 0 1px 0 rgba(255,255,255,0.2);
    transition: transform 0.3s, box-shadow 0.3s;
  }
  .tour-bot-avatar:hover {
    transform: translateY(-4px) rotateY(10deg) rotateX(-5deg);
    box-shadow:
      0 8px 25px rgba(196, 240, 77, 0.4),
      0 0 50px rgba(196, 240, 77, 0.2),
      inset 0 1px 0 rgba(255,255,255,0.3);
  }
  .tour-bot.pinned .tour-bot-avatar:hover {
    transform: none;
  }
  .tour-bot-avatar svg { width: 32px; height: 32px; fill: var(--accent-contrast); }
  .tour-bot-avatar::after {
    content: ''; position: absolute; inset: -3px;
    border-radius: 22px; border: 2px solid rgba(196, 240, 77, 0.3);
    animation: botRingPulse 2s ease-in-out infinite;
  }
  @keyframes botFloat {
    0%, 100% { transform: translateY(0) rotateY(0deg); }
    50% { transform: translateY(-6px) rotateY(5deg); }
  }
  @keyframes botEntry {
    from { opacity: 0; transform: translateY(40px) scale(0.5) rotateY(-30deg); }
    to { opacity: 1; transform: translateY(0) scale(1) rotateY(0deg); }
  }
  @keyframes botRingPulse {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.05); }
  }

  /* Tour Dialog */
  .tour-dialog {
    position: fixed; z-index: 10002;
    width: 360px; max-width: calc(100vw - 40px);
    background: var(--surface); border: 1px solid var(--border); border-radius: 20px;
    overflow: hidden;
    max-height: calc(100vh - 28px);
    display: flex;
    flex-direction: column;
    opacity: 0; pointer-events: none;
    transform: translateY(20px) scale(0.95);
    transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    box-shadow: var(--tour-dialog-shadow);
  }
  .tour-dialog.active {
    opacity: 1; pointer-events: all;
    transform: translateY(0) scale(1);
  }
  .tour-dialog-header {
    display: flex; align-items: center; gap: 12px;
    padding: 20px 20px 0; position: relative;
  }
  .tour-dialog-bot {
    width: 40px; height: 40px; border-radius: 12px;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-glow) 100%);
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
    transform-style: preserve-3d;
    animation: dialogBotBob 2s ease-in-out infinite;
    box-shadow: 0 2px 10px rgba(196, 240, 77, 0.25);
  }
  .tour-dialog-bot svg { width: 22px; height: 22px; fill: var(--accent-contrast); }
  @keyframes dialogBotBob {
    0%, 100% { transform: rotateY(0deg) rotateX(0deg); }
    25% { transform: rotateY(8deg) rotateX(-3deg); }
    75% { transform: rotateY(-5deg) rotateX(2deg); }
  }
  .tour-dialog-title {
    font-family: var(--font-display); font-size: 1.1rem; color: var(--text-primary);
  }
  .tour-dialog-close {
    position: absolute; top: 16px; right: 16px;
    width: 30px; height: 30px; border-radius: 50%;
    border: 1px solid var(--border); background: var(--surface-2);
    color: var(--text-muted); cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.3s;
  }
  .tour-dialog-close:hover { border-color: var(--text-muted); color: var(--text-primary); transform: rotate(90deg); }
  .tour-dialog-close svg { width: 14px; height: 14px; }
  .tour-dialog-body { padding: 16px 20px; overflow: auto; }
  .tour-step-indicator {
    display: flex; gap: 6px; margin-bottom: 14px;
  }
  .tour-step-dot {
    width: 24px; height: 4px; border-radius: 2px;
    background: var(--border); transition: all 0.4s;
  }
  .tour-step-dot.active { background: var(--accent); width: 32px; }
  .tour-step-dot.completed { background: var(--accent); opacity: 0.5; }
  .tour-step-content {
    font-size: 0.92rem; color: var(--text-secondary); line-height: 1.7; font-weight: 300;
    min-height: 60px;
  }
  .tour-step-content strong { color: var(--text-primary); font-weight: 500; }
  .tour-step-content .tour-highlight {
    display: inline; color: var(--accent); font-weight: 400;
  }
  .tour-step-num {
    font-family: var(--font-mono); font-size: 0.6rem; letter-spacing: 0.15em;
    text-transform: uppercase; color: var(--accent); margin-bottom: 8px;
    display: block;
  }
  .tour-dialog-footer {
    display: flex; justify-content: space-between; align-items: center;
    padding: 0 20px 20px; gap: 8px;
  }
  .tour-btn {
    font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.06em;
    text-transform: uppercase; padding: 9px 18px; border-radius: 100px;
    cursor: pointer; transition: all 0.3s; display: flex; align-items: center; gap: 6px;
  }
  .tour-btn-skip {
    background: none; border: none; color: var(--text-muted);
  }
  .tour-btn-skip:hover { color: var(--text-secondary); }
  .tour-btn-back {
    background: none; border: 1px solid var(--border); color: var(--text-secondary);
  }
  .tour-btn-back:hover { border-color: var(--accent-mid); color: var(--text-primary); }
  .tour-btn-next {
    background: var(--accent); border: none; color: var(--accent-contrast); font-weight: 700;
  }
  .tour-btn-next:hover { box-shadow: 0 4px 15px rgba(196, 240, 77, 0.3); transform: translateY(-1px); }
  .tour-btn svg { width: 12px; height: 12px; }
  .tour-pointer { display: none; }
  .tour-pointer.active { opacity: 0; }
  .tour-pointer-ring { display: none; }
  @keyframes pointerPulse {
    0%, 100% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.2); opacity: 0.4; }
  }

  @media (max-width: 768px) {
    .tour-dialog {
      width: auto;
      max-width: none;
      left: calc(15px + env(safe-area-inset-left, 0px));
      right: calc(15px + env(safe-area-inset-right, 0px));
      bottom: calc(100px + env(safe-area-inset-bottom, 0px));
    }
    .tour-bot { bottom: 76px; right: 14px; }
    .neon-cursor, .neon-cursor-trail { display: none !important; }
    * { cursor: auto !important; }
    .skeleton-grid { grid-template-columns: 1fr; }
    .modal { max-height: 92vh; overflow-y: auto; }
    .modal-body { max-height: 64vh; overflow-y: auto; }
    .modal-bio { text-align: left; }
    .related-works { display: none !important; }
    .bg-orb.two { display: none; }
    .bg-orb { filter: blur(22px); opacity: 0.14; }
  }
