/* Compact, mobile-first Tally Book */

.tally-page .layout {
  max-width: min(1120px, 100%);
}

.tally-page .main-area {
  width: 100%;
  align-items: flex-start;
  justify-content: center;
}

.tally-app {
  width: min(100%, 42rem);
  min-height: 100vh;
  margin: 0 auto;
  padding: 3.25rem 1rem 7rem;
}

.tally-intro {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-md);
  margin: 0 0 var(--space-md);
  padding: 0 0.2rem;
}

.tally-intro-copy {
  min-width: 0;
  flex: 1 1 auto;
}

.tally-intro-actions {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.tally-kicker {
  margin: 0 0 var(--space-xs);
  color: var(--highlight);
  font-size: var(--type-label-size);
  font-weight: 600;
  letter-spacing: var(--type-label-tracking, 0.08em);
  text-transform: uppercase;
}

.tally-heading {
  margin: 0;
  color: var(--text);
  font-size: clamp(var(--type-title-size), 4vw, var(--type-display-size));
  font-weight: 400;
  letter-spacing: var(--type-display-tracking);
  line-height: var(--type-display-lh);
  max-width: 18ch;
}

.tally-heading-short {
  display: none;
}

.tally-quick {
  display: none;
}

.tally-topbar,
.tally-period-switcher,
.tally-records-head,
.tally-budget-row,
.tally-sheet-head {
  display: flex;
  align-items: center;
}

.tally-topbar {
  position: relative;
  z-index: 2;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.tally-view-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-xs);
  margin: 0 0 var(--space-md);
  padding: var(--space-xs);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-pill);
  background: var(--glass);
}

.tally-view-switch button {
  min-height: 2.5rem;
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font: inherit;
  font-size: var(--type-label-size);
}

.tally-view-switch button.is-active {
  background: var(--accent-soft);
  color: var(--text);
  font-weight: 600;
}

.tally-period-switcher {
  gap: 0.2rem;
  padding: 0.28rem;
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  background: var(--glass-strong);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.tally-nav-btn,
.tally-period-btn,
.tally-icon-btn,
.tally-sheet-close {
  border: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font: inherit;
}

.tally-nav-btn {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  font-size: 1.2rem;
  line-height: 1;
}

.tally-nav-btn:hover,
.tally-icon-btn:hover,
.tally-sheet-close:hover {
  background: var(--surface-hover);
}

.tally-period-btn {
  min-width: 7.6rem;
  padding: 0.42rem 0.65rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 760;
}

.tally-topbar-actions {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}
  border: 1px solid var(--glass-border);
  border-radius: 50%;
  background: var(--glass-strong);
  box-shadow: var(--shadow-soft);
  font-size: 1rem;
}

.tally-settings {
  display: grid;
  gap: 0.7rem;
  margin: -0.25rem 0 1rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  background: var(--glass-strong);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.tally-settings[hidden],
.tally-sheet[hidden] {
  display: none !important;
}

.tally-budget-row {
  justify-content: space-between;
  gap: 1rem;
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 680;
}

.tally-budget-input,
.tally-currency-input {
  width: 8rem;
  padding: 0.45rem 0.7rem;
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  background: var(--glass);
  color: var(--text);
  font: inherit;
  text-align: right;
}

.tally-currency-input {
  font-weight: 760;
}

.tally-people-settings {
  display: grid;
  gap: var(--space-sm);
  margin-top: var(--space-sm);
  padding-top: var(--space-md);
  border-top: 1px solid var(--border-soft);
}

.tally-people-settings strong {
  color: var(--text);
  font-size: var(--type-body-size);
}

.tally-people-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.tally-person-pill {
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-pill);
  background: var(--accent-soft);
  color: var(--accent);
  font-size: var(--type-label-size);
}

.tally-person-add {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--space-sm);
}

.tally-person-add input {
  min-width: 0;
  padding: var(--space-sm) var(--space-md);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  background: var(--glass);
  color: var(--text);
  font: inherit;
}

.tally-progress {
  height: 0.35rem;
  overflow: hidden;
  margin-top: 0.05rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--text) 10%, transparent);
}

.tally-progress span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--tertiary);
  transition: width 0.25s ease;
}

