@import url('https://fonts.googleapis.com/css2?family=Geist:wght@400;500;600;700&family=Geist+Mono:wght@400;500&display=swap');

:root {
  --bg: #000; --panel: #0b0b0b; --line: #1c1c1c; --line2: #2a2a2a;
  --text: #f4f4f1; --dim: #8b8b86; --faint: #55554f;
  --leaf: #8fe36b; --down: #ff6b5e; --on: #000; --line3: var(--line3); --hover: #070707; --ghost: #0c0c0c; --glow: 143,227,107;
  --sans: 'Geist', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'Geist Mono', ui-monospace, Consolas, monospace;
}
:root[data-theme=light] {
  --bg: #f5f5f0; --panel: #fff; --line: #e1e1da; --line2: #cfcfc6;
  --text: #0c0c0b; --dim: #66665f; --faint: #a3a39b;
  --leaf: #2f9a14; --down: #d8402f; --on: #f5f5f0; --line3: #9a9a92; --hover: #ecece6; --ghost: #e9e9e2; --glow: 47,154,20;
}
* { box-sizing: border-box; }
html { scrollbar-width: none; background: var(--bg); }
html::-webkit-scrollbar, *::-webkit-scrollbar { display: none; }
body { margin: 0; background: transparent; color: var(--text); font: 15px/1.5 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; color: inherit; }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* nav: no background, no border */
.nav { position: fixed; inset: 0 0 auto 0; z-index: 20; display: flex; align-items: center; gap: 28px; padding: 22px 32px; pointer-events: none; }
.nav > * { pointer-events: auto; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 23px; letter-spacing: -0.04em; }
.brand img { width: 32px; height: 32px; display: block; }
.nav .links { display: flex; gap: 28px; margin-left: 14px; color: var(--dim); font-size: 16px; font-weight: 500; }
.nav .links a:hover, .nav .links a.on { color: var(--text); }
.nav .sp { flex: 1; }
.xicon { display: grid; place-items: center; width: 42px; height: 42px; color: var(--dim); background: none; border: 0; padding: 0; cursor: pointer; border-radius: 50%; }
.xicon:hover { color: var(--text); }
.xicon svg { width: 19px; height: 19px; }
.nav { gap: 14px; }
.nav .brand { margin-right: 14px; }
.nav #connect { height: 44px; padding: 0 22px; font-size: 15px; margin-left: 6px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--text); background: var(--text); color: var(--on); font-weight: 600; font-size: 14px; cursor: pointer; transition: opacity .15s; white-space: nowrap; }
.btn:hover { opacity: .86; }
.btn.ghost { background: transparent; color: var(--text); border-color: var(--line2); }
.btn.ghost:hover { opacity: 1; border-color: var(--line3); }
.btn.sm { height: 34px; padding: 0 14px; font-size: 13px; }
.btn.wide { width: 100%; height: 46px; font-size: 15px; }

/* hero */
.hero { position: relative; height: 100vh; min-height: 620px; display: flex; align-items: center; overflow: hidden; }
.hero canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hero::after { content: ''; position: absolute; inset: auto 0 0 0; height: 30vh; background: linear-gradient(transparent, var(--bg)); pointer-events: none; }
.hero .copy { position: relative; z-index: 2; width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 32px; }
.hero.center .copy { text-align: center; }
.hero h1 { margin: 0; font-size: clamp(52px, 8.2vw, 124px); line-height: .94; letter-spacing: -0.055em; font-weight: 600; }
.hero h1 em { font-style: normal; color: var(--leaf); }
.hero p { margin: 26px 0 0; color: var(--dim); font-size: 17px; max-width: 430px; }
.hero.center p { margin-left: auto; margin-right: auto; }
.hero .cta { display: flex; gap: 10px; margin-top: 30px; }
.hero.center .cta { justify-content: center; }

/* how it works */
.how { max-width: 1180px; margin: 0 auto; padding: 40px 32px 140px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; }
.how div { padding: 0 28px 0 0; }
.how div + div { padding-left: 28px; border-left: 1px solid var(--line); }
.how .n { font-family: var(--mono); color: var(--leaf); font-size: 13px; }
.how h3 { margin: 14px 0 8px; font-size: 26px; letter-spacing: -0.03em; font-weight: 600; }
.how p { margin: 0; color: var(--dim); }

