/* The element showcase, soft warm pastel: one template (js/dex-show.js) for the Elemondex detail view
   (/elemondex/#H) and the top of every element fact page (/elemondex/hydrogen/). The full-art holo card
   (css/holo.css) on the left; on the right the name with its number, quiet pills, and soft frosted panels
   whose rows are split by hairlines. */
.show-body { color: var(--e-ink); font-size: 17px; line-height: 1.6; }
:where(.show-body) p, :where(.show-body) ul, :where(.show-body) li { margin: 0; padding: 0; color: inherit; }
:where(.show-body) a { color: inherit; text-decoration: none; }
:where(.show-body) h3 { line-height: 1.6; }
.show-body .pip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px 4px 8px; border-radius: var(--e-r-pill); font-size: 12.5px; font-weight: 800; line-height: 1.2; color: var(--t-ink); background: color-mix(in srgb, var(--t-tint) 80%, rgba(255, 255, 255, 0.4)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--t) 22%, transparent); }
.show-body .pip::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--t); }
.show-body { max-width: 1240px; margin: 0 auto; padding: clamp(28px, 4vw, 56px) var(--e-gutter) 72px; display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: clamp(32px, 5vw, 88px); align-items: start; }
.stage { position: sticky; top: calc(var(--e-nav-h) + 34px); display: flex; flex-direction: column; align-items: center; gap: 22px; }

.foil { position: relative; width: min(100%, 400px); aspect-ratio: 5 / 7; perspective: 1400px; cursor: grab; }
.foil-in { position: absolute; inset: 0; animation: showCardIn 0.7s var(--e-spring) both; }
.foil .foil-in.fcard { box-shadow: var(--e-shadow-lg), 0 30px 80px -40px var(--t), inset 0 0 0 1px rgba(255, 255, 255, 0.7); }
/* the turn and the foil are the shared holo (css/holo.css); the card's own perspective is on .foil */
.foil .foil-in.holo-rot { transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) scale(var(--hs, 1)); }
.show-body .sym { font-family: var(--e-font); font-weight: 900; letter-spacing: -0.04em; }

