.modal-overlay {
  position: fixed;
  inset: 0;
  background: #ffffff64;
  backdrop-filter: blur(8px);
  display: flex;
  justify-content: center;
  animation: whitefade 0.5s;
  height: 100dvh;
}

@keyframes whitefade {
  from {
    background: none;
  }
  to {
    background: #ffffff64;
  }
}

.modal {
  position: relative;
  font-size: 16px;
  width: 300px;
  background: beige;
  border: 3px solid peachpuff;
  border-radius: 8px;
  padding: 18px;
  margin-inline: 12px;
  margin-top: 20px;
  margin-bottom: auto;
  text-align: center;
  animation: pop 0.4s cubic-bezier(0.3, 2, 0.7, 1);
  scrollbar-color: bisque transparent;
}

.classic.modal {
  background: lightsteelblue;
  border-color: snow;
  scrollbar-color: steelblue transparent;
}

.event.modal {
  background: whitesmoke;
  border-color: powderblue;
  scrollbar-color: orange transparent;
}

.classic.modal .modal-content, .event.modal .modal-content {
  background: whitesmoke;
  border-radius: 8px;
}

.event.modal .modal-content {
  background: cornflowerblue;
  color: snow;
  text-shadow: 0 0 3px midnightblue;
}

.classic.modal button.close, .event.modal button.close {
  color: snow;
  background: deepskyblue;
  border-color: lightsteelblue;
}

.event.modal button.close {
  border-color: powderblue;
}

.classic.modal button.close:hover, .event.modal button.close:hover {
  background: lightsteelblue;
  border-color: snow;
}

@keyframes pop {
  from {
    transform: scale(.8);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.icon, .trophy-icon {
  color: beige;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.icon {
  background: salmon;
  margin: auto;
  font-size: 42px;
}
.trophy-icon {
  font-family: Noto Emoji;
  color: salmon;
  background: beige;
  font-size: 36px;
  transition: color 0.7s;
}
.trophy-icon:hover.grow {
  cursor: pointer;
  font-size: 40px;
}

h1, h2, h3 {
  font-weight: normal;
}
h1 {
  margin: 20px 0 10px;
  font-size: 28px;
  text-transform: uppercase;
}
h2 {
  font-size: 20px;
}

.subtitle {
  color: dimgray;
  margin-bottom: 24px;
}

.stats {
  display: flex;
  justify-content: space-around;
  margin-block: 16px;
}

.stat {
  flex: 1;
}

.stat .value {
  display: block;
  font-size: 24px;
  line-height: 1;
}

.stat .content {
  color: dimgray;
  font-size: 11px;
}

.modal button {
  font-size: 16px;
}

.modal button:not(:disabled) {
  cursor: pointer;
}

.modal .modal-content button {
  width: 100%;
  padding: 12px;
  margin-top: 12px;
  border: none;
  border-radius: 8px;
}

.modal .modal-content button:hover:not(:disabled) {
  cursor: pointer;
  opacity: 0.9;
}

.modal button.close {
  color: salmon;
  background: peachpuff;
  position: absolute;
  top: -12px;
  right: -12px;
  width: 32px;
  height: 32px;
  border: 3px solid beige;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal button.close:hover {
  background: beige;
  border-color: peachpuff;
}

.primary, .highlight-stat {
  background: gold;
  color: saddlebrown;
  outline: 1px solid goldenrod;
  outline-offset: -1px;
}

.continue {
  background: firebrick;
  color: whitesmoke;
}

.cancel {
  background: palevioletred;
  color: snow;
}

.modal .modal-content {
  overflow-y: auto;
  padding: 8px;
}

.highlight-stat {
  border-radius: 24px;
  padding: 6px 12px;
  font-style: italic;
  font-size: 18px;
  margin-left: calc(-24px / 2);
}

.badge-stat {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  background: salmon;
  color: snow;
  text-align: center;
  position: absolute;
  top: calc(-36px / 2 + 9px);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px dashed beige;
  border-bottom: none;
  margin-left: 1em;
  font-size: 13px;
}

.highlight-stat .preface, .badge-stat .qualifier {
  font-size: 0.66em;
  text-transform: uppercase;
}

.highlight-stat .preface {
  font-size: 12px;
}

.games-played {
  color: salmon;
  position: absolute;
  right: 0;
}

.header {
  text-align: left;
  margin-top: 6px;
  margin-inline: clamp(1em, calc(50dvw - 145px), 48px);
  position: relative;
}

.trophy {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  text-align: left;
  padding: 8px;
  background: peachpuff;
  border-radius: 96px / 100%;
  margin-top: 1em;
  gap: 12px;
}

.trophy-title {
  font-size: 20px;
  color: darkred;
}

.trophy-details {
  display: grid;
  grid-template-rows: auto;
  height: 100%;
  gap: 8px;
  color: saddlebrown;
  margin-right: 40px;
}

.trophy-footer {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
}

.trophy-footer .timestamp, .trophy-footer .flavour {
  font-size: 12px;
}
.flavour {
  font-style: italic;
}

.trophy-footer .count {
  font-style: italic;
  font-size: 16px;
  margin-left: 1em;
}

.single-row {
  display: flex;
  gap: 8px;
}

#export {
  background: royalblue;
}

#import {
  background: seagreen;
}

#import-status {
  font-style: italic;
  font-size: 12px;
}

.good {
  color: green;
}

.bad {
  color: red;
}

.in-progress {
  color: gray;
}

@media (max-width: 400px) {
  .highlight-stat.cramped {
    font-size: 16px;
  }
  .badge-stat.cramped {
    font-size: 12px;
    top: calc(-30px / 2 + 8px);
    width: 30px;
    height: 30px;
  }
  .games-played.cramped {
    font-size: 14px;
  }
}

@media (max-width: 420px) {
  .games-played-icon.cramped {
    display: none;
  }
}
