:root {
  --bg: #062035; --bg2: #0a2b47; --panel: rgba(255, 255, 255, .06); --panel2: rgba(255, 255, 255, .1); --line: rgba(255, 255, 255, .1); --line2: rgba(255, 255, 255, .2);
  --ink: #f2fbff; --dim: #a9c7dc; --mute: #6f93ad;
  --sun: #ffb648; --coral: #ff7a59; --sea: #2fd6c9; --leaf: #7ed957; --gold: #ffd34d; --red: #ff5d6c;
  --grad: linear-gradient(120deg, #ffd34d 0%, #ffb648 45%, #ff7a59 100%);
  --gold-grad: linear-gradient(180deg, #f8dc8c 0%, #e9c26e 55%, #c99a3e 100%);
  --display: 'Unbounded', system-ui, sans-serif; --ui: 'Manrope', system-ui, sans-serif;
  --r: 18px; --top: 60px;
}
* { box-sizing: border-box }
html, body { margin: 0; background: radial-gradient(1100px 600px at 80% -10%, #0e4a6e 0%, transparent 60%), var(--bg); color: var(--ink); font: 15px/1.5 var(--ui); -webkit-font-smoothing: antialiased }
a { color: inherit; text-decoration: none }
button, input, textarea, select { font: inherit; color: inherit }
button { cursor: pointer }
img { display: block; max-width: 100% }
h1, h2, h3 { font-family: var(--display); letter-spacing: -.01em; margin: 0 }
.hide { display: none !important }
.muted { color: var(--dim) } .tiny { font-size: 12px } .mono { font-family: ui-monospace, Menlo, monospace; font-size: .92em }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 20px }

/* header */
.top { position: sticky; top: 0; z-index: 50; height: var(--top); display: flex; align-items: center; gap: 14px; padding: 0 18px; background: rgba(6, 32, 53, .78); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line) }
.brand { display: flex; align-items: center; gap: 9px; font-family: var(--display); font-weight: 800; font-size: 18px; letter-spacing: -.01em }
.brand img { width: 34px; height: 34px; border-radius: 9px } .brand b { background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent }
.nav { display: flex; gap: 2px; margin-left: 8px }
.nav a { padding: 8px 12px; border-radius: 10px; color: var(--dim); font-weight: 800; font-size: 14px }
.nav a:hover { color: var(--ink); background: var(--panel) } .nav a.on { color: var(--ink); background: var(--panel2) }
.sp { flex: 1 }
.pill { display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); font-size: 13px; font-weight: 800; white-space: nowrap; cursor: pointer }
.icon-btn { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 11px; background: var(--panel); border: 1px solid var(--line); color: var(--ink) }
.icon-btn:hover { background: var(--panel2) }

/* buttons + inputs */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 18px; border-radius: 14px; border: 1px solid var(--line2); background: var(--panel2); font-weight: 800; font-size: 14px; white-space: nowrap; transition: transform .12s, filter .2s, background .2s }
.btn:hover { background: rgba(255, 255, 255, .15) } .btn:active { transform: scale(.97) }
.btn.main { background: var(--grad); border: 0; color: #2a1200; box-shadow: 0 10px 30px rgba(255, 150, 60, .35) } .btn.main:hover { filter: brightness(1.07) }
.btn.big { padding: 16px 26px; font-size: 16px; border-radius: 16px; font-family: var(--display); font-weight: 700; letter-spacing: .01em }
.btn.sm { padding: 8px 13px; font-size: 13px; border-radius: 11px }
.btn.ghost { background: transparent }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none }
.input, textarea.input { width: 100%; padding: 12px 14px; border-radius: 13px; border: 1px solid var(--line2); background: rgba(0, 0, 0, .22); outline: none; transition: border-color .15s }
.input:focus { border-color: var(--sun) }
.field { display: grid; gap: 6px; margin-bottom: 14px } .field > span { font-size: 12px; font-weight: 800; color: var(--dim); text-transform: uppercase; letter-spacing: .06em }
.row2 { display: grid; grid-template-columns: 1fr 160px; gap: 12px }
.err { color: #ff9a9a; font-weight: 700; font-size: 14px; min-height: 1em }
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; background: var(--panel2); border: 1px solid var(--line); color: var(--dim) }
.badge.demo { background: rgba(255, 182, 72, .15); border-color: rgba(255, 182, 72, .45); color: var(--sun) }
.badge.tier { background: rgba(47, 214, 201, .12); border-color: rgba(47, 214, 201, .4); color: #a8fff6 }
.badge.alive { background: rgba(126, 217, 87, .12); border-color: rgba(126, 217, 87, .4); color: #c9ffad }

/* home: the world */
.world { position: relative; height: calc(100vh - var(--top)); height: calc(100dvh - var(--top)); min-height: 520px; overflow: hidden; background: #2a7fbf }
.world canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; cursor: grab }
.world canvas.drag { cursor: grabbing }
.hero { position: absolute; left: 22px; top: 22px; z-index: 3; max-width: 430px; padding: 22px 24px; border-radius: 24px; background: rgba(6, 32, 53, .72); border: 1px solid var(--line); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: 0 20px 60px rgba(0, 0, 0, .25) }
.hero h1 { font-size: 40px; line-height: 1.02 }
.hero .emb { display: block; width: 150px; margin: -10px 0 2px -10px; filter: drop-shadow(0 8px 20px rgba(0, 0, 0, .35)) }
.hero.small .emb { display: none }
.hero h1 b { background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent }
.hero .tag { font-family: var(--display); font-weight: 700; font-size: 19px; margin: 10px 0 14px }
.hero .formula { margin: 16px 0 0; display: grid; gap: 4px; font-weight: 800; font-size: 14px; color: var(--dim) }
.hero .formula b { color: var(--ink) }
.hero .min { position: absolute; right: 12px; top: 12px; width: 28px; height: 28px; border-radius: 9px; border: 0; background: var(--panel); color: var(--dim); font-weight: 800 }
.hero.small > :not(.min):not(h1):not(.cta) { display: none }
.hero.small h1 { font-size: 22px } .hero.small .cta { margin-top: 10px }
.wstats { position: absolute; right: 18px; top: 18px; z-index: 3; display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end }
.wstats .pill { background: rgba(6, 32, 53, .72); backdrop-filter: blur(10px) }
.wtools { position: absolute; right: 18px; bottom: 74px; z-index: 3; display: grid; gap: 8px }
.wtools .icon-btn { width: 42px; height: 42px; background: rgba(6, 32, 53, .72); backdrop-filter: blur(10px); font-size: 18px; font-weight: 800 }
.ticker { position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; height: 48px; display: flex; align-items: center; overflow: hidden; background: linear-gradient(transparent, rgba(6, 32, 53, .85)); font-weight: 800; font-size: 14px; white-space: nowrap }
.ticker .track { display: inline-flex; gap: 46px; padding-left: 100%; animation: tick 60s linear infinite }
.ticker:hover .track { animation-play-state: paused }
@keyframes tick { to { transform: translateX(-100%) } }
.whint { position: absolute; left: 50%; bottom: 58px; transform: translateX(-50%); z-index: 3; font-size: 12px; font-weight: 800; color: rgba(255, 255, 255, .8); text-shadow: 0 1px 6px rgba(0, 0, 0, .5); pointer-events: none }
.pop { position: absolute; z-index: 6; width: 300px; transform: translate(-50%, calc(-100% - 14px)); padding: 16px; border-radius: 20px; background: rgba(6, 32, 53, .94); border: 1px solid var(--line2); box-shadow: 0 20px 50px rgba(0, 0, 0, .4); backdrop-filter: blur(12px) }
.pop::after { content: ''; position: absolute; left: 50%; bottom: -8px; width: 16px; height: 16px; background: rgba(6, 32, 53, .94); border-right: 1px solid var(--line2); border-bottom: 1px solid var(--line2); transform: translateX(-50%) rotate(45deg) }
.pop .x { position: absolute; right: 10px; top: 8px; border: 0; background: none; color: var(--dim); font-size: 20px }
.pop .hd { display: flex; gap: 12px; align-items: center }
.pop .hd img { width: 52px; height: 52px; border-radius: 14px; object-fit: cover; background: var(--panel2) }
.pop h3 { font-size: 17px }
.pop .meta { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 12px 0 }
.pop .meta div { padding: 8px 10px; border-radius: 12px; background: var(--panel) } .pop .meta small { display: block; color: var(--mute); font-weight: 800; font-size: 11px; text-transform: uppercase; letter-spacing: .05em } .pop .meta b { font-size: 15px }
.pop .btn { width: 100% }
.banner { position: absolute; left: 50%; top: 22px; z-index: 7; transform: translateX(-50%); padding: 14px 26px; border-radius: 18px; background: var(--grad); color: #2a1200; font-family: var(--display); font-weight: 800; font-size: 19px; box-shadow: 0 16px 50px rgba(255, 150, 60, .45); animation: drop .5s cubic-bezier(.2, 1.5, .4, 1); white-space: nowrap; max-width: calc(100vw - 40px); overflow: hidden; text-overflow: ellipsis }
@keyframes drop { from { transform: translate(-50%, -40px) scale(.8); opacity: 0 } }

/* sections under the world */
.sec { padding: 46px 0 10px }
.sec-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px }
.sec-title h2 { font-size: 24px }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px }
.tabs button { padding: 8px 13px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); color: var(--dim); font-weight: 800; font-size: 13px }
.tabs button.on { background: var(--ink); color: #062035; border-color: var(--ink) }
.lb { display: grid; gap: 8px }
.lrow { display: grid; grid-template-columns: 34px 46px 1fr auto; gap: 12px; align-items: center; padding: 10px 14px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line); transition: background .15s }
.lrow:hover { background: var(--panel2) }
.lrow .n { font-family: var(--display); font-weight: 800; color: var(--mute); text-align: center }
.lrow img { width: 46px; height: 46px; border-radius: 12px; object-fit: cover; background: var(--panel2) }
.lrow .t b { font-weight: 800 } .lrow .t span { display: block; color: var(--dim); font-size: 13px }
.lrow .v { text-align: right; font-family: var(--display); font-weight: 700 } .lrow .v small { display: block; color: var(--mute); font-family: var(--ui); font-weight: 800; font-size: 11px; text-transform: uppercase }
.cols { display: grid; grid-template-columns: 1.4fr 1fr; gap: 28px }
.steps { display: grid; gap: 10px }
.step { display: flex; gap: 14px; padding: 14px 16px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line) }
.step i { flex: none; width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; font-style: normal; font-size: 18px; background: var(--panel2) }
.step b { display: block }
.fees { margin-top: 14px; padding: 18px; border-radius: 18px; background: var(--panel); border: 1px solid var(--line) }
.fees .bar { display: flex; height: 14px; border-radius: 99px; overflow: hidden; margin: 12px 0 8px }
.fees .row { display: flex; justify-content: space-between; font-size: 14px; color: var(--dim) } .fees .row b { color: var(--ink) }
.feed { display: grid; gap: 8px }
.frow { display: flex; gap: 10px; align-items: baseline; padding: 10px 14px; border-radius: 14px; background: var(--panel); font-weight: 700; font-size: 14px }
.frow small { margin-left: auto; color: var(--mute); white-space: nowrap }
.empty { padding: 26px; text-align: center; color: var(--dim); border: 1px dashed var(--line2); border-radius: 18px }
.demo-note { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; padding: 12px 16px; border-radius: 16px; background: rgba(255, 182, 72, .08); border: 1px solid rgba(255, 182, 72, .35); color: var(--dim); font-size: 14px; margin-top: 26px }
.demo-note b { color: var(--ink) }
footer.foot { padding: 40px 20px 60px; text-align: center; color: var(--mute); font-size: 12px }

