/*
 * Stat calculator page styles (stat-calculator2.php).
 * Redesign rules shared with the rest of the site live in stat-calculator2-redesign.css.
 */

:root {
  --dx-surface: rgba(255, 255, 255, 0.055);
  --dx-surface-hover: rgba(255, 255, 255, 0.035);
  --dx-border: rgba(255, 255, 255, 0.09);
  --dx-border-subtle: rgba(255, 255, 255, 0.07);
  --dx-border-soft: rgba(255, 255, 255, 0.06);
  --dx-border-mid: rgba(255, 255, 255, 0.1);
  --dx-border-strong: rgba(255, 255, 255, 0.15);
  --dx-inset-highlight: rgba(255, 255, 255, 0.07);
  --dx-overlay: rgba(0, 0, 0, 0.14);
  --dx-overlay-bar: rgba(0, 0, 0, 0.18);
  --dx-overlay-btn: rgba(0, 0, 0, 0.28);
  --dx-text-muted: rgba(233, 243, 241, 0.55);
  --dx-text-faint: rgba(233, 243, 241, 0.45);
  --dx-text-soft: rgba(233, 243, 241, 0.72);
  --dx-text-white: rgba(255, 255, 255, 0.95);
  --dx-text-teal: rgba(196, 220, 218, 0.72);
  --dx-warm: rgb(255, 125, 92);
  --dx-warm-mid: rgb(255, 157, 128);
  --dx-warm-soft: rgb(255, 180, 155);
  --dx-warm-fill: rgba(255, 125, 92, 0.22);
  --dx-warm-fill-strong: rgba(255, 125, 92, 0.34);
  --dx-action-fill: rgba(185, 239, 133, 0.22);
  --dx-action-fill-soft: rgba(185, 239, 133, 0.18);
  --dx-action-fill-mid: rgba(185, 239, 133, 0.12);
  --dx-action-fill-strong: rgba(151, 255, 50, 0.28);
  --dx-white-55: rgba(255, 255, 255, 0.55);
  --dx-white-72: rgba(255, 255, 255, 0.72);
  --dx-white-14: rgba(255, 255, 255, 0.14);
  --dx-white-12: rgba(255, 255, 255, 0.12);
  --dx-white-45: rgba(255, 255, 255, 0.45);
  --dx-white-65: rgba(255, 255, 255, 0.65);
  --dx-white-85: rgba(255, 255, 255, 0.85);
  --active: rgb(242, 193, 78);
  --action: #a3e635
}

.mono {
	font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  }
  .dx-form-label {
	display: flex;
	align-items: center;
	gap: 6px;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
    font-size:0.85em;
	color: var(--dx-text-muted);
	font-family: "Hanken Grotesk", Helvetica, sans-serif;
  }
  .dx-form-label--split {
    justify-content: space-between;
  }
  .dx-form-label--split > .dx-form-label__link {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 0.45em;
  }
  .dx-form-label__link {
    text-decoration: none;
    text-transform: none;
    letter-spacing: normal;
    font-weight: 600;
    font-size: 1.05em;
    line-height: 1;
    text-decoration: underline;
  }
  .dx-form-label__link:hover {
    color: rgba(255, 255, 255, 0.65);
  }
  .dx-form-label__link i {
    font-size: 1.15em;
  }
  .darkbox {
	background: var(--dx-overlay-btn);
	border: 1px solid var(--dx-border-soft);
	border-radius: 12px;
	padding: 0.85em 1.1em;
	line-height: 1.45;
  }
  .grade-score-row {
	overflow: visible;
  }
  .grade-percentile-badge {
	position: relative;
	width: 140px;
	height: 140px;
	flex-shrink: 0;
	overflow: visible;
  }
  .grade-percentile-badge__ring {
	display: block;
	width: 100%;
	height: 100%;
	overflow: visible;
  }
  .grade-percentile-badge__ring circle {
	transition: stroke-dashoffset 0.5s ease, stroke 0.5s ease;
  }
  .grade-percentile-badge__label {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	pointer-events: none;
  }
  .grade-percentile-badge__top {
	font-size: 0.7em;
	font-weight: bold;
	text-transform: uppercase;
	opacity: 0.8;
	margin-bottom: 0.2em;
	text-shadow: 0 0 4px currentColor;
  }
  .grade-percentile-badge__number {
	font-size: 2.2em;
	font-weight: bold;
	line-height: 1;
	text-shadow: 0 0 5px currentColor;
  }
  .grade-percentile-badge__name {
	font-size: 0.9em;
	font-weight: bold;
	margin-top: 0.2em;
	text-transform: uppercase;
	text-shadow: 0 0 4px currentColor;
  }
  .boolButtons.boolButtonsDark {
	background: var(--dx-overlay-btn);
	border: 1px solid var(--dx-border-soft);
  }
  .boolButtons.boolButtonsDark .boolButton.active {
	background: rgba(255, 255, 255, 0.92);
  }

