/* PAIRBIN. Paired cores / split-signal.
   Design read: function-first memecoin tool site for Solana traders, split-screen "dual core" language. Dials ENERGY 3 / RHYTHM 3 / MOTION 3.
   Why these colors: graphite #0b0c0f is the shared chassis; hot coral #ff4f6d is core A and the single action color (Buy, primary buttons);
   ice blue #9ad1ff is core B (secondary highlights, up candles); bone white #f2efe9 is the seam where both meet and the text color;
   mid gray #6b7080 is only used for lines and large labels (it fails 4.5:1 for small text), small secondary text uses #a7abb8.
   The logo is a P split coral|ice, so every surface repeats that split: two halves, one bright seam.
   Why these fonts: Sora's wide geometric caps hold the giant split word without breaking; Inter keeps body copy readable at small sizes;
   IBM Plex Mono carries data only (CA, prices, addresses, the 0/1 core labels).
   Why the layout: hero is two halves that slide together on scroll (PAIR + BIN), the main menu is one floating command bar
   (Cmd-K palette), tools sit in an asymmetric grid where size follows use: chart biggest, trending tall for a vertical list,
   checker smallest. Owner asked for the bento grid explicitly (override of R-05 noted); tiles open in place.
   Elevation: only the floating command bar and the palette get a shadow and blur, because they float above everything. */
:root {
  --g0: #0b0c0f; --g1: #111318; --g2: #161920; --g3: #1d2029;
  --line: rgba(107,112,128,.28); --line-2: rgba(107,112,128,.55);
  --coral: #ff4f6d; --ice: #9ad1ff; --bone: #f2efe9; --mid: #6b7080; --dim: #a7abb8;
  --f-h: "Sora", system-ui, sans-serif; --f-b: "Inter", system-ui, sans-serif; --f-m: "IBM Plex Mono", ui-monospace, monospace;
  --ease: cubic-bezier(.2,.8,.2,1); --bar: 62px; --r: 6px; --r-l: 14px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; }
main { overflow-x: clip; }
body { background: var(--g0); color: var(--bone); font: 400 16px/1.6 var(--f-b); overflow-x: hidden; min-height: 100vh; }
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }
a { color: inherit; }
button { font: inherit; color: inherit; }
kbd { font-size: .8em; padding: .05rem .35rem; border: 1px solid var(--line-2); border-radius: 4px; color: var(--bone); }
.mono { font-family: var(--f-m); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--bone); outline-offset: 3px; }
.skip { position: fixed; left: 1rem; top: -4rem; z-index: 100; background: var(--coral); color: var(--g0); padding: .6rem 1rem; font-weight: 600; }
.skip:focus { top: 1rem; }
.field { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; display: block; pointer-events: none; }
main, .foot { position: relative; z-index: 2; }

/* ---------- top bar ---------- */
.bar { position: fixed; z-index: 40; top: 0; left: 0; right: 0; height: var(--bar); display: flex; align-items: center; gap: 1rem; padding: 0 clamp(.8rem, 2.4vw, 1.8rem); background: linear-gradient(90deg, rgba(14,11,13,.92) 50%, rgba(10,13,17,.92) 50%); border-bottom: 1px solid var(--line); }
.bar__brand { display: flex; align-items: center; gap: .55rem; text-decoration: none; min-height: 44px; }
.bar__brand img { width: 34px; height: 34px; }
.bar__w { font: 800 1.05rem/1 var(--f-h); letter-spacing: .02em; color: var(--coral); }
.bar__w i { font-style: normal; color: var(--ice); }
.bar__sig { position: absolute; left: 50%; transform: translateX(-50%); display: flex; gap: .7rem; align-items: center; font-size: .72rem; color: var(--dim); }
.bar__bits { color: var(--bone); width: 2ch; }
.bar__pct { color: var(--bone); }
.bar__r { display: flex; align-items: center; gap: .5rem; margin-left: auto; position: relative; }
.bar__prog { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; }
.bar__prog i { display: block; height: 100%; background: linear-gradient(90deg, var(--coral) 50%, var(--ice) 50%); transform-origin: 50% 50%; transform: scaleX(0); }
.snd { display: inline-flex; align-items: center; gap: .5rem; min-height: 44px; padding: 0 .7rem; background: none; border: 1px solid var(--line); border-radius: var(--r); cursor: pointer; font: 500 .74rem var(--f-m); color: var(--dim); }
.snd:hover { color: var(--bone); border-color: var(--line-2); }
.snd__eq { display: inline-flex; gap: 2px; align-items: flex-end; height: 14px; }
.snd__eq i { width: 2px; height: 4px; background: currentColor; }
.snd.is-on { color: var(--bone); }
.snd.is-on .snd__eq i { animation: eq .9s ease-in-out infinite; } .snd.is-on .snd__eq i:nth-child(2) { animation-delay: .2s } .snd.is-on .snd__eq i:nth-child(3) { animation-delay: .4s } .snd.is-on .snd__eq i:nth-child(4) { animation-delay: .1s }
@keyframes eq { 50% { height: 14px; } }
.buy { display: inline-flex; align-items: center; gap: .55rem; min-height: 44px; padding: 0 1rem; background: var(--coral); color: var(--g0); border-radius: var(--r); text-decoration: none; font: 700 .84rem var(--f-h); cursor: pointer; }
.buy__s { font-size: .68rem; font-weight: 500; opacity: .8; }
.buy:hover:not(.is-off) { background: var(--bone); }
.buy.is-off { background: none; color: var(--dim); border: 1px dashed var(--line-2); cursor: not-allowed; }

