.member-view-activity {
  --ledger-ink: #211813;
  --ledger-roast: #3f2b22;
  --ledger-caramel: #d49a5b;
  --ledger-cream: #fffaf2;
  --ledger-paper: #f7f0e6;
  --ledger-cement: #d8d0c8;
  --ledger-muted: #6c625c;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}

.member-view-activity > * { min-width: 0; }
.points-ledger-section .editorial-section-heading { flex-wrap: wrap; gap: 8px; }

.member-view-activity .secondary-header {
  margin-bottom: -4px;
}

.points-overview {
  position: relative;
  overflow: hidden;
  padding: 23px 20px 18px;
  border: 1px solid rgb(255 255 255 / 10%);
  border-radius: 26px;
  background: var(--ledger-ink);
  color: var(--ledger-cream);
  box-shadow: 0 16px 38px rgb(39 25 18 / 18%);
}

.points-overview::after {
  position: absolute;
  right: -38px;
  top: -50px;
  width: 132px;
  height: 132px;
  border: 1px solid rgb(255 255 255 / 13%);
  border-radius: 50%;
  content: "";
}

.points-overview-mark {
  position: absolute;
  right: 34px;
  top: 26px;
  width: 20px;
  height: 20px;
  background: var(--ledger-caramel);
  clip-path: polygon(50% 0, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0 50%, 39% 39%);
}

.points-overview .eyebrow {
  margin: 0 0 8px;
  color: #d9b88f;
}

.points-balance {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.points-balance h2 {
  margin: 0;
  color: var(--ledger-cream);
  font-size: clamp(2.35rem, 12vw, 2.9rem);
  font-weight: 760;
  line-height: 1;
}

.points-balance span {
  font-size: 0.875rem;
  font-weight: 700;
}

.points-overview > p:not(.eyebrow) {
  max-width: 29ch;
  margin: 10px 0 19px;
  color: #d8d0ca;
  font-size: 0.75rem;
  line-height: 1.55;
  text-wrap: pretty;
}

.points-flow {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 5rem), 1fr));
  row-gap: 12px;
  margin: 0;
  padding-top: 15px;
  border-top: 1px solid rgb(255 255 255 / 13%);
}

.points-flow div {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 0 10px;
  border-left: 1px solid rgb(255 255 255 / 12%);
}

.points-flow div:first-child {
  padding-left: 0;
  border-left: 0;
}

.points-flow dt {
  color: #bdb3ad;
  font-size: 0.6875rem;
}

.points-flow dd {
  margin: 0;
  color: var(--ledger-cream);
  font-size: 0.9375rem;
  font-weight: 750;
}

.points-ledger-section {
  container: points-ledger / inline-size;
  gap: 14px;
  padding: 18px 0 0;
  border-top: 1px solid rgb(63 43 34 / 10%);
}

.points-ledger-section .editorial-section-heading {
  padding: 0 2px;
}

.points-ledger-section .editorial-section-heading h2 {
  max-width: 18ch;
  font-size: 1.35rem;
  line-height: 1.12;
  text-wrap: balance;
}

.points-ledger-count {
  min-height: 18px;
  margin: 0;
  color: var(--ledger-muted);
  font-size: 0.6875rem;
  text-align: right;
}

.points-search { display: grid; gap: 8px; min-width: 0; }
.points-search label { color: var(--ledger-ink); font-size: 1rem; font-weight: 650; }
.points-search-field { display: flex; align-items: center; gap: 8px; min-width: 0; min-height: 48px; padding-inline: 12px 2px; border: 1px solid var(--ledger-muted); border-radius: 14px; background: var(--ledger-paper); color: var(--ledger-roast); }
.points-search-field > span { display: flex; flex: 0 0 auto; }
.points-search-field input { flex: 1 1 0; width: 0; min-width: 0; min-height: 48px; padding: 8px 0; border: 0; border-radius: 0; background: transparent; color: var(--ledger-ink); font: inherit; font-size: 1rem; }
.points-search-field input:focus-visible { outline: none; }
.points-search-field input::-webkit-search-cancel-button { display: none; }
.points-search-field input::placeholder { color: var(--ledger-muted); opacity: 1; }
.points-search-field button { display: grid; place-items: center; flex: 0 0 44px; width: 44px; min-height: 44px; padding: 0; border: 0; border-radius: 12px; background: transparent; color: inherit; }
.points-search-field button[hidden] { display: none; }
.points-search-field:focus-within { outline: 2px solid var(--ledger-roast); outline-offset: 3px; }
[data-activity-empty-copy] { overflow-wrap: anywhere; }
.points-search > p { margin: 0; color: var(--ledger-muted); font-size: 0.75rem; line-height: 1.5; text-wrap: pretty; }