/* Reusable stat points meter (wild / tamed / wasted bars) */
.dx-stat-bar {
  --dx-stat-bar-accent: var(--dx-white-55);
  --dx-stat-bar-fill: var(--dx-white-14);
  --dx-stat-bar-label: var(--dx-white-72);
  position: relative;
  height: 36px;
  min-width: 7.5em;
  border-radius: 9px;
  background: var(--dx-overlay-bar);
  border: 1px solid var(--dx-border-soft);
  overflow: hidden;
}
.dx-stat-bar__fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0%;
  background: var(--dx-stat-bar-fill);
  border-right: 2px solid var(--dx-stat-bar-accent);
  transition: width 0.22s ease-out, background 0.22s ease-out, border-color 0.22s ease-out;
}
.dx-stat-bar__content {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  pointer-events: none;
}
.dx-stat-bar__value {
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1;
  color: var(--dx-text-white);
}
.dx-stat-bar__label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--dx-stat-bar-label);
  white-space: nowrap;
}
.dx-stat-bar--empty .dx-stat-bar__fill {
  width: 0% !important;
  border-right-color: transparent;
  background: transparent;
}
.dx-stat-bar--avg {
  --dx-stat-bar-accent: var(--dx-white-55);
  --dx-stat-bar-fill: var(--dx-white-14);
  --dx-stat-bar-label: var(--dx-white-72);
}
.dx-stat-bar--high {
  --dx-stat-bar-accent: var(--action);
  --dx-stat-bar-fill: color-mix(in srgb, var(--action) 22%, transparent);
  --dx-stat-bar-label: var(--action);
}
.dx-stat-bar--very-high {
  --dx-stat-bar-accent: var(--action);
  --dx-stat-bar-fill: color-mix(in srgb, var(--action) 34%, transparent);
  --dx-stat-bar-label: var(--action);
}
.dx-stat-bar--low {
  --dx-stat-bar-accent: var(--dx-warm);
  --dx-stat-bar-fill: var(--dx-warm-fill);
  --dx-stat-bar-label: var(--dx-warm-mid);
}
.dx-stat-bar--very-low {
  --dx-stat-bar-accent: var(--dx-warm);
  --dx-stat-bar-fill: var(--dx-warm-fill-strong);
  --dx-stat-bar-label: var(--dx-warm-soft);
}
.dx-stat-bar--good {
  --dx-stat-bar-accent: var(--pos, #B9EF85);
  --dx-stat-bar-fill: var(--dx-action-fill);
  --dx-stat-bar-label: var(--pos, #B9EF85);
}
.dx-stat-bar--good-strong {
  --dx-stat-bar-accent: var(--posstrong, #97ff32);
  --dx-stat-bar-fill: var(--dx-action-fill-strong);
  --dx-stat-bar-label: var(--posstrong, #97ff32);
}
.dx-stat-bar--neutral {
  --dx-stat-bar-accent: var(--dx-white-45);
  --dx-stat-bar-fill: var(--dx-white-12);
  --dx-stat-bar-label: var(--dx-white-65);
}

#body,
#body.accent {
    font-family: "Hanken Grotesk", Helvetica, sans-serif;
    background-color: var(--base);
    background-image:
        radial-gradient(760px 320px at 86% 0%, rgba(200, 190, 240, 0.1), transparent 70%),
        linear-gradient(rgb(22, 51, 59) 0%, rgb(29, 65, 73) 38%, rgb(41, 89, 95) 64%, rgb(51, 109, 113) 88%);
    background-repeat: no-repeat;
    background-size: 100% 560px;
}

.mono {
	font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  }
  .dx-form-label {
	display: flex;
	align-items: center;
	gap: 6px;
	font-weight: 700;
	letter-spacing: 0.11em;
	text-transform: uppercase;
	color: var(--dx-text-muted);
	font-family: "Hanken Grotesk", Helvetica, sans-serif;
  }

/* Generic data table styles live in /css/stat-calculator2-redesign.css (.dodo-table*) */
.dodo-stat-icon {
  width: 34px;
  height: 24px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  background: var(--dx-border);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-sizing: border-box;
}
.dodo-stat-icon img {
  width: 16px;
  height: 16px;
  object-fit: contain;
  display: block;
}
.dodo-stat-icon-abbr {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 10.5px;
  font-weight: 600;
  line-height: 22px;
  text-align: center;
  color: var(--dx-text-soft);
}

.wasted-stats-row {
  border-top: 2px solid var(--dx-overlay);
}

.creature-info-card {
  padding: 0;
  overflow: hidden;
}
.creature-info-card__inner {
  gap: 1.25em;
  padding: 1.1em 1.5em;
  align-items: center;
}
.creature-info-card__image {
  width: 108px;
  height: 108px;
  object-fit: contain;
  flex-shrink: 0;
  /* Ground shadow, as if lit from above; sits behind the transparent PNG */
  background: radial-gradient(ellipse 46% 8% at 50% 77%, rgba(0, 0, 0, 0.4), transparent);
}
.creature-info-card__image-link {
  display: block;
  line-height: 0;
  flex-shrink: 0;
}
.creature-info-card__text {
  min-width: 0;
  flex: 1;
}
.creature-info-card__name-row {
  gap: 0.45em;
  margin-bottom: 0.15em;
}
.creature-info-card__name {
  font-size: 1.65em;
  font-weight: 700;
  line-height: 1.15;
  color: #fff;
}
.creature-info-card__edit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: none;
  border-radius: 6px;
  background: var(--dx-overlay-btn);
  color: var(--dx-white-85);
  cursor: pointer;
  flex-shrink: 0;
}
.creature-info-card__edit:hover {
  background: rgba(0, 0, 0, 0.4);
}
.creature-info-card__name-input {
  flex: 1;
  min-width: 0;
  max-width: 18em;
  font-size: 1.2em;
  font-weight: 700;
}
.creature-info-card__name-edit {
  display: none;
  gap: 0.45em;
  margin-bottom: 0.15em;
  align-items: center;
}
.creature-info-card__name-edit.is-editing {
  display: flex;
}
.creature-info-card__name-row.is-editing {
  display: none;
}
.creature-info-card__confirm {
  background: var(--dx-action-fill-soft);
  color: var(--action);
}
.creature-info-card__confirm:hover {
  background: rgba(185, 239, 133, 0.3);
}
.creature-info-card__species {
  font-size: 0.95em;
  color: var(--dx-text-teal);
  margin-bottom: 0.55em;
}
.creature-info-card__suggest {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  padding: 0;
  border: none;
  background: none;
  color: var(--dx-text-teal);
  font-size: 0.9em;
  text-decoration: none;
  cursor: pointer;
}
.creature-info-card__suggest span {
  text-decoration: underline;
}
.creature-info-card__suggest:hover {
  color: rgba(220, 240, 238, 0.9);
}


.trading-card-price-icon {
  width: 18px;
  height: 18px;
  object-fit: contain;
  flex-shrink: 0;
}

.card-price-fields {
  gap: 2em;
}
.card-price-icon-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45em;
  margin-top: 0.55em;
}
.card-price-icon-preset {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 4px;
  border: 1px solid var(--dx-border-strong);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.2);
  cursor: pointer;
}
.card-price-icon-preset:hover {
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.06);
}
.card-price-icon-preset.is-active {
  border-color: var(--action);
  background: var(--dx-action-fill-mid);
}
.card-price-icon-preset--clear {
  font-size: 1.25em;
  line-height: 1;
  color: var(--dx-white-55);
}
.card-price-icon-preset--clear.is-active {
  border-color: var(--dx-border-strong);
  background: rgba(0, 0, 0, 0.2);
  color: var(--dx-white-55);
}
.card-price-icon-preset img {
  width: 26px;
  height: 26px;
  object-fit: contain;
  display: block;
}
.card-tint-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45em;
  margin-top: 0.55em;
}
.card-tint-preset {
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid var(--dx-border-strong);
  border-radius: 6px;
  cursor: pointer;
  box-sizing: border-box;
}
.card-tint-preset:hover {
  border-color: rgba(255, 255, 255, 0.4);
}
.card-tint-preset.is-active {
  border-color: var(--action);
  box-shadow: 0 0 0 1px var(--action);
}

