html, body {
  height: 100%;
  margin: 0; padding: 0;
  background: #FDF6E3;
  color: rgba(0, 0, 0, 0.9);
  scroll-behavior: smooth;
  touch-action: manipulation;
}

body, h1, button, input {
  font: normal 13pt/1.7 Avenir,'Segoe UI',sans-serif;
}

button {
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}

button:disabled {
  opacity: 0.3;
}

ol {
  list-style: none;
  counter-reset: li;
}

ol > li {
  counter-increment: li;
}

ol > li::before {
  content: counter(li) '.';
  display: inline-block;
  width: 3em;
  text-align: right;
  margin: 0 0.5rem 0 -3.5rem;
  color: rgba(0, 0, 0, 0.4);
}

label {
  text-align: left;
  display: inline-block;
}

label > input {
  display: block;
}

.View {
  box-sizing: border-box;
  padding: 0 0.5rem;
  text-align: center;
  display: none;
}

.View.visible {
  display: block;
  min-height: 100%;
}

.View > header, .View > footer {
  display: flex;
  position: fixed;
  left: 0; right: 0;
  height: 3rem;
  white-space: nowrap;
}

.View > header {
  top: 0;
  background: linear-gradient(#FDF6E3, #FDF6E3, #FDF6E300);
}

.View > footer {
  bottom: 0;
  background: linear-gradient(#FDF6E300, #FDF6E3, #FDF6E3);
}

.View > header > h1 {
  margin: 0;
  flex-grow: 1;
  font-weight: bold;
  line-height: 3rem;
  letter-spacing: -0.03em;
}

button:not(.PrimaryButton) {
  display: inline-block;
  background: none;
  padding: 0 0.5em;
  border: none;
  color: #914CCE;
  border-radius: 0;
  -webkit-appearance: none;
}

.View > main {
  padding: 3rem 0;
}

.View > main h1 {
  font-size: 120%;
}

.View > main table {
  margin: 0 auto;
  font-size: 80%;
  line-height: 1.3;
  border-collapse: collapse;
}

.View > main td, .View > main th {
  vertical-align: middle;
}

.View > main td:not(:last-child),
.View > main th:not(:last-child) {
  padding-right: 0.7em;
}

.View > main .borderTop:not(:first-child) td {
  border-top: solid 1px rgba(0, 0, 0, 0.4);
}

.NavToPrev::before {
  content: '‹';
  margin-right: 0.3rem;
}

.NavToNext::after {
  content: '›';
  margin-left: 0.3rem;
}

.Grow {
  flex-grow: 1;
}

.OccurrenceList {
  display: inline-block;
  text-align: left;
  padding: 0;
}

.OccurrenceList:empty::before {
  content: '(no occurrences)';
  color: rgba(0, 0, 0, 0.4);
}

.OccurrenceList > li {
  cursor: pointer; /* this is necessary for iOS to bubble the click-event: see http://gravitydept.com/blog/js-click-event-bubbling-on-ios */
}

.OccurrenceList.added > li:last-child {
  font-weight: bold;
}

.PrimaryButton {
  padding: 0 1rem;
  margin: 0.25rem;
  border: solid 2px #390965;
  color: #FFF;
  background: #914CCE;
  -webkit-appearance: none;
}

.PrimaryButton:active {
  background: #4C038E;
  color: #DDC8F0;
  transform: translateY(2px);
}

.CountTable {
  max-width: 50em;
  text-align: right;
}

.CountTable th {
  font-weight: normal;
  border-bottom: solid 1px rgba(0, 0, 0, 0.4);
}

.CountTable td:not(:last-child) {
  white-space: nowrap;
}

.CountTable th:last-child {
  text-align: center;
}

.CountTable td:last-child {
  text-align: left;
  width: 100%;
}

.Bar {
  display: inline-block;
  background: #914CCE;
  min-width: 0.1em;
  height: 0.7em;
}

.Bar.light {
  background: #914CCE80;
}

#periodStats .Bar {
  min-width: 0.1em;
}

#dataTextArea {
  background: none;
  border: none;
  width: 100%;
  height: 85vh;
}