/* small CA chip: same config as the bottom section, truncated, tap to copy */
.cachip { display: inline-flex; align-items: center; gap: .45rem; min-height: 44px; padding: 0 .7rem 0 .35rem; background: var(--g1); border: 1px solid var(--line-2); border-radius: var(--r); cursor: pointer; color: var(--bone); font: 500 .74rem var(--f-m); }
.cachip__k { padding: .18rem .38rem; border-radius: 3px; background: linear-gradient(90deg, var(--coral) 50%, var(--ice) 50%); color: var(--g0); font-weight: 600; font-size: .62rem; letter-spacing: .06em; }
.cachip__i { width: 14px; height: 14px; fill: none; stroke: var(--ice); stroke-width: 1.8; }
.cachip:hover:not(:disabled) { border-color: var(--bone); }
.cachip.is-done .cachip__i { stroke: var(--coral); }
.cachip.is-off { cursor: default; color: var(--dim); border-style: dashed; }
.cachip.is-off .cachip__k { background: none; color: var(--dim); border: 1px solid var(--line-2); }
.cachip.is-off .cachip__i { display: none; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 46px; padding: 0 1.15rem; border: 1px solid var(--line-2); border-radius: var(--r); background: none; color: var(--bone); font: 600 .86rem var(--f-h); cursor: pointer; text-decoration: none; transition: background .2s, color .2s, border-color .2s; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn--coral { background: var(--coral); border-color: var(--coral); color: var(--g0); }
.btn--coral:hover:not(:disabled) { background: var(--bone); border-color: var(--bone); }
.btn--line:hover:not(.is-off) { border-color: var(--ice); color: var(--ice); }
.btn--ghost { border-color: transparent; color: var(--dim); text-decoration: underline; text-underline-offset: 4px; }
.btn--ghost:hover:not(.is-off) { color: var(--bone); }
.btn.is-off { color: var(--dim); border-style: dashed; cursor: not-allowed; }

/* ---------- 01 dual core hero ---------- */
.core { position: relative; height: 230vh; }
.core__pin { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.half { position: absolute; top: 0; bottom: 0; width: 50%; display: flex; flex-direction: column; justify-content: center; will-change: transform; }
.half--a { left: 0; align-items: flex-end; background: linear-gradient(90deg, rgba(11,12,15,.0), rgba(30,14,20,.55)); border-right: 1px solid rgba(255,79,109,.35); transform: translate3d(calc(var(--split, 1) * -7vw), 0, 0); }
.half--b { right: 0; align-items: flex-start; background: linear-gradient(270deg, rgba(11,12,15,.0), rgba(13,22,32,.55)); border-left: 1px solid rgba(154,209,255,.35); transform: translate3d(calc(var(--split, 1) * 7vw), 0, 0); }
.half__word { font: 800 clamp(4.2rem, 15.5vw, 15rem)/.82 var(--f-h); letter-spacing: -.035em; padding: 0 .04em; }
.half--a .half__word { color: var(--coral); }
.half--b .half__word { color: var(--ice); }
.half__tag { position: absolute; top: calc(var(--bar) + 1.4rem); font-size: .72rem; color: var(--dim); letter-spacing: .08em; }
.half__tag b { font-weight: 600; color: var(--bone); margin-left: .4rem; }
.half--a .half__tag { left: calc(var(--split, 1) * 7vw + clamp(1rem, 3vw, 2rem)); } .half--b .half__tag { right: calc(var(--split, 1) * 7vw + clamp(1rem, 3vw, 2rem)); }
.seam { position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; transform: translateX(-50%); pointer-events: none; }
.seam__line { position: absolute; inset: 0; background: var(--bone); opacity: calc(.15 + (1 - var(--split, 1)) * .85); }
.nucleus { position: absolute; left: 50%; top: 50%; width: clamp(150px, 22vw, 300px); transform: translate(-50%, -50%) translate3d(0, var(--ny, 0px), 0) scale(var(--ns, 1)); z-index: 3; will-change: transform; }
.nucleus img { width: 100%; height: auto; filter: drop-shadow(0 18px 40px rgba(0,0,0,.6)); transform: rotateY(var(--ry, 0deg)) rotateX(var(--rx, 0deg)); }
.nucleus__bits { position: absolute; left: 50%; top: calc(100% + .4rem); transform: translateX(-50%); font-size: .78rem; color: var(--bone); white-space: nowrap; letter-spacing: .2em; }
.core__copy { position: absolute; left: 0; right: 0; top: calc(var(--bar) + clamp(3.2rem, 9vh, 6rem)); text-align: center; padding: 0 1.2rem; z-index: 4; }
.kick { font-size: .78rem; color: var(--dim); letter-spacing: .06em; margin-bottom: .5rem; }
.core__sub { font: 500 clamp(1rem, 1.6vw, 1.25rem)/1.4 var(--f-h); color: var(--bone); max-width: 32ch; margin: 0 auto; }
.core__hint { position: absolute; left: clamp(1rem, 3vw, 2rem); bottom: 1.6rem; display: flex; align-items: center; gap: .6rem; font-size: .7rem; color: var(--dim); z-index: 4; }
.core__hint i { display: block; width: 46px; height: 2px; background: var(--line-2); position: relative; overflow: hidden; }
.core__hint i::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, var(--coral) 50%, var(--ice) 50%); transform: scaleX(var(--merge, 0)); transform-origin: left; }

