.page-totality-time [hidden] { display: none !important; }
.totality-controls { padding: 0; margin: 0; border: 0; min-width: 0; }
.totality-controls .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.totality-workspace { min-height: 0; }
.totality-choices { max-height: 380px; overflow-y: auto; scrollbar-gutter: stable; }
.totality-choice { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.5rem; align-items: center; border-bottom: 1px solid var(--border); padding: 0.4rem 0.35rem; min-height: 60px; }
.totality-choice.is-active { background: rgba(250, 204, 21, 0.07); box-shadow: inset 2px 0 var(--today); }
.totality-choice label { display: flex; align-items: center; gap: 0.65rem; min-width: 0; min-height: 44px; cursor: pointer; }
.totality-choice input { width: 18px; height: 18px; flex: 0 0 18px; accent-color: var(--today); }
.totality-choice-copy { display: grid; gap: 0.15rem; min-width: 0; }
.totality-choice-copy strong { font-size: 0.85rem; color: var(--text); }
.totality-choice-copy small { font-size: 0.7rem; color: var(--muted); }
.totality-choice .btn { min-height: 40px; font-size: 0.72rem; }
.totality-choice-footer { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; margin: 0.65rem 0; min-height: 36px; }
#selectionCount, #locationProgress { font-size: 0.72rem; color: var(--muted); }
.totality-location-editor { border-top: 1px solid var(--border); padding-top: 1rem; margin-top: 0.75rem; scroll-margin-top: 4.5rem; }
.totality-search-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.5rem; align-items: end; }
.totality-search-form .totality-field, .totality-coordinate-fields .totality-field { grid-column: auto; }
.totality-search-form .input-control, .totality-coordinate-fields .input-control { font-size: 16px; min-height: 42px; }
.totality-search-form .btn { min-height: 42px; }
.totality-search-credit { font-size: 0.65rem; color: var(--muted); margin: 0.3rem 0 0.7rem; }
.totality-search-credit a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.totality-location-results { list-style: none; padding: 0; margin: 0.3rem 0; max-height: 260px; overflow-y: auto; border: 1px solid var(--border); border-radius: 6px; }
.totality-location-results li + li { border-top: 1px solid var(--border); }
.totality-location-results button { display: grid; width: 100%; gap: 0.2rem; padding: 0.7rem; text-align: left; background: transparent; color: var(--text); border: 0; cursor: pointer; font: inherit; overflow-wrap: anywhere; }
.totality-location-results button:hover, .totality-location-results button:focus-visible { background: rgba(255,255,255,0.07); }
.totality-location-results strong { font-size: 0.8rem; }
.totality-location-results span { font-size: 0.72rem; color: var(--muted); line-height: 1.4; }
.totality-chosen-location { padding: 0.55rem 0; display: grid; gap: 0.3rem; overflow-wrap: anywhere; }
.totality-chosen-location strong { font-size: 0.8rem; color: #86efac; }
.totality-chosen-location span { font-size: 0.72rem; color: var(--muted-strong); }
.totality-location-tools { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.5rem 0; }
.totality-location-tools .btn { min-height: 40px; }
.totality-coordinate-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0.6rem; margin: 0.75rem 0; }
.totality-location-editor .totality-add-button { margin: 0.75rem 0; min-height: 44px; }
.totality-capture > .totality-entry-status:empty, #searchStatus:empty, #mapStatus:empty { min-height: 0; }
.totality-map-shell { height: 360px; }
.page-totality-time button:focus-visible, .page-totality-time input:focus-visible { outline: 2px solid var(--today); outline-offset: 2px; }
.totality-log-main:disabled, .totality-log-remove:disabled { opacity: 0.5; cursor: wait; }
.totality-continent-field { max-width: 320px; margin-top: 0.75rem; }
.totality-continent-field select { font-size: 16px; min-height: 40px; }
.totality-badge-preview { aspect-ratio: auto; min-height: 320px; gap: 1.15rem; padding: 1rem; scroll-margin-top: 4.5rem; }
.totality-badge-preview::after { top: 66px; width: 64px; right: 22px; pointer-events: none; }
.totality-badge-body { min-height: 88px; justify-content: center; }
.totality-badge-body strong { max-width: 100%; }
.totality-badge-body > span { position: relative; z-index: 1; }
.totality-badge-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.5rem; }
.totality-badge-stats > div { display: grid; gap: 0.15rem; min-width: 0; }
.totality-badge-stats strong { font-size: 1.4rem; font-variant-numeric: tabular-nums; }
.totality-badge-stats > div:first-child strong { color: var(--today); }
.totality-badge-stats span { color: var(--muted-strong); font-size: 0.65rem; text-transform: uppercase; }
.totality-badge-record { border-top: 1px solid var(--border); padding-top: 0.85rem; }
#badgeEntries { list-style: none; margin: 0.75rem 0 0; padding: 0; display: grid; gap: 0.8rem; max-height: 260px; overflow-y: auto; scrollbar-width: thin; }
#badgeEntries:empty { margin-top: 0; }
#badgeEntries li { display: grid; gap: 0.2rem; min-width: 0; }
.totality-badge-row-head { display: flex; justify-content: space-between; gap: 0.5rem; font-size: 0.76rem; }
.totality-badge-row-head strong { flex-shrink: 0; color: #fef08a; font-variant-numeric: tabular-nums; }
#badgeEntries li > span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.7rem; color: var(--muted-strong); }
#badgeGeographyNote { margin: 0.75rem 0 0; font-size: 0.65rem; line-height: 1.4; color: var(--muted); }
#retryBadgeRegions { align-self: flex-start; }
#reviewBadgeRegions { align-self: flex-start; }
@media (min-width: 641px) and (max-width: 900px) {
  .totality-ledger { grid-template-areas: 'name loghead' 'badge log' 'actions log' 'status privacy' 'review privacy' 'retry privacy'; }
  .totality-badge-name { grid-area: name; }
  .totality-badge-preview { grid-area: badge; }
  .totality-badge-actions { grid-area: actions; }
  .totality-ledger > .totality-entry-status { grid-area: status; }
  .totality-log-header { grid-area: loghead; }
  .totality-log { grid-area: log; max-height: 300px; overflow-y: auto; }
  .totality-privacy-note { grid-area: privacy; }
  #retryBadgeRegions { grid-area: retry; }
  #reviewBadgeRegions { grid-area: review; }
}
@media (max-width: 640px) {
  .totality-page-heading { flex-wrap: wrap; gap: 0.55rem; }
  .totality-page-heading > div:first-child { min-width: 0; flex: 1 1 100%; }
  .totality-running-chip { display: flex; align-items: baseline; gap: 0.6rem; text-align: left; }
  .totality-ledger { align-items: stretch; }
  .totality-choice { padding-inline: 0.25rem; }
  .totality-choice label { gap: 0.5rem; }
  .totality-choices { max-height: 330px; }
  .totality-location-editor .totality-add-button { width: 100%; }
  .totality-map-shell { height: 320px; }
}
