.welcome-loyalty-summary {
  margin-top: 14px;
  padding: 11px 12px 10px;
  border: 1px solid #e7e2d3;
  border-radius: 6px;
  background: linear-gradient(130deg, #fffef9, #f5f2e8);
}

.welcome-loyalty-heading,
.loyalty-hero,
.loyalty-section-heading,
.loyalty-mission,
.loyalty-theme {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.welcome-loyalty-heading > div {
  display: grid;
  gap: 3px;
}

.welcome-loyalty-heading span {
  color: #8a8d7c;
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 1.3px;
}

.welcome-loyalty-heading strong {
  color: #345444;
  font-size: 10px;
}

.welcome-loyalty-heading > b {
  color: #9a8045;
  font-size: 11px;
}

.welcome-loyalty-summary .loyalty-progress-track {
  height: 5px;
  margin-top: 8px;
}

.welcome-loyalty-summary > p {
  margin: 7px 0 0;
  color: #758176;
  font-size: 8px;
}

.welcome-loyalty-link {
  margin-top: 7px;
  padding: 0;
  border: 0;
  background: none;
  color: #8c7441;
  cursor: pointer;
  font: 700 8px 'DM Sans', sans-serif;
}

.welcome-loyalty-link:hover {
  color: #4f644e;
  text-decoration: underline;
}

.loyalty-detail {
  display: grid;
  gap: 8px;
  margin-top: 15px;
}

.loyalty-hero {
  justify-content: flex-start;
  padding: 12px;
  border: 1px solid #e8e3d6;
  border-radius: 6px;
  background: linear-gradient(115deg, #f6f4ed, #fffefa);
}

.loyalty-level-emblem {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  place-items: center;
  border: 1px solid #c8b57d;
  border-radius: 50%;
  background: #fffdf6;
  color: #8f7742;
  font: 600 19px 'Playfair Display', serif;
}

.loyalty-hero strong,
.loyalty-hero span:not(.loyalty-level-emblem) {
  display: block;
}

.loyalty-hero strong {
  color: #345444;
  font-size: 12px;
}

.loyalty-hero div span {
  margin-top: 4px;
  color: #8b9389;
  font-size: 9px;
}

.loyalty-progress-track {
  height: 7px;
  overflow: hidden;
  border-radius: 99px;
  background: #e9e7dd;
}

.loyalty-progress-track > span {
  display: block;
  height: 100%;
  min-width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #678b70, #c2a45b);
  transition: width .35s ease;
}

.loyalty-next-level {
  margin: -3px 0 4px;
  color: #90978d;
  font-size: 8px;
}

.loyalty-section-heading {
  justify-content: flex-start;
  margin-top: 7px;
  color: #798479;
}

.loyalty-section-heading strong {
  font-size: 8px;
  letter-spacing: 1.1px;
}

.loyalty-section-heading span {
  color: #9ba197;
  font-size: 8px;
}

.loyalty-missions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.loyalty-mission {
  min-width: 0;
  padding: 9px;
  border: 1px solid #e9e6dd;
  border-radius: 5px;
  background: #fffefa;
}

.loyalty-mission > div,
.loyalty-achievement {
  min-width: 0;
}

.loyalty-mission strong,
.loyalty-mission span,
.loyalty-achievement strong,
.loyalty-achievement span {
  display: block;
}

.loyalty-mission strong,
.loyalty-achievement strong {
  color: #52634f;
  font-size: 9px;
}

.loyalty-mission span,
.loyalty-achievement span {
  margin-top: 4px;
  color: #92988e;
  font-size: 8px;
  line-height: 1.4;
}

.loyalty-mission > b {
  flex: 0 0 auto;
  color: #9a8249;
  font-size: 9px;
}

.loyalty-mission.is-complete {
  border-color: #cdddcf;
  background: #f4f8f1;
}

.loyalty-mission.is-complete > b {
  color: #4d875c;
}

.loyalty-achievements {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.loyalty-achievement {
  padding: 8px 9px;
  border: 1px solid #e9e6dd;
  border-radius: 5px;
  background: #f5f3ed;
}

.loyalty-achievement.is-unlocked {
  border-color: #d6c994;
  background: #fffdf5;
}

.loyalty-themes {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 7px;
}

.loyalty-theme {
  min-width: 0;
  flex-direction: column;
  justify-content: flex-start;
  gap: 4px;
  padding: 8px 5px;
  border: 1px solid #e7e3d9;
  border-radius: 5px;
  background: #fffefa;
  color: #596b5f;
  cursor: pointer;
  font: 600 8px 'DM Sans', sans-serif;
}

.loyalty-theme:disabled {
  cursor: not-allowed;
  opacity: .55;
}

.loyalty-theme.is-equipped {
  border-color: #bca76e;
  box-shadow: inset 0 0 0 1px #bca76e;
}

.loyalty-theme-swatch {
  display: block;
  width: 100%;
  height: 20px;
  border: 2px solid var(--theme-accent);
  border-radius: 3px;
  background: var(--theme-color);
}

.loyalty-theme small {
  color: #9a927f;
  font-size: 7px;
  font-weight: 500;
}

.stats-modal {
  max-height: min(92vh, 860px);
  overflow-y: auto;
}

.abandon-modal {
  max-width: 430px;
}

.abandon-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-top: 22px;
}

.abandon-actions .welcome-secondary,
.abandon-actions .confirm-button {
  min-height: 44px;
  margin: 0;
  font-size: 10px;
}

.abandon-actions .confirm-button {
  border: 1px solid #b74c3d;
  background: #a64336;
}

body[data-table-theme="forest"] {
  --felt: #16473c;
  --felt2: #103b33;
  --loyalty-ring: #bb9d5d;
  --loyalty-edge: #e0c879;
}

body[data-table-theme="ocean"] {
  --felt: #254d69;
  --felt2: #1b3b53;
  --loyalty-ring: #739eb2;
  --loyalty-edge: #a7d0dc;
}

body[data-table-theme="plum"] {
  --felt: #55435f;
  --felt2: #3e3048;
  --loyalty-ring: #ab80a2;
  --loyalty-edge: #dab5d0;
}

body[data-table-theme="copper"] {
  --felt: #694938;
  --felt2: #4a3228;
  --loyalty-ring: #bd8754;
  --loyalty-edge: #e2b26c;
}

body[data-table-theme="midnight"] {
  --felt: #27334e;
  --felt2: #1b243a;
  --loyalty-ring: #7788b4;
  --loyalty-edge: #a9b9e4;
}

.felt-table {
  box-shadow: inset 0 0 0 8px var(--loyalty-ring, #bb9d5d), inset 0 0 0 10px var(--loyalty-edge, #e0c879), inset 0 0 0 13px var(--felt, #16473c), 0 12px 22px #1429231c;
}

@media (max-width: 760px) {
  .welcome-loyalty-summary {
    margin-top: 10px;
  }

  .loyalty-missions {
    grid-template-columns: 1fr;
  }

  .loyalty-mission {
    padding: 8px 10px;
  }

  .loyalty-themes {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .felt-table {
    box-shadow: inset 0 0 0 6px var(--loyalty-ring, #bb9d5d), inset 0 0 0 8px var(--loyalty-edge, #e0c879), inset 0 0 0 11px var(--felt, #16473c);
  }
}

@media (max-width: 430px) {
  .loyalty-achievements {
    grid-template-columns: 1fr;
  }

  .abandon-actions {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .loyalty-progress-track > span {
    transition: none;
  }
}
