/* Elemon landing — cinematic dark */
:root {
  --bg: #060a12;
  --bg-2: #0b1320;
  --ink: #f4efe2;
  --ink-2: #b9c1cf;
  --ink-3: #7c879a;
  --line: rgba(255, 255, 255, 0.09);
  --glass: rgba(16, 24, 38, 0.62);
  --gold: #f2c65a;
  --gold-2: #ffe7a3;
  --gold-deep: #b9852a;
  --salt: #d7e36a;
  --soft: #f6b04c;
  --life: #7dcea0;
  --hard: #9eb6c8;
  --display: "Bebas Neue", Impact, sans-serif;
  --body: "Nunito", system-ui, sans-serif;
  --serif: "Fraunces", Georgia, serif;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --gutter: clamp(16px, 4vw, 56px);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: fixed; left: 12px; top: -60px; z-index: 100; background: var(--gold); color: #111; padding: 8px 14px; border-radius: 8px; font-weight: 800; }
.skip:focus { top: 12px; }
:focus-visible { outline: 2px solid var(--gold-2); outline-offset: 3px; border-radius: 6px; }

.grain {
  position: fixed; inset: 0; z-index: 60; pointer-events: none; opacity: 0.06; mix-blend-mode: overlay;
  background-image: url("../img/grain.webp");
}

/* type colors */
[data-type="Salt"], .t-Salt { --t: var(--salt); }
[data-type="Soft"], .t-Soft { --t: var(--soft); }
[data-type="Life"], .t-Life { --t: var(--life); }
[data-type="Hard"], .t-Hard { --t: var(--hard); }

.pip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px 3px 8px; border-radius: 999px;
  font-size: 12px; font-weight: 900; letter-spacing: 0.08em; text-transform: uppercase;
  color: #10141b; background: var(--t, var(--hard));
  box-shadow: 0 0 18px color-mix(in srgb, var(--t, var(--hard)) 45%, transparent);
}
.pip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: rgba(0,0,0,.45); }

/* ---------- buttons ---------- */
.btn {
  --h: 46px;
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: var(--h); padding: 0 22px; border-radius: 999px; border: 0; cursor: pointer;
  font-weight: 900; font-size: 16px; letter-spacing: 0.01em; text-decoration: none; white-space: nowrap;
  transition: transform 0.35s var(--spring), box-shadow 0.35s var(--ease), background 0.3s;
  isolation: isolate; overflow: hidden;
}
.btn svg { width: 16px; height: 16px; }
.btn--sm { --h: 38px; padding: 0 18px; font-size: 15px; }
.btn--lg { --h: 56px; padding: 0 28px; font-size: 17px; }
.btn--block { width: 100%; }
.btn--gold {
  color: #1c1406;
  background: linear-gradient(180deg, var(--gold-2), var(--gold) 55%, var(--gold-deep));
  box-shadow: 0 10px 30px -8px rgba(242, 198, 90, 0.55), inset 0 1px 0 rgba(255,255,255,.7), inset 0 -2px 0 rgba(0,0,0,.18);
}
.btn--gold::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.75) 48%, transparent 62%);
  transform: translateX(-120%); transition: transform 0.8s var(--ease);
}
.btn--gold:hover::after { transform: translateX(120%); }
.btn--ghost {
  color: var(--ink); background: rgba(255,255,255,.06);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.18);
  backdrop-filter: blur(10px);
}
.btn--ghost:hover { background: rgba(255,255,255,.12); box-shadow: inset 0 0 0 1px rgba(255,255,255,.35); }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(1px) scale(0.98); }