.points-filter-rail {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding: 1px 2px 4px;
  scrollbar-width: none;
}

.points-filter-rail::-webkit-scrollbar {
  display: none;
}

.points-filter-rail .filter-chip {
  flex: 0 0 auto;
  min-height: 44px;
  padding-inline: 17px;
  border-color: rgb(63 43 34 / 14%);
  background: var(--ledger-paper);
  color: var(--ledger-roast);
}

.points-filter-rail .filter-chip[aria-pressed="true"] {
  border-color: var(--ledger-ink);
  background: var(--ledger-ink);
  color: var(--ledger-cream);
}

.points-ledger {
  display: grid;
  gap: 17px;
}

.points-day-group {
  display: grid;
  gap: 8px;
}

.points-day-group > h3 {
  margin: 0;
  padding: 0 3px;
  color: var(--ledger-muted);
  font-size: 0.75rem;
  font-weight: 700;
}

.points-day-group ol {
  overflow: hidden;
  margin: 0;
  padding: 0;
  border: 1px solid rgb(63 43 34 / 10%);
  border-radius: 22px;
  background: var(--ledger-cream);
  box-shadow: 0 8px 24px rgb(66 45 34 / 7%);
  list-style: none;
}

.points-day-group li + li {
  border-top: 1px solid rgb(63 43 34 / 9%);
}

.points-ledger-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto 18px;
  width: 100%;
  min-height: 82px;
  align-items: center;
  gap: 10px;
  padding: 12px 12px;
  border: 0;
  background: transparent;
  color: var(--ledger-ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.points-ledger-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 14px;
  background: #f1dfca;
  color: #694522;
}

.points-ledger-icon.out {
  background: #e9e4df;
  color: #483c36;
}

.points-ledger-icon.pending,
.points-ledger-icon.neutral {
  border: 1px solid #d8ccc1;
  background: #fffaf2;
  color: #665b54;
}