/* footer */
footer { position: relative; border-top: 1px solid var(--line); overflow: hidden; }
footer .in { max-width: 1180px; margin: 0 auto; padding: 34px 32px; display: flex; align-items: center; justify-content: space-between; position: relative; z-index: 2; }
footer .big { font-size: clamp(120px, 26vw, 380px); font-weight: 700; letter-spacing: -0.07em; line-height: .72; text-align: center; user-select: none; margin: 10px 0 -0.06em; color: transparent; -webkit-background-clip: text; background-clip: text; background-color: var(--ghost); background-image: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(var(--glow),calc(var(--lit, 0) * .95)) 0, rgba(var(--glow),calc(var(--lit, 0) * .28)) 16%, rgba(var(--glow),0) 38%); transition: --lit .5s; }
@property --lit { syntax: '<number>'; inherits: true; initial-value: 0; }

/* app pages */
.page { max-width: 1180px; margin: 0 auto; padding: 118px 32px 100px; min-height: 100vh; }
.page h1 { font-size: 44px; letter-spacing: -0.045em; font-weight: 600; margin: 0 0 26px; line-height: 1; }
.tools { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; }
.search { flex: 1; max-width: 360px; height: 40px; border-radius: 999px; border: 1px solid var(--line2); background: transparent; padding: 0 16px; outline: none; }
.search::placeholder, .field input::placeholder, .field textarea::placeholder { color: var(--faint); }
.search:focus { border-color: var(--line3); }
.seg { display: flex; gap: 4px; }
.seg button { height: 34px; padding: 0 14px; border-radius: 999px; border: 1px solid transparent; background: none; color: var(--dim); cursor: pointer; font-size: 14px; }
.seg button.on { color: var(--text); border-color: var(--line2); }

.rows { width: 100%; border-collapse: collapse; }
.rows th { text-align: right; font: 500 12px var(--mono); color: var(--faint); padding: 14px 0 10px; border-bottom: 1px solid var(--line); }
.rows th:first-child, .rows td:first-child { text-align: left; }
.rows td { padding: 14px 0; border-bottom: 1px solid var(--line); text-align: right; }
.rows tr.r { cursor: pointer; }
.rows tr.r:hover td { background: var(--hover); }
.tok { display: flex; align-items: center; gap: 12px; }
.av { width: 36px; height: 36px; border-radius: 50%; flex: none; display: grid; place-items: center; font-weight: 700; font-size: 14px; color: #000; object-fit: cover; }
.tok b { font-weight: 600; }
.tok span { color: var(--dim); font-size: 13px; }
.up { color: var(--leaf); } .dn { color: var(--down); }
.spark { width: 96px; height: 28px; display: inline-block; vertical-align: middle; }
.empty { color: var(--dim); padding: 60px 0; text-align: center; }

/* launch form */
.form { max-width: 520px; }
.field { margin-bottom: 16px; }
.field label { display: block; color: var(--dim); font-size: 13px; margin-bottom: 7px; }
.field input, .field textarea { width: 100%; height: 46px; border-radius: 12px; border: 1px solid var(--line2); background: var(--bg); padding: 0 14px; outline: none; }
.field textarea { height: 92px; padding: 12px 14px; resize: none; }
.field input:focus, .field textarea:focus { border-color: var(--line3); }
.two { display: grid; grid-template-columns: 1fr 140px; gap: 12px; }
.drop { height: 132px; border-radius: 12px; background: var(--bg); border: 1px dashed var(--line2); display: grid; place-items: center; color: var(--dim); cursor: pointer; overflow: hidden; position: relative; }
.drop:hover { border-color: var(--line3); }
.drop img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: var(--bg); }
.launchgrid { display: grid; grid-template-columns: minmax(0, 520px) 1fr; gap: 72px; align-items: start; }
.prev { position: sticky; top: 118px; background: var(--bg); border: 1px solid var(--line); border-radius: 18px; padding: 22px; max-width: 340px; }
.prev .av { width: 64px; height: 64px; font-size: 24px; }
.prev h4 { margin: 16px 0 2px; font-size: 22px; letter-spacing: -0.03em; }
.prev .tk { color: var(--dim); font-family: var(--mono); font-size: 13px; }
.prev p { color: var(--dim); margin: 12px 0 0; font-size: 14px; min-height: 42px; overflow-wrap: anywhere; }
.field input.range { -webkit-appearance: none; appearance: none; width: 100%; height: 4px; border-radius: 4px; background: var(--line2); outline: none; padding: 0; border: 0; margin: 10px 0 14px; display: block; }
.range::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%; background: var(--text); cursor: pointer; }
.range::-moz-range-thumb { width: 18px; height: 18px; border: 0; border-radius: 50%; background: var(--text); cursor: pointer; }
.rangehead { display: flex; justify-content: space-between; }
.note { color: var(--dim); font-size: 13px; margin-top: 12px; min-height: 20px; }

