In the sidebar, Rosa only wants what’s on next and when, but the Family badge, note, and full border make the card a tall box in a narrow column. She’d like a compact card there, while the Today panel keeps the full one.
You’ll switch the sidebar’s card to a compact variant with a style query, keep it readable where style queries aren’t supported, and check support yourself. Start with the switch.
Switch the Card From Its Slot
Both slots hold the same <article class="session-card">. A modifier class such as session-card--compact would work, but every sidebar card would need it. A style query lets the slot decide in CSS. It applies rules when a container’s custom property holds a given value.
In the components layer of styles.css, give the .sidebar rule the switch:
styles.css
.sidebar {
--variant: compact;
padding: var(--space-inset);
}
--variant is a name you choose, and it holds a word for your rules to test. Custom properties inherit, so everything inside the sidebar sees compact too.