.agc-history-entry { display:flex; flex-direction:column; gap:12px; min-width:0; }
.agc-rich { width:min(100%,640px); margin:8px 0; padding:16px; border:1px solid var(--ag-line); border-radius:16px; background:var(--ag-surface); color:var(--ag-text); box-sizing:border-box; overflow:hidden; }
.agc-rich figcaption { font-size:15px; font-weight:700; margin-bottom:12px; }
.agc-rich-chart { display:block; width:100%; height:auto; min-height:140px; color:var(--ag-muted); }
.agc-rich-note { font-size:12px; line-height:1.5; color:var(--ag-muted); margin:8px 0; overflow-wrap:anywhere; }
.agc-rich button { border:1px solid var(--ag-line); border-radius:9px; background:var(--ag-surface2); color:var(--ag-text); padding:8px 12px; cursor:pointer; }
.agc-rich table { width:100%; border-collapse:collapse; margin-top:12px; font-size:12px; }
.agc-rich table[hidden] { display:none; }
.agc-rich :is(th,td) { padding:8px; border-bottom:1px solid var(--ag-line); text-align:left; overflow-wrap:anywhere; }
.agc-rich img { width:100%; height:auto; border-radius:10px; }
.agc-widget-stats { display:grid; grid-template-columns:repeat(auto-fit,minmax(110px,1fr)); gap:10px; }
.agc-widget-stats > div { padding:12px; border:1px solid var(--ag-line); border-radius:10px; }
.agc-widget-stats strong,.agc-widget-progress strong { display:block; font-size:12px; }
.agc-stat-value { display:block; font-size:24px; font-weight:700; color:var(--ag-accent); margin-top:7px; }
.agc-widget-progress > div { margin:12px 0; }
.agc-widget-progress progress { display:block; width:100%; height:12px; margin:8px 0; accent-color:var(--ag-accent); }
.agc-widget-progress span,.agc-widget-steps li { font-size:13px; }
.agc-widget-steps { padding-left:22px; }.agc-widget-steps li { padding:7px 0; }.agc-rich p { font-size:12px; }
.agc-visualise-hint { color:var(--ag-muted); font-size:10px; margin:7px 8px 0; }
html[data-theme=light] .agc-stat-value { color:#765512; }
/* Keep rich replies at their intrinsic height inside the scrolling flex thread. */
.agc-rich,.agc-history-entry { flex:0 0 auto; }
.agc-rich > a { display:block; }
.agc-rich img { display:block; aspect-ratio:auto 3 / 2; object-fit:contain; }
.agc-composer-wrap { position:relative; }
.agc-command-menu { position:absolute; bottom:100%; left:8px; right:8px; z-index:25; max-height:260px; overflow:auto; padding:6px; border:1px solid var(--ag-line); border-radius:12px; background:var(--ag-surface); color:var(--ag-text); box-shadow:0 8px 28px #0005; }
.agc-command-menu[hidden] { display:none; }
.agc-command-menu button { display:block; width:100%; border:0; border-radius:8px; background:transparent; color:inherit; text-align:left; padding:10px 12px; cursor:pointer; }
.agc-command-menu button[aria-selected=true] { background:var(--ag-surface2); outline:1px solid var(--ag-accent); }
.agc-command-menu strong,.agc-command-menu small { display:block; }
.agc-command-menu small { color:var(--ag-muted); margin-top:3px; }
.agc-commands-open { border:1px solid var(--ag-line); background:var(--ag-surface); color:var(--ag-text); border-radius:6px; padding:2px 8px; margin-right:6px; cursor:pointer; }
#agentChatPanel .agc-rich :is(table,th,td) { color:var(--ag-text); }

#agentChatPanel .agc-bubble :is(table,th,td) { color:var(--ag-text); }
.agc-widget-text { white-space:pre-wrap; overflow-wrap:anywhere; line-height:1.6; }

/* Workout replies keep exercises and controls together at every panel size. */
.agc-rich.agc-workout { width:100%; max-width:1100px; }
.agc-workout select { max-width:100%; padding:10px 12px; border:1px solid var(--ag-line); border-radius:8px; background:var(--ag-surface2); color:var(--ag-text); font:inherit; }
.agc-workout h3 { margin:16px 0 4px; font-size:16px; }
.agc-exercise-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(140px,1fr)); gap:8px; list-style:none; padding:0; margin:12px 0; }
.agc-exercise-grid > li { min-width:0; padding:12px; border:1px solid var(--ag-line); border-radius:10px; background:var(--ag-surface2); overflow-wrap:anywhere; }
.agc-exercise-number { display:block; color:var(--ag-accent); font-size:24px; font-weight:700; margin-bottom:16px; }
.agc-exercise-grid strong { display:block; font-size:13px; }
.agc-exercise-dose { font-size:15px !important; font-weight:600; }
.agc-exercise-muscles { display:inline-block; font-size:11px; color:var(--ag-muted); }
.agc-exercise-grid details { font-size:12px; margin-top:12px; }
.agc-exercise-grid summary { cursor:pointer; }
.agc-workout-footer { display:flex; flex-wrap:wrap; gap:8px; padding:12px 0; border-top:1px solid var(--ag-line); }
.agc-workout-footer button:first-child { background:var(--ag-accent); color:#17191b; font-weight:700; }
.agc-workout :is(button,select,summary):focus-visible { outline:2px solid var(--ag-accent); outline-offset:3px; }
@media(max-width:480px) { .agc-exercise-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } }

.agc-exercise-grid > li { position:relative; padding:10px; display:flex; flex-direction:column; align-items:flex-start; }
.agc-exercise-grid .agc-exercise-number { position:absolute; top:14px; left:14px; z-index:1; font-size:11px; color:var(--ag-text); background:var(--ag-surface); border:1px solid var(--ag-line); border-radius:50%; padding:4px 6px; margin:0; }
.agc-exercise-art { align-self:stretch; aspect-ratio:1; background-color:#20272d; border-radius:8px; margin-bottom:12px; background-repeat:no-repeat; }
.agc-exercise-grid > li > button { font-size:11px; margin-top:auto; align-self:flex-end; padding:4px 8px; }
.agc-exercise-grid strong { margin-bottom:6px; }
.agc-exercise-grid .agc-exercise-dose { margin:0 0 8px; }
.agc-workout-full { border-top:1px solid var(--ag-line); margin-top:16px; padding-top:8px; display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:16px; }
.agc-workout-full[hidden] { display:none; }
.agc-workout-full h4 { margin:8px 0; }
.agc-workout-full ul { padding-left:20px; font-size:13px; line-height:1.8; }
#wsOverlay { z-index:10080; }
.agc-exercise-art-generic { display:grid; place-items:center; font-size:44px; }

/* Compact workout presentation, with a readable summary beside the main actions. */
.agc-workout { font-family:Inter,system-ui,-apple-system,"Segoe UI",sans-serif; background:linear-gradient(145deg,var(--ag-surface2),var(--ag-surface)); border-radius:14px; }
.agc-workout > figcaption { font-size:18px; line-height:1.3; letter-spacing:-.25px; margin-bottom:4px; }
.agc-workout > select { float:right; font-size:12px; font-weight:600; border-radius:22px; padding:8px 12px; }
.agc-workout h3 { font-size:15px; letter-spacing:-.15px; }
.agc-workout .agc-exercise-grid { clear:both; grid-template-columns:repeat(auto-fit,minmax(125px,1fr)); gap:6px; }
.agc-workout .agc-exercise-grid > li { background:var(--ag-surface); border-color:transparent; padding:8px; }
.agc-workout .agc-exercise-grid strong { font-size:12px; line-height:1.4; }
.agc-workout .agc-exercise-dose { font-size:12px !important; font-weight:500; }
.agc-workout .agc-exercise-muscles { border-radius:16px; padding:3px 7px; background:var(--ag-surface2); font-size:10px; margin-bottom:8px; }
.agc-workout-bottom { display:flex; flex-wrap:wrap; align-items:center; gap:12px; padding-top:10px; border-top:1px solid var(--ag-line); }
.agc-workout-metrics { display:flex; flex:1 1 300px; gap:16px; }
.agc-workout-metrics > div { display:flex; align-items:center; gap:7px; min-width:0; }
.agc-workout-metrics strong { display:block; font-size:12px; font-weight:600; line-height:1.4; }
.agc-workout-metrics small { display:block; font-size:10px; color:var(--ag-muted); margin-top:2px; }
.agc-metric-icon { font-size:24px; color:var(--ag-accent); }
.agc-workout-bottom .agc-workout-footer { border:0; padding:0; gap:6px; }
.agc-workout-footer button,.agc-workout > .agc-followups button { border-radius:22px; font-size:11px; }
.agc-workout > .agc-followups { margin-top:12px; }
.agc-workout-choices { margin-top:16px; padding:14px; border:1px solid var(--ag-line); border-radius:12px; background:var(--ag-surface); }
.agc-workout-choices[hidden] { display:none; }
.agc-workout-choices h4 { margin:0 0 12px; }
.agc-workout-choices fieldset { border:0; padding:0; margin:12px 0; min-width:0; }
.agc-workout-choices legend { font-size:12px; font-weight:600; margin-bottom:8px; }
.agc-choice-chips { display:flex; flex-wrap:wrap; gap:6px; }
.agc-choice-chips button { font-size:12px; border-radius:18px; }
.agc-choice-chips button[aria-pressed=true] { border-color:var(--ag-accent); background:var(--ag-accent); color:#17191b; }
.agc-workout-choices input,.agc-workout-choices textarea { box-sizing:border-box; display:block; width:100%; margin-top:8px; padding:10px; border:1px solid var(--ag-line); border-radius:8px; background:var(--ag-surface2); color:var(--ag-text); font:inherit; font-size:12px; }
@media(max-width:600px) { .agc-workout > select { float:none; width:100%; } .agc-workout-metrics { gap:10px; } .agc-workout-metrics strong { font-size:11px; } .agc-workout .agc-exercise-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } }
.agc-workout :is(strong,button,select,small,h3,h4,legend) { font-family:inherit; }