/* create */
.create { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 26px; padding: 28px 0 60px; align-items: start }
.create h1 { font-size: 34px; margin-bottom: 6px }
.card { padding: 22px; border-radius: 22px; background: var(--panel); border: 1px solid var(--line) }
.biomes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px }
.biomes button { padding: 12px 8px; border-radius: 14px; border: 1px solid var(--line); background: var(--panel); font-weight: 800; font-size: 13px; display: grid; gap: 2px; justify-items: center }
.biomes button span { font-size: 24px }
.biomes button.on { border-color: var(--sun); background: rgba(255, 182, 72, .12); box-shadow: 0 0 0 2px rgba(255, 182, 72, .35) inset }
.swatches { display: flex; gap: 8px; flex-wrap: wrap }
.swatches button { width: 32px; height: 32px; border-radius: 10px; border: 2px solid transparent }
.swatches button.on { border-color: #fff; box-shadow: 0 0 0 2px rgba(255, 255, 255, .25) }
.chips { display: flex; gap: 6px; flex-wrap: wrap }
.chip { padding: 7px 11px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); color: var(--dim); font-weight: 800; font-size: 13px }
.chip.on { background: var(--ink); color: #062035; border-color: var(--ink) }
.imgpick { display: flex; gap: 14px; align-items: center }
.imgpick .prev { width: 84px; height: 84px; border-radius: 18px; background: var(--panel2) center/cover; border: 1px solid var(--line2); flex: none }
.preview { position: sticky; top: calc(var(--top) + 16px) }
.preview .view { position: relative; height: 520px; border-radius: 24px; overflow: hidden; background: #2a7fbf; border: 1px solid var(--line) }
.preview canvas { position: absolute; inset: 0; width: 100%; height: 100% }
.preview .over { position: absolute; left: 14px; top: 14px; right: 14px; display: flex; justify-content: space-between; gap: 10px; pointer-events: none }
.preview .over .badge { background: rgba(6, 32, 53, .8) }
.grow { margin-top: 12px; padding: 14px 16px; border-radius: 18px; background: var(--panel); border: 1px solid var(--line) }
.grow input { width: 100%; accent-color: var(--sun) }
.grow .lbl { display: flex; justify-content: space-between; font-weight: 800; font-size: 13px; color: var(--dim) }
.progress { display: grid; gap: 6px; margin-top: 14px }
.progress div { display: flex; gap: 10px; align-items: center; color: var(--mute); font-weight: 700; font-size: 14px }
.progress i { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line2); display: grid; place-items: center; font-style: normal; font-size: 12px }
.progress .on { color: var(--ink) } .progress .on i { border-color: var(--sun); animation: spin 1s linear infinite; border-top-color: transparent }
.progress .done { color: var(--leaf) } .progress .done i { border-color: var(--leaf); background: var(--leaf); color: #062035 }
.progress .bad { color: var(--red) } .progress .bad i { border-color: var(--red) }
@keyframes spin { to { transform: rotate(360deg) } }

/* island page */
.ihero { position: relative; height: 64vh; min-height: 420px; background: #2a7fbf; overflow: hidden }
.ihero canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none }
.ihero .over { position: absolute; left: 22px; bottom: 22px; right: 22px; display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; pointer-events: none }
.ihero .name { display: flex; gap: 14px; align-items: center; padding: 14px 18px; border-radius: 20px; background: rgba(6, 32, 53, .78); backdrop-filter: blur(10px); pointer-events: auto }
.ihero .name img { width: 64px; height: 64px; border-radius: 16px; object-fit: cover }
.ihero .name h1 { font-size: 28px }
.ihero .name .tk { font-family: var(--display); font-weight: 800; color: var(--sun) }
.ihero .acts { display: flex; gap: 8px; pointer-events: auto; flex-wrap: wrap; justify-content: flex-end }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 22px }
.stat { padding: 16px; border-radius: 18px; background: var(--panel); border: 1px solid var(--line) }
.stat small { display: block; color: var(--mute); font-weight: 800; font-size: 12px; text-transform: uppercase; letter-spacing: .05em }
.stat b { display: block; font-family: var(--display); font-size: 22px; margin-top: 4px }
.stat span { color: var(--dim); font-size: 13px; font-weight: 700 }
.next { margin-top: 14px; padding: 16px 18px; border-radius: 18px; background: var(--panel); border: 1px solid var(--line) }
.next .bar { height: 12px; border-radius: 99px; background: rgba(255, 255, 255, .08); overflow: hidden; margin: 10px 0 6px }
.next .bar i { display: block; height: 100%; background: var(--grad); border-radius: 99px }
.hist { display: grid; gap: 0; border-left: 2px solid var(--line2); margin-left: 8px; padding-left: 18px }
.hist div { position: relative; padding: 8px 0; font-weight: 700 }
.hist div::before { content: ''; position: absolute; left: -25px; top: 15px; width: 10px; height: 10px; border-radius: 50%; background: var(--sun) }
.hist small { color: var(--mute); margin-right: 10px; font-weight: 800 }
.treas { padding: 18px; border-radius: 18px; background: linear-gradient(135deg, rgba(255, 211, 77, .14), rgba(255, 122, 89, .08)); border: 1px solid rgba(255, 211, 77, .35) }
.treas b { font-family: var(--display); font-size: 30px; color: var(--gold) }

#toasts { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 99; display: grid; gap: 8px }
.toast { padding: 12px 18px; border-radius: 14px; background: #0f3a5c; border: 1px solid var(--line2); font-weight: 800; box-shadow: 0 10px 30px rgba(0, 0, 0, .35); animation: drop .3s }
.toast.bad { background: #5c1f2a }
.modal-bg { position: fixed; inset: 0; z-index: 90; background: rgba(2, 12, 24, .7); display: grid; place-items: center; padding: 16px }
.modal { width: min(560px, 100%); padding: 22px; border-radius: 24px; background: var(--bg2); border: 1px solid var(--line2) }
.modal img { border-radius: 16px; width: 100% }

@media (max-width: 900px) {
  .create, .cols { grid-template-columns: 1fr }
  .preview { position: static; order: -1 } .preview .view { height: 330px }
  .stats { grid-template-columns: 1fr 1fr }
  .nav a { padding: 8px 9px }
}
@media (max-width: 640px) {
  .top { gap: 8px; padding: 0 12px } .brand span { display: none } .pill.ca { padding: 6px 10px; font-size: 12px } .top .icon-btn { width: 32px; height: 32px }
  .brand { flex: none } .nav { margin-left: 0 } .nav a[data-nav="/"], .nav a[data-nav="/leaders"] { display: none }
  .hero { left: 12px; right: 12px; top: 12px; max-width: none; padding: 16px 18px } .hero h1 { font-size: 28px } .hero .tag { font-size: 15px }
  .wstats { top: auto; bottom: 60px; left: 12px; right: auto; justify-content: flex-start }
  .wtools { right: 12px; bottom: 60px }
  .pop { width: 270px }
  .ihero .over { flex-direction: column; align-items: stretch } .ihero .name h1 { font-size: 22px }
  .biomes { grid-template-columns: repeat(2, 1fr) }
  .row2 { grid-template-columns: 1fr }
  .lrow { grid-template-columns: 26px 40px 1fr auto; gap: 8px; padding: 8px 10px } .lrow img { width: 40px; height: 40px }
  .banner { font-size: 14px; padding: 12px 16px }
}
