.rotk-duels {
  width: 100%;
}

.rotk-duel-store {
  display: none !important;
}

.rotk-duel {
  --dc-avatar: 72px;
  position: relative;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  margin: 1.5rem 0;
  padding: 1.25rem 15px 1.75rem;
  background: #fff;
  overflow: hidden;
  color: #1a1a1a;
}

.rotk-duel-terrain {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-position: center center;
  background-repeat: no-repeat;
  background-size: cover;
  opacity: 0.18;
  filter: grayscale(0.1);
}

.rotk-duel[data-terrain="mountain"] .rotk-duel-terrain {
  background-image: url("../img/terrain-mountain.png");
}
.rotk-duel[data-terrain="plains"] .rotk-duel-terrain {
  background-image: url("../img/terrain-plains.png");
}
.rotk-duel[data-terrain="sea"] .rotk-duel-terrain {
  background-image: url("../img/terrain-sea.png");
}
.rotk-duel[data-terrain="city"] .rotk-duel-terrain {
  background-image: url("../img/terrain-city.png");
  opacity: 0.2;
  filter: grayscale(1) contrast(1.15);
}

.rotk-duel-title {
  display: block;
  position: relative;
  z-index: 2;
  margin: 0 auto 0.35rem;
  height: 18px;
  width: auto;
  max-width: none;
  overflow: visible;
  zoom: 1.3;
}

.rotk-duel-stage {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  grid-template-areas:
    "title title title"
    "a mid b"
    "a note b";
  align-items: start;
  justify-items: stretch;
  column-gap: 12px;
  row-gap: 0;
  min-height: 120px;
}

.rotk-duel-team-a { grid-area: a; justify-content: flex-end; }
.rotk-duel-team-b { grid-area: b; justify-content: flex-start; }
.rotk-duel-mid { grid-area: mid; }
.rotk-duel-result { grid-area: note; }
.rotk-duel-title { grid-area: title; }

.rotk-duel-team {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
}

.rotk-duel-mid {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  justify-self: center;
  min-width: 0;
  max-width: none;
  width: max-content;
  padding-top: 0;
  text-align: center;
}

.rotk-duel-vs {
  display: block;
  width: 56px;
  height: 56px;
}

.rotk-duel-swords {
  width: 56px;
  height: 56px;
  display: block;
  overflow: visible;
}

.rotk-sword {
  transform-origin: 40px 50px;
}

.rotk-sword-l {
  animation: rotk-clash-l 0.85s ease-in-out infinite alternate;
}
.rotk-sword-r {
  animation: rotk-clash-r 0.85s ease-in-out infinite alternate;
}

@keyframes rotk-clash-l {
  from { transform: rotate(-6deg); }
  to { transform: rotate(7deg); }
}
@keyframes rotk-clash-r {
  from { transform: rotate(6deg); }
  to { transform: rotate(-7deg); }
}

.rotk-duel-round,
.rotk-duel-result,
.rotk-duel-meta {
  margin-top: 6px;
  text-align: center;
  font-size: 0.78rem;
  line-height: 1.35;
  color: #4a4a4a;
  word-break: break-word;
}

.rotk-duel-round {
  max-width: none;
  white-space: nowrap;
}

.rotk-duel-result,
.rotk-duel-meta {
  max-width: 16rem;
  justify-self: center;
}