/* Price icon autocomplete — design system "Autocomplete with icon, compact" */
.dxAc--compact .dxAcInput {
  padding-right: 2em;
}
.dxAc--compact .dxAcClear {
  right: 0;
  width: auto;
  height: auto;
  padding: 0 0.6em;
  border-radius: 0;
  background: none;
  color: var(--gray, #aaa);
  font-size: 16px;
}
.dxAc--compact .dxAcClear:hover {
  background: none;
  color: var(--base);
}
.dxAc--compact .dxAcResults {
  margin-top: 6px;
  padding: 4px;
  background: #fff;
  color: #333;
  border: 0;
  border-radius: 2px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.22);
  max-height: 320px;
}
.dxAc--compact .dxAcResult {
  gap: 10px;
  padding: 6px 10px;
  border-radius: 3px;
  font-family: inherit;
  font-size: 15px;
  color: #333;
}
.dxAc--compact .dxAcResult:hover,
.dxAc--compact .dxAcResult.isActive {
  background: rgba(49, 107, 111, 0.12);
}
.dxAc--compact .dxAcResultImg {
  width: 24px;
  height: 24px;
  background: none;
  border-radius: 0;
}
.dxAc--compact .dxAcResultImg--empty {
  background: rgba(0, 0, 0, 0.06);
  border-radius: 0.25em;
}