/* ---------- section shell ---------- */
section.tools, section.story, section.ca { padding: clamp(4rem, 9vw, 7.5rem) clamp(1rem, 4vw, 3.5rem); max-width: 1440px; margin: 0 auto; }
.sec { margin-bottom: 2.2rem; max-width: 760px; }
.sec__n { display: block; font-size: .72rem; color: var(--dim); letter-spacing: .08em; margin-bottom: .7rem; }
.sec__h { font: 700 clamp(2.1rem, 5vw, 4rem)/1.02 var(--f-h); letter-spacing: -.025em; }
.sec__p { color: var(--dim); margin-top: .8rem; }
/* split-screen wipe: the header opens from the centre seam outwards as it enters */
.wipe { clip-path: inset(0 calc(50% - var(--w, 1) * 50%) 0 calc(50% - var(--w, 1) * 50%)); }

/* ---------- 02 bento ---------- */
.bento { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-auto-rows: minmax(150px, auto); gap: 12px;
  grid-template-areas:
    "c c c c c c c t t t t t"
    "c c c c c c c t t t t t"
    "l l l l k k k t t t t t"
    "w w w w w w w t t t t t"; }
.t-chart { grid-area: c; } .t-trend { grid-area: t; } .t-launch { grid-area: l; } .t-check { grid-area: k; } .t-wallet { grid-area: w; }
.tile { position: relative; background: var(--g1); border: 1px solid var(--line); border-radius: var(--r-l); overflow: hidden; overflow: clip; min-width: 0; }
/* overflow: clip (not hidden) so the open tile header can stick under the top bar */
.tile::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: linear-gradient(90deg, var(--coral) 50%, var(--ice) 50%); transform: scaleX(0); transition: transform .5s var(--ease); }
.tile:hover::before, .tile:focus-within::before, .tile.is-open::before { transform: scaleX(1); }
.t-launch .tile__p, .t-check .tile__p { padding-right: 2.6rem; }
.tile__open { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: .4rem; width: 100%; height: 100%; min-height: 150px; padding: 1.3rem 1.4rem; background: none; border: 0; text-align: left; cursor: pointer; }
.tile__open:focus-visible { outline-offset: -4px; }
.tile__n { font-size: .72rem; color: var(--dim); }
.tile__h { font: 700 clamp(1.3rem, 2.2vw, 1.9rem)/1.1 var(--f-h); letter-spacing: -.01em; }
.tile__p { color: var(--dim); font-size: .92rem; max-width: 40ch; }
.t-chart .tile__h { font-size: clamp(1.8rem, 3.6vw, 3rem); }
.tile__live { margin-top: auto; font-size: .82rem; color: var(--ice); }
.tile__spark { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 42%; pointer-events: none; }
.tile__spark path { fill: none; stroke: var(--coral); stroke-width: 1.6; vector-effect: non-scaling-stroke; }
.t-chart .tile__live { position: relative; z-index: 1; margin-bottom: 30%; }
.tile__list { list-style: none; width: 100%; margin-top: 1rem; display: grid; gap: 0; font-size: .82rem; }
.tile__list li { display: flex; justify-content: space-between; gap: .8rem; padding: .7rem 0; border-top: 1px solid var(--line); animation: tick .5s var(--ease) both; }
.tile__list li:nth-child(2) { animation-delay: .06s } .tile__list li:nth-child(3) { animation-delay: .12s } .tile__list li:nth-child(4) { animation-delay: .18s } .tile__list li:nth-child(5) { animation-delay: .24s } .tile__list li:nth-child(6) { animation-delay: .3s }
.tile__list b { color: var(--bone); font-weight: 600; } .tile__list span { color: var(--dim); }
@keyframes tick { from { opacity: 0; transform: translateX(10px); } }
.tile__twin { position: absolute; right: 1.3rem; top: 1.2rem; display: flex; } .tile__twin i { width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--coral); } .tile__twin i + i { border-color: var(--ice); margin-left: -14px; transition: margin .4s var(--ease); }
.tile:hover .tile__twin i + i { margin-left: -34px; }
.tile__scan { position: absolute; right: 1.3rem; top: 1.2rem; width: 36px; height: 36px; border: 1px solid var(--line-2); border-radius: 50%; overflow: hidden; } .tile__scan i { position: absolute; left: 0; right: 0; height: 2px; background: var(--ice); top: 50%; animation: sweep 2.4s ease-in-out infinite; }
@keyframes sweep { 0%, 100% { top: 15%; } 50% { top: 85%; } }
.tile__bits { margin-top: auto; font-size: .82rem; letter-spacing: .25em; color: var(--mid); }
.tile__bits::first-letter { color: var(--coral); }

