* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
  background: #0a0a0c;
  color: #e8e2d8;
  font-family: 'Pretendard', 'Malgun Gothic', 'Apple SD Gothic Neo', system-ui, sans-serif;
  overflow: hidden;
}

#game-shell {
  position: relative;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

#game-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  outline: none;
}

.screen {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 50% 40%, rgba(24, 20, 30, 0.55) 0%, rgba(8, 8, 12, 0.92) 70%);
  transition: opacity 0.45s ease, visibility 0.45s ease;
}

.screen.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.screen-inner {
  text-align: center;
  padding: 2rem 1.5rem;
  max-width: 520px;
  width: 100%;
  animation: rise 0.7s cubic-bezier(0.22, 0.8, 0.3, 1) both;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.eyebrow {
  margin: 0 0 0.9rem;
  font-size: 0.7rem;
  letter-spacing: 0.42em;
  color: #c9a227;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(2.6rem, 9vw, 4.4rem);
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #f2e8c9;
  text-shadow: 0 0 18px rgba(201, 162, 39, 0.35), 0 0 46px rgba(201, 162, 39, 0.12);
}

.tagline {
  margin: 0.9rem 0 1.8rem;
  font-size: 0.95rem;
  color: #9a938a;
}

.controls-note {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
  justify-content: center;
  font-size: 0.78rem;
  color: #b7b0a4;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  padding: 0.45rem 0.95rem;
  margin-bottom: 1.7rem;
}

kbd {
  font-family: inherit;
  font-size: 0.72rem;
  color: #ddd6c8;
  background: #2a2a33;
  border: 1px solid #4a4a55;
  border-bottom-width: 2px;
  border-radius: 4px;
  padding: 0.02rem 0.35rem;
}

.primary-button {
  font: inherit;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #1a1408;
  background: linear-gradient(180deg, #e3c766 0%, #b8932a 100%);
  border: none;
  border-radius: 8px;
  padding: 0.9rem 2.6rem;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 8px 22px rgba(0, 0, 0, 0.45);
  transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
}

.primary-button:hover {
  transform: translateY(-2px);
  filter: brightness(1.06);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 12px 28px rgba(0, 0, 0, 0.5);
}

.primary-button:active {
  transform: translateY(0);
}

.primary-button:focus-visible {
  outline: 2px solid #e3c766;
  outline-offset: 3px;
}

.skill-inner {
  max-width: 760px;
}

.skill-title {
  margin: 0;
  font-size: clamp(1.5rem, 5vw, 2.4rem);
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #f2e8c9;
}

.skill-options {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: center;
  gap: 0.7rem;
}

.skill-card {
  font: inherit;
  flex: 1 1 150px;
  max-width: 200px;
  min-width: 0;
  aspect-ratio: 5 / 7;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  padding: 1rem 0.8rem;
  text-align: center;
  color: #e8e2d8;
  background: rgba(18, 16, 24, 0.92);
  border: 1px solid rgba(201, 162, 39, 0.45);
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.skill-card:hover {
  transform: translateY(-3px);
  border-color: rgba(227, 199, 102, 0.9);
  background: rgba(30, 26, 18, 0.95);
}

.skill-card:focus-visible {
  outline: 2px solid #e3c766;
  outline-offset: 3px;
}

.skill-card-name {
  font-size: 0.98rem;
  font-weight: 700;
  color: #f2e8c9;
}

.skill-card-effect {
  font-size: 0.76rem;
  line-height: 1.45;
  color: #c9a227;
}

@media (max-height: 640px) {
  .skill-card {
    aspect-ratio: auto;
    min-height: 160px;
  }
}

@media (max-height: 520px) {
  .skill-options {
    gap: 0.5rem;
  }

  .skill-card {
    flex: 1 1 140px;
    max-width: 220px;
    aspect-ratio: auto;
    min-height: 0;
    padding: 0.6rem 0.65rem;
    gap: 0.25rem;
  }

  .skill-card-name {
    font-size: 0.86rem;
  }

  .skill-card-effect {
    font-size: 0.7rem;
  }
}

.hud-button {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 5;
  display: none;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #e8e2d8;
  background: rgba(10, 10, 14, 0.72);
  border: 1px solid rgba(201, 162, 39, 0.5);
  border-radius: 8px;
  padding: 0.5rem 1rem;
  cursor: pointer;
}

.hud-button.visible {
  display: block;
}

.hud-button:hover {
  background: rgba(30, 26, 18, 0.9);
}

.hud-button:focus-visible {
  outline: 2px solid #e3c766;
  outline-offset: 2px;
}

/* HUD: 체력 (왼쪽 위, 예전 다시 시작 버튼 자리) */
.health-hud {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 5;
  display: none;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.55rem;
  min-width: 172px;
  padding: 0.55rem 0.75rem;
  font-size: 0.72rem;
  color: #d8d1c4;
  background: rgba(10, 10, 14, 0.72);
  border: 1px solid rgba(201, 162, 39, 0.5);
  border-radius: 8px;
}

.health-hud.visible {
  display: grid;
}

@media (max-width: 480px) {
  .health-hud {
    top: 10px;
    left: 10px;
    min-width: 0;
  }
}

/* HUD: 현재 계층 표시 */
.floor-indicator {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  display: none;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: #f2e8c9;
  background: rgba(10, 10, 14, 0.72);
  border: 1px solid rgba(201, 162, 39, 0.5);
  border-radius: 8px;
  padding: 0.5rem 1rem;
  white-space: nowrap;
}

.floor-indicator.visible {
  display: block;
}

@media (max-width: 480px) {
  .floor-indicator {
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    padding: 0.4rem 0.7rem;
  }
}

/* HUD: 보유 미궁 코인 */
.coin-indicator {
  position: absolute;
  top: 56px;
  left: 14px;
  z-index: 5;
  display: none;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #f0d78c;
  background: rgba(10, 10, 14, 0.72);
  border: 1px solid rgba(201, 162, 39, 0.5);
  border-radius: 8px;
  padding: 0.4rem 0.85rem;
  white-space: nowrap;
}

.coin-indicator.visible {
  display: flex;
}

.coin-icon {
  display: inline-block;
  width: 0.7rem;
  height: 0.7rem;
  background: #c9a227;
  border: 1px solid #f0d78c;
}

@media (max-width: 480px) {
  .coin-indicator {
    top: 52px;
    left: 10px;
    font-size: 0.72rem;
    padding: 0.35rem 0.7rem;
  }
}

/* 상점 */
#shop-screen {
  z-index: 8;
  align-items: flex-start;
  overflow-y: auto;
  background: rgba(6, 6, 10, 0.95);
}

#shop-screen .screen-inner {
  margin: auto;
}

.shop-inner {
  max-width: 720px;
  text-align: center;
}

.shop-coins {
  margin: 0 0 1rem;
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #f0d78c;
}

.shop-items {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.6rem;
  text-align: left;
}

.shop-reroll {
  font: inherit;
  margin-top: 0.9rem;
  padding: 0.55rem 1rem;
  color: #f0d78c;
  background: #1a1a2e;
  border: 2px solid #c9a227;
  cursor: pointer;
}

.shop-reroll:disabled {
  color: #6b6b76;
  border-color: #4a4a55;
  cursor: default;
}

.shop-item {
  font: inherit;
  display: grid;
  gap: 0.15rem;
  padding: 0.6rem 0.7rem;
  text-align: left;
  color: #e8e2d8;
  background: rgba(18, 16, 24, 0.92);
  border: 1px solid rgba(201, 162, 39, 0.35);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease;
}

.shop-item:hover {
  border-color: rgba(227, 199, 102, 0.9);
  background: rgba(30, 26, 18, 0.95);
}

.shop-item:disabled {
  cursor: default;
  opacity: 0.5;
}

.shop-item:focus-visible {
  outline: 2px solid #e3c766;
  outline-offset: 2px;
}

.shop-item-icon {
  font-size: 1.3rem;
  line-height: 1;
  color: #f0d78c;
}

.shop-item-name {
  font-size: 0.86rem;
  font-weight: 700;
  color: #f2e8c9;
}

.shop-item-desc {
  font-size: 0.7rem;
  line-height: 1.4;
  color: #c9a227;
}

.shop-item-price {
  font-size: 0.7rem;
  font-weight: 700;
  color: #f0d78c;
}

.stats-panel {
  position: absolute;
  left: 14px;
  bottom: 14px;
  z-index: 5;
  display: none;
  min-width: 172px;
  padding: 0.55rem 0.75rem 0.65rem;
  background: rgba(10, 10, 14, 0.72);
  border: 1px solid rgba(201, 162, 39, 0.5);
  border-radius: 8px;
}

.stats-panel.visible {
  display: block;
}

.stats-title {
  margin: 0 0 0.45rem;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.3em;
  color: #c9a227;
  text-transform: uppercase;
}

#stats-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}

.stat-row {
  display: grid;
  /* 왼쪽 이름 칸은 좁아질 수 있게 두고, 값 칸은 내용만큼 확보해 겹치지 않게 한다. */
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.7rem;
  font-size: 0.72rem;
  line-height: 1.5;
  color: #d8d1c4;
}

.stat-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stat-bar {
  display: block;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
}

.stat-fill {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #b8932a, #e3c766);
}

.stat-value {
  min-width: 1.1em;
  /* '124%'처럼 긴 값도 한 줄로 두고, 글자끼리 붙지 않게 칸을 확보한다. */
  white-space: nowrap;
  text-align: right;
  justify-self: end;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #f2e8c9;
}

/* 장비창의 '스탯' 칸. 막대 없이 이름과 숫자만 적는다. */
#equip-screen #stats-list {
  gap: 0.6rem;
}