/* ---------- nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; gap: 24px;
  padding: 14px var(--gutter);
  transition: background 0.4s, backdrop-filter 0.4s, padding 0.4s, box-shadow 0.4s;
}
.nav.is-scrolled {
  background: rgba(6, 10, 18, 0.72); backdrop-filter: blur(16px) saturate(1.4);
  padding-top: 10px; padding-bottom: 10px; box-shadow: 0 1px 0 var(--line);
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { border-radius: 12px; box-shadow: 0 0 0 1px rgba(242,198,90,.4), 0 6px 20px rgba(0,0,0,.4); }
.brand strong { display: block; font-family: var(--display); font-size: 26px; letter-spacing: 0.06em; line-height: 0.9; color: var(--gold-2); }
.brand em { display: block; font-style: normal; font-size: 11px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); }
.nav-links { display: flex; gap: 6px; margin-left: auto; }
.nav-links a {
  padding: 8px 14px; border-radius: 999px; text-decoration: none; font-weight: 800; font-size: 15px; color: var(--ink-2);
  transition: color .2s, background .2s;
}
.nav-links a:hover { color: var(--ink); background: rgba(255,255,255,.07); }

/* ---------- sections ---------- */
.section { position: relative; padding: clamp(80px, 12vw, 160px) var(--gutter); }
.section-head { max-width: 760px; }
.section-head--center { margin: 0 auto; text-align: center; max-width: 1100px; }
.kicker {
  margin: 0 0 14px; display: inline-flex; align-items: center; gap: 10px;
  font-size: 13px; font-weight: 900; letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold);
}
.kicker::before { content: ""; width: 28px; height: 2px; background: currentColor; border-radius: 2px; }
.section-head--center .kicker::after { content: ""; width: 28px; height: 2px; background: currentColor; border-radius: 2px; }
h2 {
  margin: 0; font-family: var(--display); font-weight: 400; letter-spacing: 0.01em;
  font-size: clamp(52px, 8.4vw, 118px); line-height: 0.9;
}
h2 em, h1 em {
  font-family: var(--serif); font-style: italic; font-weight: 600; letter-spacing: -0.02em;
  font-size: 0.78em;
  background: linear-gradient(90deg, var(--gold-2), var(--gold), #ff9a5a);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

.reveal { opacity: 0; transform: translateY(40px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- hero ---------- */
.hero {
  position: relative; min-height: 100svh; overflow: hidden;
  display: flex; align-items: center;
  padding: 110px var(--gutter) 90px;
}
.hero-bg { position: absolute; inset: -6%; z-index: 0; }
.hero-bg img {
  width: 100%; height: 100%; object-fit: cover; object-position: 60% 50%;
  filter: saturate(1.1) brightness(0.42);
  transform: translate3d(var(--px, 0), var(--py, 0), 0) scale(1.05);
  transition: transform 0.6s var(--ease);
}
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    radial-gradient(60% 70% at 72% 50%, transparent 0, rgba(6,10,18,.35) 60%, rgba(6,10,18,.9) 100%),
    linear-gradient(90deg, rgba(6,10,18,.92) 0%, rgba(6,10,18,.55) 45%, rgba(6,10,18,.1) 100%),
    linear-gradient(0deg, var(--bg) 0%, transparent 25%);
}
.hero-canvas { position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; }
.hero-inner {
  position: relative; z-index: 3; width: 100%; max-width: 1400px; margin: 0 auto;
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 40px; align-items: center;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px; margin: 0 0 22px;
  padding: 7px 16px 7px 12px; border-radius: 999px;
  background: rgba(255,255,255,.06); box-shadow: inset 0 0 0 1px rgba(255,255,255,.14); backdrop-filter: blur(8px);
  font-size: 13px; font-weight: 900; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-2);
  animation: rise 1s var(--ease) both;
}
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--life); box-shadow: 0 0 12px var(--life); animation: pulse 2s infinite; }
h1 {
  margin: 0; font-family: var(--display); font-weight: 400;
  font-size: clamp(64px, min(8.4vw, 13.5vh), 150px); line-height: 0.86; letter-spacing: 0.005em;
  text-shadow: 0 10px 50px rgba(0,0,0,.6);
}
h1 .line { display: block; overflow: hidden; padding-bottom: 0.04em; }
h1 .line > span { display: inline-block; animation: lineUp 1.2s var(--ease) both; }
h1 .line:nth-child(2) > span { animation-delay: 0.08s; }
h1 .line:nth-child(3) > span { animation-delay: 0.16s; }
h1 .line--glow > span {
  background: linear-gradient(95deg, var(--gold-2) 0%, var(--gold) 35%, #ff9a5a 70%, var(--gold-2) 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: lineUp 1.2s var(--ease) 0.16s both, sheen 6s linear 1.4s infinite;
}
.lede { margin: 26px 0 34px; font-size: clamp(19px, 1.8vw, 24px); font-weight: 700; color: var(--ink-2); animation: rise 1s var(--ease) 0.4s both; }
.cta-row { display: flex; flex-wrap: wrap; gap: 14px; animation: rise 1s var(--ease) 0.55s both; }

.hero-cards {
  position: relative; height: min(640px, 72vh); perspective: 1400px;
  animation: rise 1.4s var(--ease) 0.3s both;
}
.tcard {
  --rx: 0deg; --ry: 0deg; --mx: 50%; --my: 50%;
  position: absolute; left: 50%; top: 50%;
  width: clamp(190px, 17vw, 270px); aspect-ratio: 5 / 7;
  margin: calc(clamp(190px, 17vw, 270px) * -0.7) 0 0 calc(clamp(190px, 17vw, 270px) * -0.5);
  transform-style: preserve-3d;
  transform: translate3d(var(--x, 0), var(--y, 0), var(--z, 0)) rotateZ(var(--rot, 0deg)) rotateX(var(--rx)) rotateY(var(--ry));
  transition: transform 0.5s var(--ease);
  cursor: pointer; text-decoration: none;
}
.tcard .float { position: absolute; inset: 0; animation: bob 6s ease-in-out infinite; animation-delay: var(--d, 0s); transform-style: preserve-3d; }
.tcard .face {
  position: absolute; inset: 0; border-radius: 18px; overflow: hidden;
  background: #111; padding: 9px;
  background: linear-gradient(160deg, var(--gold-2), var(--gold-deep) 40%, #6d4b16 60%, var(--gold) 100%);
  box-shadow: 0 30px 60px -20px rgba(0,0,0,.8), 0 0 0 1px rgba(255,255,255,.2), 0 0 60px -10px color-mix(in srgb, var(--t) 60%, transparent);
}
.tcard .art { position: relative; height: 100%; border-radius: 11px; overflow: hidden; background: #0c1119; }
.tcard .art img { width: 100%; height: 100%; object-fit: cover; }
.tcard .art::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(0deg, rgba(6,10,18,.92) 0%, rgba(6,10,18,.2) 38%, transparent 55%);
}
.tcard .tag { position: absolute; left: 12px; right: 12px; bottom: 12px; z-index: 2; display: flex; align-items: end; justify-content: space-between; gap: 8px; }
.tcard .sym { font-family: var(--display); font-size: 58px; line-height: 0.8; color: #fff; text-shadow: 0 0 20px color-mix(in srgb, var(--t) 80%, transparent); }
.tcard .nm { display: block; font-weight: 900; font-size: 15px; line-height: 1.1; }
.tcard .nm small { display: block; font-size: 11px; color: var(--ink-3); font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.tcard .z { position: absolute; top: 10px; left: 12px; z-index: 2; font-weight: 900; font-size: 12px; letter-spacing: .1em; color: rgba(255,255,255,.8); }
.tcard .pip { position: absolute; top: 9px; right: 10px; z-index: 2; font-size: 10px; padding: 2px 8px 2px 6px; }
.tcard .holo {
  position: absolute; inset: 0; border-radius: 18px; pointer-events: none; mix-blend-mode: color-dodge; opacity: 0.55;
  background:
    radial-gradient(circle at var(--mx) var(--my), rgba(255,255,255,.55), transparent 42%),
    linear-gradient(115deg, transparent 20%, rgba(255,120,200,.35) 36%, rgba(120,220,255,.35) 50%, rgba(255,240,140,.35) 64%, transparent 80%);
  background-size: 100% 100%, 250% 250%;
  background-position: 0 0, var(--mx) var(--my);
}
.tcard:nth-child(1) { --x: -62%; --y: 6%; --z: -60px; --rot: -11deg; --d: -1.5s; }
.tcard:nth-child(2) { --x: 0%; --y: -4%; --z: 40px; --rot: 0deg; --d: 0s; z-index: 2; }
.tcard:nth-child(3) { --x: 62%; --y: 8%; --z: -60px; --rot: 11deg; --d: -3s; }
.hero-cards:hover .tcard:not(:hover) { filter: brightness(0.75); }
.tcard:hover { --z: 120px; z-index: 3; }
.tcard { transition: transform 0.5s var(--ease), filter 0.4s; }

.scroll-cue {
  position: absolute; left: 50%; bottom: 26px; z-index: 4; width: 28px; height: 46px; margin-left: -14px;
  border-radius: 20px; box-shadow: inset 0 0 0 2px rgba(255,255,255,.35);
}
.scroll-cue span { position: absolute; left: 50%; top: 9px; width: 4px; height: 9px; margin-left: -2px; border-radius: 3px; background: var(--gold); animation: wheel 1.8s var(--ease) infinite; }

/* ---------- marquee ---------- */
.marquee {
  position: relative; padding: 30px 0 10px; overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.marquee-row { display: flex; gap: 14px; width: max-content; padding: 7px 0; animation: marqL 140s linear infinite; }
.marquee-row[data-dir="right"] { animation-name: marqR; animation-duration: 160s; }
.marquee:hover .marquee-row { animation-play-state: paused; }
.mq {
  position: relative; flex: none; width: 116px; height: 154px; border-radius: 14px; overflow: hidden;
  background: #0c1119; box-shadow: 0 0 0 1px var(--line); text-decoration: none;
  transition: transform .4s var(--spring), box-shadow .3s;
}
.mq img { width: 100%; height: 100%; object-fit: cover; opacity: 0.85; transition: opacity .3s, transform .6s var(--ease); }
.mq::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(6,10,18,.85), transparent 45%); }
.mq b { position: absolute; left: 10px; bottom: 6px; z-index: 1; font-family: var(--display); font-size: 30px; font-weight: 400; line-height: 1; color: #fff; text-shadow: 0 0 12px var(--t); }
.mq i { position: absolute; right: 9px; bottom: 12px; z-index: 1; width: 9px; height: 9px; border-radius: 50%; background: var(--t); box-shadow: 0 0 10px var(--t); }
.mq:hover { transform: translateY(-6px) scale(1.05); box-shadow: 0 0 0 2px var(--t), 0 14px 40px -10px var(--t); z-index: 2; }
.mq:hover img { opacity: 1; transform: scale(1.08); }

/* ---------- science lab ---------- */
.science { max-width: 1400px; margin: 0 auto; }
.science::before {
  content: ""; position: absolute; left: 50%; top: 30%; width: 900px; height: 900px; transform: translateX(-50%); z-index: -1;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--lab-t, var(--soft)) 22%, transparent), transparent);
  transition: background 0.8s;
}
.lab { margin-top: 56px; }
.lab-picker { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 22px; }
.lab-chip {
  --t: var(--hard);
  display: inline-flex; align-items: center; gap: 10px; padding: 6px 16px 6px 6px; border-radius: 999px; border: 0; cursor: pointer;
  background: rgba(255,255,255,.05); box-shadow: inset 0 0 0 1px var(--line);
  font-weight: 900; font-size: 15px; transition: background .25s, box-shadow .25s, transform .35s var(--spring);
}
.lab-chip img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; object-position: 50% 30%; }
.lab-chip:hover { transform: translateY(-2px); background: rgba(255,255,255,.09); }
.lab-chip[aria-selected="true"] { background: color-mix(in srgb, var(--t) 18%, transparent); box-shadow: inset 0 0 0 2px var(--t), 0 0 24px -6px var(--t); }
.lab-stage { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 22px; }
.lab-art {
  --t: var(--soft);
  position: relative; border-radius: 26px; overflow: hidden; aspect-ratio: 3 / 2; background: #0c1119;
  box-shadow: 0 0 0 1px var(--line), 0 40px 80px -30px rgba(0,0,0,.8);
}
.lab-art img { width: 100%; height: 100%; object-fit: cover; transition: opacity .5s, transform 6s var(--ease); }
.lab-art.swap img { opacity: 0; transform: scale(1.06); }
.lab-art:hover img { transform: scale(1.04); }
.lab-art-glow { position: absolute; inset: 0; background: linear-gradient(0deg, rgba(6,10,18,.92), transparent 45%), radial-gradient(80% 60% at 50% 110%, color-mix(in srgb, var(--t) 40%, transparent), transparent); transition: background .6s; }
.lab-id { position: absolute; left: 24px; right: 24px; bottom: 20px; display: flex; align-items: end; gap: 16px; }
.lab-sym { font-family: var(--display); font-size: clamp(70px, 8vw, 118px); line-height: .78; color: #fff; text-shadow: 0 0 40px var(--t); }
.lab-name { flex: 1; min-width: 0; padding-bottom: 6px; }
.lab-name b { display: block; font-size: clamp(22px, 2.4vw, 32px); font-weight: 900; line-height: 1.05; }
.lab-name i { display: block; font-family: var(--serif); font-size: 17px; color: var(--gold-2); }
.lab-id .pip { margin-bottom: 10px; }
.lab-moves {
  display: flex; flex-direction: column; gap: 12px; padding: 26px; border-radius: 26px;
  background: var(--glass); box-shadow: inset 0 0 0 1px var(--line); backdrop-filter: blur(14px);
}
.lab-label { margin: 0; font-size: 12px; font-weight: 900; letter-spacing: .2em; text-transform: uppercase; color: var(--ink-3); }
.lab-attacks { display: grid; gap: 10px; }
.atk {
  --t: var(--gold);
  position: relative; display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 16px; border: 0; border-radius: 16px; cursor: pointer; text-align: left;
  background: rgba(255,255,255,.04); box-shadow: inset 0 0 0 1px var(--line);
  font-size: 18px; font-weight: 900; transition: background .25s, box-shadow .25s, transform .35s var(--spring);
  opacity: 0; transform: translateX(20px); animation: slideIn .6s var(--ease) forwards; animation-delay: calc(var(--i) * 90ms);
}
.atk span { display: grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 10px; background: rgba(255,255,255,.07); font-family: var(--display); font-size: 20px; font-weight: 400; color: var(--gold); }
.atk:hover { background: rgba(255,255,255,.08); }
.atk[aria-pressed="true"] { background: linear-gradient(90deg, rgba(242,198,90,.18), rgba(242,198,90,.04)); box-shadow: inset 0 0 0 2px var(--gold), 0 0 30px -10px var(--gold); }
.atk[aria-pressed="true"] span { background: var(--gold); color: #1c1406; }
.lab-fact {
  flex: 1; display: flex; gap: 14px; align-items: flex-start; margin-top: 6px; padding: 18px; border-radius: 18px; min-height: 130px;
  background: linear-gradient(135deg, rgba(125,206,160,.1), rgba(242,198,90,.07)); box-shadow: inset 0 0 0 1px rgba(125,206,160,.25);
}
.lab-fact svg { flex: none; width: 28px; height: 28px; color: var(--life); filter: drop-shadow(0 0 8px var(--life)); }
.lab-fact p { margin: 0; font-size: 18px; font-weight: 700; line-height: 1.45; color: var(--ink); }
.lab-fact p .caret { display: inline-block; width: 2px; height: 1.1em; margin-left: 2px; vertical-align: -3px; background: var(--life); animation: blink 1s steps(1) infinite; }

/* ---------- type circle ---------- */
.types { overflow: hidden; }
.types::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(50% 60% at 70% 50%, color-mix(in srgb, var(--ring-t, var(--salt)) 14%, transparent), transparent 70%);
  transition: background 1s;
}
.types-grid { max-width: 1300px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 40px; align-items: center; }
.chant { margin: 40px 0 6px; font-family: var(--display); font-size: clamp(44px, 5vw, 76px); line-height: 1; min-height: 1em; }
.chant b { font-weight: 400; color: var(--c1, var(--salt)); text-shadow: 0 0 30px color-mix(in srgb, var(--c1, var(--salt)) 50%, transparent); }
.chant b + b { color: var(--c2, var(--soft)); text-shadow: 0 0 30px color-mix(in srgb, var(--c2, var(--soft)) 50%, transparent); }
.chant.flip { animation: chantIn .7s var(--ease); }
.chant-why { margin: 0; font-family: var(--serif); font-style: italic; font-size: 22px; color: var(--ink-2); min-height: 1.5em; }
.chant-why.flip { animation: chantIn .7s var(--ease) .08s both; }
.ring-wrap { position: relative; }
.ring { width: 100%; max-width: 580px; margin: 0 auto; display: block; overflow: visible; }
.ring-track { fill: none; stroke: rgba(255,255,255,.07); stroke-width: 2; stroke-dasharray: 2 8; }
.arc { fill: none; stroke: rgba(255,255,255,.14); stroke-width: 3; stroke-linecap: round; color: rgba(255,255,255,.25); transition: stroke .4s, color .4s, stroke-width .4s; }
.arc.on { stroke: var(--t); color: var(--t); stroke-width: 5; stroke-dasharray: var(--len); stroke-dashoffset: var(--len); animation: draw 0.9s var(--ease) forwards; filter: drop-shadow(0 0 8px var(--t)); }
.node { cursor: pointer; }
.node .halo { fill: var(--t); opacity: 0; transition: opacity .4s, r .5s var(--spring); }
.node .disc { fill: #0c1320; stroke: var(--t); stroke-width: 2.5; transition: fill .3s, stroke-width .3s; }
.node text { fill: var(--ink); font-family: var(--display); font-size: 28px; letter-spacing: .04em; text-anchor: middle; pointer-events: none; }
.node .ex { fill: var(--ink-3); font-family: var(--body); font-weight: 800; font-size: 12px; letter-spacing: .06em; }
.node image { clip-path: circle(50%); }
.node:hover .disc, .node:focus-visible .disc { fill: #15203a; }
.node.win .halo { opacity: .22; }
.node.win .disc { stroke-width: 5; fill: color-mix(in srgb, var(--t) 20%, #0c1320); }
.node.lose .disc { stroke-dasharray: 4 5; }
.node.lose { opacity: .8; }
.ring-spark { fill: #fff; }

/* ---------- bonds reactor ---------- */
.bonds { overflow: hidden; }
.reactor { max-width: 980px; margin: 50px auto 0; }
.rx-stage {
  position: relative; height: clamp(300px, 42vw, 420px); border-radius: 32px; overflow: hidden;
  background: radial-gradient(60% 80% at 50% 50%, #142036 0%, #0a1020 60%, #070b14 100%);
  box-shadow: inset 0 0 0 1px var(--line), 0 40px 90px -40px rgba(0,0,0,.9);
}
.rx-ring {
  position: absolute; left: 50%; top: 50%; width: 62%; aspect-ratio: 1; transform: translate(-50%, -50%);
  border-radius: 50%; border: 1px dashed rgba(255,255,255,.12); animation: spin 40s linear infinite;
}
.rx-ring::before, .rx-ring::after { content: ""; position: absolute; width: 10px; height: 10px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 16px var(--gold); top: -5px; left: 50%; }
.rx-ring::after { top: auto; bottom: -5px; background: var(--life); box-shadow: 0 0 16px var(--life); }
.rx-atom {
  --t: var(--hard);
  position: absolute; top: 50%; width: clamp(110px, 16vw, 160px); aspect-ratio: 1; border-radius: 50%;
  display: grid; place-items: center;
  box-shadow: 0 0 0 3px var(--t), 0 0 50px -4px var(--t), inset 0 0 30px rgba(0,0,0,.6);
  transition: transform 0.8s cubic-bezier(.6,-0.28,.74,.05), opacity .3s, left .8s cubic-bezier(.6,-0.28,.74,.05);
  transform: translate(-50%, -50%);
  animation: atomBob 3s ease-in-out infinite;
}
.rx-atom img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; border-radius: 50%; }
.rx-atom b { position: absolute; bottom: -14px; left: 50%; transform: translateX(-50%); padding: 2px 14px; border-radius: 999px; background: var(--t); color: #10141b; font-family: var(--display); font-weight: 400; font-size: 28px; line-height: 1.1; }
.rx-a { left: 22%; }
.rx-b { left: 78%; animation-delay: -1.5s; }
.rx-stage.fuse .rx-a { left: 50%; transform: translate(-50%, -50%) scale(.35); }
.rx-stage.fuse .rx-b { left: 50%; transform: translate(-50%, -50%) scale(.35); }
.rx-stage.made .rx-atom { opacity: 0; transition: opacity .15s; }
.rx-flash { position: absolute; left: 50%; top: 50%; width: 20px; height: 20px; margin: -10px; border-radius: 50%; background: #fff; opacity: 0; pointer-events: none; }
.rx-stage.made .rx-flash { animation: flash .9s var(--ease); }
.rx-product {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) scale(.4); opacity: 0; text-align: center; pointer-events: none; width: 90%;
}
.rx-stage.made .rx-product { opacity: 1; transform: translate(-50%, -50%) scale(1); transition: transform .8s var(--spring) .1s, opacity .4s .1s; }
.rx-formula { display: block; font-family: var(--display); font-size: clamp(80px, 13vw, 150px); line-height: .9; color: #fff; text-shadow: 0 0 40px rgba(242,198,90,.7); }
.rx-product strong { display: block; font-family: var(--serif); font-style: italic; font-weight: 600; font-size: clamp(26px, 3.4vw, 40px); color: var(--gold-2); }
.rx-product small { display: block; margin-top: 4px; font-size: 16px; font-weight: 800; color: var(--ink-2); }
.rx-sparks { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.rx-recipes { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 22px; }
.rx-btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border: 0; border-radius: 999px; cursor: pointer;
  background: rgba(255,255,255,.05); box-shadow: inset 0 0 0 1px var(--line); font-weight: 900; font-size: 15px;
  transition: background .25s, box-shadow .25s, transform .35s var(--spring);
}
.rx-btn small { font-weight: 800; color: var(--ink-3); }
.rx-btn:hover { transform: translateY(-2px); background: rgba(255,255,255,.09); }
.rx-btn[aria-selected="true"] { background: rgba(242,198,90,.14); box-shadow: inset 0 0 0 2px var(--gold); }
.rx-btn[aria-selected="true"] small { color: var(--gold-2); }

/* ---------- periodic table ---------- */
.dex { max-width: 1500px; margin: 0 auto; }
.dex-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 40px; }
.dex-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border: 0; border-radius: 999px; cursor: pointer;
  background: rgba(255,255,255,.05); box-shadow: inset 0 0 0 1px var(--line); font-weight: 900; font-size: 15px;
  transition: background .25s, box-shadow .25s, color .25s;
}
.chip i { width: 10px; height: 10px; border-radius: 50%; background: var(--t); box-shadow: 0 0 10px var(--t); }
.chip:hover { background: rgba(255,255,255,.1); }
.chip.is-on { background: color-mix(in srgb, var(--t, var(--gold)) 22%, transparent); box-shadow: inset 0 0 0 2px var(--t, var(--gold)); }

.ptable-wrap { position: relative; --sx: 50%; --sy: 50%; }
.ptable-wrap::before {
  content: ""; position: absolute; inset: -40px; pointer-events: none; z-index: 0; opacity: 0; transition: opacity .4s;
  background: radial-gradient(360px circle at var(--sx) var(--sy), rgba(242,198,90,.14), transparent 70%);
}
.ptable-wrap:hover::before { opacity: 1; }
.ptable {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: repeat(18, minmax(0, 1fr)); grid-template-rows: repeat(7, auto) 18px repeat(2, auto);
  gap: clamp(3px, 0.45vw, 7px);
}
.el {
  --t: var(--hard);
  position: relative; aspect-ratio: 1 / 1.08; min-width: 0; padding: 0; border: 0; border-radius: clamp(4px, .6vw, 10px); cursor: pointer; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--t) 18%, #0b111c);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--t) 35%, transparent);
  color: var(--ink);
  opacity: 0; transform: scale(.4) translateY(20px);
  transition: transform .45s var(--spring), box-shadow .25s, background .25s, opacity .4s, filter .4s;
}
.ptable.in .el { opacity: 1; transform: none; transition-delay: calc(var(--wave) * 22ms), calc(var(--wave) * 22ms), 0s, 0s, calc(var(--wave) * 22ms), 0s; }
.ptable.settled .el { transition-delay: 0s; }
.el img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; opacity: 0; transition: opacity .3s, transform .5s var(--ease); transform: scale(1.2); }
.el::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(6,10,18,.85), transparent 70%); opacity: 0; transition: opacity .3s; }
.el .s { position: relative; z-index: 1; font-family: var(--display); font-size: clamp(11px, 1.6vw, 28px); line-height: 1; letter-spacing: .02em; }
.el .n { position: absolute; top: 3px; left: 5px; z-index: 1; font-size: clamp(6px, .62vw, 10px); font-weight: 800; color: var(--ink-3); }
.el:hover, .el:focus-visible, .el.is-sel {
  transform: scale(1.35); z-index: 5; background: color-mix(in srgb, var(--t) 30%, #0b111c);
  box-shadow: inset 0 0 0 2px var(--t), 0 10px 30px -6px color-mix(in srgb, var(--t) 70%, transparent);
}
.el:hover img, .el:focus-visible img, .el.is-sel img { opacity: 1; transform: scale(1); }
.el:hover::after, .el:focus-visible::after, .el.is-sel::after { opacity: 1; }
.el.is-sel { transform: scale(1.18); }
.ptable.filtered .el:not(.match) { filter: grayscale(1) brightness(.35); transform: scale(.88); }
.ptable.filtered .el.match { box-shadow: inset 0 0 0 2px var(--t), 0 0 18px -4px var(--t); }
.el-gap { display: grid; place-items: center; border-radius: 8px; font-size: clamp(6px, .7vw, 11px); font-weight: 900; color: var(--ink-3); box-shadow: inset 0 0 0 1px dashed var(--line); border: 1px dashed rgba(255,255,255,.12); }

.peek {
  grid-column: 3 / 13; grid-row: 1 / 4; align-self: stretch; z-index: 2;
  display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.4fr); gap: clamp(10px, 1.4vw, 22px); align-items: center;
  padding: clamp(8px, 1vw, 16px) clamp(12px, 1.4vw, 22px) clamp(8px, 1vw, 16px) clamp(8px, 1vw, 14px);
  margin: 0 clamp(4px, 1.2vw, 24px) clamp(6px, 1vw, 16px);
  border-radius: 20px; background: linear-gradient(135deg, rgba(20,30,48,.85), rgba(10,15,26,.85));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--t) 40%, transparent), 0 0 60px -30px var(--t);
  transition: box-shadow .4s;
}
.peek-img { position: relative; height: 100%; max-height: 240px; aspect-ratio: 3 / 4; justify-self: center; border-radius: 14px; overflow: hidden; background: #0c1119; box-shadow: 0 0 0 2px var(--t), 0 0 40px -8px var(--t); }
.peek-img img { width: 100%; height: 100%; object-fit: cover; animation: peekIn .5s var(--ease); }
.peek-body { min-width: 0; }
.peek-top { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 13px; font-weight: 900; color: var(--ink-3); letter-spacing: .1em; }
.peek h3 { margin: 4px 0 0; font-family: var(--display); font-weight: 400; font-size: clamp(28px, 3.4vw, 54px); line-height: .95; }
.peek h3 span { color: var(--t); text-shadow: 0 0 24px var(--t); }
.peek h3 b { font-weight: 400; }
.peek-epi { margin: 0; font-family: var(--serif); font-style: italic; font-size: clamp(14px, 1.3vw, 19px); color: var(--gold-2); }
.peek-bio { margin: 8px 0; font-size: clamp(12px, 1.05vw, 15px); font-weight: 700; color: var(--ink-2); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.peek-match { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 0 0 8px; font-size: 13px; font-weight: 800; color: var(--ink-3); }
.peek-match b { color: var(--ink); }
.peek-link { font-weight: 900; font-size: 14px; color: var(--gold); text-decoration: none; }
.peek-link:hover { text-decoration: underline; }
.peek.pop .peek-body > * { animation: peekIn .45s var(--ease) both; }
.peek.pop .peek-body > *:nth-child(2) { animation-delay: .04s; }
.peek.pop .peek-body > *:nth-child(3) { animation-delay: .08s; }
.peek.pop .peek-body > *:nth-child(4) { animation-delay: .12s; }
.dex-cta { display: flex; justify-content: center; margin-top: 50px; }

/* ---------- how ---------- */
.how-grid { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.how-tile {
  position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; padding: 40px 24px 34px; border-radius: 28px; overflow: hidden;
  background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.015)); box-shadow: inset 0 0 0 1px var(--line);
}
.how-tile:nth-child(2) { transition-delay: .1s; }
.how-tile:nth-child(3) { transition-delay: .2s; }
.how-num { font-family: var(--display); font-weight: 400; font-size: clamp(110px, 13vw, 180px); line-height: .85; background: linear-gradient(180deg, #fff, var(--gold) 70%, var(--gold-deep)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.how-tile span { font-size: 22px; font-weight: 900; }
.how-fx { height: 80px; display: grid; place-items: center; margin-bottom: 10px; }
.how-fx--fan { position: relative; width: 150px; }
.how-fx--fan i { position: absolute; left: 50%; bottom: 0; width: 42px; height: 60px; margin-left: -21px; border-radius: 7px; background: linear-gradient(160deg, var(--gold-2), var(--gold-deep)); box-shadow: 0 6px 16px rgba(0,0,0,.5), inset 0 0 0 3px rgba(0,0,0,.15); transform-origin: 50% 140%; transition: transform .9s var(--spring); }
.how-fx--fan i:nth-child(1) { background: linear-gradient(160deg, #fff, var(--salt)); }
.how-fx--fan i:nth-child(2) { background: linear-gradient(160deg, #fff, var(--soft)); }
.how-fx--fan i:nth-child(3) { background: linear-gradient(160deg, #fff, var(--gold)); }
.how-fx--fan i:nth-child(4) { background: linear-gradient(160deg, #fff, var(--life)); }
.how-fx--fan i:nth-child(5) { background: linear-gradient(160deg, #fff, var(--hard)); }
.how-tile.in .how-fx--fan i:nth-child(1) { transform: rotate(-34deg); }
.how-tile.in .how-fx--fan i:nth-child(2) { transform: rotate(-17deg); }
.how-tile.in .how-fx--fan i:nth-child(4) { transform: rotate(17deg); }
.how-tile.in .how-fx--fan i:nth-child(5) { transform: rotate(34deg); }
.how-fx--bolt svg { width: 64px; height: 64px; fill: var(--gold); filter: drop-shadow(0 0 16px var(--gold)); }
.how-tile.in .how-fx--bolt svg { animation: zap 2.4s var(--ease) infinite; }
.how-fx--hearts { display: flex; gap: 12px; }
.how-fx--hearts i { width: 30px; height: 30px; background: #ff6b7a; clip-path: path("M15 27 3.5 15.7A7 7 0 0 1 15 6.4a7 7 0 0 1 11.5 9.3Z"); filter: drop-shadow(0 0 10px #ff6b7a); }
.how-tile.in .how-fx--hearts i { animation: faint 3s var(--ease) infinite; }
.how-tile.in .how-fx--hearts i:nth-child(2) { animation-delay: .4s; }
.how-tile.in .how-fx--hearts i:nth-child(3) { animation-delay: .8s; }

/* ---------- play ---------- */
.play { overflow: hidden; padding-bottom: clamp(100px, 12vw, 160px); }
.play-bg { position: absolute; inset: 0; z-index: -1; }
.play-bg img { width: 100%; height: 100%; object-fit: cover; filter: brightness(.3) saturate(1.1); }
.play-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, var(--bg) 0%, rgba(6,10,18,.4) 30%, rgba(6,10,18,.55) 70%, var(--bg) 100%); }
.play-inner { max-width: 1040px; margin: 0 auto; }
.play-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 20px; margin-top: 50px; }
.panel {
  display: flex; flex-direction: column; gap: 14px; padding: 30px; border-radius: 28px;
  background: rgba(10, 16, 28, .72); backdrop-filter: blur(18px) saturate(1.3); box-shadow: inset 0 0 0 1px rgba(255,255,255,.12), 0 40px 80px -40px rgba(0,0,0,.9);
}
.panel--solo { box-shadow: inset 0 0 0 1px rgba(242,198,90,.35), 0 0 80px -30px rgba(242,198,90,.35), 0 40px 80px -40px rgba(0,0,0,.9); }
.panel h3 { margin: 0; font-family: var(--display); font-weight: 400; font-size: 44px; line-height: 1; }
.panel > p { margin: -8px 0 4px; color: var(--ink-2); font-weight: 700; }
.panel--solo .btn { margin-top: auto; }
.field { display: grid; gap: 6px; font-size: 12px; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.field input {
  height: 50px; padding: 0 16px; border-radius: 14px; border: 0; outline: 0;
  background: rgba(255,255,255,.06); box-shadow: inset 0 0 0 1px rgba(255,255,255,.14);
  color: var(--ink); font: 800 18px var(--body); letter-spacing: 0; text-transform: none;
  transition: box-shadow .2s, background .2s;
}
.field input:focus { background: rgba(255,255,255,.09); box-shadow: inset 0 0 0 2px var(--gold); }
.open { display: grid; gap: 12px; }
.err { margin: 0; min-height: 0; color: #ff8a8a; font-weight: 800; font-size: 14px; }
.err:empty { display: none; }
.rooms-head { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; }
.rooms-head h4 { margin: 0; font-size: 12px; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.refresh { display: grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 50%; cursor: pointer; background: rgba(255,255,255,.06); transition: transform .5s var(--ease), background .2s; }
.refresh svg { width: 18px; height: 18px; }
.refresh:hover { background: rgba(255,255,255,.12); transform: rotate(180deg); }
.rooms { display: grid; gap: 8px; max-height: 260px; overflow: auto; }
.empty { margin: 0; padding: 16px; border-radius: 14px; border: 1px dashed rgba(255,255,255,.14); color: var(--ink-3); font-weight: 700; font-size: 15px; text-align: center; }
.table-row {
  display: grid; grid-template-columns: 1fr auto; grid-template-areas: "n s" "m s"; align-items: center; gap: 0 12px; width: 100%;
  padding: 12px 16px; border: 0; border-radius: 14px; cursor: pointer; text-align: left;
  background: rgba(255,255,255,.05); box-shadow: inset 0 0 0 1px var(--line); transition: background .2s, box-shadow .2s, transform .3s var(--spring);
}
.table-row strong { grid-area: n; font-size: 17px; }
.table-row .meta { grid-area: m; font-size: 13px; font-weight: 700; color: var(--ink-3); }
.table-row .sit { grid-area: s; font-weight: 900; color: var(--gold); }
.table-row:hover { background: rgba(242,198,90,.1); box-shadow: inset 0 0 0 1px var(--gold); transform: translateX(3px); }

/* ---------- footer ---------- */
.foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding: 30px var(--gutter) 40px; border-top: 1px solid var(--line); }
.foot .brand strong { font-size: 22px; }
.foot nav { display: flex; gap: 20px; }
.foot nav a { color: var(--ink-3); font-weight: 800; text-decoration: none; }
.foot nav a:hover { color: var(--ink); }

/* ---------- keyframes ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: none; } }
@keyframes lineUp { from { transform: translateY(105%); } to { transform: none; } }
@keyframes sheen { to { background-position: -200% 0; } }
@keyframes pulse { 50% { opacity: .35; } }
@keyframes bob { 50% { transform: translateY(-14px) rotateZ(1deg); } }
@keyframes wheel { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(16px); } }
@keyframes marqL { to { transform: translateX(-50%); } }
@keyframes marqR { from { transform: translateX(-50%); } to { transform: translateX(0); } }
@keyframes slideIn { to { opacity: 1; transform: none; } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes chantIn { from { opacity: 0; transform: translateY(20px); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes spin { to { transform: translate(-50%, -50%) rotate(360deg); } }
@keyframes atomBob { 50% { margin-top: -10px; } }
@keyframes flash { 0% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(40); } }
@keyframes peekIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes zap { 0%, 100% { transform: scale(1) rotate(0); } 8% { transform: scale(1.3) rotate(-8deg); } 16% { transform: scale(.95) rotate(4deg); } 26% { transform: scale(1); } }
@keyframes faint { 0%, 55% { transform: none; opacity: 1; } 70% { transform: translateY(8px) scale(.7) rotate(-20deg); opacity: .15; } 100% { transform: none; opacity: 1; } }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .hero-inner { grid-template-columns: 1fr; gap: 10px; }
  .hero { padding-top: 100px; align-items: flex-start; }
  .hero-cards { height: 420px; order: -1; margin: 0 -10px; }
  .tcard { width: 170px; margin: -119px 0 0 -85px; }
  .hero::before { background: linear-gradient(0deg, var(--bg) 0%, rgba(6,10,18,.75) 40%, rgba(6,10,18,.55) 100%); }
  .lab-stage, .types-grid, .play-grid { grid-template-columns: 1fr; }
  .peek { grid-column: 1 / -1; grid-row: 11; margin: 18px 0 0; grid-template-columns: 120px 1fr; }
  .peek-img { max-height: 170px; width: 120px; }
  .ptable { grid-template-rows: repeat(7, auto) 10px repeat(2, auto) auto; }
}
@media (max-width: 720px) {
  body { font-size: 16px; }
  .nav-links { display: none; }
  .nav .btn { margin-left: auto; }
  .brand em { display: none; }
  .hero-cards { height: 330px; }
  .tcard { width: 138px; margin: -97px 0 0 -69px; }
  .tcard .sym { font-size: 40px; }
  .tcard .nm { font-size: 12px; }
  .tcard .nm small { display: none; }
  .cta-row .btn { flex: 1 1 100%; }
  .mq { width: 88px; height: 118px; }
  .mq b { font-size: 24px; }
  .lab-moves { padding: 18px; }
  .lab-id { left: 16px; right: 16px; bottom: 14px; gap: 10px; }
  .lab-id .pip { display: none; }
  .atk { font-size: 16px; padding: 12px; }
  .lab-fact p { font-size: 16px; }
  .how-grid { grid-template-columns: 1fr; }
  .el .n { display: none; }
  .el { border-radius: 3px; }
  .el:hover, .el:focus-visible { transform: scale(1.6); }
  .el-gap { font-size: 0; }
  .peek { grid-template-columns: 96px 1fr; padding: 12px; }
  .peek-img { width: 96px; }
  .rx-a { left: 24%; }
  .rx-b { left: 76%; }
  .panel { padding: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}

/* Element symbols and formulas must keep real case (Na, not NA). */
.tcard .sym, .mq b, .lab-sym, .rx-atom b, .el .s, .peek h3 span, .rx-formula, .node .ex {
  font-family: var(--body); font-weight: 900; letter-spacing: -0.035em;
}
.tcard .sym { font-size: 50px; line-height: .85; }
.mq b { font-size: 26px; bottom: 8px; }
.lab-sym { font-size: clamp(60px, 7vw, 100px); line-height: .8; }
.rx-atom b { font-size: 22px; padding: 2px 14px 3px; }
.el .s { font-size: clamp(10px, 1.35vw, 24px); }
.peek h3 span { font-size: .86em; }
.rx-formula { font-size: clamp(72px, 11vw, 130px); letter-spacing: -0.04em; }
@media (max-width: 720px) { .tcard .sym { font-size: 34px; } .mq b { font-size: 21px; } }

/* Phones: bigger tap targets; the table swipes inside its own box. */
@media (max-width: 720px) {
  .ptable-wrap { margin: 0 calc(var(--gutter) * -1); padding: 12px var(--gutter) 4px; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; }
  .ptable-wrap::-webkit-scrollbar { display: none; }
  .ptable { min-width: 680px; }
  .el .s { font-size: 15px; }
  .el:hover, .el:focus-visible { transform: scale(1.25); }
  .peek { position: sticky; left: 0; width: calc(100vw - var(--gutter) * 2); }
}

/* Solo difficulty */
.levels { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.level {
  display: grid; gap: 2px; padding: 10px 8px; border-radius: 14px; cursor: pointer; text-align: center;
  background: rgba(255,255,255,.05); box-shadow: inset 0 0 0 1px var(--line); border: 0;
  transition: background .2s, box-shadow .2s, transform .3s var(--spring);
}
.level b { font-weight: 900; font-size: 16px; }
.level small { font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.level:hover { transform: translateY(-2px); }
.level.is-on { background: rgba(242,198,90,.14); box-shadow: inset 0 0 0 2px var(--gold); }
.level.is-on small { color: var(--gold-2); }

/* Type colors must beat per-component defaults. */
[data-type="Salt"][data-type] { --t: var(--salt); }
[data-type="Soft"][data-type] { --t: var(--soft); }
[data-type="Life"][data-type] { --t: var(--life); }
[data-type="Hard"][data-type] { --t: var(--hard); }
