.points-records {
  --ledger-secondary: #526075;
  --ledger-active: #0950bb;
  --ledger-rule: #e3e7ed;
  display: flex;
  flex-direction: column;
  padding-bottom: max(20px, env(safe-area-inset-bottom));
  background: #f1f3f5;
  color: #202836;
}

.points-records-summary {
  flex: none;
  background: #fff;
}

.points-records-header {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) 46px;
  align-items: center;
  min-height: calc(54px + var(--phone-status-height));
  padding-top: calc(4px + max(var(--phone-status-height), env(safe-area-inset-top)));
}

.points-records-header h1 {
  text-align: center;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.25;
}

.points-records-header h1:focus { outline: none; }

.points-records-back {
  display: grid;
  place-items: center;
  min-height: 44px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
}

.points-records-back::before {
  content: "";
  width: 12px;
  height: 12px;
  border: solid currentColor;
  border-width: 0 0 2px 2px;
  border-radius: 1px;
  rotate: 45deg;
}

.points-records-views {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: min(212px, calc(100% - 24px));
  margin: 6px auto 0;
  padding: 2px;
  border-radius: 999px;
  background: #f0f1f3;
}

.points-records-views button {
  min-height: 34px;
  padding: 0 4px;
  border: 0;
  border-radius: inherit;
  background: transparent;
  font-size: 15px;
}

.points-records-views button[aria-pressed="true"] {
  background: #fff;
  font-weight: 750;
}

.points-records-overview { margin: 8px 16px 0; }

.points-records-balance-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-height: 52px;
}

.points-records-balance-line .coin {
  flex: none;
  width: 31px;
  height: 31px;
}

.points-records-balance-line h2 {
  font-size: 14px;
  font-weight: 400;
}

#points-records-balance {
  min-width: 0;
  margin-inline-start: 2px;
  font: 600 36px/1 Arial, sans-serif;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

#points-records-gift {
  margin-top: 4px;
  color: var(--ledger-secondary);
  font-size: 12px;
}

.points-records-filters {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  min-height: 47px;
  margin-top: 7px;
}

.points-records-filters button {
  position: relative;
  padding: 0 4px;
  border: 0;
  background: transparent;
  font-size: 16px;
}

.points-records-filters button[aria-pressed="true"] {
  color: var(--ledger-active);
  font-weight: 750;
}

.points-records-filters button[aria-pressed="true"]::after {
  position: absolute;
  inset: auto calc(50% - 21px) 0;
  height: 4px;
  border-radius: 4px;
  background: var(--ledger-active);
  content: "";
}

.points-records-filters button:focus-visible { outline-offset: -3px; }

.points-records-panel {
  flex: none;
  min-width: 0;
  margin: 17px 9px 0;
  padding-inline: clamp(10px, 4.11cqw, 16px);
  border-radius: 12px;
  background: #fff;
}

.points-records-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 2px 8px;
  min-height: 51px;
  padding-block: 3px;
  border-bottom: 1px solid var(--ledger-rule);
}

#points-records-month {
  min-height: 44px;
  max-width: 100%;
  padding: 0 2px 0 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #545e6e;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}

.points-records-totals {
  margin-inline-start: auto;
  font-size: clamp(11px, 3.34cqw, 13px);
  line-height: 1.3;
  text-align: end;
  overflow-wrap: anywhere;
}

.points-record-copy h3,
#points-records-income { color: #30343a; }

#points-records-expense,
.points-record[data-direction="expense"] .points-record-change strong {
  color: var(--price-emphasis);
}

.points-record-group > h2 {
  padding: 8px 0;
  border-bottom: 1px solid var(--ledger-rule);
  color: var(--ledger-secondary);
  font-size: 12px;
  font-weight: 650;
}

.points-record-group + .points-record-group {
  border-top: 1px solid var(--ledger-rule);
}

.points-records-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.points-record {
  display: grid;
  grid-template-columns: minmax(0, 1fr) fit-content(43%);
  align-items: start;
  gap: 10px;
  min-height: 64px;
  padding: 13px 0;
  border-bottom: 1px solid var(--ledger-rule);
}

.points-record:last-child { border-bottom: 0; }

.points-record-copy {
  display: grid;
  gap: 3px;
  overflow-wrap: anywhere;
}

.points-record-copy h3 {
  font-size: clamp(14px, 3.85cqw, 15px);
  font-weight: 700;
  line-height: 1.3;
}

.points-record-detail, .points-record-date {
  color: var(--ledger-secondary);
  font-size: 12px;
  line-height: 1.35;
}

.points-record-date { font-variant-numeric: tabular-nums; }

.points-record-change {
  padding-top: 3px;
  font: 750 clamp(16px, 4.88cqw, 19px)/1.35 Arial, sans-serif;
  font-variant-numeric: tabular-nums;
  text-align: end;
  overflow-wrap: anywhere;
}

.points-record-change strong { font-weight: inherit; }

.points-records-empty {
  padding: 38px 12px;
  text-align: center;
  color: var(--ledger-secondary);
  font-size: 13px;
}