/* token page */
.thead { display: flex; align-items: center; gap: 14px; margin-bottom: 26px; flex-wrap: wrap; }
.thead .av { width: 52px; height: 52px; font-size: 20px; }
.thead .id { margin-right: 44px; }
.thead .nm { display: flex; align-items: center; gap: 12px; }
.thead h1 { margin: 0; font-size: 30px; line-height: 1.15; }
.thead .tk { color: var(--dim); font-family: var(--mono); font-size: 13px; }
.ca { display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 13px; color: var(--dim); border: 1px solid var(--line2); border-radius: 999px; height: 32px; padding: 0 12px; background: none; cursor: pointer; }
.ca:hover { color: var(--text); }
.ca svg { width: 13px; height: 13px; }
.tgrid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 28px; align-items: start; }
.ctools { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.seg.sm button { height: 28px; padding: 0 11px; font: 12px var(--mono); }
.chart { height: 440px; margin-bottom: 18px; }
.tv { width: 100%; height: 100%; color: var(--dim); }
.stats { display: flex; gap: 44px; }
.stats div span { display: block; color: var(--faint); font: 12px var(--mono); margin-bottom: 2px; }
.stats div b { font: 500 20px var(--mono); }
.stats div i { font: 12px var(--mono); font-style: normal; margin-left: 8px; }
.swap { border: 1px solid var(--line); border-radius: 18px; padding: 18px; position: sticky; top: 100px; }
.swap .seg { margin-bottom: 14px; }
.amt { border: 1px solid var(--line2); border-radius: 14px; padding: 12px 14px; margin-bottom: 10px; }
.amt small { color: var(--faint); font-size: 12px; }
.amt .row { display: flex; align-items: center; gap: 10px; }
.amt input { flex: 1; min-width: 0; background: none; border: 0; outline: none; font: 500 26px var(--mono); padding: 4px 0; }
.amt .unit { color: var(--dim); font-weight: 600; }
.quick { display: flex; gap: 6px; margin: 0 0 14px; }
.quick button { flex: 1; height: 30px; border-radius: 999px; border: 1px solid var(--line2); background: none; color: var(--dim); cursor: pointer; font: 12px var(--mono); }
.quick button:hover { color: var(--text); border-color: var(--line3); }
.txs td, .txs th { font-family: var(--mono); font-size: 13px; }

/* option C: app shell */
.shell .rail { position: fixed; inset: 0 auto 0 0; width: 64px; border-right: 1px solid var(--line); display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 20px 0; z-index: 30; background: var(--bg); }
.shell .rail img { width: 26px; height: 26px; margin-bottom: 22px; }
.shell .rail a { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: var(--dim); }
.shell .rail a.on, .shell .rail a:hover { color: var(--text); background: var(--hover); }
.shell .rail svg { width: 18px; height: 18px; }
.shell .rail .sp { flex: 1; }
.shell .nav { left: 64px; padding: 16px 28px; }
.shell .nav .brand, .shell .nav .links { display: none; }
.shell .nav .search { max-width: 420px; }
.shell main { margin-left: 64px; padding-bottom: 40px; }
.shell .strip { position: relative; height: 430px; overflow: hidden; display: flex; align-items: center; border-bottom: 1px solid var(--line); }
.shell .strip canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.shell .strip .copy { position: relative; z-index: 2; padding: 40px 28px 0; }
.shell .strip h1 { font-size: clamp(44px, 5.4vw, 76px); line-height: .96; letter-spacing: -0.05em; margin: 0; font-weight: 600; }
.shell .strip h1 em { font-style: normal; color: var(--leaf); }
.shell .strip p { color: var(--dim); max-width: 380px; margin: 18px 0 22px; }
.shell .list { padding: 8px 28px 0; }
.shell .tape { position: fixed; inset: auto 0 0 64px; height: 34px; border-top: 1px solid var(--line); background: var(--bg); overflow: hidden; z-index: 25; font: 12px var(--mono); color: var(--dim); display: flex; align-items: center; }
.shell .tape .run { display: flex; gap: 34px; white-space: nowrap; animation: tape 60s linear infinite; padding-left: 28px; }
.shell .tape b { color: var(--text); font-weight: 500; margin-right: 8px; }
@keyframes tape { to { transform: translateX(-50%); } }

@media (max-width: 860px) {
  .nav { padding: 16px 18px; gap: 14px; }
  .nav .links { gap: 16px; margin-left: 0; }
  .hero .copy, .page, .how, footer .in { padding-left: 18px; padding-right: 18px; }
  .how { grid-template-columns: 1fr; gap: 34px; }
  .how div, .how div + div { padding: 0; border: 0; }
  .tgrid, .launchgrid { grid-template-columns: 1fr; gap: 24px; }
  .prev, .swap { position: static; max-width: none; }
  .rows .hide { display: none; }
  .stats { gap: 24px; width: 100%; }
  .chart { height: 320px; }
  .page h1 { font-size: 34px; }
}


body:not(.shell) .nav { position: absolute; }

.quick.fee { margin: 0; }
.quick.fee button { height: 40px; font-size: 14px; }
.quick.fee button.on { color: var(--on); background: var(--text); border-color: var(--text); }

.lang { display: flex; align-items: center; gap: 2px; font: 500 14px var(--mono); pointer-events: auto; }
.lang button { background: none; border: 0; padding: 9px 7px; color: var(--faint); cursor: pointer; font: inherit; }
.lang button + button { border-left: 1px solid var(--line2); padding-left: 8px; margin-left: 2px; }
.lang button.on, .lang button:hover { color: var(--text); }
:lang(ko) body { font-family: 'Geist', 'Pretendard', 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif; word-break: keep-all; }

/* page background: the grove, dim, behind app pages */
.pagebg { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: -1; pointer-events: none; }

/* connect popup */
.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; background: rgba(0,0,0,.62); backdrop-filter: blur(6px); opacity: 0; transition: opacity .18s; }
:root[data-theme=light] .modal { background: rgba(20,20,18,.32); }
.modal.in { opacity: 1; }
.sheet { width: 100%; max-width: 380px; background: var(--panel); border: 1px solid var(--line2); border-radius: 24px; padding: 20px; transform: translateY(10px) scale(.98); transition: transform .22s cubic-bezier(.2,.8,.2,1); box-shadow: 0 30px 80px rgba(0,0,0,.5); }
.modal.in .sheet { transform: none; }
.mh { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.mh img { width: 34px; height: 34px; }
.mh h3 { margin: 0; font-size: 19px; letter-spacing: -0.03em; font-weight: 600; flex: 1; }
.mh .x { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line2); background: none; color: var(--dim); font-size: 20px; line-height: 1; cursor: pointer; }
.mh .x:hover { color: var(--text); border-color: var(--line3); }
.wlist { display: grid; gap: 8px; }
.wopt { display: flex; align-items: center; gap: 12px; width: 100%; height: 58px; padding: 0 16px; border-radius: 16px; border: 1px solid var(--line); background: var(--bg); color: var(--text); cursor: pointer; text-align: left; font-size: 16px; font-weight: 500; transition: border-color .15s, transform .15s; }
.wopt:hover { border-color: var(--leaf); transform: translateY(-1px); }
.wopt img, .wopt .wi { width: 30px; height: 30px; border-radius: 9px; flex: none; }
.wopt .wi { background: var(--line2); }
.wopt .wn { flex: 1; }
.wopt small { color: var(--faint); font: 12px var(--mono); }
.wnone { color: var(--dim); margin: 4px 2px 8px; }
.mf { display: flex; align-items: center; gap: 8px; margin-top: 16px; color: var(--faint); font: 12px var(--mono); }
.mf i { width: 7px; height: 7px; border-radius: 50%; background: var(--leaf); }