.vh { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.show-critter { position: absolute; width: 34%; max-width: 140px; right: -6%; bottom: 70px; z-index: 5; pointer-events: auto; cursor: pointer; }
.show-critter img { animation: critter-in 0.7s var(--e-spring) 0.35s both; }
@keyframes critter-in { from { transform: translate(-30px, 40px) scale(0.3); opacity: 0; } }

.info { display: flex; flex-direction: column; gap: 16px; min-width: 0; --sh-hair: rgba(38, 29, 61, 0.08); }
.info > * { animation: showRise 0.6s var(--e-out) both; }
.info > *:nth-child(2) { animation-delay: 0.05s; } .info > *:nth-child(3) { animation-delay: 0.1s; } .info > *:nth-child(4) { animation-delay: 0.15s; }
.info > *:nth-child(5) { animation-delay: 0.2s; } .info > *:nth-child(6) { animation-delay: 0.25s; } .info > *:nth-child(7) { animation-delay: 0.3s; }

/* title: the name big and bold, the number quiet and right-aligned */
.title { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.show-body .title :is(h1, h2) { margin: 0; min-width: 0; font-size: clamp(44px, 5.4vw, 76px); line-height: 0.98; font-weight: 900; letter-spacing: -0.035em; color: var(--e-ink); overflow-wrap: anywhere; }
.show-body .title :is(h1, h2) .sym { font-size: 0.5em; font-weight: 800; color: color-mix(in srgb, var(--t-ink) 70%, var(--e-ink-3)); margin-left: 6px; letter-spacing: -0.02em; }
.title .no { flex: none; font-size: clamp(24px, 2.4vw, 34px); font-weight: 600; letter-spacing: -0.01em; color: var(--e-ink-2); font-variant-numeric: tabular-nums; }
.bio { margin: 0; max-width: 40rem; font-size: 17px; font-weight: 600; line-height: 1.6; color: var(--e-ink-2); }
/* small icon + label pills: the type (dulled type ink, white) and the epithet (frosted) */
.tags { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 2px 0 6px; }
.tags .pip { padding: 6px 12px 6px 9px; font-size: 13px; color: #fff; background: color-mix(in srgb, var(--t-ink) 78%, #7d7690); box-shadow: none; }
.show-body .tags .pip .ti { color: #fff; }
.tags .epi { display: inline-flex; padding: 6px 13px; border-radius: var(--e-r-pill); font-size: 13.5px; font-weight: 700; color: var(--e-ink-2); background: rgba(255, 255, 255, 0.5); box-shadow: inset 0 0 0 1px var(--sh-hair); }

/* soft panels: a frosted tint fill, an inner highlight and a hairline rim, no heavy outline */
.panel { padding: 22px 24px; border-radius: 28px; background: linear-gradient(180deg, rgba(255, 255, 255, 0.62), rgba(255, 255, 255, 0.36)); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 1px 2px rgba(70, 48, 20, 0.04), 0 24px 48px -36px rgba(70, 48, 20, 0.3); }
.panel-note { margin: -4px 0 14px; font-size: 13.5px; font-weight: 600; line-height: 1.5; color: var(--e-ink-3); }
.panel .ph { margin: 0 0 10px; font-size: 13px; font-weight: 800; letter-spacing: 0.01em; color: var(--e-ink-3); }
/* stats: three tiles split by hairlines, the value big, a tiny label, a slim meter */
.panel.stats { position: relative; padding: 20px 8px; }
.panel.stats .ph { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.statrows { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stat { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 2px 14px; text-align: center; }
.stat + .stat { border-left: 1px solid var(--sh-hair); }
.stat .val { font-size: clamp(24px, 2.2vw, 30px); line-height: 1.1; font-weight: 800; color: var(--e-ink); font-variant-numeric: tabular-nums; }
.stat .lbl { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 700; color: var(--e-ink-3); }
.stat .lbl svg { width: 13px; height: 13px; fill: var(--bc); }
.stat .meter { position: relative; width: min(100%, 92px); height: 4px; margin: 4px 0 2px; border-radius: 4px; background: rgba(38, 29, 61, 0.07); overflow: hidden; }
.stat .meter i { position: absolute; inset: 0 auto 0 0; border-radius: 4px; background: var(--bc); animation: showGrow 1s var(--e-out) both 0.2s; transform-origin: left; }
.stat .why { font-size: 12px; font-weight: 600; line-height: 1.35; color: var(--e-ink-3); }
/* facts, moves, matchups, family: rows split by hairlines */
.facts { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.facts li { display: grid; grid-template-columns: 26px 1fr; gap: 12px; align-items: baseline; margin: 0; padding: 12px 0; border-top: 1px solid var(--sh-hair); font-weight: 600; font-size: 16px; line-height: 1.55; color: var(--e-ink); }
.facts li:first-child { border-top: 0; padding-top: 4px; }
.facts li:last-child { padding-bottom: 0; }
.facts li b { font-size: 13px; font-weight: 700; color: var(--e-ink-3); font-variant-numeric: tabular-nums; }
.moves { display: grid; gap: 0; }
.move { --jc: var(--e-violet); display: grid; grid-template-columns: 48px 1fr; gap: 14px; padding: 14px 0; border-top: 1px solid var(--sh-hair); }
.move:first-child { border-top: 0; padding-top: 4px; }
.move:last-child { padding-bottom: 0; }
.move .ico { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: linear-gradient(180deg, #fff, color-mix(in srgb, var(--jc) 22%, #fff)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--jc) 30%, transparent); }
.move .ico svg { width: 22px; height: 22px; fill: none; stroke: color-mix(in srgb, var(--jc) 70%, #261d3d); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.move .top { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; }
.move .top b { font-size: 17px; font-weight: 800; color: var(--e-ink); }
.move .top span { font-size: 12.5px; font-weight: 700; color: var(--e-ink-3); }
.move .top span::before { content: "·"; margin-right: 8px; }
.move .does { margin: 1px 0 0; font-size: 13.5px; font-weight: 700; color: var(--e-ink-2); }
.move .real { margin: 6px 0 0; font-size: 14.5px; font-weight: 600; line-height: 1.5; color: var(--e-ink-3); }
.move .real::before { content: "Real science · "; font-weight: 800; color: var(--e-life-ink); }
.tpanel .tline { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin: 0 0 6px; font-size: 15px; font-weight: 700; color: var(--e-ink-2); }
.tpanel .tline .tp-badge { flex: none; width: 48px; height: 48px; filter: drop-shadow(0 3px 6px rgba(60, 40, 20, 0.14)); }
.tpanel .tpass { margin: 0 0 8px; font-size: 14.5px; font-weight: 600; color: var(--e-ink-2); }
.tpanel .tpass b { color: var(--e-ink); font-weight: 800; }
.match { display: grid; gap: 0; }
.mrow { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 12px; align-items: start; padding: 12px 0; border-top: 1px solid var(--sh-hair); }
.mlab small { display: block; font-size: 12px; font-weight: 700; color: var(--e-ink-3); }
.mlab b { font-size: 19px; font-weight: 800; color: var(--e-ink); }
.mrow ul { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.mrow li { display: grid; justify-items: start; gap: 4px; font-size: 14px; font-weight: 600; line-height: 1.45; color: var(--e-ink-2); }
.mrow .src { display: inline-block; margin-left: 2px; padding: 1px 8px; border-radius: var(--e-r-pill); font-size: 11px; font-weight: 800; white-space: nowrap; vertical-align: 1px; }
.mrow .src.is-real { background: rgba(23, 112, 63, 0.1); color: #17703f; }
.mrow .src.is-game { background: rgba(91, 63, 208, 0.09); color: var(--e-violet-ink); }
.tpanel .tnote { margin: 10px 0 0; font-size: 12.5px; font-weight: 600; color: var(--e-ink-3); }
.show-body .pip .ti, .pip .ti { width: 1.25em; height: 1.25em; color: var(--t-ink); }
.show-body .pip:has(.ti)::before, .pip:has(.ti)::before { display: none; }
.kin { display: grid; gap: 0; margin-top: 4px; }
.kin div { padding: 12px 0 0; margin-top: 12px; border-top: 1px solid var(--sh-hair); font-size: 14.5px; font-weight: 600; line-height: 1.55; color: var(--e-ink-2); }
.kin b { color: var(--e-ink); font-weight: 800; }
/* bond buddies: soft tinted tiles, the buddy's cut-out stepping out of the top */
.bonds { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; padding-top: 34px; }
.bond {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; min-height: 150px; padding: 70px 12px 14px;
  color: inherit; text-decoration: none; text-align: center; font: inherit; cursor: pointer; border: 0; border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.5), color-mix(in srgb, var(--t-tint) 70%, rgba(255, 255, 255, 0.3)));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  transition: transform var(--e-t) var(--e-spring), box-shadow var(--e-t);
}
.bond:hover { transform: translateY(-3px); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--t) 60%, transparent), 0 16px 28px -20px rgba(60, 40, 20, 0.5); }
.bond:focus-visible { outline: none; box-shadow: inset 0 0 0 2px var(--t-ink), var(--e-focus); }
.bond img { position: absolute; left: 50%; top: -34px; width: 104px; height: 104px; object-fit: contain; object-position: 50% 100%; transform: translateX(-50%); filter: drop-shadow(0 8px 10px rgba(40, 28, 70, 0.22)); transition: transform 0.5s var(--e-spring); }
.bond:hover img { transform: translateX(-50%) translateY(-4px) scale(1.04); }
.bmeta { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.bmeta small { font-size: 12px; font-weight: 600; color: var(--e-ink-3); }
.bmeta b { font-size: 15px; font-weight: 800; color: var(--e-ink); }
.bmeta .bno { font-weight: 600; color: var(--e-ink-2); }
.stage .cta-row { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }

/* fact pages: a warm wash tinted by the element's type, then the guide below in soft panels */
body:has(main.element) { background: linear-gradient(180deg, #fcf7ee 0, #fbf5ec 1400px, #f9f5fb 3200px); }
.element .el-show { position: relative; isolation: isolate; margin-top: calc(-1 * (var(--e-nav-h) + 20px)); padding-top: calc(var(--e-nav-h) + 20px);
  background:
    radial-gradient(80% 60% at 18% 0%, color-mix(in srgb, var(--t-tint) 92%, #fff), rgba(255, 255, 255, 0) 72%),
    radial-gradient(50% 36% at 100% 36%, color-mix(in srgb, var(--t-tint) 60%, rgba(255, 255, 255, 0)), rgba(255, 255, 255, 0) 70%); }
.el-show .show-bg { display: none; }
.show-body .title h1 .h1-tail { display: block; margin-top: 10px; font-size: clamp(14px, 1.2vw, 17px); font-weight: 700; line-height: 1.3; letter-spacing: 0; color: var(--e-ink-3); }
.el-more { padding-top: 8px !important; }
.el-more .table-wrap caption { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.element .el-more h2 { margin-top: clamp(44px, 5vw, 64px); font-size: clamp(24px, 2.6vw, 32px); }
.element .el-more h2::before { display: none; }
.element .el-more p, .element .el-more ul { color: var(--e-ink-2); }
.element .el-more ul li::marker { color: var(--e-ink-3); }
.element .table-wrap { border-radius: 24px; background: linear-gradient(180deg, rgba(255, 255, 255, 0.66), rgba(255, 255, 255, 0.4)); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 24px 48px -36px rgba(70, 48, 20, 0.3); }
.element .table-wrap th, .element .table-wrap td { border-bottom-color: rgba(38, 29, 61, 0.07); }
.element .table-wrap tbody th { width: 42%; font-size: 13.5px; font-weight: 700; color: var(--e-ink-3); }
.element .table-wrap td { font-weight: 700; color: var(--e-ink); }
.element .el-nav a { border-radius: 22px; background: linear-gradient(180deg, rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0.36)); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 18px 36px -30px rgba(70, 48, 20, 0.35); }
.element .el-nav small { font-size: 12px; font-weight: 700; letter-spacing: 0; text-transform: none; }
.element .el-nav b { font-weight: 800; }

@media (max-width: 960px) {
  .show-body { grid-template-columns: 1fr; }
  .stage { position: relative; top: 0; }
  .foil { width: min(68vw, 300px); }
  .show-critter { right: max(0px, calc(50% - 210px)); width: 110px; }
}
@media (max-width: 720px) {
  .stat { padding: 2px 8px; }
  .stat .why { font-size: 11.5px; }
  .bonds { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .show-body { gap: 26px; padding-bottom: 56px; }
  .panel { padding: 18px 18px; border-radius: 24px; }
  .mrow { grid-template-columns: 1fr; gap: 6px; }
  .title .no { font-size: 22px; }
  .bio { font-size: 16px; }
  .move { grid-template-columns: 40px 1fr; gap: 12px; }
  .move .ico { width: 40px; height: 40px; }
  .show-critter { width: 92px; bottom: 64px; }
}

@keyframes showRise { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
@keyframes showCardIn { from { opacity: 0; transform: translateY(40px) rotateY(-30deg) scale(0.85); } to { opacity: 1; } }
@keyframes showGrow { from { transform: scaleX(0); } }
@media (prefers-reduced-motion: reduce) {
  .show-body *, .show-body *::before, .show-body *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}
