.sealed-card-detail,
.ce-card-detail {
  position: fixed;
  z-index: 900;
  width: min(360px, calc(100vw - 24px));
  max-height: min(520px, calc(100vh - 24px));
  overflow: auto;
  border: 1px solid rgba(210, 170, 71, 0.64);
  border-radius: 0;
  background: rgba(8, 12, 20, 0.96);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.48);
  color: #edfaff;
  padding: 0;
  pointer-events: none;
}

.sealed-card-detail[hidden],
.ce-card-detail[hidden] {
  display: none;
}

.sealed-card-detail.is-pinned,
.ce-card-detail.is-pinned {
  border-color: rgba(210, 170, 71, 0.92);
}

.sealed-card-detail-media,
.ce-card-detail-media {
  position: relative;
  height: 92px;
  margin: 0;
  overflow: hidden;
  border-radius: 0;
  background: #0f141d;
  background-position: center;
  background-size: cover;
  box-shadow: inset 0 -48px 58px rgba(8, 12, 20, 0.92);
}

.sealed-card-detail-media canvas,
.ce-card-detail-media canvas,
.ce-card-detail-media img {
  display: block;
  width: 100%;
  height: 100%;
}

.ce-card-detail-media img {
  object-fit: cover;
  object-position: center 20%;
}

.sealed-card-detail-media-fallback,
.ce-card-detail-media-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 10px 14px;
  background: rgba(8, 12, 20, 0.88);
  color: #edfaff;
  font-size: 13px;
  font-weight: 900;
  text-align: center;
}

.sealed-card-detail-media-fallback[hidden],
.ce-card-detail-media-fallback[hidden] {
  display: none;
}

.sealed-card-detail-header,
.ce-card-detail-header {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px 14px 8px;
  margin-top: -42px;
}

.sealed-card-detail-header .sealed-card-cost,
.ce-card-detail-header .ce-card-cost {
  width: 30px;
  height: 30px;
  font-size: 16px;
}

.sealed-card-detail-title,
.ce-card-detail-title {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.sealed-card-detail-title small,
.ce-card-detail-title small {
  color: #c8d3df;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sealed-card-detail-title strong,
.ce-card-detail-title strong {
  color: #fff7e4;
  font-size: 18px;
  line-height: 1.2;
  overflow-wrap: anywhere;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.72);
}

.sealed-card-detail-stats,
.ce-card-detail-stats {
  display: inline-flex;
  gap: 6px;
}

.sealed-card-detail-stats b,
.ce-card-detail-stats b {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 16px;
  font-weight: 900;
  line-height: 1;
  isolation: isolate;
}

.sealed-card-detail-stats b::before,
.ce-card-detail-stats b::before {
  content: "";
  position: absolute;
  inset: 1px;
  z-index: -1;
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 2px 7px rgba(0, 0, 0, 0.42);
}

.sealed-card-detail-stat.is-attack::before,
.ce-card-detail-stat.is-attack::before {
  background: #5aa5d6;
  clip-path: polygon(50% 0%, 76% 20%, 64% 55%, 88% 55%, 88% 75%, 61% 75%, 61% 100%, 39% 100%, 39% 75%, 12% 75%, 12% 55%, 36% 55%, 24% 20%);
}

.sealed-card-detail-stat.is-health::before,
.ce-card-detail-stat.is-health::before {
  background: linear-gradient(180deg, #d74848, #7a202a);
  clip-path: polygon(50% 0%, 90% 16%, 84% 70%, 50% 100%, 16% 70%, 10% 16%);
}

.sealed-card-detail-meta,
.ce-card-detail-meta {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-top: 0;
  padding: 7px 14px;
  color: #cbd8e4;
  font-size: 13px;
  font-weight: 800;
}

.sealed-card-detail-text,
.ce-card-detail-text {
  margin-top: 0;
  padding: 12px 14px 14px;
  color: #f5f7fb;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.65;
  white-space: normal;
}