/* bridge + testnet */
.duo { display: grid; grid-template-columns: 1fr 440px; gap: 64px; align-items: center; min-height: calc(100vh - 220px); }
.duo h1 { font-size: clamp(40px, 5vw, 64px); line-height: 1; margin: 0 0 20px; }
.duo h1 em { font-style: normal; color: var(--leaf); }
.duo header p { color: var(--dim); max-width: 340px; margin: 0; font-size: 16px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 24px; padding: 20px; }
.leg { border: 1px solid var(--line2); border-radius: 16px; padding: 14px 16px; background: var(--bg); }
.leg small { display: block; color: var(--faint); font: 12px var(--mono); margin-bottom: 6px; }
.leg .row { display: flex; align-items: center; gap: 10px; }
.leg b { font-weight: 600; font-size: 17px; flex: 1; }
.leg input { flex: 1; min-width: 0; background: none; border: 0; outline: none; font: 500 26px var(--mono); padding: 0; }
.leg .dot { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--line2); font: 600 12px var(--mono); flex: none; }
.leg .dot.g { background: var(--leaf); color: var(--on); }
.flip { width: 36px; height: 36px; margin: -8px auto; position: relative; z-index: 1; border-radius: 50%; border: 1px solid var(--line2); background: var(--panel); display: grid; place-items: center; color: var(--dim); }
.flip svg { width: 15px; height: 15px; }
.card.off .leg { opacity: .55; }
.card .btn.wide { margin-top: 14px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.card .note { text-align: center; }
.step { display: flex; gap: 14px; padding: 6px 0 18px; }
.step + .step { border-top: 1px solid var(--line); padding-top: 18px; }
.step .n { font: 13px var(--mono); color: var(--leaf); padding-top: 3px; }
.step .b { flex: 1; min-width: 0; }
.step h4 { margin: 0 0 10px; font-size: 17px; font-weight: 600; letter-spacing: -0.02em; }
.step .field { margin-bottom: 10px; }
.step .pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.step p { color: var(--faint); font-size: 13px; margin: 10px 0 0; }
.facts { display: flex; gap: 26px; margin-top: 26px; color: var(--faint); font: 12px var(--mono); }
.facts b { display: block; color: var(--text); font-weight: 500; font-size: 14px; margin-top: 2px; }
@media (max-width: 980px) { .nav .links { gap: 16px; font-size: 14px; } .nav .brand { font-size: 20px; margin-right: 4px; } .nav .brand img { width: 26px; height: 26px; } }
@media (max-width: 860px) { .duo { grid-template-columns: 1fr; gap: 28px; min-height: 0; } .nav { gap: 6px; flex-wrap: wrap; } .nav #connect { height: 38px; padding: 0 14px; } .xicon { width: 34px; height: 34px; } }

/* nav, a size up */
.nav { padding: 26px 40px; gap: 16px; }
.brand { font-size: 27px; gap: 12px; }
.brand img { width: 38px; height: 38px; }
.nav .links { font-size: 18px; gap: 32px; margin-left: 18px; }
.lang { font-size: 15px; }
.lang button { padding: 10px 8px; }
.xicon { width: 46px; height: 46px; }
.xicon svg { width: 21px; height: 21px; }
.nav #connect { height: 48px; padding: 0 26px; font-size: 16px; }
@media (max-width: 980px) { .nav { padding: 18px 20px; gap: 8px; } .nav .links { gap: 16px; font-size: 15px; margin-left: 4px; } .brand { font-size: 21px; } .brand img { width: 28px; height: 28px; } .xicon { width: 36px; height: 36px; } .xicon svg { width: 18px; height: 18px; } .nav #connect { height: 40px; padding: 0 16px; font-size: 14px; } .lang { font-size: 13px; } }

/* bridge: chain picker */
.card.off .leg { opacity: 1; }
.card.off .leg input, .card.off .leg .num { opacity: .5; }
.leg { position: relative; }
.clogo { width: 30px; height: 30px; border-radius: 50%; flex: none; display: block; }
img.clogo { border-radius: 9px; border: 1px solid var(--line2); }
.pick { display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 12px 0 8px; margin-right: auto; border-radius: 999px; border: 1px solid var(--line2); background: var(--panel); color: var(--text); cursor: pointer; }
.pick:hover, .pick.open { border-color: var(--line3); }
.pick b { font-size: 17px; font-weight: 600; flex: none; }
.pick .chev { width: 16px; height: 16px; color: var(--dim); transition: transform .18s; }
.pick.open .chev { transform: rotate(180deg); }
.menu { display: none; position: absolute; left: 12px; top: calc(100% - 8px); z-index: 5; min-width: 230px; padding: 6px; border-radius: 16px; border: 1px solid var(--line2); background: var(--panel); box-shadow: 0 20px 50px rgba(0,0,0,.45); }
.menu.open { display: block; }
.menu button { display: flex; align-items: center; gap: 10px; width: 100%; height: 46px; padding: 0 10px; border: 0; border-radius: 11px; background: none; color: var(--text); font-size: 15px; font-weight: 500; cursor: pointer; text-align: left; }
.menu button:hover, .menu button.on { background: var(--hover); }
.menu button span { flex: 1; }
.menu button i { font-style: normal; color: var(--leaf); }
.menu p { margin: 6px 10px 6px; color: var(--faint); font: 12px var(--mono); }