#equip-screen .stat-row {
  font-size: 0.84rem;
}

/* 시작 스탯 화면 */
.start-stats-inner {
  max-width: 360px;
}

.start-stats-list {
  list-style: none;
  margin: 0 auto 1.8rem;
  padding: 0.6rem 0.9rem;
  display: grid;
  gap: 0.75rem;
  max-width: 300px;
  text-align: left;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
}

.start-stats-list .stat-row {
  font-size: 0.95rem;
}

.start-stats-list .stat-value {
  color: #f0d78c;
}

@media (max-height: 420px) {
  .stats-panel {
    left: 10px;
    bottom: 10px;
    padding: 0.4rem 0.6rem 0.5rem;
  }

  .stat-row {
    font-size: 0.66rem;
  }
}

@media (max-height: 420px) {
  .screen-inner {
    padding: 1rem;
  }

  h1 {
    font-size: clamp(1.8rem, 7vw, 2.6rem);
  }

  .tagline {
    margin: 0.5rem 0 1rem;
  }

  .controls-note {
    margin-bottom: 1rem;
  }
}

.skill-card-tag {
  align-self: flex-start;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: #0f0d0a;
  background: linear-gradient(180deg, #e3c766, #b8932a);
  border-radius: 999px;
  padding: 0.1rem 0.45rem;
}

.skill-card-icon {
  margin: auto 0;
  font-size: 2.4rem;
  line-height: 1;
  color: #f0d78c;
}

/* HUD: 스킬 슬롯 바 */
.skill-bar {
  position: absolute;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  z-index: 6;
  display: none;
  flex-wrap: wrap;
  justify-content: center;
  gap: 5px;
  width: max-content;
  max-width: calc(100% - 380px);
}

.skill-bar.visible {
  display: flex;
}

.skill-slot {
  position: relative;
  flex: 0 0 auto;
  width: clamp(34px, 4.6vw, 54px);
  height: clamp(34px, 4.6vw, 54px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  border-radius: 8px;
  background: rgba(10, 10, 14, 0.74);
  border: 1px solid rgba(255, 255, 255, 0.14);
  overflow: hidden;
}

.skill-slot.filled {
  border-color: rgba(201, 162, 39, 0.5);
}

.skill-slot.ready {
  border-color: rgba(227, 199, 102, 0.95);
}

.skill-slot-key {
  position: absolute;
  top: 2px;
  left: 5px;
  font-size: 0.58rem;
  font-weight: 700;
  color: #9a938a;
}

.skill-slot-icon {
  font-size: clamp(0.8rem, 1.9vw, 1.15rem);
  line-height: 1;
  color: #f2e8c9;
}

.skill-slot-name {
  padding: 0 3px;
  font-size: 0.56rem;
  line-height: 1.1;
  text-align: center;
  color: #c9c2b6;
}

.skill-slot-cd {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 0;
  background: rgba(6, 6, 10, 0.72);
  pointer-events: none;
}

@media (max-width: 720px) {
  .skill-slot-name {
    display: none;
  }
}

@media (max-width: 680px) {
  .stats-panel {
    top: 140px;
    bottom: auto;
  }

  .skill-bar {
    max-width: calc(100% - 24px);
  }
}

/* 장비창 */
#equip-screen {
  z-index: 8;
  align-items: flex-start;
  overflow-y: auto;
  background: rgba(6, 6, 10, 0.95);
}

#equip-screen .screen-inner {
  margin: auto;
}