/* Upload, modals, stats table cells, chips, trading card, share */
@keyframes scan {
    0% { top: 0; }
    50% { top: 100%; }
    100% { top: 0; }
}
/* Upload drop zone */
.ocr-upload-area {
    border: 2px dashed var(--dx-white-14);
    border-radius: 4px;
    padding: 14px 16px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background-color 0.2s;
}
.ocr-upload-area a {
    color: var(--pos);
}
/* Scan overlay shown while a screenshot is read */
#ocrPreview {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.8);
    align-items: center;
    justify-content: center;
    flex-direction: column;
}
#ocrPreviewPanel {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
}
#ocrPreviewClose {
    position: absolute;
    top: -12px;
    right: -12px;
    z-index: 2;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.85);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}
#ocrPreviewClose i {
    font-size: 1.35em;
}
#ocrPreviewImg {
    display: block;
    max-width: 100%;
    max-height: 90vh;
    border: 2px solid #555;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}
#ocrProgressWrap {
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 12px;
    background: rgba(0, 0, 0, 0.75);
    padding: 10px 12px;
    border-radius: 6px;
}
.ocr-progress__head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.75em;
    margin-bottom: 6px;
}
.ocr-progress__track {
    height: 6px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 3px;
    overflow: hidden;
}
#ocrProgressBar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #8BC34A, #B9EF85);
    border-radius: 3px;
    transition: width 0.25s ease-out;
}
#ocrScanLine {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 8px;
    background: #B9EF85;
    box-shadow: 0 0 10px #B9EF85, 0 0 22px rgba(185, 239, 133, 0.75), 0 0 36px rgba(185, 239, 133, 0.35);
    animation: scan 2.5s ease-in-out infinite;
    pointer-events: none;
}
#ocrScanLine.active {
    display: block;
}
#ocrPreview.show {
    display: flex;
}
#ocrPreviewClose:hover {
    background: rgba(227, 86, 77, 0.95);
}
.ocr-upload-area.is-dragover {
    border-color: #B9EF85;
    background-color: rgba(185, 239, 133, 0.1);
}
/* Left-aligned variant of the site .notice (which centers its text) */
.notice--left {
    text-align: left;
}/* Short numeric input (level, TE %, imprint %) */
.inputNum {
    width: 4em;
    text-align: center;
    font-weight: bold;
}
/* Modal — Dododex design system (Overlays → Modal) */
.modal-live {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10001;
    place-items: center;
    padding: 16px;
}
.modal-live.show {
    display: grid;
}
.scrim {
    position: absolute;
    inset: 0;
    background: rgba(10, 21, 22, 0.62);
    backdrop-filter: blur(2px);
}
.modal {
    position: relative;
    width: min(440px, 100%);
    max-height: calc(100vh - 32px);
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    border-radius: 16px;
    background: var(--base);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
    text-align: left;
}
.modal--wide {
    width: min(560px, 100%);
}
.modal-hd {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 20px 22px 0;
}
.modal-hd .eyebrow {
    font: 600 10px "IBM Plex Mono", "JetBrains Mono", monospace;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #a9cfcb;
    margin-bottom: 4px;
}
.modal-hd h2 {
    margin: 0;
    font: 700 20px "Hanken Grotesk", Helvetica, sans-serif;
    color: #fff;
    text-wrap: balance;
}
.modal-x {
    margin-left: auto;
    flex: none;
    width: 32px;
    height: 32px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.05);
    color: #e8f3f2;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
}
.modal-x:hover {
    background: rgba(255, 255, 255, 0.12);
}
.modal-bd {
    padding: 12px 22px 20px;
    font-size: 14.5px;
    line-height: 1.6;
    color: #cfe3e1;
    overflow-y: auto;
}
.modal-ft {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
    padding: 14px 22px 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.mbtn {
    font: 700 13px "Hanken Grotesk", Helvetica, sans-serif;
    border-radius: 999px;
    padding: 10px 20px;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.06);
    color: #e8f3f2;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    line-height: 1;
}
.mbtn i {
    font-size: 1.2em;
    line-height: 1;
}
.mbtn:hover {
    border-color: rgba(255, 255, 255, 0.3);
}
.mbtn.primary {
    background: #bbff77;
    border-color: #bbff77;
    color: #0a1516;
}
.mbtn.primary:hover {
    background: #97ff32;
    border-color: #97ff32;
}
.mbtn:focus-visible,
.modal-x:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}
.modal-section + .modal-section {
    margin-top: 1.25em;
    padding-top: 1.25em;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.modal-section h3 {
    margin: 0 0 0.5em;
    font-size: 1.05em;
    color: #fff;
}
.modal-section p {
    margin: 0 0 0.5em;
}
.how-steps {
    list-style: none;
    margin: 0.75em 0 0;
    padding: 0;
    counter-reset: how-step;
}
.how-steps li {
    counter-increment: how-step;
    position: relative;
    padding-left: 2.4em;
    margin-bottom: 0.85em;
}
.how-steps li::before {
    content: counter(how-step);
    position: absolute;
    left: 0;
    top: 0.05em;
    width: 1.6em;
    height: 1.6em;
    border-radius: 999px;
    background: rgba(187, 255, 119, 0.16);
    color: #bbff77;
    font: 700 0.85em/1.6em "JetBrains Mono", monospace;
    text-align: center;
}
.how-steps b {
    color: #fff;
}
.modal-section .normallist {
    margin: 0.75em 0 0 1.25em;
    line-height: 1.6;
}
.modal-path {
    display: block;
    padding: 0.5em 0.65em;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    font-size: 0.82em;
    word-break: break-all;
    line-height: 1.45;
}
.modal-section kbd {
    display: inline-block;
    padding: 0.1em 0.45em;
    font-size: 0.9em;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 3px;
    border: 1px solid rgba(255, 255, 255, 0.15);
}
.ocr-example-image img {
    display: block;
    width: 100%;
    max-width: 280px;
    margin: 0 auto;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.15);
}
.points-cell {
    padding: 0.5em !important;
    min-width: 9em;
    vertical-align: middle;
}
.level-value {
    position: relative;
    z-index: 1;
    font-weight: bold;
}
.dx-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px;
    border-radius: 10px;
    cursor: pointer;
    font-family: "Hanken Grotesk", Helvetica, sans-serif;
    transition: background 140ms, border-color 140ms, color 140ms, box-shadow 140ms;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: rgba(255, 255, 255, 0.78);
    user-select: none;
}
.dx-chip:hover,
.dx-chip[data-tooltip]:hover {
    border-radius: 10px;
}
.dx-chip__icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}
.dx-chip.active .dx-chip__icon {
    filter: brightness(0) invert(16%) sepia(23%) saturate(748%) hue-rotate(138deg) brightness(93%) contrast(91%);
}
.dx-chip__name {
    font-size: 13px;
    font-weight: 500;
}
.dx-chip.active {
    background: var(--active);
    border-color: var(--active);
    color: var(--basedark2);
    box-shadow: 0px 6px 18px -8px color-mix(in srgb, var(--active) 80%, transparent);
    border-radius: 10px;
}
.dx-chip.disabled {
    opacity: 0.3;
    cursor: not-allowed;
}
#tradingCard {
    position: sticky;
    top: 1em;
    width: 424px;
    max-width: 100%;
    margin-left: auto;
    padding: 0 !important;
    text-align: left;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}