.tally-progress span.is-over {
  background: var(--danger);
}

.tally-card-note {
  margin: 0.5rem 0 0;
  color: var(--text-muted);
  font-size: 0.75rem;
}

.tally-card-note.is-over {
  color: var(--danger);
}

.tally-overview-card {
  padding: clamp(1.25rem, 4vw, 1.7rem);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  background: var(--glass-strong);
  box-shadow: var(--shadow-pop);
  backdrop-filter: blur(18px) saturate(1.04);
  -webkit-backdrop-filter: blur(18px) saturate(1.04);
}

.tally-settlement {
  display: grid;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
  padding: var(--space-md);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  background: var(--glass-strong);
  box-shadow: var(--shadow-soft);
}

.tally-settlement[hidden] {
  display: none;
}

.tally-settlement-head,
.tally-balance-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
}

.tally-settlement-head h2 {
  margin: var(--space-xs) 0 0;
  color: var(--text);
  font-size: var(--type-title-size);
  font-weight: 400;
}

.tally-settlement-head > span {
  color: var(--text);
  font-weight: 600;
}

.tally-balance-list,
.tally-settlement-list {
  display: grid;
  gap: var(--space-sm);
}

.tally-balance-row {
  min-height: 2.75rem;
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--accent-soft) 70%, transparent);
  color: var(--text);
}

.tally-balance-row strong {
  color: var(--success);
  font-size: var(--type-label-size);
}

.tally-balance-row strong.is-negative {
  color: var(--danger);
}

.tally-settlement-list {
  padding-top: var(--space-md);
  border-top: 1px solid var(--border-soft);
}

.tally-settlement-list p {
  margin: 0;
  color: var(--text-muted);
  font-size: var(--type-label-size);
}

.tally-settlement-list .tally-settlement-kicker {
  color: var(--highlight);
  font-weight: 600;
  letter-spacing: var(--type-label-tracking);
  text-transform: uppercase;
}

.tally-overview-label {
  margin: 0;
  color: var(--highlight);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: var(--type-label-tracking);
  text-transform: uppercase;
  text-shadow: none;
}

.tally-today-strip {
  margin-bottom: 0.85rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-soft);
}

.tally-today-total {
  display: block;
  margin-top: var(--space-xs);
  color: var(--text);
  font-size: clamp(var(--type-title-size), 5.5vw, var(--type-display-size));
  line-height: var(--type-display-lh);
  letter-spacing: var(--type-display-tracking);
}

.tally-week-total {
  display: block;
  margin-top: 0.2rem;
  color: var(--text);
  font-size: clamp(2.25rem, 8vw, 3.35rem);
  line-height: 1;
  letter-spacing: -0.055em;
}

.tally-meta {
  margin: 0.5rem 0 0;
  color: var(--text-muted);
  font-size: 0.72rem;
}

.tally-bars {
  height: 13rem;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: clamp(0.35rem, 2vw, 0.8rem);
  margin-top: 1.2rem;
  padding-top: 0.5rem;
  border-top: 1px solid color-mix(in srgb, var(--text) 9%, transparent);
  background-image: linear-gradient(
    to bottom,
    transparent 32%,
    color-mix(in srgb, var(--text) 8%, transparent) 32%,
    color-mix(in srgb, var(--text) 8%, transparent) calc(32% + 1px),
    transparent calc(32% + 1px),
    transparent 65%,
    color-mix(in srgb, var(--text) 8%, transparent) 65%,
    color-mix(in srgb, var(--text) 8%, transparent) calc(65% + 1px),
    transparent calc(65% + 1px)
  );
}

.tally-bars[hidden] {
  display: none;
}

.tally-week-empty {
  margin-top: 1.1rem;
  padding: var(--space-md);
  border: 1px dashed color-mix(in srgb, var(--tertiary) 45%, var(--glass-border));
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--tertiary) 8%, var(--glass));
}

.tally-week-empty[hidden] {
  display: none;
}

.tally-week-empty-kicker,
.tally-empty-kicker {
  margin: 0 0 var(--space-xs);
  color: var(--highlight);
  font-size: var(--type-label-size);
  font-weight: 600;
  letter-spacing: var(--type-label-tracking, 0.08em);
  text-transform: uppercase;
}

