* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  border: none;
  color: white;
  font-family: sans-serif;
}

html,
body {
  background: dimgrey;
}

body {
  min-height: 100vh;
  padding: 16px 14px 24px;
  text-align: center;
}

.screen {
  width: 100%;
  max-width: 390px;
  margin: auto;
}

.hidden {
  display: none;
}

h2 {
  margin-bottom: 10px;
  font-size: 20px;
}

.panel {
  padding: 6px 0;
  margin-top: 14px;
}

.wallets {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.wallet-card {
  border: 1px solid white;
  border-radius: 10px;
  padding: 14px 10px;
}

.wallet-card.oett {
  border: 3px solid #d33;
}

.wallet-card.clear {
  border: 3px solid #2f9e44;
}

.wallet-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 8px;
}

.wallet-name {
  display: block;
  font-size: 14px;
  opacity: 0.85;
}

.wallet-balance {
  display: block;
  font-size: 28px;
  font-weight: bold;
}

.wallet-tag {
  display: inline-block;
  padding: 3px 8px;
  border: 1px solid #d33;
  border-radius: 999px;
  font-size: 12px;
  color: #ffb3b3;
}

.difference-card {
  margin-top: 12px;
  border: 1px solid white;
  border-radius: 10px;
  padding: 12px 10px;
}

.difference-label {
  display: block;
  font-size: 13px;
  opacity: 0.85;
}

.difference-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  margin-top: 4px;
}

.difference-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  font-weight: 900;
  line-height: 1;
}

.difference-arrow.is-red {
  color: #d33;
}

.difference-arrow.is-green {
  color: #2f9e44;
}

.difference-arrow.is-neutral {
  color: transparent;
}

.difference-value {
  display: block;
  font-size: 26px;
  font-weight: bold;
}

input, select {
  width: 100%;
  padding: 12px;
  margin-top: 8px;
  font-size: 16px;
  border: 1px solid white;
  border-radius: 5px;
  background: transparent;
}

button {
  background: #333;
  width: 100%;
  padding: 12px;
  margin-top: 8px;
  font-size: 16px;
  border-radius: 5px;
  border: 1px solid white;
}

select {
  height: 46px;
}

#log {
  margin-top: 10px;
}

.bottom-log {
  margin-top: 14px;
}

details {
  text-align: left;
}

summary {
  cursor: pointer;
  padding: 10px;
  border: 1px solid white;
  border-radius: 5px;
  list-style: none;
}

details > div {
  max-height: 280px;
  overflow-y: auto;
  padding: 10px 2px 0;
}

.log-entry {
  display: grid;
  grid-template-columns: 2.8rem 5.2rem 1fr 7rem 1.2rem;
  align-items: baseline;
  column-gap: 2px;
  font-size: 13px;
  line-height: 1.4;
  padding-bottom: 10px;
}


.log-amount {
  font-weight: bold;
}

.btn-delete-entry {
  background: transparent;
  border: none;
  color: #d33;
  font-size: 18px;
  line-height: 1;
  padding: 0;
  margin: 0;
  width: auto;
  cursor: pointer;
  flex-shrink: 0;
}

.archive-section {
  margin-top: 16px;
  text-align: left;
}

.archive-summary {
  max-height: 280px;
  overflow-y: auto;
  padding: 10px 2px 0;
}

.archive-summary div {
  font-size: 13px;
  line-height: 1.4;
  padding-bottom: 10px;
}

@media (min-width: 480px) {
  body {
    display: flex;
    justify-content: center;
  }
}