.points-ledger-copy {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.points-ledger-copy strong {
  overflow: hidden;
  font-size: 0.875rem;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.points-ledger-copy small {
  overflow: hidden;
  color: var(--ledger-muted);
  font-size: 0.6875rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.points-ledger-copy em {
  width: max-content;
  color: #6d5542;
  font-size: 0.6875rem;
  font-style: normal;
  font-weight: 700;
}

.points-ledger-amount {
  display: grid;
  justify-items: end;
  gap: 2px;
  white-space: nowrap;
}

.member-view-activity .tabular,
.points-detail-dialog .tabular {
  font-variant-numeric: tabular-nums;
}

.points-ledger-amount strong {
  font-size: 0.9375rem;
}

.points-ledger-amount.in strong {
  color: #765026;
}

.points-ledger-amount small {
  color: var(--ledger-muted);
  font-size: 0.625rem;
}

.points-ledger-chevron {
  display: grid;
  color: #9f948d;
}

@container points-ledger (max-width: 16rem) {
  .points-ledger-row { grid-template-columns: 42px minmax(0, 1fr) 18px; }
  .points-ledger-icon { grid-column: 1; grid-row: 1; }
  .points-ledger-copy { grid-column: 2; grid-row: 1; }
  .points-ledger-amount { grid-column: 2; grid-row: 2; justify-items: start; }
  .points-ledger-chevron { grid-column: 3; grid-row: 1; }
  .points-ledger-copy strong, .points-ledger-copy small { white-space: normal; overflow-wrap: anywhere; overflow: visible; }
  .points-ledger-copy em { width: auto; overflow-wrap: anywhere; }
}

.points-ledger-empty {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 28px 20px;
  border: 1px dashed #cfc3b8;
  border-radius: 22px;
  color: var(--ledger-roast);
  text-align: center;
}

.points-ledger-empty[hidden] {
  display: none;
}

.points-ledger-empty > span {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 16px;
  background: #f1dfca;
}

.points-ledger-empty h3,
.points-ledger-empty p {
  margin: 0;
}

.points-ledger-empty p {
  max-width: 28ch;
  color: var(--ledger-muted);
  font-size: 0.8125rem;
  line-height: 1.5;
}

.points-detail-dialog {
  width: min(100%, 430px);
  max-width: none;
  margin: auto auto 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ledger-ink, #211813);
}

.points-detail-dialog::backdrop {
  background: rgb(24 17 14 / 76%);
}

.points-detail-panel {
  position: relative;
  max-height: 92dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 22px 18px calc(18px + env(safe-area-inset-bottom));
  border: 1px solid rgb(63 43 34 / 16%);
  border-radius: 30px 30px 0 0;
  background: #fffaf2;
  box-shadow: 0 -22px 62px rgb(25 17 13 / 29%);
}

.points-detail-handle {
  width: 38px;
  height: 4px;
  margin: -11px auto 20px;
  border-radius: 999px;
  background: #d7cec7;
}

.points-detail-close {
  position: absolute;
  right: 16px;
  top: 18px;
  min-width: 44px;
  min-height: 44px;
}

.points-detail-heading {
  position: relative;
  min-height: 96px;
  margin: 0 50px 15px 0;
  padding-left: 18px;
  border-left: 2px solid #c26935;
}

.points-detail-mark {
  position: absolute;
  top: -2px;
  right: -30px;
  color: #71953f;
  font-size: 1.15rem;
}

.points-detail-heading .eyebrow {
  margin: 0 0 5px;
  color: #765026;
}

.points-detail-heading h2 {
  max-width: 16ch;
  margin: 0;
  font-size: clamp(1.45rem, 7vw, 1.8rem);
  line-height: 1.08;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.points-detail-heading > p:last-child {
  max-width: 29ch;
  margin: 8px 0 0;
  color: var(--ledger-muted, #6c625c);
  font-size: 0.72rem;
  line-height: 1.45;
}

.points-detail-amount {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 3px 12px;
  padding: 17px 18px;
  border: 1px solid rgb(63 43 34 / 12%);
  border-radius: 19px;
  background: #f2eadf;
}

.points-detail-dialog[data-detail-direction="in"] .points-detail-amount {
  background: #dff3b6;
}

.points-detail-dialog[data-detail-direction="out"] .points-detail-amount {
  background: #f4d0b9;
}

.points-detail-dialog[data-detail-direction="pending"] .points-detail-amount {
  background: #e8e4de;
}

.points-detail-amount strong {
  grid-row: 1 / span 2;
  grid-column: 2;
  font-size: clamp(2rem, 10vw, 2.65rem);
  line-height: 0.94;
  letter-spacing: -0.06em;
}

.points-detail-amount span {
  color: #4e4037;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.points-detail-amount small {
  color: #5f544d;
  font-size: 0.68rem;
  font-weight: 650;
}

.points-detail-note {
  margin: 12px 3px 17px;
  color: #574b44;
  font-size: 0.78rem;
  line-height: 1.5;
  text-wrap: pretty;
}

.points-detail-journey {
  display: grid;
  gap: 0;
  margin: 0 0 14px;
  padding: 0;
  list-style: none;
}

.points-detail-journey li {
  position: relative;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 12px;
  min-height: 54px;
}

.points-detail-journey li:not(:last-child)::after {
  position: absolute;
  top: 17px;
  bottom: -1px;
  left: 7px;
  width: 1px;
  background: #cfc4b9;
  content: "";
}

.points-detail-journey i {
  position: relative;
  z-index: 1;
  width: 15px;
  height: 15px;
  margin-top: 2px;
  border: 3px solid #fffaf2;
  border-radius: 50%;
  background: #1f1916;
  box-shadow: 0 0 0 1px #1f1916;
}

.points-detail-journey li[data-step-state="current"] i {
  background: #d9fa78;
  box-shadow: 0 0 0 1px #5c742f, 0 0 0 5px rgb(217 250 120 / 32%);
}

.points-detail-journey li[data-step-state="waiting"] i {
  background: #fffaf2;
  box-shadow: 0 0 0 1px #8c817a;
}

.points-detail-journey span {
  display: grid;
  align-content: start;
  gap: 2px;
  padding-bottom: 13px;
}

.points-detail-journey strong {
  font-size: 0.78rem;
  line-height: 1.25;
}

.points-detail-journey small {
  color: var(--ledger-muted, #6c625c);
  font-size: 0.7rem;
  line-height: 1.4;
}

.points-detail-list {
  display: grid;
  gap: 0;
  margin: 0 0 12px;
  padding: 4px 13px;
  border: 1px solid rgb(63 43 34 / 10%);
  border-radius: 16px;
  background: rgb(255 255 255 / 44%);
}

.points-detail-list div {
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid rgb(63 43 34 / 9%);
}

.points-detail-list dt {
  color: var(--ledger-muted, #6c625c);
  font-size: 0.75rem;
}

.points-detail-list dd {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 700;
  text-align: right;
}

.points-detail-support {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 12px;
  align-items: center;
  margin: 0 0 12px;
  padding: 12px 13px;
  border: 1px dashed #a49385;
  border-radius: 16px;
}

.points-detail-support > span {
  display: grid;
  gap: 3px;
}

.points-detail-support small {
  color: var(--ledger-muted, #6c625c);
  font-size: 0.68rem;
}

.points-detail-support strong {
  font-size: 0.76rem;
  letter-spacing: 0.04em;
}

.points-detail-support .button {
  min-width: 102px;
  min-height: 44px;
  padding: 0 14px;
  font-size: 0.72rem;
}

.points-detail-support p {
  grid-column: 1 / -1;
  min-height: 0;
  margin: 0;
  color: #4d6330;
  font-size: 0.7rem;
  font-weight: 700;
}

.points-detail-support p:empty {
  display: none;
}

.points-detail-demo {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 2px 13px;
  color: var(--ledger-muted, #6c625c);
  font-size: 0.6875rem;
  line-height: 1.45;
}

.points-detail-demo > span {
  flex: 0 0 auto;
  padding: 4px 7px;
  border: 1px solid currentColor;
  border-radius: 999px;
  color: #6f432c;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.points-detail-finish {
  min-height: 48px;
}

@media (max-width: 350px) {
  .points-overview {
    padding-inline: 17px;
  }

  .points-ledger-row {
    grid-template-columns: 38px minmax(0, 1fr) auto 16px;
    gap: 7px;
    padding-inline: 9px;
  }

  .points-ledger-icon {
    width: 38px;
    height: 38px;
  }

  .points-flow div {
    padding-inline: 7px;
  }

  .points-detail-panel {
    padding-inline: 14px;
  }

  .points-detail-heading {
    padding-left: 13px;
  }

  .points-detail-list div {
    align-items: start;
    flex-direction: column;
    gap: 3px;
    padding-block: 9px;
  }

  .points-detail-list dd {
    max-width: 100%;
    text-align: left;
    overflow-wrap: anywhere;
  }

  .points-detail-support {
    grid-template-columns: 1fr;
  }

  .points-detail-support .button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .points-ledger-row,
  .points-detail-panel {
    transition: none !important;
  }

}

@media (forced-colors: active) {
  .points-overview,
  .points-day-group ol,
  .points-ledger-icon,
  .points-detail-panel,
  .points-detail-amount,
  .points-detail-list,
  .points-detail-support {
    border: 1px solid CanvasText;
  }

  .points-detail-panel,
  .points-detail-amount,
  .points-detail-dialog[data-detail-direction] .points-detail-amount {
    background: Canvas;
    color: CanvasText;
  }

  .points-detail-journey i {
    border-color: Canvas;
    background: CanvasText;
    box-shadow: 0 0 0 1px CanvasText;
  }
}