.equip-inner {
  max-width: 720px;
  text-align: center;
}

.equip-body {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.9rem;
  text-align: left;
}

.equip-column {
  flex: 1 1 240px;
  min-width: 0;
}

.equip-subtitle {
  margin: 0 0 0.5rem;
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.26em;
  color: #c9a227;
  text-transform: uppercase;
}

.skill-inventory,
.equip-slots {
  display: grid;
  gap: 0.4rem;
}

.skill-item {
  font: inherit;
  width: 100%;
  display: grid;
  gap: 0.12rem;
  padding: 0.5rem 0.6rem;
  text-align: left;
  color: #e8e2d8;
  background: rgba(18, 16, 24, 0.92);
  border: 1px solid rgba(201, 162, 39, 0.35);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease;
}

.skill-item:hover {
  border-color: rgba(227, 199, 102, 0.9);
  background: rgba(30, 26, 18, 0.95);
}

.skill-item.equipped {
  border-color: rgba(143, 227, 255, 0.65);
}

.skill-item:focus-visible {
  outline: 2px solid #e3c766;
  outline-offset: 2px;
}

.skill-item-name {
  font-size: 0.86rem;
  font-weight: 700;
  color: #f2e8c9;
}

.skill-item-desc {
  font-size: 0.7rem;
  line-height: 1.4;
  color: #c9a227;
}