.tally-week-empty-copy {
  margin: 0;
  color: var(--text-muted);
  font-size: var(--type-body-size);
  line-height: var(--type-body-lh);
}

.tally-bar {
  min-width: 0;
  display: grid;
  grid-template-rows: 1.1rem 1fr 1rem;
  gap: 0.3rem;
  color: var(--text-muted);
  text-align: center;
}

.tally-bar-value {
  overflow: hidden;
  font-size: 0.62rem;
  text-overflow: ellipsis;
}

.tally-bar-track {
  min-height: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.tally-bar-fill {
  width: min(2.15rem, 76%);
  min-height: 0;
  border-radius: 0.65rem 0.65rem 0.18rem 0.18rem;
  background: var(--tertiary);
  box-shadow: 0 6px 16px color-mix(in srgb, var(--highlight) 22%, transparent);
  transition: height 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.tally-bar:not(.has-value) .tally-bar-fill {
  opacity: 0;
}

.tally-bar-day {
  overflow: hidden;
  font-size: 0.65rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tally-transactions {
  margin-top: 1.5rem;
}

.tally-records-head {
  justify-content: space-between;
  gap: 1rem;
  padding: 0 0.25rem;
}

.tally-records-head h2 {
  margin: 0;
  color: var(--text);
  font-size: var(--type-title-size);
  font-weight: 400;
  letter-spacing: var(--type-title-tracking, 0.02em);
}

.tally-records-head > span {
  color: var(--text-muted);
  font-size: 0.72rem;
}

.tally-records-head b {
  color: var(--text);
}

.tally-record-list {
  list-style: none;
  display: grid;
  gap: 1.15rem;
  margin: 1rem 0 0;
  padding: 0;
}

.tally-record-group-title {
  margin: 0 0 0.45rem 0.3rem;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 680;
}

.tally-record-group-card {
  overflow: hidden;
  border: 1px solid var(--glass-border);
  border-radius: 1.35rem;
  background: var(--glass-strong);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.tally-record {
  position: relative;
  display: grid;
  grid-template-columns: 2.65rem minmax(0, 1fr) auto 1.35rem;
  gap: 0.7rem;
  align-items: center;
  min-height: 4.15rem;
  padding: 0.65rem 0.75rem;
  cursor: pointer;
  transition: background 0.15s ease;
}

.tally-record:hover,
.tally-record:focus-visible {
  background: color-mix(in srgb, var(--tertiary) 10%, transparent);
  outline: none;
}

.tally-record + .tally-record {
  border-top: 1px solid color-mix(in srgb, var(--text) 8%, transparent);
}

.tally-record-icon {
  width: 2.65rem;
  height: 2.65rem;
  display: grid;
  place-items: center;
  border-radius: 0.75rem;
  background: color-mix(in srgb, var(--text) 8%, transparent);
  color: var(--text);
  font-size: 1.15rem;
  font-weight: 780;
}

.tally-record-main {
  min-width: 0;
}

.tally-record-category {
  overflow: hidden;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 760;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tally-record-note {
  overflow: hidden;
  margin-top: 0.12rem;
  color: var(--text-muted);
  font-size: 0.72rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tally-record-amount {
  color: var(--text);
  font-size: 0.84rem;
  font-weight: 780;
  white-space: nowrap;
}

.tally-record-amount small {
  display: block;
  margin-top: var(--space-xs);
  color: var(--text-muted);
  font-size: var(--type-label-size);
  font-weight: 400;
}

.tally-record-delete {
  width: 1.35rem;
  height: 1.35rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font: inherit;
  opacity: 0;
  transition: opacity 0.15s, background 0.15s;
}

.tally-record:hover .tally-record-delete,
.tally-record-delete:focus-visible {
  opacity: 1;
}

.tally-record-delete:hover {
  background: var(--surface-hover);
}

/* Hover cannot reveal anything on touch, so the control stays visible there. */
@media (hover: none), (max-width: 819px) {
  .tally-record-delete {
    width: 2.75rem;
    height: 2.75rem;
    opacity: 1;
  }

  .tally-record {
    grid-template-columns: 2.6rem minmax(0, 1fr) auto 2.75rem;
  }
}

.tally-empty-panel {
  margin-top: var(--space-md);
  padding: var(--space-lg) var(--space-md);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  background: var(--glass-strong);
  box-shadow: var(--shadow-soft);
  text-align: center;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.tally-empty-panel[hidden] {
  display: none;
}

.tally-empty {
  margin: 0 0 var(--space-md);
  color: var(--text-muted);
  font-size: var(--type-body-size);
  line-height: var(--type-body-lh);
}

.tally-empty-cta {
  min-width: 9rem;
}

.tally-add-fab {
  position: fixed;
  right: max(1.25rem, calc((100vw - 36rem) / 2 + 1.25rem));
  bottom: 5rem;
  z-index: 255;
  width: 3.6rem;
  height: 3.6rem;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-pill);
  background: var(--tertiary);
  color: var(--on-tertiary);
  box-shadow: var(--shadow-pop);
  cursor: pointer;
  font: inherit;
  font-size: 2rem;
  font-weight: 350;
  line-height: 1;
  transition: transform 0.16s ease, background 0.15s ease;
}

.tally-add-fab:hover {
  background: var(--tertiary-hover);
  color: var(--on-tertiary);
  transform: translateY(-2px) scale(1.03);
}

.tally-sheet {
  position: fixed;
  inset: 0;
  z-index: 310;
  display: grid;
  place-items: end center;
}

.tally-sheet-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: color-mix(in srgb, var(--primary) 42%, transparent);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.tally-sheet-panel {
  position: relative;
  z-index: 1;
  width: min(100% - 1.25rem, 32rem);
  max-height: min(90vh, 46rem);
  overflow-y: auto;
  margin-bottom: max(0.65rem, env(safe-area-inset-bottom));
  padding: 1.2rem;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  background: var(--glass-strong);
  box-shadow: var(--shadow-pop);
  backdrop-filter: blur(16px) saturate(1.04);
  -webkit-backdrop-filter: blur(16px) saturate(1.04);
}

.tally-sheet-head {
  justify-content: space-between;
  gap: 1rem;
}

.tally-sheet-head p {
  margin: 0;
  color: var(--highlight);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: var(--type-label-tracking);
  text-transform: uppercase;
}

.tally-sheet-head h2 {
  margin: 0.15rem 0 0;
  color: var(--text);
  font-size: 1.25rem;
}

.tally-sheet-close {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  font-size: 1.35rem;
}

.tally-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}

.tally-form label {
  display: grid;
  gap: 0.35rem;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 650;
}

.tally-form input,
.tally-form select {
  width: 100%;
  min-height: 2.8rem;
  padding: 0.68rem 0.78rem;
  border: 1px solid var(--glass-border);
  border-radius: 0.85rem;
  background: var(--glass);
  color: var(--text);
  font: inherit;
}

.tally-field-help {
  color: var(--text-muted);
  font-size: var(--type-label-size);
  font-weight: 400;
}

.tally-fx-field,
.tally-shared-fields {
  grid-column: 1 / -1;
}

.tally-shared-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-sm);
  padding: var(--space-md);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--accent-soft) 55%, transparent);
}

.tally-shared-fields[hidden],
.tally-fx-field[hidden] {
  display: none;
}

.tally-shared-fields fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.tally-shared-fields legend {
  margin-bottom: var(--space-sm);
  color: var(--text-muted);
  font-size: var(--type-label-size);
  font-weight: 600;
}

.tally-split-people {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.tally-person-check {
  position: relative;
}

.tally-person-check input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.tally-person-check span {
  display: block;
  padding: var(--space-sm) var(--space-md);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-pill);
  background: var(--glass);
  color: var(--text-muted);
  cursor: pointer;
}

.tally-person-check input:checked + span {
  background: var(--tertiary);
  color: var(--on-tertiary);
}

.tally-category-field {
  grid-column: 1 / -1;
}

.tally-category-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  margin-top: 0.15rem;
}

