/* Wiki-only visual compatibility fixes. */
body.tc-page .tc-gem-detail__image img,
body.tc-page .tc-gem-choice img,
body.tc-page .tc-gem-card img {
  image-rendering: crisp-edges;
  image-rendering: pixelated;
}

html[data-color-theme="dark"] body.tc-page .tc-wiki-nav {
  background: #101c2a !important;
  border-color: #3b5066 !important;
  box-shadow: var(--tc-shadow-sm) !important;
}

html[data-color-theme="dark"] body.tc-page .tc-wiki-nav a {
  color: #aebdca !important;
}

html[data-color-theme="dark"] body.tc-page .tc-wiki-nav a:hover,
html[data-color-theme="dark"] body.tc-page .tc-wiki-nav a.is-active {
  background: #18283b !important;
  border-color: #40546a !important;
  border-bottom-color: #d3a94f !important;
  color: #ffffff !important;
}

/* The legacy light presentation layer owns deliberate cherry hover states.
 * Keep them in light mode, but make every interactive surface on the Wiki
 * landing page explicitly dark-owned so stylesheet order cannot leak pink. */
html[data-color-theme="dark"] body.tc-page .tc-wiki-page--index :is(.tc-guide-link, a.tc-wiki-card):hover {
  background: #18181b !important;
  border-color: #52525b !important;
  color: #f4f4f5 !important;
  box-shadow: 0 3px 0 rgba(0, 0, 0, .28) !important;
}

html[data-color-theme="dark"] body.tc-page .tc-wiki-page--index :is(.tc-guide-link, a.tc-wiki-card):hover :is(h2, h3) {
  color: #ffffff !important;
}

html[data-color-theme="dark"] body.tc-page .tc-wiki-page--index :is(.tc-guide-link:hover > i, a.tc-wiki-card:hover .tc-wiki-card__icon) {
  background: #27272a !important;
  border-color: #52525b !important;
  color: #d3a94f !important;
}

html[data-color-theme="dark"] body.tc-page .tc-wiki-page--index .tc-wiki-actions :is(.tc-btn, .btn):hover {
  background: #27272a !important;
  border-color: #71717a !important;
  color: #ffffff !important;
  box-shadow: none !important;
}

html[data-color-theme="dark"] body.tc-page .tc-wiki-page--index .tc-wiki-actions :is(.tc-btn-primary, .btn-primary):hover {
  background: #3b82f6 !important;
  border-color: #3b82f6 !important;
}

html[data-color-theme="dark"] body.tc-page .tc-wiki-page--index .tc-world-route a:hover {
  background: #202024 !important;
  border-color: #52525b !important;
  color: #ffffff !important;
}

html[data-color-theme="dark"] body.tc-page .tc-wiki-page--index .tc-text-link:hover {
  color: #d3a94f !important;
}

html[data-color-theme="dark"] body.tc-page ::selection {
  background: #33485c;
  color: #f8fafc;
}

html[data-color-theme="dark"] body.tc-page ::-moz-selection {
  background: #33485c;
  color: #f8fafc;
}

/* Final dark-surface ownership. Older light/cherry layers contain broad
 * !important card rules; legal CMS content and some Wiki panels were not in
 * every compatibility list, so a reveal/hover/scroll repaint could expose the
 * pink parent surface. These selectors are deliberately last-loaded and state
 * independent. */
html[data-color-theme="dark"] body.tc-page :is(
  .tc-legal-page .tc-card,
  .tc-legal-page .tc-card-body,
  .tc-legal-page .tc-legal-content,
  .tc-legal-page .ck-content,
  .tc-custom-page .tc-card,
  .tc-custom-page .tc-card-body,
  .tc-custom-page .ck-content,
  .tc-wiki-page .tc-card,
  .tc-wiki-page .tc-card-body,
  .tc-wiki-page .tc-wiki-panel,
  .tc-wiki-page .tc-wiki-header,
  .tc-wiki-page .tc-wiki-card,
  .tc-wiki-page .tc-wiki-fact,
  .tc-wiki-page .tc-wiki-stat,
  .tc-wiki-page .tc-mc-stat,
  .tc-wiki-page .tc-wiki-list li,
  .tc-wiki-page .tc-mini-quest-list > div
) {
  background-color: #121215 !important;
  background-image: none !important;
  border-color: #27272a !important;
  box-shadow: none !important;
}

