.account-card.activity-card {
  --activity-zero: #ecebe7;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .activity-card { --activity-zero: #2a2926; }
}
:root[data-theme="dark"] .activity-card { --activity-zero: #2a2926; }
.activity-head { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.account-card .activity-head h3 { margin: 0 auto 0 0; }
.activity-share, .activity-tabs button {
  font: inherit;
  font-size: 13px;
  line-height: 1.6;
  border-radius: 999px;
  cursor: pointer;
}
.activity-share {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  color: var(--ink);
}
.activity-share:disabled { opacity: .5; cursor: default; }
.activity-tabs { display: flex; gap: 2px; }
.activity-tabs button { border: 0; padding: 6px 12px; background: transparent; color: var(--ink-3); }
.activity-tabs button:hover, .activity-share:not(:disabled):hover { background: var(--bg-soft); color: var(--ink); }
.activity-tabs button[aria-pressed="true"] { background: var(--ink); color: var(--on-ink); }
.activity-stats { display: flex; flex-wrap: wrap; gap: 22px; margin: 14px 0 16px; font-size: 13px; color: var(--ink-3); }
.activity-stats b { display: block; color: var(--ink); font-size: 18px; font-weight: 650; }
.activity-scroll { min-width: 0; overflow-x: auto; padding-bottom: 4px; }
.activity-scroll svg { display: block; width: 100%; min-width: 520px; max-width: none; }
.activity-scroll svg[height="128"] { width: auto; min-width: 0; }
.activity-scroll svg:focus-visible { outline-offset: -2px; }
.activity-scroll rect[data-point]:hover { stroke: var(--ink); stroke-width: 1.5px; }
.activity-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; font-size: 11px; color: var(--ink-3); }
.activity-foot:has(.activity-detail:empty):not(:has(.activity-legend)) { display: none; }
.activity-legend { display: inline-flex; margin: 10px 0 0 auto; align-items: center; gap: 4px; }
.activity-legend i { width: 11px; height: 11px; border-radius: 3px; }
.activity-coverage { color: var(--ink-3); font-size: 12px; }
.activity-share-dialog {
  box-sizing: border-box; width: min(620px, calc(100% - 32px)); max-height: calc(100dvh - 40px);
  margin: auto; padding: clamp(18px, 4vw, 30px); overflow: auto; overscroll-behavior: contain;
  border: 1px solid var(--line); border-radius: 24px; background: var(--surface); color: var(--ink);
  box-shadow: 0 24px 80px rgb(14 23 34 / 22%);
}
.activity-share-dialog::backdrop { background: rgb(19 24 30 / 48%); }
html:has(.activity-share-dialog[open]) { overflow: hidden; }
.activity-share-heading, .activity-share-actions { display: flex; align-items: center; gap: 10px; }
.activity-share-heading { justify-content: space-between; margin-bottom: 20px; }
.activity-share-heading h2 { margin: 0; font: inherit; font-weight: 700; font-size: clamp(20px, 4vw, 26px); }
.activity-share-dialog button { font-family: inherit; cursor: pointer; }
.activity-share-close { display: grid; place-items: center; width: 38px; height: 38px; padding: 0;
  border: 0; border-radius: 50%; background: var(--bg-soft); color: var(--ink-2); font-size: 25px; line-height: 1; }
.activity-share-close:hover { color: var(--ink); background: var(--line); }
.activity-share-preview { border-radius: 15px; overflow: hidden; }
.activity-share-preview > svg { width: 100%; height: auto; display: block; }
.activity-share-actions { justify-content: flex-end; margin-top: 22px; }
.activity-share-actions button { min-height: 44px; padding: 9px 20px; border: 1px solid var(--line-strong);
  border-radius: 999px; font-size: 14px; font-weight: 600; }
.activity-share-copy { background: var(--surface); color: var(--ink); }
.activity-share-copy:hover { background: var(--bg-soft); }
.activity-share-actions .activity-share-save { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
.activity-share-save:hover { opacity: .87; }
.activity-share-save:disabled { opacity: .6; cursor: progress; }
.activity-share-note { margin: 10px 0 0; font-size: 13px; color: var(--ink-2); }
.activity-share-note:empty { margin: 0; }
.activity-share-manual { width: 100%; box-sizing: border-box; min-height: 100px; margin-top: 8px;
  padding: 10px; background: var(--bg-soft); color: var(--ink); border: 1px solid var(--line-strong); border-radius: 8px; }
@media (prefers-reduced-motion: no-preference) {
  .activity-share-dialog[open] { animation: activity-share-enter .16s ease-out; }
  @keyframes activity-share-enter { from { opacity: 0; transform: translateY(7px); } }
}
@media (max-width: 520px) {
  .activity-share-dialog { width: calc(100% - 20px); padding: 16px; border-radius: 20px; }
  .activity-share-actions button { flex: 1; }
}
@media (max-width: 520px) {
  .activity-head { gap: 8px; }
  .activity-head .activity-tabs { margin-left: auto; }
  .activity-tabs button { padding: 5px 9px; }
  .activity-stats { gap: 8px 16px; }
}