.trading-card {
    --tc-accent: #e9a93f;
    --tc-accent-soft: rgba(233, 169, 63, 0.7);
    --tc-accent-bg: rgba(224, 163, 60, 0.12);
    --tc-accent-border: rgba(224, 163, 60, 0.3);
    --tc-accent-pill: #e6b76c;
    --tc-cols: 20px 1fr 62px 26px 26px 74px;
    width: 424px;
    max-width: 100%;
    border-radius: 14px;
    padding: 1px;
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0.04) 38%, rgba(0, 0, 0, 0.4));
    box-shadow:
        rgba(0, 0, 0, 0.85) 0px 26px 50px -18px,
        rgba(255, 255, 255, 0.06) 0px 2px 0px inset;
    transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
    box-sizing: border-box;
    overflow: hidden;
    color: #f2efe9;
}
.trading-card__inner {
    border-radius: 13px;
    overflow: hidden;
    background: var(--tc-bg-inner, rgb(13, 20, 22));
}
.trading-card__header {
    display: flex;
    align-items: stretch;
    background: linear-gradient(var(--tc-bg-header-top, rgb(19, 28, 30)), var(--tc-bg-header-bottom, rgb(12, 18, 20)));
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
.trading-card__brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    width: 78px;
    padding: 12px 0;
    border-right: 1px solid rgba(255, 255, 255, 0.07);
    flex-shrink: 0;
    box-sizing: border-box;
}
.trading-card__brand-mark {
    width: 34px;
    height: 34px;
    object-fit: contain;
    display: block;
    filter: drop-shadow(rgba(0, 0, 0, 0.55) 0px 2px 6px);
}
.trading-card__brand-name {
    font: 600 8px / 1.25 "IBM Plex Mono", monospace;
    letter-spacing: 0.1em;
    text-align: center;
    color: rgba(232, 228, 220, 0.62);
    text-transform: uppercase;
}
.trading-card__header-main {
    flex: 1 1 0%;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}