.tally-category-suggestions[hidden] {
  display: none;
}

.tally-category-chip {
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-pill);
  background: color-mix(in srgb, var(--tertiary) 16%, var(--glass));
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-size: var(--type-label-size);
  font-weight: 400;
  letter-spacing: 0.02em;
  padding: 0.35rem 0.7rem;
}

.tally-category-chip:hover,
.tally-category-chip:focus-visible {
  background: color-mix(in srgb, var(--tertiary) 32%, transparent);
  outline: none;
}

.tally-submit-btn {
  grid-column: 1 / -1;
  min-height: 2.9rem;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-pill);
  background: var(--tertiary);
  color: var(--on-tertiary);
  box-shadow: var(--shadow-pop);
  cursor: pointer;
  font: inherit;
  font-weight: 780;
  transition: background 0.15s ease;
}

.tally-submit-btn:hover {
  background: var(--tertiary-hover);
  color: var(--on-tertiary);
}

body.tally-sheet-open {
  overflow: hidden;
}

@media (max-width: 819px) {
  .tally-app {
    padding: calc(env(safe-area-inset-top, 0px) + var(--space-md)) var(--space-md)
      calc(env(safe-area-inset-bottom, 0px) + 6.5rem);
    max-width: 28rem;
  }

  .tally-heading-full {
    display: none;
  }

  .tally-heading-short {
    display: inline;
  }

  .tally-heading {
    font-size: var(--type-title-size);
    max-width: none;
  }

  body.tally-page .todo-agent {
    position: static;
    inset: auto;
    width: 0;
    height: 0;
    overflow: visible;
  }

  body.tally-page .todo-agent-fab-page {
    position: static;
    width: 2.65rem;
    height: 2.65rem;
    margin: 0;
    padding: 0.28rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--liquid-edge, var(--glass-border));
    background: var(--liquid-sheen, var(--glass-strong)), var(--liquid-fill, var(--glass));
    backdrop-filter: var(--liquid-blur, blur(22px) saturate(1.55));
    -webkit-backdrop-filter: var(--liquid-blur, blur(22px) saturate(1.55));
    box-shadow: var(--liquid-shadow, var(--shadow-soft));
  }

  .tally-view-switch,
  .tally-add-fab,
  #tally-export,
  .tally-overview-card > :not(.tally-today-strip) {
    display: none !important;
  }

  .tally-overview-card {
    margin: 0 0 var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    box-shadow: none;
  }

  .tally-today-total {
    font-size: var(--type-title-size);
  }

  .tally-quick {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0 0 var(--space-md);
    padding: 0.35rem 0.45rem;
    border-radius: var(--radius-md);
    background: var(--surface);
    border: 1px solid color-mix(in srgb, var(--primary) 8%, transparent);
    box-shadow: 0 10px 28px color-mix(in srgb, var(--primary) 10%, transparent);
  }

  .tally-quick-amount,
  .tally-quick-category {
    min-height: 2.6rem;
    border: 0;
    background: transparent;
    color: var(--text);
    font: inherit;
  }

  .tally-quick-amount {
    flex: 0 0 4.6rem;
    width: 4.6rem;
    min-width: 0;
  }

  .tally-quick-category {
    flex: 1 1 auto;
    min-width: 0;
  }

  .tally-quick-submit {
    flex-shrink: 0;
    min-height: 2.4rem;
    padding-inline: 0.85rem;
  }

  .tally-sheet-panel {
    margin-bottom: calc(env(safe-area-inset-bottom, 0px) + 5.5rem);
  }
}

@media (max-width: 540px) {
  .tally-app {
    padding-inline: 0.75rem;
  }

  .tally-overview-card {
    border-radius: 1.4rem;
  }

  .tally-bars {
    height: 11.5rem;
    gap: 0.3rem;
  }

  .tally-record {
    grid-template-columns: 2.4rem minmax(0, 1fr) auto 2.75rem;
    gap: 0.55rem;
    padding-inline: 0.65rem;
  }

  .tally-record-icon {
    width: 2.4rem;
    height: 2.4rem;
  }

  .tally-record-delete {
    justify-self: end;
  }

  .tally-form {
    grid-template-columns: 1fr;
  }

  .tally-person-add,
  .tally-shared-fields {
    grid-template-columns: 1fr;
  }

  .tally-fx-field,
  .tally-shared-fields {
    grid-column: auto;
  }

  .tally-submit-btn {
    grid-column: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tally-add-fab,
  .tally-progress span,
  .tally-bar-fill {
    transition: none;
  }
}