html[data-color-theme="dark"] body.tc-page :is(.tc-legal-page, .tc-custom-page, .tc-wiki-page) :is(
  [data-reveal], [data-reveal].is-revealed, article, section
) {
  --tc-surface: #121215;
  --tc-surface-2: #18181b;
}

/* Authentic Minecraft UI Polish (Anti-Pattern Reductions) */
/* 1. Subdued Game-like Button & Card Press (No over-animated floating) */
.tc-card:hover, .tc-wiki-card:hover, .tc-boss-card:hover, .tc-rank-card:hover {
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25) !important;
}

.tc-btn:active, .btn:active, button.tc-nav__link:active {
  transform: translateY(1px) !important;
}

/* 2. Crisp Minecraft GUI Borders (Replacing thick 7px stripes) */
.tc-quest-card, .tc-quest-panel, .tc-item-card, .tc-boss-card, .tc-rank-card {
  border-width: 1px !important;
  border-radius: 4px !important;
}

/* 3. Consistent Corner Radius (Minecraft UI standard 4px-6px) */
.tc-card, .tc-wiki-panel, .tc-wiki-fact, .tc-btn, .btn, .tc-nav__link, .tc-drawer__item {
  border-radius: 4px !important;
}

/* 4. Responsive Crafting & Detail Panes */
.tc-crafting-window, .tc-item-detail, .tc-world-header {
  box-sizing: border-box !important;
  max-width: 100% !important;
  min-width: 0 !important;
}

/* 5. Dark Theme Gem Ore Source Popover (No pink hover card) */
html[data-color-theme="dark"] .tc-ore-source {
  background: #18181b !important;
  border-color: #3f3f46 !important;
}

html[data-color-theme="dark"] .tc-ore-source__popover {
  background: #121215 !important;
  border-color: #3f3f46 !important;
  color: #f4f4f5 !important;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.6) !important;
}

html[data-color-theme="dark"] .tc-ore-source__popover::after {
  background: #121215 !important;
  border-right-color: #3f3f46 !important;
  border-bottom-color: #3f3f46 !important;
}

html[data-color-theme="dark"] .tc-ore-source__popover strong {
  color: #ffffff !important;
}

html[data-color-theme="dark"] .tc-ore-source__popover span {
  color: #a1a1aa !important;
}

/* 6. Dark Theme Store & Tebex Market (No pink surfaces) */
html[data-color-theme="dark"] .tebex-list-item__button,
html[data-color-theme="light"] .tebex-list-item__button {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  font: inherit;
  cursor: pointer;
}
html[data-color-theme="dark"] :is(
  .tc-store-hero,
  .tc-store-sidebar,
  .tc-store-toolbar,
  .tc-store-product,
  .tc-product,
  .tc-store-category,
  .tc-store-product-detail,
  .tc-store-product-detail__media,
  .tebex-list,
  .tebex-list-item,
  .tebex-list-subitem,
  .tc-form-group,
  .tc-card,
  .card
) {
  background-color: #121215 !important;
  background-image: none !important;
  border-color: #27272a !important;
  color: #f4f4f5 !important;
  box-shadow: none !important;
}

/* SweetAlert2 Modal Dark Theme */
html[data-color-theme="dark"] .swal2-popup {
  background: #18181b !important;
  color: #f4f4f5 !important;
  border: 1px solid #3f3f46 !important;
  box-shadow: 0 20px 40px rgba(0,0,0,0.8) !important;
}

html[data-color-theme="dark"] .swal2-title {
  color: #ffffff !important;
}

html[data-color-theme="dark"] .swal2-content,
html[data-color-theme="dark"] .swal2-html-container {
  color: #a1a1aa !important;
}

html[data-color-theme="dark"] .swal2-icon.swal2-error {
  border-color: #ef4444 !important;
  color: #ef4444 !important;
}

html[data-color-theme="dark"] .swal2-icon.swal2-error [class^='swal2-x-mark-line'] {
  background-color: #ef4444 !important;
}

html[data-color-theme="dark"] .tc-label,
html[data-color-theme="dark"] .form-label {
  color: #a1a1aa !important;
}