.rotk-duel-node {
  flex: 0 1 auto;
  width: auto;
  max-width: 110px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.rotk-duel-photo {
  position: relative;
  display: block;
  box-sizing: border-box;
  width: var(--dc-avatar);
  height: var(--dc-avatar);
  flex: 0 0 var(--dc-avatar);
  margin: 0 auto 8px;
  overflow: hidden;
  border-radius: 50%;
  border: 1.5px solid #c8c8c8;
  background: #f3f3f3;
  isolation: isolate;
}

.rotk-duel .rotk-duel-photo img,
.entry-card-box .rotk-duel .rotk-duel-photo img {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  object-fit: cover !important;
  object-position: center 18% !important;
  border-radius: 50% !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0 !important;
  background: #f3f3f3;
  display: block !important;
  transition: opacity 0.15s ease, filter 0.15s ease;
}

.rotk-duel-photo:hover img,
.entry-card-box .rotk-duel a.rotk-duel-photo:hover img {
  opacity: 0.88 !important;
}
.rotk-duel[data-outcome="a-win"] .rotk-duel-team-b .rotk-duel-photo:hover img,
.rotk-duel[data-outcome="a-lose"] .rotk-duel-team-a .rotk-duel-photo:hover img {
  opacity: 0.78 !important;
}
.rotk-duel[data-outcome="a-injure"] .rotk-duel-team-b .rotk-duel-photo:hover img,
.rotk-duel[data-outcome="a-injured"] .rotk-duel-team-a .rotk-duel-photo:hover img {
  opacity: 0.58 !important;
}
.rotk-duel[data-outcome="a-capture"] .rotk-duel-team-b .rotk-duel-photo:hover img,
.rotk-duel[data-outcome="a-captured"] .rotk-duel-team-a .rotk-duel-photo:hover img {
  opacity: 0.4 !important;
}

.rotk-duel-badge {
  width: 100%;
  max-width: 148px;
  padding: 4px 8px 5px;
  border-radius: 999px;
  background: #fff;
  border: 1.5px solid #1a1a1a;
  box-sizing: border-box;
}

.rotk-duel-items {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px;
  margin-top: 14px;
  width: 100%;
}

.rotk-duel-gear {
  display: block;
  box-sizing: border-box;
  width: calc(var(--dc-avatar) * 2 / 3);
  height: calc(var(--dc-avatar) * 2 / 3);
  flex: 0 0 calc(var(--dc-avatar) * 2 / 3);
  overflow: hidden;
  border-radius: 50%;
  border: 1px solid #c8c8c8;
  background: #f3f3f3;
  line-height: 0;
  text-decoration: none;
}

.rotk-duel .rotk-duel-gear img,
.entry-card-box .rotk-duel .rotk-duel-gear img {
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  object-fit: cover !important;
  border: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border-radius: 50% !important;
  display: block !important;
  transition: opacity 0.15s ease;
}

.rotk-duel-gear:hover img {
  opacity: 0.88 !important;
}

.rotk-duel-name {
  display: block;
  font-family: "Noto Sans SC", "Segoe UI", system-ui, sans-serif;
  font-size: clamp(0.52rem, 1.7vw, 0.72rem);
  font-weight: 700;
  line-height: 1.2;
  color: var(--pink, #f92091) !important;
  text-decoration: none;
  white-space: normal;
  word-break: break-word;
}

.rotk-duel-name:hover {
  color: var(--pink-hover, #d11276) !important;
  text-decoration: underline;
}

.rotk-duel[data-outcome="a-win"] .rotk-duel-team-b .rotk-duel-photo img {
  opacity: 0.9;
}
.rotk-duel[data-outcome="a-lose"] .rotk-duel-team-a .rotk-duel-photo img {
  opacity: 0.9;
}
.rotk-duel[data-outcome="a-kill"] .rotk-duel-team-b .rotk-duel-photo img {
  filter: grayscale(1);
}
.rotk-duel[data-outcome="a-killed"] .rotk-duel-team-a .rotk-duel-photo img {
  filter: grayscale(1);
}
.rotk-duel[data-outcome="a-injure"] .rotk-duel-team-b .rotk-duel-photo img {
  opacity: 0.7;
}
.rotk-duel[data-outcome="a-injured"] .rotk-duel-team-a .rotk-duel-photo img {
  opacity: 0.7;
}
.rotk-duel[data-outcome="a-capture"] .rotk-duel-team-b .rotk-duel-photo img {
  opacity: 0.5;
}
.rotk-duel[data-outcome="a-captured"] .rotk-duel-team-a .rotk-duel-photo img {
  opacity: 0.5;
}

.entry-card-box .rotk-duel-title {
  display: block !important;
  width: auto !important;
  max-width: none !important;
  height: 18px !important;
  margin: 0 auto 0.35rem !important;
  padding: 0 !important;
  border: 0 !important;
  zoom: 1.3;
}

.entry-card-box .rotk-duel a.rotk-duel-name {
  color: var(--pink, #f92091) !important;
  font-weight: 700 !important;
  text-decoration: none !important;
}
.entry-card-box .rotk-duel a.rotk-duel-name:hover {
  color: var(--pink-hover, #d11276) !important;
  text-decoration: underline !important;
}
.entry-card-box .rotk-duel a.rotk-duel-photo {
  color: inherit !important;
  text-decoration: none !important;
}

.entry-card-box:has(.rotk-duels),
.single-left-content:has(.rotk-duels) {
  overflow: visible !important;
}

.entry-card-box .rotk-duel {
  width: calc(100% + 48px);
  max-width: none;
  margin-left: -24px;
  margin-right: -24px;
  padding-left: 15px;
  padding-right: 15px;
  box-sizing: border-box;
}

@media (max-width: 768px) {
  .entry-card-box .rotk-duel {
    width: calc(100% + 32px);
    margin-left: -16px;
    margin-right: -16px;
  }
}

@media (max-width: 720px) {
  .rotk-duel {
    --dc-avatar: 48px;
    margin: 1.1rem 0;
    padding: 0.7rem 0 1.1rem;
  }
  .entry-card-box .rotk-duel {
    padding-left: 0;
    padding-right: 0;
  }
  .rotk-duel-stage {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr);
    grid-template-areas:
      "title title title title title title title"
      ". a . mid . b ."
      "note note note note note note note";
    column-gap: 0;
    justify-items: center;
  }
  .rotk-duel-team-a,
  .rotk-duel-team-b {
    justify-content: center;
    justify-self: center;
  }
  .rotk-duel-mid {
    position: relative;
    width: max-content;
    min-width: 0;
    padding-top: 0;
    padding-bottom: 1.15rem;
    justify-self: center;
    overflow: visible;
  }
  .rotk-duel-title,
  .entry-card-box .rotk-duel-title {
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    margin: 0 auto 0.45rem !important;
    width: auto !important;
    height: 18px !important;
    justify-self: center;
    zoom: 1.3;
  }
  .rotk-duel-vs,
  .rotk-duel-swords {
    width: 42px;
    height: 42px;
  }
  .rotk-duel-round {
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    margin: 0;
    font-size: 0.72rem;
  }
  .rotk-duel-result,
  .rotk-duel-meta {
    width: 100%;
    max-width: none;
    margin-top: 10px;
    padding: 0 12px;
    box-sizing: border-box;
    justify-self: stretch;
  }
  .rotk-duel-photo {
    margin-bottom: 5px;
  }
  .rotk-duel-badge {
    padding: 3px 5px 4px;
    max-width: 120px;
  }
  .rotk-duel-team {
    gap: 4px;
  }
}

@media (max-width: 400px) {
  .rotk-duel {
    --dc-avatar: 40px;
  }
  .rotk-duel-vs,
  .rotk-duel-swords {
    width: 36px;
    height: 36px;
  }
}