/* open state: the tile takes the full row where it sits, the others shrink to a strip */
.bento.has-open { grid-template-areas: none; grid-auto-flow: row dense; grid-auto-rows: auto; }
.bento.has-open .tile { grid-area: auto; grid-column: span 3; }
.bento.has-open .tile.is-open { grid-column: 1 / -1; }
.bento.has-open .tile:not(.is-open) .tile__open { min-height: 0; padding: .9rem 1.1rem; flex-direction: row; align-items: baseline; gap: .7rem; }
.bento.has-open .tile:not(.is-open) .tile__open > :not(.tile__n):not(.tile__h) { display: none; }
.bento.has-open .tile:not(.is-open) .tile__h { font-size: 1rem; }
.tile.is-open .tile__open { display: none; }
.tile.is-open { background: var(--g1); border-color: var(--line-2); }
.tile__body { padding: 0 1.4rem 1.6rem; }
.tile__bar { display: flex; align-items: center; gap: 1rem; padding: 1rem 0; margin-bottom: 1rem; border-bottom: 1px solid var(--line); position: sticky; top: var(--bar); background: var(--g1); z-index: 2; }
.tile__t { font: 700 1.35rem/1.2 var(--f-h); }
.tile__x { margin-left: auto; min-height: 44px; padding: 0 1rem; background: none; border: 1px solid var(--bone); border-radius: var(--r); cursor: pointer; font: 600 .8rem var(--f-h); }
.tile__x:hover { background: var(--bone); color: var(--g0); }
::view-transition-group(*) { animation-duration: .45s; animation-timing-function: cubic-bezier(.2,.8,.2,1); }

