/* Phase A-3: dedicated project hub and inline AI workbench entry. */
.xy-product-page { width: min(1120px, 100%); margin: 0 auto; padding: 42px 0 76px; color: var(--text-primary); }
.xy-product-page h1, .xy-product-page h2, .xy-product-page h3 { color: var(--text-primary); letter-spacing: -.025em; }
.xy-product-page p { color: var(--text-secondary); }
.xy-product-page .xy-eyebrow { margin: 0 0 10px; color: var(--brand-primary); font-size: .68rem; font-weight: 800; letter-spacing: .14em; }
.xy-product-page .xy-button { display: inline-flex; justify-content: center; align-items: center; gap: 8px; min-height: 44px; padding: 12px 18px; border-radius: 12px; font: inherit; font-size: .88rem; font-weight: 700; text-decoration: none; cursor: pointer; transition: transform var(--motion-fast) var(--motion-ease), box-shadow var(--motion-fast) var(--motion-ease), background var(--motion-fast) var(--motion-ease); }
.xy-product-page .xy-button:hover { transform: translateY(-1px); box-shadow: var(--shadow-hover); }
.xy-product-page .xy-primary { border: 1px solid var(--brand-primary); background: var(--brand-primary); color: #fff; box-shadow: 0 8px 20px rgba(36,121,149,.16); }
.xy-product-page .xy-secondary { border: 1px solid var(--border-soft); background: #fff; color: var(--brand-primary); }
.xy-product-page .xy-text-link { color: var(--brand-primary); font-size: .86rem; font-weight: 700; text-decoration: none; }
.xy-product-page .xy-text-link:hover { text-decoration: underline; }
.xy-product-hero { display: grid; grid-template-columns: minmax(0,1fr) 180px; align-items: center; gap: 28px; min-height: 270px; padding: clamp(24px,4vw,46px); overflow: hidden; border: 1px solid var(--border-soft); border-radius: 26px; background: radial-gradient(circle at 88% 18%, rgba(110,184,198,.16), transparent 35%), linear-gradient(135deg,#fff 0%,#f4f9f9 100%); box-shadow: var(--shadow-soft); }
.xy-product-hero h1, .xy-workbench-welcome h1 { margin: 0 0 12px; font-size: clamp(2rem,4vw,3rem); line-height: 1.2; }
.xy-product-hero-copy > p:not(.xy-eyebrow) { max-width: 650px; margin: 0; line-height: 1.9; font-size: .98rem; }
.xy-product-hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.xy-product-mascot { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; align-self: stretch; color: var(--brand-primary); font-size: .72rem; font-weight: 700; text-align: center; }
.xy-product-mascot img { display: block; width: 138px; height: 200px; object-fit: contain; object-position: center bottom; filter: drop-shadow(0 8px 12px rgba(35,90,110,.10)); }
.xy-project-overview { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin: 40px 0 20px; }
.xy-project-overview h2 { margin: 0 0 7px; font-size: 1.45rem; }
.xy-project-overview p:not(.xy-eyebrow) { margin: 0; font-size: .87rem; }
.xy-project-count { display: flex; flex-direction: column; align-items: end; min-width: 76px; color: var(--text-muted); font-size: .75rem; }
.xy-project-count strong { color: var(--brand-primary); font-size: 2rem; line-height: 1.1; }
.xy-project-empty { display: grid; grid-template-columns: 170px minmax(0,1fr); align-items: center; gap: 28px; padding: clamp(24px,4vw,42px); border: 1px solid var(--border-soft); border-radius: 22px; background: #fff; box-shadow: var(--shadow-soft); }
.xy-empty-art { display: grid; place-items: center; min-height: 180px; border-radius: 18px; background: linear-gradient(145deg,#f2f8f8,#eaf3f5); }
.xy-empty-art img { width: 122px; height: 176px; object-fit: contain; object-position: center bottom; }
.xy-empty-copy h2 { margin: 0 0 12px; font-size: clamp(1.45rem,3vw,1.9rem); }
.xy-empty-copy > p:not(.xy-eyebrow) { max-width: 680px; margin: 0; line-height: 1.9; font-size: .92rem; }
.xy-empty-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 18px; margin-top: 22px; }
.xy-local-note { margin: 16px 0 0; color: var(--text-muted)!important; font-size: .75rem!important; line-height: 1.7; }
.xy-projects-local-note { padding: 12px 14px; border-radius: 10px; background: var(--bg-soft); }
.xy-projects-local-note span { margin-right: 6px; color: var(--brand-primary); }
.xy-project-form-panel { margin: 24px 0; padding: clamp(22px,4vw,36px); border: 1px solid var(--border-strong); border-radius: 22px; background: #fff; box-shadow: var(--shadow-soft); scroll-margin-top: 24px; }
.xy-project-form-panel[hidden] { display: none; }
.xy-form-heading { display: flex; align-items: start; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.xy-form-heading h2 { margin: 0 0 8px; font-size: 1.5rem; }
.xy-form-heading p:not(.xy-eyebrow) { margin: 0; font-size: .87rem; }
.xy-form-step { color: var(--brand-primary); font-size: 1.2rem; font-weight: 800; white-space: nowrap; }
.xy-form-step span { color: var(--text-muted); font-size: .8rem; font-weight: 500; }
.xy-form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; }
.xy-field { display: flex; flex-direction: column; gap: 8px; color: var(--text-primary); font-size: .84rem; font-weight: 700; }
.xy-field > span { display: inline; color: var(--text-muted); font-size: .72rem; font-weight: 500; }
.xy-field-full { grid-column: 1 / -1; }
.xy-field input, .xy-field select, .xy-field textarea, .xy-workbench-brief-form textarea { width: 100%; min-width: 0; padding: 12px 14px; border: 1px solid var(--border-soft); border-radius: 11px; outline: none; background: #fff; color: var(--text-primary); font: inherit; font-size: .88rem; line-height: 1.65; }
.xy-field input:focus, .xy-field select:focus, .xy-field textarea:focus, .xy-workbench-brief-form textarea:focus { border-color: var(--brand-primary); box-shadow: var(--focus-ring); }
.xy-field textarea, .xy-workbench-brief-form textarea { resize: vertical; }
.xy-form-feedback { min-height: 1.2em; margin: 12px 0 0; color: var(--danger)!important; font-size: .8rem!important; }
.xy-form-actions { display: flex; justify-content: end; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.xy-project-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; }
.xy-project-card { display: flex; flex-direction: column; min-width: 0; min-height: 248px; padding: 22px; border: 1px solid var(--border-soft); border-radius: 18px; background: #fff; box-shadow: var(--shadow-soft); }
.xy-project-card-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.xy-project-symbol { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 13px; background: var(--bg-soft); color: var(--brand-primary); font-size: 1.2rem; font-weight: 800; }
.xy-project-status { display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px; border-radius: 99px; background: var(--success-soft); color: var(--success); font-size: .68rem; white-space: nowrap; }
.xy-project-status i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.xy-project-kind { margin: 18px 0 6px!important; font-size: .72rem!important; }
.xy-project-card h3 { margin: 0 0 9px; overflow-wrap: anywhere; font-size: 1.1rem; }
.xy-project-goal { display: -webkit-box; overflow: hidden; -webkit-line-clamp: 3; -webkit-box-orient: vertical; margin: 0; line-height: 1.75; font-size: .83rem; }
.xy-project-card-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 20px; color: var(--text-muted); font-size: .7rem; }
.xy-text-button { border: 0; background: transparent; color: var(--brand-primary); font: inherit; font-size: .8rem; font-weight: 800; cursor: pointer; }
.xy-project-add-card { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 9px; min-height: 248px; padding: 20px; border: 1px dashed var(--border-strong); border-radius: 18px; background: rgba(237,244,246,.45); color: var(--text-primary); cursor: pointer; text-align: center; }
.xy-project-add-card > span { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: #fff; color: var(--brand-primary); font-size: 1.6rem; }
.xy-project-add-card small { color: var(--text-muted); line-height: 1.6; }
.xy-workbench-welcome { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: clamp(24px,4vw,42px); border: 1px solid var(--border-soft); border-radius: 24px; background: radial-gradient(circle at 88% 15%, rgba(110,184,198,.15), transparent 34%), #fff; box-shadow: var(--shadow-soft); }
.xy-workbench-welcome > div:first-child { max-width: 720px; }
.xy-workbench-welcome > div:first-child > p:not(.xy-eyebrow) { max-width: 650px; margin: 0; line-height: 1.9; }
.xy-workbench-avatar { display: flex; flex-direction: column; align-items: center; flex: 0 0 112px; gap: 4px; color: var(--brand-primary); font-size: .7rem; font-weight: 700; }
.xy-workbench-avatar img { height: 126px; width: 84px; object-fit: contain; }
.xy-project-context { display: flex; align-items: center; gap: 14px; margin-top: 20px; padding: 16px 18px; border: 1px solid #cfe4e8; border-radius: 14px; background: #eff7f8; }
.xy-project-context-icon { display: grid; place-items: center; flex: 0 0 38px; height: 38px; border-radius: 12px; background: #fff; color: var(--brand-primary); }
.xy-project-context div { flex: 1; min-width: 0; }
.xy-project-context strong { display: block; overflow-wrap: anywhere; font-size: .87rem; }
.xy-project-context p { margin: 5px 0 0; font-size: .78rem; line-height: 1.6; }
.xy-project-context > a { color: var(--brand-primary); font-size: .76rem; font-weight: 700; text-decoration: none; white-space: nowrap; }
.xy-workbench-layout { display: grid; grid-template-columns: minmax(0,1fr) 260px; align-items: start; gap: 24px; margin-top: 34px; }
.xy-section-title-row { margin-bottom: 18px; }
.xy-section-title-row h2 { margin: 0 0 8px; font-size: 1.5rem; }
.xy-section-title-row p:not(.xy-eyebrow) { margin: 0; font-size: .86rem; }
.xy-workbench-task-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.xy-workbench-task { display: grid; grid-template-columns: 44px minmax(0,1fr); grid-template-rows: auto auto auto; align-items: start; column-gap: 12px; row-gap: 5px; min-height: 142px; padding: 18px; border: 1px solid var(--border-soft); border-radius: 16px; background: #fff; color: var(--text-primary); text-align: left; cursor: pointer; transition: border-color var(--motion-fast), background var(--motion-fast), box-shadow var(--motion-fast); }
.xy-workbench-task:hover { border-color: var(--border-strong); box-shadow: var(--shadow-soft); }
.xy-workbench-task.is-selected { border-color: var(--brand-primary); background: #f0f8f9; box-shadow: 0 0 0 2px rgba(36,121,149,.08); }
.xy-workbench-task-icon { display: grid; place-items: center; grid-row: 1 / span 3; width: 42px; height: 42px; border-radius: 13px; background: var(--bg-soft); color: var(--brand-primary); font-size: 1.25rem; }
.xy-workbench-task strong { font-size: .91rem; }
.xy-workbench-task > span:nth-of-type(2) { color: var(--text-secondary); font-size: .76rem; line-height: 1.65; }
.xy-workbench-task i { align-self: end; color: var(--brand-primary); font-size: .7rem; font-style: normal; font-weight: 800; }
.xy-brief-panel { margin-top: 20px; padding: clamp(20px,3vw,30px); border: 1px solid var(--border-soft); border-radius: 18px; background: #fff; box-shadow: var(--shadow-soft); }
.xy-brief-heading h2 { margin: 0 0 8px; font-size: 1.35rem; }
.xy-brief-heading p:not(.xy-eyebrow) { margin: 0; font-size: .84rem; line-height: 1.8; }
.xy-workbench-brief-form { margin-top: 22px; }
.xy-workbench-brief-form label { display: block; margin-bottom: 9px; color: var(--text-primary); font-size: .85rem; font-weight: 800; }
.xy-workbench-brief-form textarea { min-height: 160px; }
.xy-workbench-form-actions { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px; margin-top: 12px; }
.xy-workbench-form-actions > span { color: var(--text-muted); font-size: .75rem; }
.xy-brief-empty { display:flex; flex-direction:column; align-items:flex-start; gap:10px; min-height:190px; justify-content:center; }.xy-brief-empty-icon { display:grid; place-items:center; width:42px; height:42px; border-radius:13px; background:var(--bg-soft); color:var(--brand-primary); font-size:1.25rem; }.xy-brief-empty h2 { margin:0; font-size:1.25rem; }.xy-brief-empty p { max-width:540px; margin:0; font-size:.84rem; line-height:1.8; }.xy-workbench-aside { display: grid; gap: 14px; }
.xy-aside-card { padding: 22px; border: 1px solid var(--border-soft); border-radius: 17px; background: #fff; box-shadow: var(--shadow-soft); }
.xy-aside-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: var(--bg-soft); color: var(--brand-primary); font-size: 1.2rem; }
.xy-aside-card h3 { margin: 14px 0 12px; font-size: 1rem; }
.xy-aside-card ul { margin: 0; padding-left: 18px; color: var(--text-secondary); font-size: .78rem; line-height: 1.9; }
.xy-aside-card > p { margin: 14px 0 0; font-size: .74rem; line-height: 1.7; }
.xy-aside-note { background: #f3f8f8; }
.xy-aside-note strong { font-size: .83rem; }
.xy-aside-note p { margin-bottom: 0; font-size: .76rem; line-height: 1.8; }
.xy-code-entry { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 22px; padding: 18px; border: 1px solid var(--border-soft); border-radius: 14px; background: #f7faf9; }
.xy-code-entry-icon { display: grid; place-items: center; flex: 0 0 42px; height: 42px; border-radius: 12px; background: #fff; color: var(--brand-primary); font-size: 1.2rem; }
.xy-code-entry > div:nth-child(2) { flex: 1; min-width: 180px; }
.xy-code-entry strong { font-size: .88rem; }
.xy-code-entry p { margin: 5px 0 0; font-size: .76rem; }
@media (max-width: 900px) { .xy-project-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }.xy-workbench-layout { grid-template-columns: 1fr; }.xy-workbench-aside { grid-template-columns: repeat(2,minmax(0,1fr)); }.xy-aside-card { min-width: 0; } }
@media (max-width: 620px) { .xy-product-page { padding: 24px 0 48px; }.xy-product-hero { grid-template-columns: minmax(0,1fr); gap: 10px; padding: 22px 18px; border-radius: 19px; }.xy-product-mascot { flex-direction:row; justify-content:flex-start; gap:9px; margin-top:4px; }.xy-product-mascot img { width:52px; height:78px; }.xy-product-mascot span { font-size:.62rem; }.xy-product-hero h1, .xy-workbench-welcome h1 { font-size: 2rem; }.xy-product-hero-copy > p:not(.xy-eyebrow) { font-size: .84rem; line-height: 1.8; }.xy-product-hero-actions { gap: 8px; }.xy-product-hero-actions .xy-button { width: 100%; padding: 11px 12px; font-size: .78rem; }.xy-product-mascot img { width:52px; height:78px; }.xy-product-mascot span { font-size: .6rem; }.xy-project-overview { margin-top: 28px; }.xy-project-overview h2 { font-size: 1.2rem; }.xy-project-empty { grid-template-columns: 1fr; gap: 14px; padding: 22px 18px; }.xy-empty-art { min-height: 120px; }.xy-empty-art img { width: 78px; height: 118px; }.xy-empty-copy h2 { font-size: 1.45rem; }.xy-empty-copy > p:not(.xy-eyebrow) { font-size: .85rem; }.xy-empty-actions { align-items: start; flex-direction: column; gap: 15px; }.xy-project-grid { grid-template-columns: 1fr; }.xy-project-card { min-height: 220px; }.xy-project-add-card { min-height: 170px; }.xy-form-grid { grid-template-columns: 1fr; gap: 14px; }.xy-field-full { grid-column: auto; }.xy-project-form-panel { padding: 22px 17px; }.xy-form-actions .xy-button { flex: 1; }.xy-workbench-welcome { align-items:flex-start; flex-direction:column; padding: 22px 18px; gap: 8px; }.xy-workbench-avatar { align-self:flex-end; flex-direction:row; flex-basis:auto; gap:6px; margin-top:-6px; }.xy-workbench-avatar img { width:42px; height:64px; }.xy-workbench-welcome > div:first-child > p:not(.xy-eyebrow) { font-size: .84rem; line-height: 1.8; }.xy-workbench-avatar { flex-basis: 72px; font-size: .58rem; }.xy-workbench-avatar img { width: 62px; height: 94px; }.xy-project-context { align-items: start; flex-wrap: wrap; padding: 13px; }.xy-project-context div { flex-basis: calc(100% - 54px); }.xy-project-context > a { margin-left: 52px; }.xy-workbench-task-grid { grid-template-columns: 1fr; }.xy-workbench-task { min-height: 116px; }.xy-workbench-aside { grid-template-columns: 1fr; }.xy-workbench-form-actions { align-items: stretch; flex-direction: column; }.xy-workbench-form-actions .xy-button { width: 100%; }.xy-code-entry .xy-button { width: 100%; } }
@media (prefers-reduced-motion: reduce) { .xy-product-page .xy-button, .xy-workbench-task { transition: none; } .xy-product-page .xy-button:hover { transform: none; } }

/* Xiaoyu-PDF-Integration-1A: three-step feature cards for the PDF tools entry page (reuses xy-aside-card tokens only). */
.xy-pdf-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 22px; }
.xy-pdf-steps .xy-aside-card { min-width: 0; }
@media (max-width: 900px) { .xy-pdf-steps { grid-template-columns: 1fr; } }

.xy-existing-docs { width:100%; margin-top:14px; min-height:40px!important; padding:9px 12px!important; font-size:.78rem!important; }


/* Phase A-4: pose changes are tied to page state, with gentle motion rather than a repeated static sticker. */
.xy-product-mascot img[data-xiaoyu-role],
.xy-empty-art img[data-xiaoyu-role],
.xy-workbench-avatar img[data-xiaoyu-role],
.xy-avatar img[data-xiaoyu-role] {
  transform-origin: 50% 88%;
  transition: opacity .24s ease, transform .32s ease;
}
.xy-pose-changing { opacity: .28 !important; transform: translateY(6px) scale(.97) !important; }
.xy-product-mascot img[data-xiaoyu-pose="welcome"],
.xy-workbench-avatar img[data-xiaoyu-pose="welcome"],
.xy-avatar img[data-xiaoyu-pose="welcome"] { animation: xy-pose-float 4.2s ease-in-out infinite; }
.xy-product-mascot img[data-xiaoyu-pose="thinking"],
.xy-workbench-avatar img[data-xiaoyu-pose="thinking"],
.xy-avatar img[data-xiaoyu-pose="thinking"] { animation: xy-pose-think 5.2s ease-in-out infinite; }
.xy-product-mascot img[data-xiaoyu-pose="working"],
.xy-empty-art img[data-xiaoyu-pose="working"],
.xy-workbench-avatar img[data-xiaoyu-pose="working"],
.xy-avatar img[data-xiaoyu-pose="working"] { animation: xy-pose-work 3.8s ease-in-out infinite; }
.xy-product-mascot img[data-xiaoyu-pose="celebrate"],
.xy-avatar img[data-xiaoyu-pose="celebrate"] { animation: xy-pose-celebrate .86s cubic-bezier(.2,.8,.2,1) 1; }
.xy-product-mascot img[data-xiaoyu-pose="invite"],
.xy-empty-art img[data-xiaoyu-pose="invite"],
.xy-avatar img[data-xiaoyu-pose="invite"] { animation: xy-pose-invite 4s ease-in-out infinite; }
.xy-product-mascot img[data-xiaoyu-pose="teaching"],
.xy-empty-art img[data-xiaoyu-pose="teaching"],
.xy-workbench-avatar img[data-xiaoyu-pose="teaching"],
.xy-avatar img[data-xiaoyu-pose="teaching"] { animation: xy-pose-teach 4.6s ease-in-out infinite; }
@keyframes xy-pose-float { 0%,100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-5px) rotate(1deg); } }
@keyframes xy-pose-think { 0%,100% { transform: translateY(0) rotate(0); } 45% { transform: translateY(-2px) rotate(-1.2deg); } 70% { transform: translateY(0) rotate(.5deg); } }
@keyframes xy-pose-work { 0%,100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-3px) rotate(-.6deg); } }
@keyframes xy-pose-celebrate { 0% { transform: translateY(8px) scale(.92); } 55% { transform: translateY(-8px) scale(1.04); } 100% { transform: translateY(0) scale(1); } }
@keyframes xy-pose-invite { 0%,100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-4px) rotate(-1deg); } }
@keyframes xy-pose-teach { 0%,100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-3px) rotate(.8deg); } }
@media (prefers-reduced-motion: reduce) {
  .xy-product-mascot img[data-xiaoyu-role], .xy-empty-art img[data-xiaoyu-role],
  .xy-workbench-avatar img[data-xiaoyu-role], .xy-avatar img[data-xiaoyu-role] {
    animation: none !important; transition: none !important;
  }
  .xy-pose-changing { opacity: 1 !important; transform: none !important; }
}

/* Main-site code workspace modes; keep the AI form out of manual modes. */
.xy-code-modes { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; }
#cv-ai-panel[hidden], #cv-login[hidden] { display: none; }
#cv-ai-panel { margin-bottom: 16px; }
#cv-mode-hint { margin-bottom: 14px; }
#xy-other-links { overflow-wrap: anywhere; }