html[data-color-theme="dark"] .tc-input,
html[data-color-theme="dark"] input.tc-input {
  background: #18181b !important;
  border-color: #3f3f46 !important;
  color: #f4f4f5 !important;
}

html[data-color-theme="dark"] .tc-input:focus,
html[data-color-theme="dark"] input.tc-input:focus {
  border-color: #d3a94f !important;
  outline: none !important;
}

html[data-color-theme="dark"] .tc-store-product:hover {
  border-color: #3f3f46 !important;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45) !important;
}

/* Product artwork: neutral frame, no crop, same contract in both themes. */
.tc-store-product,
.tc-product-detail__media,
.tc-cart-item__media {
  border-radius: 4px !important;
}

.tc-store-product:hover {
  transform: translateY(-1px) !important;
  box-shadow: 0 3px 10px rgba(24, 24, 27, 0.12) !important;
}

.tc-store-product:active {
  transform: translateY(1px) !important;
}

.tc-store-product__media,
.tc-product__media,
.tc-product-detail__media,
.tc-cart-item__media {
  background: var(--tc-surface-2) !important;
  border: 1px solid var(--tc-line) !important;
  border-radius: 4px !important;
}

.tc-store-product__media img,
.tc-product__media img,
.tc-product-detail__media img,
.tc-cart-item__media img {
  object-fit: contain !important;
  transform: none !important;
}

.tc-store-product__media::after {
  display: none !important;
}

html[data-color-theme="dark"] :is(
  .tc-store-product__media,
  .tc-product__media,
  .tc-product-detail__media,
  .tc-cart-item__media
) {
  background: #18181b !important;
  border-color: #3f3f46 !important;
}

html[data-color-theme="dark"] .tc-store-product__media {
  background: #18181b !important;
}

html[data-color-theme="dark"] .tc-store-product__media::after {
  background: linear-gradient(180deg, transparent 40%, rgba(9,9,11,0.92) 100%) !important;
}

html[data-color-theme="dark"] .tc-store-hero__desc,
html[data-color-theme="dark"] .tc-store-product__desc {
  color: #a1a1aa !important;
}

html[data-color-theme="dark"] .tc-store-hero__title,
html[data-color-theme="dark"] .tc-store-product__title {
  color: #ffffff !important;
}

html[data-color-theme="dark"] .tebex-list-item:hover,
html[data-color-theme="dark"] .tebex-list-subitem:hover {
  background: #18181b !important;
  color: #ffffff !important;
}

html[data-color-theme="dark"] .tebex-list-item.active {
  background: #27272a !important;
  color: #f5b71a !important;
  border-left-color: #f5b71a !important;
}

html[data-color-theme="dark"] .tebex-list-subitem.active {
  color: #f5b71a !important;
}

html[data-color-theme="dark"] .tc-product-quantity {
  overflow: hidden;
  border: 1px solid #3f3f46;
  border-radius: 4px;
  background: #121215;
  transition: border-color 120ms ease, background-color 120ms ease;
}

html[data-color-theme="dark"] .tc-product-quantity:hover,
html[data-color-theme="dark"] .tc-product-quantity:focus-within {
  border-color: #f5b71a;
  background: #18181b;
}