/* ---------- tool internals (reused from Orbyx/Cindral, re-skinned) ---------- */
.kx-panel { animation: rise .5s var(--ease) both; }
.kx-panel > * { animation: rise .55s var(--ease) both; } .kx-panel > *:nth-child(2) { animation-delay: .06s } .kx-panel > *:nth-child(3) { animation-delay: .12s }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }
.kx-panel input, .kx-panel textarea { width: 100%; background: var(--g0); border: 1px solid var(--line-2); border-radius: var(--r); color: var(--bone); font: .9rem/1.4 var(--f-m); padding: .75rem .85rem; min-height: 46px; }
.kx-panel input::placeholder, .kx-panel textarea::placeholder { color: #80859a; }
.kx-panel input:focus, .kx-panel textarea:focus { outline: 2px solid var(--ice); outline-offset: 0; border-color: var(--ice); }
.kx-panel input[aria-invalid="true"], .kx-panel textarea[aria-invalid="true"] { border-color: var(--coral); }
.kx-panel label { display: grid; gap: .35rem; font: 600 .78rem/1.2 var(--f-b); color: var(--dim); }
.kx-note { font-size: .78rem; color: var(--dim); line-height: 1.5; }
.kx-empty { color: var(--dim); padding: 2rem 0; max-width: 56ch; }
.kx-status { font: .8rem/1.5 var(--f-m); color: var(--dim); min-height: 1.2em; margin: .6rem 0; }
.kx-status.err { color: var(--coral); }
.kx-sub { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; margin-bottom: .8rem; }
.kx-sub button { min-height: 44px; padding: 0 .8rem; background: none; border: 1px solid var(--line-2); border-radius: var(--r); color: var(--dim); cursor: pointer; font: 500 .76rem var(--f-m); }
.kx-sub button:hover { color: var(--bone); }
.kx-sub button.is-on { background: var(--bone); color: var(--g0); border-color: var(--bone); }
.kx-sub .kx-note { margin-left: auto; }
.ch-top { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; align-items: center; margin-bottom: .8rem; }
.ch-top .kx-sub { margin: 0; }
.ch-id { display: flex; gap: .75rem; align-items: center; }
.ch-id b { display: block; font: 700 1.1rem var(--f-h); }
.ch-id small { color: var(--dim); font-size: .74rem; }
.kx-ph, .ch-logo { width: 40px; height: 40px; flex: 0 0 40px; display: inline-block; background: var(--g2) url(/assets/img/favicon-64.png) center/72% no-repeat; border: 1px solid var(--line); border-radius: var(--r); object-fit: cover; }
.kx-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; margin-bottom: .8rem; }
.kx-stats:empty { display: none; }
.kx-stat { background: var(--g2); padding: .7rem .8rem; }
.kx-stat small { display: block; font: .64rem/1 var(--f-m); color: var(--dim); margin-bottom: .4rem; }
.kx-stat b { font: 500 .98rem/1.2 var(--f-m); }
.up { color: var(--ice); } .dn { color: var(--coral); }
.kx-bar { height: 3px; background: var(--line); margin-top: .4rem; } .kx-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--coral), var(--ice)); }
.ch-box { position: relative; height: clamp(280px, 52vh, 520px); border: 1px solid var(--line); border-radius: var(--r); background: #0d0e12; overflow: hidden; }
.ch-box canvas { width: 100%; height: 100%; display: block; }
.ch-wait { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 1rem; text-align: center; padding: 1rem; color: var(--dim); font: .82rem/1.5 var(--f-m); }
.ch-wait[hidden] { display: none; }
.pb-wait { display: flex; } .pb-wait i { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--coral); animation: pairL 1.4s ease-in-out infinite; } .pb-wait i + i { border-color: var(--ice); animation-name: pairR; }
@keyframes pairL { 50% { transform: translateX(8px); } } @keyframes pairR { 50% { transform: translateX(-8px); } }
.ch-tip { position: absolute; left: .5rem; top: .5rem; right: .5rem; font-size: .7rem; background: rgba(11,12,15,.94); border: 1px solid var(--line); padding: .4rem .55rem; pointer-events: none; }
.kx-coins { list-style: none; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.kx-coin { display: grid; grid-template-columns: 2rem 42px minmax(0,1fr) 96px 84px 120px; gap: .8rem; align-items: center; padding: .6rem .8rem; border-bottom: 1px solid var(--line); cursor: pointer; transition: background .15s; animation: rise .4s var(--ease) both; min-height: 58px; }
.kx-coin:hover, .kx-coin:focus-visible { background: rgba(154,209,255,.06); }
.kx-coin:focus-visible { outline-offset: -2px; }
.kx-coin img { width: 42px; height: 42px; object-fit: cover; border: 1px solid var(--line); border-radius: var(--r); }
.tr-rank { color: var(--dim); font-size: .74rem; }
.tr-name { min-width: 0; } .tr-name b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tr-name small, .tr-age { color: var(--dim); font: .7rem var(--f-m); }
.tr-name em { color: var(--ice); font-style: normal; }
.tr-mc, .tr-age, .tr-prog { text-align: right; } .tr-mc small, .tr-age small, .tr-prog small { display: block; font: .62rem var(--f-m); color: var(--dim); }
.tr-mc b, .tr-age b { font: 500 .84rem var(--f-m); } .tr-prog .kx-bar { margin-top: .35rem; }
.sg-created .kx-coin { grid-template-columns: 42px minmax(0,1fr) auto; }
.kx-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 1.4rem; }
.kx-form { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem; }
.kx-form .wide { grid-column: 1 / -1; }
.kx-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.kx-art { display: grid; gap: .6rem; align-content: start; }
.kx-img { position: relative; aspect-ratio: 1; max-width: 380px; border: 1px dashed var(--line-2); border-radius: var(--r); display: grid; place-items: center; overflow: hidden; background: #0d0e12; color: var(--dim); font: .76rem var(--f-m); }
.kx-img img { width: 100%; height: 100%; object-fit: cover; }
.kx-scan { position: absolute; left: 0; right: 0; height: 30%; top: -30%; background: linear-gradient(180deg, transparent, rgba(154,209,255,.3), transparent); opacity: 0; }
.kx-img.busy .kx-scan { opacity: 1; animation: scan 1.2s linear infinite; }
@keyframes scan { to { top: 100%; } }
.kx-file { position: relative; overflow: hidden; } .kx-file input { position: absolute; inset: 0; opacity: 0; cursor: pointer; min-height: 0; }
.kx-file:focus-within { outline: 2px solid var(--ice); outline-offset: 3px; }
.kx-confirm, .kx-result { border: 1px solid var(--coral); border-radius: var(--r); padding: 1rem; margin-top: 1rem; background: rgba(255,79,109,.05); }
.kx-confirm h4 { font: 700 1rem var(--f-h); margin-bottom: .6rem; }
.kx-dl { display: grid; grid-template-columns: max-content 1fr; gap: .3rem 1rem; font-size: .86rem; margin-bottom: .75rem; } .kx-dl dt { color: var(--dim); font: .74rem var(--f-m); } .kx-dl dd { word-break: break-all; }
.kx-result a, .kx-links a { color: var(--ice); }
.kx-search { display: flex; gap: .5rem; flex-wrap: wrap; } .kx-search input { flex: 1 1 280px; width: auto; }
.kx-card { display: flex; gap: 1rem; border: 1px solid var(--line); border-radius: var(--r); padding: 1rem; margin: .8rem 0; background: var(--g2); }
.kx-card img, .kx-card .kx-ph { width: 64px; height: 64px; flex: 0 0 64px; object-fit: cover; border-radius: var(--r); }
.kx-card h3 { font: 700 1.1rem var(--f-h); } .kx-card h3 small { font: 500 .8rem var(--f-m); color: var(--dim); margin-left: .5rem; }
.kx-card .kx-note { word-break: break-all; }
.sg-h { font: 700 .82rem/1 var(--f-h); color: var(--ice); margin: 1.2rem 0 .6rem; }
.kx-tag { display: inline-block; font: 500 .66rem/1 var(--f-m); padding: .3rem .45rem; border: 1px solid var(--ice); color: var(--ice); border-radius: 3px; margin: 0 .3rem .2rem 0; }
.kx-tag.warn, .kx-tag.bad, .kx-tag.sell { border-color: var(--coral); color: var(--coral); }
.kx-scroll { max-height: 340px; overflow: auto; } .kx-scroll.sg-tall { max-height: 480px; }
.kx-table { width: 100%; border-collapse: collapse; font-size: .82rem; }
.kx-table th { text-align: left; font: 500 .66rem var(--f-m); color: var(--dim); padding: .45rem .5rem; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--g2); }
.kx-table td { padding: .5rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.kx-table td.num, .kx-table th.num { text-align: right; font-family: var(--f-m); }
.kx-table a { color: var(--bone); text-decoration-color: var(--line-2); }
.sg-flags { list-style: none; display: grid; gap: .35rem; margin: .5rem 0; }
.sg-flags li { padding: .5rem .7rem; border: 1px solid var(--line); border-radius: var(--r); background: var(--g2); font-size: .86rem; }
.sg-flags li.ok { border-color: rgba(154,209,255,.6); } .sg-flags li.bad { border-color: var(--coral); color: #ffc2cc; } .sg-flags li.warn { border-color: #e9c46a; }
.sg-scan { display: flex; align-items: center; gap: .8rem; color: var(--dim); font: .8rem var(--f-m); padding: 1.5rem 0; }
.sg-scan i { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--coral); border-right-color: var(--ice); animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.sg-bar-cell { width: 90px; } .sg-bar-cell i { display: block; height: 3px; background: var(--ice); margin-left: auto; }
.kx-links { display: flex; flex-wrap: wrap; gap: 1rem; font-size: .84rem; margin-top: .6rem; }
.kx-links a { min-height: 44px; display: inline-flex; align-items: center; }

/* ---------- 03 story: split, the two columns slide in from opposite sides ---------- */
.story { display: grid; grid-template-columns: 1fr 1.25fr; gap: clamp(1.5rem, 4vw, 4rem); align-items: center; }
.story__a { transform: translate3d(calc((1 - var(--enter, 1)) * -12vw), 0, 0); opacity: calc(.2 + var(--enter, 1) * .8); }
.story__b { transform: translate3d(calc((1 - var(--enter, 1)) * 12vw), 0, 0); opacity: calc(.2 + var(--enter, 1) * .8); }
.story__l { list-style: none; margin-top: 2rem; display: grid; gap: 1.2rem; }
.story__l li { display: grid; grid-template-columns: 3.2rem 1fr; gap: .8rem; align-items: baseline; color: var(--dim); }
.story__l li b { font-size: .9rem; color: var(--coral); } .story__l li:nth-child(2) b { color: var(--ice); } .story__l li:nth-child(3) b { color: var(--bone); }
.story__l strong { color: var(--bone); font-weight: 600; }
.story__b { position: relative; border-radius: var(--r-l); overflow: hidden; border: 1px solid var(--line-2); background: var(--g1); aspect-ratio: 16 / 9; }
.story__b video { width: 100%; height: 100%; object-fit: cover; display: block; }
.story__b::after { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 1px; background: rgba(242,239,233,.0); }
.story__slot { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; gap: .4rem; color: var(--dim); font: .8rem var(--f-m); padding: 1rem; }

/* ---------- 04 CA ---------- */
section.ca { padding-bottom: 8rem; }
.ca__in { max-width: 720px; margin: 0 auto; text-align: center; border-top: 1px solid var(--line); padding-top: 2.4rem; }
.ca__h { font: 700 1.25rem var(--f-h); margin-bottom: 1rem; }
.ca__row { display: flex; gap: .5rem; align-items: stretch; justify-content: center; }
.ca__v { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; justify-content: center; padding: .6rem .9rem; background: var(--g1); border: 1px solid var(--line-2); border-radius: var(--r); font-size: .84rem; word-break: break-all; min-height: 46px; }
.ca__copy:disabled { background: none; border: 1px dashed var(--line-2); color: var(--dim); opacity: 1; }
.ca__s { font-size: .74rem; color: var(--dim); margin: .7rem 0 1rem; }
.ca__go { display: flex; gap: .6rem; flex-wrap: wrap; justify-content: center; }
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .6rem 1.5rem; padding: 1.4rem clamp(1rem, 4vw, 3.5rem) 6.5rem; border-top: 1px solid var(--line); color: var(--dim); font-size: .8rem; }

/* ---------- floating command bar (main menu) ---------- */
.cmd { position: fixed; z-index: 45; left: 50%; bottom: max(16px, env(safe-area-inset-bottom)); display: flex; align-items: center; gap: 4px; padding: 5px; background: rgba(17,19,24,.82); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border: 1px solid var(--line-2); border-radius: 12px; box-shadow: 0 16px 40px rgba(0,0,0,.5); transform: translate3d(-50%, var(--cy, 0px), 0); max-width: calc(100vw - 16px); }
.cmd__k { display: inline-flex; align-items: center; gap: .55rem; min-height: 44px; padding: 0 .9rem 0 .5rem; background: var(--bone); color: var(--g0); border: 0; border-radius: 8px; cursor: pointer; font: 600 .82rem var(--f-h); white-space: nowrap; }
.cmd__kbd { font-size: .7rem; padding: .15rem .35rem; border-radius: 4px; background: var(--g0); color: var(--bone); }
.cmd__k:hover { background: var(--ice); }
.cmd__list { display: flex; gap: 2px; }
.cmd__list button { display: inline-flex; align-items: center; gap: .45rem; min-height: 44px; padding: 0 .75rem; background: none; border: 0; border-radius: 8px; cursor: pointer; font: 500 .82rem var(--f-b); color: var(--dim); white-space: nowrap; }
.cmd__list button b { font-size: .66rem; font-weight: 500; color: var(--mid); }
.cmd__list button:hover, .cmd__list button[aria-current="true"] { color: var(--bone); background: var(--g3); }
.cmd__list button[aria-current="true"] b { color: var(--coral); }

/* ---------- palette ---------- */
.pal { position: fixed; inset: 0; z-index: 60; background: rgba(6,7,9,.6); display: flex; justify-content: center; align-items: flex-start; padding: 14vh 12px 12px; }
.pal__box { width: min(560px, 100%); background: rgba(17,19,24,.94); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); border: 1px solid var(--line-2); border-radius: var(--r-l); box-shadow: 0 30px 80px rgba(0,0,0,.6); overflow: hidden; animation: palIn .28s var(--ease) both; }
@keyframes palIn { from { opacity: 0; transform: translateY(-10px) scale(.98); } }
.pal__in { display: flex; align-items: center; gap: .6rem; padding: .4rem .9rem; border-bottom: 1px solid var(--line); color: var(--coral); }
.pal__in input { flex: 1; min-height: 52px; background: none; border: 0; color: var(--bone); font: 500 1rem var(--f-b); }
.pal__in input:focus { outline: none; }
.pal__in:focus-within { box-shadow: inset 0 -2px 0 var(--ice); }
.pal__in kbd { color: var(--dim); }
.pal__list { list-style: none; max-height: 52vh; overflow: auto; padding: 6px; }
.pal__list li { display: flex; align-items: center; gap: .8rem; min-height: 48px; padding: 0 .8rem; border-radius: 8px; cursor: pointer; color: var(--dim); }
.pal__list li b { font: 500 .7rem var(--f-m); color: var(--mid); width: 1.4rem; }
.pal__list li span { color: var(--bone); font-weight: 500; }
.pal__list li small { margin-left: auto; font: .7rem var(--f-m); color: var(--dim); }
.pal__list li[aria-selected="true"] { background: var(--g3); box-shadow: inset 2px 0 0 var(--coral); }
.pal__list li.is-empty { cursor: default; }
.pal__foot { font-size: .68rem; color: var(--dim); padding: .6rem .9rem; border-top: 1px solid var(--line); }