.trading-card__species {
    font: 700 16px / 1.05 "Barlow Condensed", sans-serif;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgb(242, 239, 233);
}
.trading-card__graded-on {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
}
.trading-card__graded-on-label {
    font: 500 8.5px / 1 "IBM Plex Mono", monospace;
    letter-spacing: 0.14em;
    color: rgba(232, 228, 220, 0.35);
    text-transform: uppercase;
}
.trading-card__graded-pill {
    font: 600 9px / 1 "IBM Plex Mono", monospace;
    letter-spacing: 0.1em;
    padding: 4px 7px;
    border-radius: 3px;
    background: var(--tc-accent-bg);
    border: 1px solid var(--tc-accent-border);
    color: var(--tc-accent-pill);
    text-transform: uppercase;
}
.trading-card__score {
    width: 88px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    border-left: 1px solid rgba(255, 255, 255, 0.07);
    background: linear-gradient(rgb(26, 21, 18), rgb(16, 13, 11));
    flex-shrink: 0;
    box-sizing: border-box;
}
.trading-card__score-value {
    font: 700 40px / 1 "Barlow Condensed", sans-serif;
    color: var(--tc-accent);
    text-shadow: 0 0 22px var(--tc-accent-soft);
}
.trading-card__score-label {
    font: 600 8px / 1 "IBM Plex Mono", monospace;
    letter-spacing: 0.18em;
    color: var(--tc-accent-soft);
    text-transform: uppercase;
}
.trading-card__score-bar {
    width: 44px;
    height: 2px;
    margin-top: 5px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.12);
    overflow: hidden;
}
.trading-card__score-bar-fill {
    height: 100%;
    width: var(--tc-score-pct, 0%);
    background: var(--tc-accent);
}
.trading-card__art {
    position: relative;
    background: var(--tc-bg-art, rgb(18, 34, 37));
    overflow: hidden;
}
.trading-card__art-glow,
.trading-card__art-img-wrap,
.trading-card__art-sheen,
.trading-card__art-fade {
    position: absolute;
    inset: 0;
}
.trading-card__art-glow {
    background: radial-gradient(
        120% 90% at 50% 0%,
        var(--tc-art-glow-1, rgb(46, 85, 89)),
        var(--tc-art-glow-2, rgb(26, 48, 51)) 58%,
        var(--tc-art-glow-3, rgb(15, 27, 29))
    );
}
.trading-card__art-img-wrap {
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.trading-card__art-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center 24%;
    display: block;
    filter: saturate(1.06) contrast(1.04) drop-shadow(0 12px 28px rgba(0, 0, 0, 0.45));
    padding: 26px 32px 72px;
    box-sizing: border-box;
}
.trading-card__art-sheen {
    background: linear-gradient(118deg, rgba(255, 255, 255, 0.14) 0px, rgba(255, 255, 255, 0.14) 13%, transparent 26%, transparent 76%, rgba(150, 220, 255, 0.1) 94%);
    mix-blend-mode: screen;
    pointer-events: none;
}
.trading-card__art-fade {
    background: linear-gradient(
        var(--tc-art-fade-top, rgba(10, 26, 28, 0.5)) 0%,
        transparent 24%,
        var(--tc-art-fade-mid, rgba(12, 30, 32, 0.4)) 68%,
        var(--tc-art-fade-bottom, rgb(15, 27, 29)) 100%
    );
    pointer-events: none;
}
.trading-card__identity {
    position: relative;
    padding: 230px 16px 15px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
    column-gap: 10px;
    row-gap: 8px;
    align-items: end;
}
.trading-card__art--empty .trading-card__identity {
    padding-top: 72px;
}
.trading-card__identity-row {
    display: contents;
}
.trading-card__name {
    grid-column: 1;
    grid-row: 1;
    font: 700 38px / 0.78 "Barlow Condensed", sans-serif;
    letter-spacing: 0.02em;
    color: rgb(255, 255, 255);
    text-shadow: rgba(0, 0, 0, 0.6) 0px 3px 16px;
    text-transform: uppercase;
    word-break: break-word;
    min-width: 0;
    align-self: start;
}
.trading-card__badges {
    grid-column: 1;
    grid-row: 2;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}