.skill-item-tag {
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  color: #8f8a80;
}

.skill-item.equipped .skill-item-tag {
  color: #8fe3ff;
}

.equip-slot {
  font: inherit;
  width: 100%;
  display: grid;
  grid-template-columns: 1.9rem 1fr;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.6rem;
  text-align: left;
  color: #e8e2d8;
  background: rgba(18, 16, 24, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  cursor: pointer;
}

.equip-slot.filled {
  border-color: rgba(201, 162, 39, 0.55);
}

.equip-slot.filled:hover {
  border-color: rgba(227, 199, 102, 0.95);
  background: rgba(30, 26, 18, 0.95);
}

.equip-slot:disabled {
  cursor: default;
  color: #6f6a63;
}

.equip-slot:focus-visible {
  outline: 2px solid #e3c766;
  outline-offset: 2px;
}

.equip-slot-key {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  text-align: center;
  color: #ddd6c8;
  background: #2a2a33;
  border: 1px solid #4a4a55;
  border-radius: 4px;
  padding: 0.06rem 0;
}

.equip-slot-name {
  font-size: 0.82rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.equip-empty {
  margin: 0;
  font-size: 0.76rem;
  color: #8f8a80;
}

/* 스킬 수치: 피해(물리/마법)와 쿨타임을 카드·장비창에 적는다. */
.skill-card-stats,
.skill-item-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 0.5rem;
}

.skill-card-stats {
  justify-content: center;
}

.skill-item-stats {
  justify-content: flex-start;
}

.skill-stat {
  font-size: 0.68rem;
  line-height: 1.3;
  letter-spacing: 0.03em;
  white-space: nowrap;
  color: #b7b0a4;
}

.skill-stat.physical {
  color: #e08b5a;
}

.skill-stat.magic {
  color: #8fb8ff;
}

.skill-stat.cooldown {
  color: #9a938a;
}

.skill-stat.speed {
  color: #9a938a;
}

/* 슬롯 위에 적는 남은 쿨타임 초. */
.skill-slot-cdtext {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.66rem;
  font-weight: 700;
  color: #ffffff;
  pointer-events: none;
}

@media (max-height: 520px) {
  .skill-stat {
    font-size: 0.62rem;
  }
}

/* 상점 구역 제목(아이템 / 유물) */
.shop-section-title {
  margin: 0.9rem 0 0.4rem;
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.26em;
  color: #c9a227;
  text-transform: uppercase;
  text-align: left;
}

.shop-item.relic-item {
  border-color: rgba(143, 227, 255, 0.35);
}

/* 스탯 패널 아래 보유 유물 목록 */
.relic-block {
  display: none;
  margin-top: 0.55rem;
}

.relic-block.visible {
  display: block;
}

.relic-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.22rem;
}