.toast { position: fixed; z-index: 70; left: 50%; top: calc(var(--bar) + 14px); transform: translate(-50%, -10px); opacity: 0; padding: .65rem 1rem; background: var(--bone); color: var(--g0); font: 600 .84rem var(--f-h); pointer-events: none; transition: .25s var(--ease); border-radius: var(--r); }
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* reveal helper for decode/rise */
.rv { opacity: 0; transform: translateY(16px); transition: opacity .7s var(--ease), transform .7s var(--ease); } .rv.is-in { opacity: 1; transform: none; }

@media (max-width: 1100px) {
  .bento { grid-template-areas:
    "c c c c c c c c c c c c"
    "c c c c c c c c c c c c"
    "t t t t t t l l l l l l"
    "t t t t t t k k k k k k"
    "w w w w w w w w w w w w"; }
  .cmd__list button { padding: 0 .55rem; }
  .story { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  :root { --bar: 56px; }
  .bar { gap: .4rem; padding: 0 .5rem 0 .7rem; }
  .bar__sig { display: none; }
  .bar__w { display: none; }
  .snd { padding: 0; width: 44px; justify-content: center; } .snd__t { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .buy { padding: 0 .8rem; font-size: .8rem; } .buy__s { display: none; }
  .cachip { padding: 0 .5rem 0 .3rem; font-size: .7rem; }
  .core { height: 190vh; }
  .half__word { font-size: 16.5vw; }
  .half__tag { top: calc(var(--bar) + 1rem); font-size: .64rem; }
  .nucleus { width: 46vw; top: 40%; }
  .core__copy { top: calc(var(--bar) + 2.6rem); }
  .core__hint { display: none; }
  .bento { grid-template-columns: 1fr; grid-template-areas: "c" "t" "l" "k" "w"; grid-auto-rows: auto; }
  .bento.has-open .tile, .bento.has-open .tile.is-open { grid-column: 1 / -1; }
  .tile__open { min-height: 132px; }
  .t-chart .tile__open { min-height: 230px; }
  .tile__list li:nth-child(n+4) { display: none; }
  .tile__body { padding: 0 .9rem 1.2rem; }
  .tile__t { font-size: 1.1rem; }
  .story__a, .story__b { transform: none; opacity: 1; }
  .ca__row { flex-direction: column; } .ca__copy { width: 100%; }
  .foot { flex-direction: column; }
  .cmd__list { display: none; }
  .cmd__k { padding: 0 1.1rem 0 .55rem; }
  .kx-grid, .kx-form { grid-template-columns: 1fr; }
  .kx-coin { grid-template-columns: 1.4rem 38px minmax(0,1fr) auto; gap: .55rem; } .kx-coin .tr-age { display: none; } .kx-coin .tr-prog { grid-column: 3 / -1; text-align: left; } .kx-coin img, .kx-coin .kx-ph { width: 38px; height: 38px; flex-basis: 38px; }
  .kx-sub .kx-note { margin-left: 0; width: 100%; }
  .kx-scroll { overflow-x: auto; }
  .kx-table { font-size: .76rem; }
  .pal { padding-top: 10vh; }
}
@media (hover: none) and (pointer: coarse) { .cmd__kbd { display: none; } .cmd__k { padding: 0 1.2rem; } }
@media (max-width: 380px) { .cachip__v { display: none; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .core { height: auto; } .core__pin { position: relative; }
  .half--a, .half--b { transform: none; }
  .wipe { clip-path: none; }
  .story__a, .story__b { transform: none; opacity: 1; }
  .rv { opacity: 1; transform: none; }
}