.trading-card__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    height: 22px;
    padding: 0 10px;
    border-radius: 99px;
    box-sizing: border-box;
    flex-shrink: 0;
}
.trading-card__badge--female {
    background: rgba(255, 140, 190, 0.16);
    border: 1px solid rgba(255, 140, 190, 0.42);
    color: rgb(255, 166, 201);
}
.trading-card__badge--male {
    background: rgba(140, 190, 255, 0.16);
    border: 1px solid rgba(140, 190, 255, 0.42);
    color: rgb(166, 201, 255);
}
.trading-card__badge--status {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.22);
    font: 600 8.5px / 1 "IBM Plex Mono", monospace;
    letter-spacing: 0.14em;
    color: rgba(255, 255, 255, 0.8);
    text-transform: uppercase;
}
.trading-card__badge--platform {
    background: rgba(185, 239, 133, 0.12);
    border: 1px solid rgba(185, 239, 133, 0.32);
    font: 600 8.5px / 1 "IBM Plex Mono", monospace;
    letter-spacing: 0.14em;
    color: rgb(185, 239, 133);
    text-transform: uppercase;
}
.trading-card__badge-icon {
    font: 600 11px / 1 Barlow, sans-serif;
}
.trading-card__badge-text {
    font: 600 8.5px / 1 "IBM Plex Mono", monospace;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}
.trading-card__level {
    grid-column: 2;
    grid-row: 1 / -1;
    align-self: end;
    display: flex;
    align-items: baseline;
    gap: 4px;
    flex-shrink: 0;
}
.trading-card__level-label {
    font: 500 9px / 1 "IBM Plex Mono", monospace;
    letter-spacing: 0.14em;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
}
.trading-card__level-value {
    font: 700 24px / 1 "Barlow Condensed", sans-serif;
    color: rgb(255, 255, 255);
}
.trading-card__meta {
    margin: 16px 0 0;
    border: 1px solid var(--tc-accent-border, rgba(233, 169, 63, 0.45));
    border-radius: 8px;
    background: var(--tc-bg-meta, rgba(10, 18, 20, 0.55));
    overflow: hidden;
    box-sizing: border-box;
}
.trading-card__meta-price {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
}
.trading-card__price-label {
    flex-shrink: 0;
    font: 600 9px / 1 "IBM Plex Mono", monospace;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--tc-accent, rgb(233, 169, 63));
}
.trading-card__price-value {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 7px;
    min-width: 0;
}
.trading-card__price-icon {
    width: 22px;
    height: 22px;
    object-fit: contain;
    flex-shrink: 0;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.45));
}
.trading-card__price-amount {
    font: 700 18px / 1 "Barlow Condensed", sans-serif;
    letter-spacing: 0.02em;
    color: rgb(255, 255, 255);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}