.relic-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.7rem;
  color: #d8d1c4;
}

.relic-icon {
  color: #8fe3ff;
  line-height: 1;
}

.relic-name {
  white-space: nowrap;
}

/* 사용형 유물의 사용 가능·재사용 대기 표시 */
.relic-status {
  margin-left: auto;
  font-size: 0.62rem;
  font-weight: 700;
  color: #8fe3ff;
}

/* 장비창의 유물 인벤토리. 유물은 흐려지지 않고 밝게 보이게 한다. */
.skill-item.relic-use {
  border-color: rgba(143, 227, 255, 0.35);
}

.skill-item.relic-use:disabled {
  cursor: default;
  opacity: 1;
}

.skill-item.relic-use .skill-item-name {
  color: #ffd700;
}

.skill-item.relic-use .skill-item-desc {
  color: #d8d1c4;
}

.skill-item.relic-use .skill-item-tag {
  color: #b7b0a4;
}

/* 유물 도감 */
.codex-button {
  top: 94px;
}

#codex-screen {
  z-index: 8;
  align-items: flex-start;
  overflow-y: auto;
  background: rgba(6, 6, 10, 0.95);
}

#codex-screen .screen-inner {
  margin: auto;
}

.codex-inner {
  max-width: 760px;
  text-align: center;
}

.codex-count {
  margin: 0 0 0.9rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #f0d78c;
}

.codex-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.55rem;
  text-align: left;
}

.codex-card {
  display: grid;
  gap: 0.15rem;
  padding: 0.6rem 0.7rem;
  background: rgba(18, 16, 24, 0.92);
  border: 1px solid rgba(201, 162, 39, 0.35);
  border-radius: 8px;
}

.codex-card.unknown {
  opacity: 0.55;
}

.codex-icon {
  font-size: 1.3rem;
  line-height: 1;
  color: #8fe3ff;
}

.codex-name {
  font-size: 0.86rem;
  font-weight: 700;
  color: #f2e8c9;
}

.codex-tag {
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  color: #8f8a80;
}

.codex-desc {
  font-size: 0.7rem;
  line-height: 1.4;
  color: #c9a227;
}

@media (max-width: 480px) {
  .codex-button {
    top: 88px;
    left: 10px;
  }
}

/* 유물 등급: 등급 표식과 테두리 색으로 구분한다. */
.rarity-badge {
  justify-self: start;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 0.02rem 0.3rem;
  border: 1px solid currentColor;
  color: #b7b0a4;
}

.rarity-badge.rarity-common,
.codex-tag.rarity-common {
  color: #b7b0a4;
}

.rarity-badge.rarity-rare,
.codex-tag.rarity-rare {
  color: #6ec6ff;
}

.rarity-badge.rarity-epic,
.codex-tag.rarity-epic {
  color: #b98bff;
}

.rarity-badge.rarity-legendary,
.codex-tag.rarity-legendary {
  color: #ffb038;
}

.shop-item.rarity-common,
.codex-card.rarity-common,
.skill-item.relic-use.rarity-common {
  border-color: #6a6a78;
}

.shop-item.rarity-rare,
.codex-card.rarity-rare,
.skill-item.relic-use.rarity-rare {
  border-color: #6ec6ff;
}

.shop-item.rarity-epic,
.codex-card.rarity-epic,
.skill-item.relic-use.rarity-epic {
  border-color: #b98bff;
}

.shop-item.rarity-legendary,
.codex-card.rarity-legendary,
.skill-item.relic-use.rarity-legendary {
  border-color: #ffb038;
}