html[data-color-theme="dark"] .tc-product-quantity :is(.tc-btn, .tc-input) {
  margin: 0;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

html[data-color-theme="dark"] .tc-product-quantity .tc-btn {
  flex: 0 0 42px;
  min-width: 42px;
  background: #18181b !important;
  color: #d4d4d8 !important;
}

html[data-color-theme="dark"] .tc-product-quantity .tc-btn:hover {
  background: #27272a !important;
  color: #f5b71a !important;
}

html[data-color-theme="dark"] .tc-product-quantity__input {
  min-width: 0;
  height: 42px;
  text-align: center;
  background: #121215 !important;
  color: #f4f4f5 !important;
  border-inline: 1px solid #3f3f46 !important;
}

html[data-color-theme="dark"] .tc-product-quantity:hover .tc-product-quantity__input,
html[data-color-theme="dark"] .tc-product-quantity:focus-within .tc-product-quantity__input {
  background: #18181b !important;
  border-inline-color: #f5b71a !important;
}

/* Global breadcrumb contrast: every icon, link, separator and label follows the active theme. */
html[data-color-theme="dark"] body.tc-page .tc-breadcrumb,
html[data-color-theme="dark"] body.tc-page .tc-breadcrumb :is(a, i, svg, .tc-breadcrumb__sep, .tc-breadcrumb__current),
html[data-color-theme="dark"] body.tc-page .tc-breadcrumb :is(a:hover, a:focus-visible) {
  color: #ffffff !important;
}

html[data-color-theme="dark"] body.tc-page .tc-breadcrumb svg {
  fill: currentColor !important;
  stroke: currentColor !important;
}

html:not([data-color-theme="dark"]) body.tc-page .tc-breadcrumb,
html:not([data-color-theme="dark"]) body.tc-page .tc-breadcrumb :is(a, i, svg, .tc-breadcrumb__sep, .tc-breadcrumb__current),
html:not([data-color-theme="dark"]) body.tc-page .tc-breadcrumb :is(a:hover, a:focus-visible) {
  color: #000000 !important;
}

html:not([data-color-theme="dark"]) body.tc-page .tc-breadcrumb svg {
  fill: currentColor !important;
  stroke: currentColor !important;
}

html[data-color-theme="dark"] .tc-badge {
  background: #18181b !important;
  border-color: #3f3f46 !important;
  color: #e4e4e7 !important;
}

html[data-color-theme="dark"] .tc-badge.tc-badge-gold {
  color: #f5b71a !important;
  background: rgba(245,183,26,0.12) !important;
  border-color: rgba(245,183,26,0.3) !important;
}

html[data-color-theme="dark"] .tc-badge.tc-badge-success {
  color: #3dd68c !important;
  background: rgba(61,214,140,0.12) !important;
  border-color: rgba(61,214,140,0.3) !important;
}

html[data-color-theme="dark"] .tc-badge.tc-badge-info {
  color: #4fa8f5 !important;
  background: rgba(79,168,245,0.12) !important;
  border-color: rgba(79,168,245,0.3) !important;
}

.tc-store-category-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.tc-store-category-card {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 76px;
  padding: 14px;
  border: 1px solid var(--tc-line);
  border-radius: 4px;
  background: var(--tc-surface);
  color: var(--tc-text);
  text-align: left;
  cursor: pointer;
}

.tc-store-category-card:hover,
.tc-store-category-card:focus-visible {
  border-color: var(--tc-gold);
  transform: translateY(-1px);
}

.tc-store-category-card:active { transform: translateY(1px); }
.tc-store-category-card__media {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  flex: 0 0 56px;
  overflow: hidden;
  border: 1px solid var(--tc-line);
  border-radius: 4px;
  background: var(--tc-ink-2);
}

.tc-store-category-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tc-store-category-card__body { display: grid; gap: 4px; flex: 1; min-width: 0; }
.tc-store-category-card__body small { color: var(--tc-text-muted); }

html[data-color-theme="dark"] .tc-store-category-card {
  border-color: #3f3f46;
  background: #121215;
  color: #f4f4f5;
}

html[data-color-theme="dark"] .tc-store-category-card:hover,
html[data-color-theme="dark"] .tc-store-category-card:focus-visible {
  border-color: #f5b71a;
  background: #18181b;
}

@media (max-width: 720px) {
  .tc-store-category-grid { grid-template-columns: 1fr; }
}

/* Premium ranks: one readable feature sequence, then the monthly chest. */
.tc-rank-feature-list {
  display: grid;
  gap: 0;
  margin: 0 0 14px;
  padding: 0;
  list-style: none;
}

.tc-rank-feature-list li {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: start;
  gap: 8px;
  padding: 8px 2px;
  color: var(--tc-text-muted);
  border-bottom: 1px solid var(--tc-line);
  font-size: .7rem;
  line-height: 1.5;
}

.tc-rank-feature-list li:first-child {
  padding: 10px;
  background: color-mix(in srgb, var(--rank-color) 7%, var(--tc-surface-2));
  border: 1px solid color-mix(in srgb, var(--rank-color) 26%, var(--tc-line));
  border-radius: 4px;
}

.tc-rank-feature-list i {
  color: var(--rank-color);
  font-size: 1rem;
  line-height: 1.35;
}

.tc-rank-feature-list strong { color: var(--tc-text); }
.tc-rank-feature-list small { color: var(--tc-text-muted); }
.tc-rank-feature-list code { white-space: nowrap; }
.tc-rank-card > .tc-rank-card__details { margin-top: auto; border-radius: 4px; }
.tc-rank-card > .tc-rank-card__details + .tc-btn { margin-top: 0; }

html[data-color-theme="dark"] body.tc-page .tc-rank-feature-list li {
  color: #a1a1aa;
  border-color: #27272a;
}

html[data-color-theme="dark"] body.tc-page .tc-rank-feature-list li:first-child {
  background: color-mix(in srgb, var(--rank-color) 8%, #18181b) !important;
  border-color: color-mix(in srgb, var(--rank-color) 30%, #3f3f46) !important;
}

html[data-color-theme="dark"] body.tc-page .tc-rank-feature-list strong {
  color: #f4f4f5;
}

/* Tebex descriptions inherit the host theme; only neutral surfaces are owned. */
.ck-content .tc-tebex-rank {
  box-sizing: border-box;
  max-width: 100% !important;
  color: var(--tc-text) !important;
  background: color-mix(in srgb, var(--tc-surface) 96%, transparent) !important;
  border-color: var(--tc-line) !important;
}

.ck-content .tc-tebex-rank :is(p, li, small, summary) {
  color: inherit !important;
}

.ck-content .tc-tebex-rank__features li {
  border-bottom-color: var(--tc-line) !important;
}

.ck-content .tc-tebex-rank__buy-link {
  display: block !important;
  border-radius: 4px !important;
}

.ck-content table.tc-tebex-rank__metrics,
.ck-content table.tc-tebex-rank__rewards {
  display: table !important;
  width: 100% !important;
  table-layout: fixed !important;
}

.ck-content table.tc-tebex-rank__metrics td,
.ck-content table.tc-tebex-rank__rewards td {
  box-sizing: border-box;
}

/* Existing package descriptions have already passed through Tebex's sanitizer,
   which strips inline flex/grid declarations. Keep those saved div structures
   useful until each description is replaced with the table-based source. */
.ck-content div.tc-tebex-rank__metrics {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.ck-content div.tc-tebex-rank__rewards {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  padding: 8px !important;
}

.ck-content div.tc-tebex-rank__rewards .tc-tebex-rank__item {
  display: grid !important;
  grid-template-rows: 56px auto;
  align-items: center;
  justify-items: center;
  gap: 5px;
  min-width: 0;
  min-height: 112px;
  text-align: center;
}

.ck-content div.tc-tebex-rank__rewards .tc-tebex-rank__item > span {
  display: block !important;
  min-width: 0;
  width: 100%;
}

.ck-content .tc-tebex-rank__metric,
.ck-content .tc-tebex-rank__chest,
.ck-content .tc-tebex-rank__item {
  background: var(--tc-surface-2) !important;
  border-color: var(--tc-line) !important;
  border-radius: 4px !important;
}

.ck-content .tc-tebex-rank__item img {
  display: inline-block !important;
  width: 56px !important;
  height: 56px !important;
  margin: 0 !important;
  object-fit: contain !important;
  image-rendering: crisp-edges;
  image-rendering: pixelated;
}

.ck-content .tc-tebex-rank__chest {
  position: relative;
  background: color-mix(in srgb, #8f5c2c 64%, var(--tc-surface-2)) !important;
  border: 2px solid color-mix(in srgb, #4a2b14 72%, var(--tc-line)) !important;
  box-shadow: inset 0 0 0 2px color-mix(in srgb, #d99b4f 40%, transparent), 0 3px 0 color-mix(in srgb, #241409 52%, transparent);
}

.ck-content .tc-tebex-rank__chest-head,
.ck-content .tc-tebex-rank__chest > div:first-child {
  min-height: 34px;
  color: #fff4d8 !important;
  background: color-mix(in srgb, #8f5c2c 82%, #3b2414) !important;
  border-bottom: 2px solid color-mix(in srgb, #d99b4f 56%, #4a2b14) !important;
  text-shadow: 0 2px 0 #4a2b14;
  letter-spacing: .025em;
}

.ck-content .tc-tebex-rank__rewards {
  background: color-mix(in srgb, #3b2414 72%, var(--tc-surface-2)) !important;
  border-top: 1px solid color-mix(in srgb, #d99b4f 36%, transparent);
  border-bottom: 1px solid color-mix(in srgb, #241409 66%, transparent);
}

.ck-content .tc-tebex-rank__chest .tc-tebex-rank__item {
  background: color-mix(in srgb, var(--tc-surface) 76%, #c69657) !important;
  border: 2px solid color-mix(in srgb, var(--tc-line) 55%, #3b2717) !important;
  box-shadow: inset 2px 2px 0 color-mix(in srgb, #fff 22%, transparent), inset -2px -2px 0 color-mix(in srgb, #25160c 30%, transparent);
}

.ck-content .tc-tebex-rank__chest .tc-tebex-rank__item strong {
  text-shadow: 0 1px 0 color-mix(in srgb, var(--tc-surface) 70%, transparent);
}

html[data-color-theme="dark"] body.tc-page .ck-content .tc-tebex-rank {
  color: #f4f4f5 !important;
  background: #121215 !important;
  border-color: #3f3f46 !important;
}

html[data-color-theme="dark"] body.tc-page .ck-content .tc-tebex-rank__metric {
  background: #18181b !important;
  border-color: #3f3f46 !important;
}

html[data-color-theme="dark"] body.tc-page .ck-content .tc-tebex-rank__chest .tc-tebex-rank__item {
  background: color-mix(in srgb, #18181b 74%, #c69657) !important;
  border-color: color-mix(in srgb, #3f3f46 64%, #8f5c2c) !important;
}

@media (max-width: 620px) {
  .ck-content .tc-tebex-rank { padding: 14px !important; }
  .ck-content .tc-tebex-rank__metrics,
  .ck-content div.tc-tebex-rank__metrics { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 6px; border-spacing: 0 !important; }
  .ck-content .tc-tebex-rank__metrics tbody,
  .ck-content .tc-tebex-rank__metrics tr { display: contents; }
  .ck-content .tc-tebex-rank__metrics td { display: block; width: auto !important; }
  .ck-content .tc-tebex-rank__metric { padding: 8px 4px !important; text-align: center !important; }
  .ck-content .tc-tebex-rank__metric strong { font-size: 14px !important; }
  .ck-content .tc-tebex-rank__item { min-height: 106px !important; padding: 8px 4px !important; }
}

/* Rank description v2 survives Tebex sanitization without exposed lore. */
.ck-content .tc-tebex-rank-v2 {
  box-sizing: border-box;
  width: 100% !important;
  max-width: 680px !important;
  margin: 0 auto !important;
  color: var(--tc-text) !important;
  background: transparent !important;
  border: 0 !important;
}

.ck-content table.tc-tebex-rank-v2__header,
.ck-content table.tc-tebex-rank-v2__features,
.ck-content table.tc-tebex-rank-v2__rewards,
.ck-content .tc-tebex-rank-v2__item table {
  display: table !important;
  width: 100% !important;
  table-layout: fixed !important;
  border-spacing: 0 !important;
}

.ck-content table.tc-tebex-rank-v2__header {
  table-layout: auto !important;
}

.ck-content .tc-tebex-rank-v2__header td {
  width: 100% !important;
  text-align: center !important;
  white-space: nowrap !important;
}

.ck-content .tc-tebex-rank-v2__feature-cell {
  width: 50% !important;
  padding: 0 8px !important;
  vertical-align: top !important;
  border-bottom-color: var(--tc-line) !important;
}

.ck-content .tc-tebex-rank-v2__feature {
  padding: 7px 0 !important;
  color: inherit !important;
  font-size: 15px !important;
  line-height: 1.38 !important;
}

.ck-content .tc-tebex-rank-v2__lore {
  position: relative !important;
  cursor: help !important;
}

.ck-content .tc-tebex-rank-v2__lore::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 6px);
  z-index: 30;
  width: max-content;
  max-width: min(260px, calc(100vw - 32px));
  padding: 8px 10px;
  color: #f4f4f5;
  background: rgba(24, 24, 27, .98);
  border: 1px solid rgba(161, 161, 170, .55);
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.35;
  text-align: left;
  white-space: normal;
  transform: translateX(-50%);
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.ck-content .tc-tebex-rank-v2__lore:is(:hover, :focus, :focus-visible)::after {
  visibility: visible;
  opacity: 1;
}

.ck-content .tc-tebex-rank-v2__feature-cell:first-child .tc-tebex-rank-v2__lore::after,
.ck-content .tc-tebex-rank-v2__item-cell:first-child .tc-tebex-rank-v2__lore::after {
  left: 0;
  transform: none;
}

.ck-content .tc-tebex-rank-v2__feature-cell:last-child .tc-tebex-rank-v2__lore::after,
.ck-content .tc-tebex-rank-v2__item-cell:last-child .tc-tebex-rank-v2__lore::after {
  right: 0;
  left: auto;
  transform: none;
}

.ck-content :is(.tc-tebex-rank-v2__mark, .tc-tebex-rank-v2__lore):focus-visible {
  outline: 1px solid currentColor !important;
  outline-offset: 2px !important;
}
.ck-content .tc-tebex-rank-v2__item-cell { padding: 3px !important; vertical-align: top !important; }
.ck-content .tc-tebex-rank-v2__item {
  min-height: 50px !important;
  padding: 7px 9px !important;
  background: var(--tc-surface-2) !important;
  border: 1px solid var(--tc-line) !important;
  border-radius: 4px !important;
}

.ck-content .tc-tebex-rank-v2__item-image {
  display: block !important;
  width: 32px !important;
  height: 32px !important;
  max-width: none !important;
  margin: 0 !important;
  object-fit: contain !important;
  image-rendering: crisp-edges;
  image-rendering: pixelated;
}

.ck-content .tc-tebex-rank-v2__chest {
  margin-top: 10px !important;
  background: color-mix(in srgb, #8f5c2c 12%, var(--tc-surface-2)) !important;
  border: 1px solid color-mix(in srgb, #8f5c2c 48%, var(--tc-line)) !important;
  border-radius: 4px !important;
}

.ck-content .tc-tebex-rank-v2__chest-head {
  padding: 9px 12px !important;
  color: inherit !important;
  background: color-mix(in srgb, #8f5c2c 16%, var(--tc-surface-2)) !important;
  border-bottom: 1px solid color-mix(in srgb, #8f5c2c 42%, var(--tc-line)) !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  text-align: center !important;
}

.ck-content .tc-tebex-rank-v2__mark {
  display: inline-block !important;
  position: relative !important;
  vertical-align: middle !important;
}

.ck-content :is(.tc-tebex-rank-v2__mark-image, .tc-tebex-rank-v2__mark-end-image) {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  image-rendering: crisp-edges;
  image-rendering: pixelated;
}

.ck-content .tc-tebex-rank-v2__mark-end-image {
  position: absolute !important;
  inset: 0 !important;
  opacity: 0 !important;
}

.ck-content .tc-tebex-rank-v2__mark:is(:hover, :focus, :focus-visible) .tc-tebex-rank-v2__mark-image { opacity: 0 !important; }
.ck-content .tc-tebex-rank-v2__mark:is(:hover, :focus, :focus-visible) .tc-tebex-rank-v2__mark-end-image { opacity: 1 !important; }

html[data-color-theme="dark"] body.tc-page .ck-content .tc-tebex-rank-v2 {
  color: #f4f4f5 !important;
}

@media (max-width: 620px) {
  .ck-content .tc-tebex-rank-v2__feature-cell { padding: 0 4px !important; }
  .ck-content .tc-tebex-rank-v2__item { min-height: 48px !important; padding: 7px 8px !important; }
}

@media (max-width: 340px) {
  .ck-content .tc-tebex-rank-v2__header td:last-child strong { font-size: 12px !important; }
}

@media (max-width: 299px) {
  .ck-content table.tc-tebex-rank-v2__rewards,
  .ck-content .tc-tebex-rank-v2__rewards tbody,
  .ck-content .tc-tebex-rank-v2__rewards tr,
  .ck-content .tc-tebex-rank-v2__rewards td {
    display: block !important;
    width: 100% !important;
  }
}