.trading-card__description {
    padding: 10px 12px 11px;
    border-top: 1px solid var(--tc-accent-border, rgba(233, 169, 63, 0.45));
    font: italic 500 12.5px / 1.4 Barlow, sans-serif;
    color: rgba(232, 228, 220, 0.82);
    white-space: pre-wrap;
    word-break: break-word;
}
.trading-card__meta:not(:has(.trading-card__meta-price)) .trading-card__description {
    border-top: none;
}
.trading-card__stats {
    padding: 22px 16px 16px;
    background: var(--tc-bg-stats, rgb(15, 27, 29));
}
.trading-card__stats--meta-only {
    padding-top: 16px;
}
.trading-card__stats--meta-only .trading-card__meta {
    margin-top: 0;
}
.trading-card__stats-head,
.trading-card__stats-row {
    display: grid;
    grid-template-columns: var(--tc-cols);
    gap: 0 8px;
    align-items: center;
}
.trading-card__stats-head {
    padding: 0 0 8px;
    font: 600 8.5px / 1 "IBM Plex Mono", monospace;
    letter-spacing: 0.16em;
    color: rgba(232, 228, 220, 0.32);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    text-transform: uppercase;
}
.trading-card__stats-head-center {
    text-align: center;
}
.trading-card__stats-head-right {
    text-align: right;
}
.trading-card__stats-row {
    padding: 9px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.055);
}
.trading-card__stat-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
    display: block;
    filter: drop-shadow(rgba(0, 0, 0, 0.5) 0px 1px 2px);
}
.trading-card__stat-name {
    font: 500 13px / 1 Barlow, sans-serif;
    color: rgb(230, 226, 218);
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.trading-card__stat-bar {
    height: 3px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
}
.trading-card__stat-bar-fill {
    height: 100%;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.6);
    width: var(--tc-bar-pct, 0%);
}
.trading-card__stats-row--preferred .trading-card__stat-bar-fill {
    background: var(--tc-accent);
}
.trading-card__stat-num {
    font: 500 12px / 1 "IBM Plex Mono", monospace;
    font-variant-numeric: tabular-nums;
    text-align: center;
    color: rgba(232, 228, 220, 0.85);
}
.trading-card__stat-num--muted {
    opacity: 0.72;
}
.trading-card__stat-value {
    font: 600 13px / 1 "IBM Plex Mono", monospace;
    font-variant-numeric: tabular-nums;
    text-align: right;
    color: rgb(255, 255, 255);
}
.trading-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 11px 16px;
    background: var(--tc-bg-footer, rgb(11, 18, 20));
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    font: 500 8.5px / 1 "IBM Plex Mono", monospace;
    letter-spacing: 0.16em;
    color: rgba(232, 228, 220, 0.32);
    text-transform: uppercase;
}
.share-section {
    margin-bottom: 1.5em;
    padding-bottom: 1.5em;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.share-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}
.stat-calc-share-preview {
    width: 424px;
    max-width: 100%;
    flex-shrink: 0;
}

/* Mobile */
@media (max-width: 720px) {
    .creature-info-card__inner {
        gap: 1em;
        padding: 1em;
    }
    .creature-info-card__image {
        width: 84px;
        height: 84px;
    }
    .creature-info-card__name {
        font-size: 1.35em;
    }
    .stat-calc-settings {
        gap: 1.25em 1.5em !important;
    }
    .stat-calc-settings .boolButtons {
        flex-wrap: wrap;
    }
    .stat-calc-grade-layout {
        gap: 1.25em !important;
    }
    .grade-percentile-badge {
        width: 120px;
        height: 120px;
    }
    #oneInXDisplay {
        font-size: 1.25em !important;
    }
    .stat-calc-share-layout {
        gap: 1.5em !important;
    }
    .stat-calc-share-preview {
        width: 100%;
        order: -1;
    }
    #tradingCard {
        position: static;
        width: 100%;
        margin-left: 0;
    }
    .trading-card {
        width: 100%;
        margin: 0 auto;
    }
    .trading-card__header {
        gap: 0.55em;
    }
    .trading-card__score {
        width: 72px;
        min-height: 72px;
        padding: 0.4em;
    }
    .stat-calc-share-preview__toolbar {
        flex-wrap: wrap;
    }
    .points-cell {
        min-width: 7.5em;
    }
}
@media (max-width: 480px) {
    .creature-info-card__inner {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }
    .creature-info-card__image {
        width: 96px;
        height: 96px;
    }
    .dx-form-label--split {
        flex-wrap: wrap;
        gap: 0.35em 0.75em;
    }
    .stat-calc-share-link {
        flex-wrap: wrap;
    }
    .stat-calc-share-link .button {
        width: 100%;
        justify-content: center;
    }
    .trading-card {
        --tc-cols: 16px 1fr 48px 22px 22px 64px;
    }
    .trading-card__species {
        font-size: 0.78em;
    }
    .trading-card__name {
        font-size: 1.35em;
    }
    .trading-card__stats-head,
    .trading-card__stats-row {
        font-size: 0.78em;
    }
    #ocrPreviewClose {
        top: 8px;
        right: 8px;
    }
    #ocrProgressWrap {
        left: 8px;
        right: 8px;
        bottom: 8px;
    }
    .darkbox.row {
        flex-wrap: wrap;
    }
}
