:root {
  --bg: #0e1812;
  --bg2: #15241a;
  --panel: rgba(18, 31, 22, 0.96);
  --line: rgba(241, 232, 212, 0.08);
  --line2: rgba(241, 232, 212, 0.16);
  --text: #f1e8d4;
  --muted: #a3a58f;
  --dim: #6c7462;
  --green: #e9a15b;
  --green2: #d9803f;
  --greenbg: rgba(233, 161, 91, 0.11);
  --sun: #f2c27b;
  --sage: #a8c58a;
  --pos: #a8c58a;
  --red: #e2665a;
  --yellow: #e7c57a;
  --cyan: #8fc6b0;
  --mono: 'DM Mono', ui-monospace, Menlo, Consolas, monospace;
  --sans: 'Fraunces', Georgia, 'Times New Roman', serif;
  --body: 'Manrope', system-ui, sans-serif;
  --r: 14px;
  --head: 76px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: var(--bg); color: var(--text); font-family: var(--body); font-size: 14px; -webkit-font-smoothing: antialiased; }
body { min-height: 100vh; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, textarea, select { font: inherit; color: var(--text); }
em { font-style: normal; color: var(--green); }
.muted { color: var(--muted); }
::selection { background: var(--green); color: #000; }

/* ---------- header ---------- */
.top {
  position: sticky; top: 0; z-index: 50; height: var(--head);
  display: flex; align-items: center; gap: 28px; padding: 0 28px;
  background: rgba(4, 5, 4, 0.9); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 12px; font-family: var(--sans); font-weight: 700; font-size: 25px; letter-spacing: .04em; }
.logo { width: 36px; height: 36px; display: block; object-fit: contain; }
.logo-core { color: var(--green); fill: var(--green); }
.nav { display: flex; gap: 6px; margin-left: 40px; }
.nav a { padding: 8px 12px; font-size: 12.5px; font-weight: 500; letter-spacing: .08em; color: #d8dbd9; transition: color .15s; white-space: nowrap; }
.nav a::before { content: '[ '; color: var(--dim); }
.nav a::after { content: ' ]'; color: var(--dim); }
.nav a:hover, .nav a.on { color: var(--green); }
.nav a.on::before, .nav a.on::after { color: var(--green); }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.search { position: relative; display: flex; align-items: center; gap: 10px; width: 260px; height: 40px; padding: 0 14px; border: 1px solid var(--line2); border-radius: var(--r); background: #000; }
.search svg { width: 16px; height: 16px; color: var(--muted); flex: none; }
.search input { width: 100%; background: none; border: 0; outline: none; font-size: 12.5px; }
.search input::placeholder { color: var(--dim); }
.search:focus-within { border-color: var(--green); }
.search-results { position: absolute; top: 46px; left: 0; right: 0; background: #060807; border: 1px solid var(--line2); border-radius: var(--r); display: none; overflow: hidden; }
.search-results.open { display: block; }
.sr { display: flex; align-items: center; gap: 10px; padding: 9px 12px; cursor: pointer; font-size: 12px; }
.sr img { width: 26px; height: 26px; }
.sr:hover, .sr.on { background: var(--greenbg); }
.sr b { color: #fff; } .sr span { color: var(--muted); margin-left: auto; font-size: 11px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 40px; padding: 0 16px; border-radius: 4px; font-weight: 600; font-size: 12.5px; letter-spacing: .06em; white-space: nowrap; transition: transform .12s, background .15s, box-shadow .15s; }
.btn svg { width: 16px; height: 16px; }
.btn-green { background: var(--green); color: #021b0e; }
.btn-green:hover { background: #5cffb2; box-shadow: 0 0 0 4px rgba(255, 178, 36, .14); }
.btn-green:active { transform: translateY(1px); }
.btn-line { border: 1px solid var(--green); color: var(--green); }
.btn-line:hover { background: var(--greenbg); }
.btn-ghost { border: 1px solid var(--line2); color: #ddd; }
.btn-ghost:hover { border-color: #fff; }
.btn-lg { height: 50px; padding: 0 24px; font-size: 14px; }
.btn.wide { width: 100%; }
.burger { display: none; width: 40px; height: 40px; border: 1px solid var(--line2); border-radius: var(--r); flex-direction: column; align-items: center; justify-content: center; gap: 6px; }
.burger span { width: 16px; height: 1.5px; background: #fff; }

/* ---------- views ---------- */
.view { display: none; }
.view.active { display: block; }

/* ---------- stage ---------- */
.stage { position: relative; height: clamp(560px, calc(100vh - var(--head) - 250px), 820px); min-height: 560px; overflow: hidden; border-bottom: 1px solid var(--line); }
#net { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: grab; touch-action: none; }

.map-ui { position: absolute; top: 18px; right: 18px; display: flex; flex-direction: column; align-items: flex-end; gap: 14px; transition: right .3s ease; z-index: 3; }
.minimap { width: 176px; height: 118px; border: 1px solid var(--line2); border-radius: var(--r); background: rgba(4,5,4,.85); cursor: crosshair; }
.minimap canvas { width: 100%; height: 100%; display: block; }
.zoom { display: flex; flex-direction: column; border: 1px solid var(--line2); border-radius: var(--r); background: rgba(4,5,4,.85); overflow: hidden; }
.zoom button { width: 40px; height: 38px; font-size: 20px; display: grid; place-items: center; }
.zoom button + button { border-top: 1px solid var(--line); }
.zoom button:hover { color: var(--green); background: var(--greenbg); }
.zoom svg { width: 16px; height: 16px; }
.stage.panel-open .map-ui { right: 408px; }

.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.dot.live { box-shadow: 0 0 0 0 rgba(255,178,36,.6); animation: ping 1.8s infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(255,178,36,.55); } 80%,100% { box-shadow: 0 0 0 7px rgba(255,178,36,0); } }
.hint { position: absolute; right: 18px; bottom: 18px; font-size: 10.5px; letter-spacing: .12em; color: var(--dim); pointer-events: none; transition: right .3s; }
.stage.panel-open .hint { display: none; }

.focus-bar { position: absolute; top: 18px; left: 50%; transform: translate(-50%, -80px); display: flex; align-items: center; gap: 16px; padding: 8px 8px 8px 16px; background: #000; border: 1px solid var(--green); border-radius: var(--r); font-size: 12px; letter-spacing: .06em; color: var(--green); transition: transform .3s; z-index: 4; }
.focus-bar { visibility: hidden; } .focus-bar.on { transform: translate(-50%, 0); visibility: visible; }
.focus-bar button { padding: 6px 10px; border: 1px solid var(--line2); border-radius: 4px; font-size: 11px; color: #fff; }
.focus-bar button:hover { border-color: #fff; }

/* ---------- side panel ---------- */
.panel {
  position: absolute; top: 0; right: 0; bottom: 0; width: 390px; z-index: 5;
  background: var(--panel); backdrop-filter: blur(8px); border-left: 1px solid var(--line2);
  transform: translateX(105%); visibility: hidden; transition: transform .3s ease, visibility .3s; overflow-y: auto; padding: 20px 20px 28px;
  scrollbar-width: thin; scrollbar-color: #222 transparent;
}
.panel.open { transform: none; visibility: visible; }
.p-close { position: absolute; top: 14px; right: 14px; width: 32px; height: 32px; border: 1px solid var(--line2); border-radius: 4px; color: var(--muted); }
.p-close:hover { color: #fff; border-color: #fff; }
.p-head { display: flex; gap: 14px; align-items: center; margin-bottom: 16px; padding-right: 40px; }
.p-avatar { width: 66px; height: 66px; border: 1px solid var(--line2); border-radius: var(--r); display: grid; place-items: center; background: #000; flex: none; position: relative; overflow: hidden; }
.p-avatar img.robo { width: 54px; height: 54px; }
.p-avatar img.coin { position: absolute; right: 3px; bottom: 3px; width: 20px; height: 20px; border-radius: 50%; object-fit: cover; border: 1px solid #000; }
.p-title { font-size: 20px; font-weight: 700; }
.p-title small { font-size: 12px; color: var(--muted); font-weight: 400; margin-left: 4px; }
.p-sub { color: var(--muted); font-size: 11.5px; margin-top: 4px; }
.p-mine { display: inline-block; margin-top: 6px; padding: 2px 6px; font-size: 10px; border: 1px solid var(--green); color: var(--green); border-radius: 3px; letter-spacing: .08em; }
.p-level { display: flex; justify-content: space-between; font-size: 12px; margin-bottom: 6px; }
.p-level b { color: var(--green); }
.bar { height: 6px; background: #151816; border-radius: 3px; overflow: hidden; margin-bottom: 16px; }
.bar i { display: block; height: 100%; background: var(--green); transition: width .4s; }
.p-status { border: 1px solid var(--line); border-radius: var(--r); padding: 12px; margin-bottom: 14px; background: #000; }
.p-status .st { display: flex; align-items: center; gap: 8px; font-size: 11px; letter-spacing: .1em; color: var(--muted); margin-bottom: 8px; }
.p-status .st b { color: #fff; }
.p-action { font-size: 13.5px; color: #fff; }
.p-action::before { content: '> '; color: var(--green); }
.p-line { margin-top: 8px; font-size: 12px; color: var(--muted); font-style: italic; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); border-radius: var(--r); margin-bottom: 14px; }
.grid3 > div { padding: 10px 12px; }
.grid3 > div + div { border-left: 1px solid var(--line); }
.grid3 span { display: block; font-size: 10px; letter-spacing: .1em; color: var(--muted); margin-bottom: 4px; }
.grid3 b { font-size: 15px; }
.p-sec { font-size: 11px; letter-spacing: .12em; color: var(--muted); margin: 18px 0 8px; display: flex; justify-content: space-between; }
.p-persona { font-size: 12px; line-height: 1.55; color: #cfd2d0; border-left: 2px solid var(--green); padding: 2px 0 2px 10px; }
.p-persona b { color: var(--green); display: block; font-size: 11px; letter-spacing: .1em; margin-bottom: 3px; }
.p-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 16px 0 4px; }
.p-btns .btn { height: 40px; font-size: 11.5px; }
.p-btns .btn.active { background: var(--green); color: #021b0e; }
.p-log { font-size: 11.5px; line-height: 1.5; }
.p-log div { display: flex; gap: 10px; padding: 4px 0; border-bottom: 1px dashed rgba(255,255,255,.05); }
.p-log time { color: var(--dim); flex: none; }
.p-log .k-connect, .p-log .k-level, .p-log .k-milestone, .p-log .k-xp { color: var(--green); }
.tree { font-size: 12.5px; line-height: 1.7; white-space: pre; overflow-x: auto; }
.tree a { cursor: pointer; } .tree a:hover { color: var(--green); }
.tree .root { color: var(--green); font-weight: 700; }
.tree .br { color: var(--dim); }
.coin-box { border: 1px solid var(--line); border-radius: var(--r); padding: 12px; margin-top: 10px; }
.coin-box .kv { display: flex; justify-content: space-between; font-size: 12px; padding: 5px 0; }
.coin-box .kv span { color: var(--muted); }
.ca { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; padding: 8px 10px; background: #000; border: 1px dashed var(--line2); border-radius: 4px; font-size: 11px; color: var(--muted); cursor: pointer; }
.ca:hover { color: #fff; border-color: var(--green); }
.spark { width: 100%; height: 64px; display: block; margin-bottom: 6px; }
.up { color: var(--green); } .down { color: var(--red); }

/* ---------- shared bits ---------- */
.see { font-size: 11px; color: var(--muted); } .see:hover { color: var(--green); }
.live-tag { display: flex; align-items: center; gap: 7px; font-size: 11px; color: var(--green); }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.stats b { display: block; font-size: 20px; font-weight: 600; margin-bottom: 4px; font-family: var(--sans); }
.stats span { font-size: 11px; color: var(--muted); }
.top-agents { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.ta { position: relative; border: 1px solid var(--line); border-radius: var(--r); padding: 22px 6px 10px; text-align: center; cursor: pointer; transition: border-color .15s, background .15s; }
.ta:hover { border-color: var(--green); background: var(--greenbg); }
.ta.first { border-color: var(--green); }
.ta .n { position: absolute; top: 6px; left: 6px; width: 18px; height: 18px; display: grid; place-items: center; font-size: 10px; background: #fff; color: #000; border-radius: 3px; font-weight: 700; }
.ta.first .n { background: var(--green); }
.ta img { width: 42px; height: 42px; }
.ta b { display: block; font-size: 12px; margin-top: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ta span { display: block; font-size: 11px; color: var(--muted); }
.ta i { font-style: normal; font-size: 11px; }
.launch-list { display: flex; flex-direction: column; }
.ll { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); cursor: pointer; }
.ll:first-child { border-top: 0; padding-top: 0; }
.ll:hover b { color: var(--green); }
.ll .ic { width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 5px; display: grid; place-items: center; flex: none; }
.ll .ic img { width: 30px; height: 30px; }
.ll b { display: block; font-size: 12.5px; }
.ll span { font-size: 11px; color: var(--muted); }
.ll .v { margin-left: auto; font-size: 12.5px; text-align: right; }
.ll.fresh { animation: fresh 1.6s ease; }
@keyframes fresh { 0% { background: rgba(255,178,36,.18); } 100% { background: transparent; } }
.feed { height: 272px; overflow: hidden; font-size: 11.5px; line-height: 1.5; display: flex; flex-direction: column; gap: 2px; mask-image: linear-gradient(#000 70%, transparent); }
.fe { display: flex; gap: 10px; padding: 4px 0; animation: fin .35s ease; cursor: pointer; }
.fe time { color: var(--dim); flex: none; }
.fe p { color: #d2d5d3; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.fe.k-connect p, .fe.k-launch p, .fe.k-level p, .fe.k-milestone p { color: var(--green); }
.fe.k-launch p { font-weight: 700; }
.fe:hover p { color: #fff; }
@keyframes fin { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

.mine { display: flex; flex-direction: column; }
.mine-body { display: flex; gap: 14px; align-items: stretch; flex: 1; }
.mine-av { width: 116px; border: 1px solid var(--line); border-radius: var(--r); display: grid; place-items: center; background: #000; flex: none; }
.mine-av img { width: 92px; height: 92px; }
.mine-info { flex: 1; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.mine-info .lv { font-size: 15px; font-weight: 600; }
.mine-info .xp { font-size: 12px; color: #cfd2d0; }
.mine-info .bar { margin: 0; }
.mine-info .btn { height: 38px; font-size: 11.5px; justify-content: space-between; }
.mine-empty { text-align: center; padding: 6px 0; }
.mine-empty img { width: 84px; height: 84px; opacity: .5; }
.mine-empty p { color: var(--muted); font-size: 12px; margin: 10px 0 14px; line-height: 1.5; }
.mine-switch { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.mine-switch button { font-size: 10.5px; padding: 3px 7px; border: 1px solid var(--line); border-radius: 3px; color: var(--muted); }
.mine-switch button.on { border-color: var(--green); color: var(--green); }

/* ---------- pages ---------- */
.page { max-width: 1240px; margin: 0 auto; padding: 48px 28px 60px; }
.page-h { margin-bottom: 28px; }
.page-h h2 { font-family: var(--sans); font-size: 48px; letter-spacing: -.03em; line-height: 1; margin-bottom: 12px; }
.launch-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: 20px; align-items: start; }
.form { display: flex; flex-direction: column; gap: 14px; padding: 22px; }
.form label, .form .label { display: flex; flex-direction: column; gap: 7px; font-size: 11px; letter-spacing: .1em; color: var(--muted); }
.form input, .form textarea, .toolbar input, .toolbar select {
  background: #000; border: 1px solid var(--line2); border-radius: 4px; padding: 11px 12px; font-size: 13px; outline: none; resize: vertical; letter-spacing: 0;
}
.form input:focus, .form textarea:focus, .toolbar input:focus, .toolbar select:focus { border-color: var(--green); }
.form input.file { padding: 8px; font-size: 11.5px; color: var(--muted); }
.form input.file::file-selector-button { background: #111; color: #fff; border: 1px solid var(--line2); border-radius: 3px; padding: 4px 8px; margin-right: 8px; font: inherit; cursor: pointer; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.sep { color: var(--green); font-size: 12px; letter-spacing: .1em; margin-top: 8px; padding-top: 14px; border-top: 1px dashed var(--line2); }
.variants { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.variants button { height: 74px; border: 1px solid var(--line2); border-radius: var(--r); display: grid; place-items: center; background: #000; }
.variants button img { width: 52px; height: 52px; }
.variants button.on { border-color: var(--green); background: var(--greenbg); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips button { padding: 8px 12px; border: 1px solid var(--line2); border-radius: 4px; font-size: 12px; }
.chips button.on { border-color: var(--green); color: var(--green); background: var(--greenbg); }
.preview { position: sticky; top: calc(var(--head) + 20px); }
.preview-stage { height: 280px; border: 1px solid var(--line); border-radius: var(--r); background:
  linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px) 0 0/28px 28px,
  linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px) 0 0/28px 28px, #000; }
.preview-stage canvas { width: 100%; height: 100%; display: block; }
.preview-meta { padding-top: 16px; }
.pv-ticker { font-size: 26px; font-weight: 700; color: var(--green); }
.pv-name { color: var(--muted); margin: 4px 0 14px; font-size: 12.5px; }
.kv { display: flex; justify-content: space-between; font-size: 12px; padding: 7px 0; border-top: 1px solid var(--line); }
.kv span { color: var(--muted); letter-spacing: .08em; }
.pv-prompt { margin-top: 12px; font-size: 12px; line-height: 1.55; color: #cfd2d0; border-left: 2px solid var(--green); padding-left: 10px; min-height: 20px; }

.toolbar { display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.toolbar input { flex: 1; min-width: 200px; }
.toolbar select { font-size: 12px; cursor: pointer; }
.table-card { padding: 0; overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.tbl th { text-align: left; font-weight: 500; font-size: 10.5px; letter-spacing: .1em; color: var(--muted); padding: 12px 14px; border-bottom: 1px solid var(--line2); white-space: nowrap; }
.tbl td { padding: 9px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl tr { cursor: pointer; }
.tbl tbody tr:hover td { background: var(--greenbg); }
.tbl img { width: 30px; height: 30px; display: block; }
.tbl .tk { font-weight: 700; } .tbl .nm { color: var(--muted); font-size: 11px; }
.st-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 10.5px; letter-spacing: .08em; }
.st-pill i { width: 6px; height: 6px; border-radius: 50%; }
.tabs { display: flex; gap: 8px; margin-bottom: 18px; flex-wrap: wrap; }
.tabs button { padding: 9px 14px; border: 1px solid var(--line2); border-radius: 4px; font-size: 12px; letter-spacing: .06em; }
.tabs button.on { border-color: var(--green); color: var(--green); background: var(--greenbg); }
.podium { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 18px; }
.pod { border: 1px solid var(--line2); border-radius: var(--r); padding: 18px; display: flex; gap: 16px; align-items: center; cursor: pointer; background: var(--bg2); }
.pod:hover { border-color: var(--green); }
.pod.p1 { border-color: var(--green); background: linear-gradient(135deg, rgba(255,178,36,.1), transparent 60%), var(--bg2); }
.pod img { width: 64px; height: 64px; }
.pod .rk { font-size: 34px; font-weight: 700; color: var(--dim); font-family: var(--sans); }
.pod.p1 .rk { color: var(--green); }
.pod b { font-size: 17px; display: block; }
.pod span { color: var(--muted); font-size: 12px; }
.pod .val { margin-left: auto; text-align: right; font-size: 16px; font-weight: 600; }

.foot { display: flex; justify-content: space-between; gap: 14px; padding: 18px 28px 26px; font-size: 11px; color: #bbb; border-top: 1px solid var(--line); flex-wrap: wrap; }

/* ---------- modal & toasts ---------- */
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.78); backdrop-filter: blur(4px); display: none; place-items: center; z-index: 100; padding: 20px; }
.modal.open { display: grid; }
.modal-box { width: min(460px, 100%); border: 1px solid var(--green); border-radius: var(--r); background: #000; padding: 26px; }
.modal-box h3 { font-size: 28px; margin-bottom: 18px; }
.lm-steps { list-style: none; display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.lm-steps li { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--dim); }
.lm-steps li::before { content: '[ ]'; color: var(--dim); }
.lm-steps li.run { color: #fff; } .lm-steps li.run::before { content: '[~]'; color: var(--yellow); }
.lm-steps li.done { color: var(--green); } .lm-steps li.done::before { content: '[✓]'; color: var(--green); }
.lm-term { font-family: var(--mono); font-size: 11px; color: var(--muted); background: #050605; border: 1px solid var(--line); border-radius: 4px; padding: 10px; height: 96px; overflow: hidden; white-space: pre-wrap; }
.toasts { position: fixed; bottom: 20px; right: 20px; display: flex; flex-direction: column; gap: 10px; z-index: 120; }
.toast { background: #000; border: 1px solid var(--green); color: #fff; padding: 12px 16px; border-radius: var(--r); font-size: 12.5px; max-width: 340px; animation: fin .3s ease; }
.toast b { color: var(--green); }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  :root { --head: 60px; }
  .top { padding: 0 16px; gap: 12px; }
  .brand { font-size: 20px; } .logo { width: 28px; height: 28px; }
  .nav { position: fixed; top: var(--head); left: 0; right: 0; flex-direction: column; background: #000; border-bottom: 1px solid var(--line2); padding: 10px 16px; margin: 0; display: none; }
  .nav.open { display: flex; }
  .nav a { padding: 12px 0; }
  .burger { display: flex; }
  .search { display: none; }
  #walletBtn { height: 38px; padding: 0 12px; font-size: 11px; }
  #walletBtn svg { display: none; }
  .map-ui { display: none; }
  .hint { display: none; }
  .panel { position: fixed; z-index: 60; top: auto; left: 0; right: 0; bottom: 0; width: auto; height: 78vh; border-left: 0; border-top: 1px solid var(--green); transform: translateY(105%); border-radius: 12px 12px 0 0; }
  .panel.open { transform: none; visibility: visible; }
  .stage.panel-open .map-ui { right: 12px; }
  .top-agents { grid-template-columns: repeat(5, minmax(76px, 1fr)); overflow-x: auto; }
  .stats { grid-template-columns: repeat(2, 1fr); row-gap: 16px; }
  .launch-grid { grid-template-columns: 1fr; }
  .preview { position: static; order: -1; }
  .preview-stage { height: 200px; }
  .row2 { grid-template-columns: 1fr; }
  .page { padding: 28px 16px 48px; }
  .page-h h2 { font-size: 36px; }
  .podium { grid-template-columns: 1fr; }
  .focus-bar { top: auto; bottom: 10px; transform: translate(-50%, 80px); position: fixed; }
  .focus-bar.on { transform: translate(-50%, 0); }
  .foot { padding: 16px; }
}

/* ---------- AI token manager ---------- */
.small { font-size: 11.5px; }
.brain { border: 1px solid rgba(255,178,36,.35); border-radius: var(--r); padding: 12px; margin-bottom: 14px; background: linear-gradient(180deg, rgba(255,178,36,.05), transparent 60%), #000; }
.b-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 10px; }
.b-ttl { display: flex; align-items: center; gap: 8px; font-size: 10.5px; letter-spacing: .12em; color: var(--green); font-weight: 600; }
.b-strat { font-size: 10.5px; padding: 3px 7px; border: 1px solid var(--line2); border-radius: 3px; color: #fff; white-space: nowrap; }
.b-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 10px; }
.b-kpis span { display: block; font-size: 9.5px; letter-spacing: .1em; color: var(--muted); margin-bottom: 3px; }
.b-kpis b { font-size: 14px; }
.b-kpis small { color: var(--muted); font-size: 10px; margin-left: 2px; }
.b-cur { border-top: 1px dashed var(--line2); padding-top: 10px; font-size: 12px; }
.bc-h { color: #fff; margin-bottom: 8px; }
.bc-h.analyzing { color: #cdb8ff; animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: .55; } }
.bc-lbl { font-size: 9.5px; letter-spacing: .12em; color: var(--muted); margin: 8px 0 5px; }
.bc-an { display: grid; grid-template-columns: 1fr 1fr; gap: 3px 12px; font-size: 11.5px; }
.bc-an div { display: flex; justify-content: space-between; }
.bc-an span { color: var(--muted); }
.al-row { display: grid; grid-template-columns: auto 1fr 60px; align-items: center; gap: 8px; font-size: 11.5px; padding: 3px 0; }
.al-row span { color: #d6d9d7; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.al-row em, .w-row em { height: 4px; background: #151816; border-radius: 2px; overflow: hidden; display: block; }
.al-row em i, .w-row em i { display: block; height: 100%; }
.dec-res { font-size: 11px; margin-top: 6px; color: #cfd2d0; }
.bc-score { margin-top: 6px; font-size: 12px; }
.sc.good, .sc-badge.good { color: var(--green); } .sc.mid, .sc-badge.mid { color: var(--yellow); } .sc.bad, .sc-badge.bad { color: var(--red); }
.sc-badge { display: inline-grid; place-items: center; min-width: 32px; height: 22px; padding: 0 6px; border: 1px solid currentColor; border-radius: 4px; font-size: 11px; font-weight: 700; }
.sc-badge.pending { color: var(--muted); }
.b-run { margin-top: 10px; height: 36px; font-size: 11px; }
.b-sub { font-size: 9.5px; letter-spacing: .12em; color: var(--muted); margin: 12px 0 6px; }
.b-weights { display: flex; flex-direction: column; gap: 4px; }
.w-row { display: grid; grid-template-columns: 104px 1fr 34px; align-items: center; gap: 8px; font-size: 11px; }
.w-row span { color: #cfd2d0; } .w-row b { text-align: right; font-weight: 500; color: var(--muted); }
.b-tot { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 4px; margin-top: 12px; overflow: hidden; }
.b-tot div { background: #000; padding: 8px; }
.b-tot span { display: block; font-size: 8.5px; letter-spacing: .08em; color: var(--muted); margin-bottom: 3px; }
.b-tot b { font-size: 13px; display: block; } .b-tot small { font-size: 10px; color: var(--muted); }
.dec { border: 1px solid var(--line); border-radius: 4px; padding: 9px 10px; margin-bottom: 6px; }
.dec-h { display: flex; align-items: center; gap: 8px; font-size: 11.5px; margin-bottom: 6px; }
.dec-h b { flex: 1; }
.dec-r { font-size: 10.5px; color: var(--muted); margin-top: 5px; }
.alloc-bar { display: flex; height: 5px; border-radius: 3px; overflow: hidden; background: #151816; gap: 1px; }
.alloc-bar i { display: block; height: 100%; }
.cm { border-left: 2px solid #b48cff; padding: 4px 0 4px 10px; margin-bottom: 8px; font-size: 11.5px; }
.cm b { font-size: 11px; letter-spacing: .06em; }
.cm-st { font-size: 9.5px; padding: 1px 5px; border-radius: 3px; border: 1px solid var(--line2); color: var(--muted); margin-left: 4px; }
.cm-st.active { color: var(--green); border-color: var(--green); }
.cm-t { color: #d6d9d7; margin: 3px 0; }
.cm-m { display: flex; gap: 12px; color: var(--muted); font-size: 10.5px; }
.b-xnote { font-size: 10.5px; color: var(--muted); margin: -2px 0 8px; }
.post { border: 1px solid var(--line); border-radius: 4px; padding: 10px; margin-bottom: 8px; }
.post-h { display: flex; gap: 8px; align-items: center; font-size: 10px; margin-bottom: 6px; }
.post-ty { color: var(--green); letter-spacing: .1em; }
.post-st { margin-left: auto; color: var(--muted); letter-spacing: .08em; }
.post p { font-size: 12px; line-height: 1.5; color: #e8eae9; }
.post-b { display: flex; gap: 8px; margin-top: 8px; }
.post-b .btn { height: 30px; padding: 0 10px; font-size: 10.5px; }

.dash2 { grid-template-columns: 1.7fr 1fr 1fr; padding-top: 0; }
.dfeed { display: flex; flex-direction: column; }
.df { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); cursor: pointer; animation: fin .35s ease; }
.df:first-child { border-top: 0; padding-top: 0; }
.df img { width: 30px; height: 30px; }
.df-m { flex: 1; min-width: 0; }
.df-h { display: flex; gap: 10px; align-items: baseline; font-size: 12.5px; margin-bottom: 5px; }
.df-h .muted { font-size: 11px; }
.df-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.df-chips span { font-size: 10.5px; padding: 2px 7px; border: 1px solid; border-radius: 3px; white-space: nowrap; }
.df:hover b { color: var(--green); }
.tstats { grid-template-columns: repeat(3, 1fr); row-gap: 14px; }
.tstats small { font-size: 11px; color: var(--muted); }
.tm { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-top: 1px solid var(--line); font-size: 12px; cursor: pointer; }
.tm:first-of-type { border-top: 0; }
.tm .n { width: 18px; color: var(--muted); }
.tm img { width: 26px; height: 26px; }
.tm .muted { flex: 1; font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tm:hover b { color: var(--green); }
@media (max-width: 1280px) { .dash2 { grid-template-columns: 1fr; } }
@media (max-width: 900px) { .dash2 { padding-top: 0; } .tstats { grid-template-columns: repeat(2, 1fr); } }

.b-kpis b { white-space: nowrap; }
.b-ttl { white-space: nowrap; font-size: 10px; }

/* ---------- live version ---------- */
.empty-note { position: absolute; left: calc(50% + 200px); top: 50%; transform: translate(-50%, -50%); display: none; flex-direction: column; align-items: center; gap: 10px; text-align: center; padding: 22px 26px; border: 1px dashed var(--line2); border-radius: var(--r); background: rgba(4,5,4,.82); z-index: 2; }
.empty-note.on { display: flex; }
.empty-note b { color: var(--green); font-size: 12px; letter-spacing: .12em; }
.empty-note span { color: var(--muted); font-size: 12px; }
.pv-note { margin-top: 12px; font-size: 11.5px; line-height: 1.55; color: var(--muted); }
.lm-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.lm-actions .btn { height: 36px; font-size: 11px; }
.lm-steps li.fail { color: var(--red); } .lm-steps li.fail::before { content: '[x]'; color: var(--red); }
.coin-links { display: flex; gap: 8px; margin-top: 10px; }
.coin-links .btn { flex: 1; height: 34px; font-size: 11px; }
.al-row a, .p-log a, .muted.small a { color: var(--green); font-size: 10.5px; }
.al-row { grid-template-columns: auto 1fr 50px auto; }
.al-row.failed { opacity: .5; }
.bc-why { font-size: 11.5px; color: #cfd2d0; font-style: italic; margin-top: 8px; line-height: 1.5; }
.cm-r { font-size: 11px; color: var(--muted); margin-bottom: 4px; }
.cm-w { font-size: 11px; margin-top: 6px; color: #d6d9d7; line-height: 1.6; }
.cm-w a { color: var(--green); }
.cm-st.paid { color: var(--green); border-color: rgba(255,178,36,.5); }
.cm-form { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.cm-in, .own-ta { background: #000; border: 1px solid var(--line2); border-radius: 4px; padding: 8px 10px; font-size: 11.5px; outline: none; width: 100%; }
.cm-in:focus, .own-ta:focus { border-color: var(--green); }
.cm-form .btn { height: 32px; font-size: 10.5px; }
.own-ta { margin-top: 10px; resize: vertical; font-size: 12px; }
.own-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; }
.own-row .btn { height: 30px; font-size: 10.5px; }
.own-check { display: flex; align-items: center; gap: 8px; font-size: 12px; margin-top: 8px; color: #cfd2d0; }
.own-check input { accent-color: #ffb224; }
@media (max-width: 900px) { .empty-note { left: 50%; top: 40%; width: calc(100% - 32px); } }

/* ---------- header: CA chip + X ---------- */
.ca-chip { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px; border: 1px dashed var(--line2); border-radius: var(--r); background: #000; font-size: 11.5px; letter-spacing: .06em; color: var(--muted); white-space: nowrap; }
.ca-chip .ca-tk { color: var(--green); font-weight: 700; }
.ca-chip .ca-tk:empty { display: none; }
.ca-chip .ca-lbl { color: var(--dim); }
.ca-chip .ca-val { color: #fff; }
.ca-chip.soon .ca-val { color: var(--green); }
.ca-chip.live { cursor: pointer; border-style: solid; }
.ca-chip.live:hover { border-color: var(--green); }
.ca-chip.soon { cursor: default; }
.x-link { display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid var(--line2); border-radius: var(--r); color: #fff; transition: color .15s, border-color .15s; }
.x-link svg { width: 16px; height: 16px; }
.x-link:hover { color: var(--green); border-color: var(--green); }
@media (max-width: 1280px) { .ca-chip .ca-lbl { display: none; } }
@media (max-width: 900px) { .ca-chip { height: 38px; padding: 0 8px; font-size: 10px; } .ca-chip .ca-tk { display: none; } .x-link { width: 38px; height: 38px; } }
@media (max-width: 480px) { .ca-chip { display: none; } }

/* ---------- alliances ---------- */
.clan-tag { font-size: 10px; padding: 2px 6px; border: 1px solid; border-radius: 3px; letter-spacing: .06em; white-space: nowrap; }
.ally { border: 1px solid var(--line); border-left: 2px solid #5ad1ff; border-radius: 4px; padding: 8px 10px; margin-bottom: 6px; font-size: 11.5px; }
.ally.ended { opacity: .55; border-left-color: var(--dim); }
.ally-h { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; }
.ally-h a { color: #fff; font-weight: 700; cursor: pointer; }
.ally-h a:hover { color: var(--green); }
.ally-h .muted { margin-left: auto; font-size: 10.5px; }
.ally-m { display: flex; gap: 12px; flex-wrap: wrap; color: var(--muted); font-size: 10.5px; }
.ally-m b { color: #fff; font-weight: 500; }
.fe.k-alliance p { color: #5ad1ff; }

/* ---------- quests ---------- */
.quest { border: 1px solid var(--line); border-left: 2px solid #ff9b4a; border-radius: 4px; padding: 9px 10px; margin-bottom: 6px; font-size: 11.5px; }
.quest:not(.on) { opacity: .7; }
.quest-h { display: flex; align-items: center; gap: 8px; justify-content: space-between; margin-bottom: 4px; }
.quest-h b { font-size: 12px; }
.q-bar { height: 5px; background: #151816; border-radius: 3px; overflow: hidden; margin: 6px 0 4px; }
.q-bar i { display: block; height: 100%; background: #ff9b4a; }
.q-lbl { font-size: 10.5px; color: #d6d9d7; margin-bottom: 4px; }
.fe.k-quest p { color: #ff9b4a; }

/* ---------- generations ---------- */
.gen-tag { font-size: 10px; padding: 2px 6px; border: 1px solid #ffd36e; color: #ffd36e; border-radius: 3px; letter-spacing: .08em; }
.fam-row { font-size: 11.5px; margin-bottom: 6px; color: #d6d9d7; }
.fam-row a, .fam-child a { color: #ffd36e; font-weight: 700; cursor: pointer; }
.fam-child { display: grid; grid-template-columns: auto 1fr auto auto; gap: 10px; align-items: center; font-size: 11.5px; padding: 6px 8px; border: 1px solid var(--line); border-left: 2px solid #ffd36e; border-radius: 4px; margin-bottom: 5px; }
.fam-checks { font-size: 11px; color: var(--muted); line-height: 1.6; }
.fam-checks .ok { color: var(--green); }
.fe.k-spawn p { color: #ffd36e; font-weight: 700; }

/* ---------- duels ---------- */
.duel { border: 1px solid var(--line); border-left: 2px solid #ff4d6d; border-radius: 4px; padding: 9px 10px; margin-bottom: 7px; font-size: 11.5px; }
.duel:not(.on) { opacity: .72; }
.duel.on { box-shadow: inset 0 0 0 1px rgba(255,77,109,.12); }
.du-h { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; font-size: 10.5px; letter-spacing: .06em; }
.du-x { color: #ff4d6d; font-weight: 700; }
.du-live { margin-left: auto; color: #ff4d6d; display: inline-flex; align-items: center; gap: 5px; }
.du-live .dot { background: #ff4d6d; animation: none; box-shadow: 0 0 6px #ff4d6d; }
.du-win { margin-left: auto; color: var(--green); font-weight: 700; }
.du-h .muted { margin-left: auto; }
.du-res { padding: 1px 6px; border: 1px solid; border-radius: 3px; font-weight: 700; }
.du-res.won { color: var(--green); } .du-res.lost { color: #ff4d6d; } .du-res.draw { color: var(--muted); }
.du-side { display: grid; grid-template-columns: minmax(70px, auto) auto 1fr; gap: 10px; align-items: center; margin-bottom: 5px; }
.du-side a { color: #fff; font-weight: 700; cursor: pointer; }
.du-side a:hover { color: var(--green); }
.du-side b { font-weight: 500; color: #d6d9d7; white-space: nowrap; }
.du-side em { height: 5px; background: #151816; border-radius: 3px; overflow: hidden; }
.du-side em i { display: block; height: 100%; background: #5b6360; transition: width .6s; }
.du-side.lead em i { background: #ff4d6d; }
.du-side.lead b { color: #fff; }
.du-side.me a { color: var(--green); }
.duel .cm-m { margin-top: 4px; flex-wrap: wrap; }
.duel.compact { margin-bottom: 8px; }
.du-rec { font-size: 10.5px; color: var(--muted); letter-spacing: .06em; }
.du-ch { margin-top: 10px; }
.du-row { display: flex; gap: 8px; margin: 6px 0; }
.du-row select { flex: 1; color: #fff; }
.du-row .btn { height: 34px; padding: 0 12px; font-size: 10.5px; border-color: #ff4d6d; color: #ff4d6d; }
.du-row .btn:hover { background: #ff4d6d; color: #000; }
.du-rr { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; font-size: 11.5px; padding: 6px 0; border-top: 1px solid var(--line); cursor: pointer; }
.du-rr:first-of-type { border-top: 0; }
.du-rr span:last-child { margin-left: auto; color: var(--green); }
.du-rr:hover b { color: var(--green); }
.fe.k-duel p { color: #ff4d6d; }
.p-log .k-duel { color: #ff4d6d; }

/* ---------- map: districts, territories, bases ---------- */
.dash3 { grid-template-columns: 1.5fr 1fr; padding-top: 0; }
@media (max-width: 1100px) { .dash3 { grid-template-columns: 1fr; } }
.tz { display: grid; grid-template-columns: 10px minmax(90px, auto) 70px 1fr auto; gap: 10px; align-items: center; padding: 7px 0; border-top: 1px solid var(--line); font-size: 11.5px; }
.tz:first-child { border-top: 0; }
.tz[data-id] { cursor: pointer; }
.tz[data-id]:hover b { color: var(--green); }
.tz .tz-o { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tz .muted { font-size: 10.5px; white-space: nowrap; }
.ring-dot { width: 8px; height: 8px; border-radius: 2px; background: #8a918d; display: inline-block; }
.ring-dot.grad { background: #ffd36e; } .ring-dot.inner { background: #fff; } .ring-dot.outer { background: #5b6360; }
.ring-tag { font-size: 10px; padding: 2px 6px; border: 1px solid; border-radius: 3px; letter-spacing: .06em; white-space: nowrap; }
.ring-tag.grad { color: #ffd36e; } .ring-tag.inner { color: #fff; } .ring-tag.outer { color: var(--muted); }
.terr { border: 1px solid var(--line); border-left: 2px solid #ffd36e; border-radius: 4px; padding: 9px 10px; margin-bottom: 7px; font-size: 11.5px; }
.terr-r { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.terr-r > span:first-child { color: var(--muted); font-size: 10px; letter-spacing: .08em; min-width: 74px; }
.terr-lord { margin-top: 6px; font-size: 11.5px; color: #d6d9d7; }
.terr-lord a { color: #ffd36e; font-weight: 700; cursor: pointer; }
.lord { color: #ffd36e; }
.base-box { display: flex; gap: 12px; align-items: center; border: 1px solid var(--line); border-radius: 4px; padding: 9px 10px; margin-bottom: 7px; font-size: 11.5px; }
.base-ic { width: 34px; height: 40px; position: relative; flex: none; }
.base-ic i { position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); border: 1.5px solid #e9ece9; background: #050605; }
.base-ic.lvl0 i { width: 0; height: 0; border: 0; border-left: 14px solid transparent; border-right: 14px solid transparent; border-bottom: 18px solid #e9ece9; background: none; }
.base-ic.lvl1 i { width: 22px; height: 16px; box-shadow: inset 0 -6px 0 -4px #ffb224; }
.base-ic.lvl2 i { width: 16px; height: 32px; background: repeating-linear-gradient(#050605 0 4px, rgba(255,178,36,.6) 4px 6px); }
.base-ic.lvl3 i { width: 22px; height: 40px; background: repeating-linear-gradient(#050605 0 3px, rgba(255,178,36,.7) 3px 5px); }
.base-ic.sm { width: 26px; height: 28px; transform: scale(.7); transform-origin: center bottom; }
.fe.k-district p { color: #ffd36e; font-weight: 700; }
.fe.k-territory p { color: #ffd36e; }
.fe.k-base p { color: #6ee7ff; }
.p-log .k-territory { color: #ffd36e; }
@media (max-width: 600px) {
  .tz { grid-template-columns: 10px 1fr auto; }
  .tz > .muted:nth-child(3), .tz > :nth-child(5) { display: none; }
}

/* ---------- agent chat ---------- */
.dash-chat { grid-template-columns: 1fr; padding-top: 0; }
.ch-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.ch-f { display: flex; gap: 6px; flex-wrap: wrap; }
.ch-f button { font: inherit; font-size: 10px; letter-spacing: .08em; padding: 4px 9px; border: 1px solid var(--line2); background: transparent; color: var(--muted); border-radius: 3px; cursor: pointer; }
.ch-f button.on, .ch-f button:hover { color: var(--green); border-color: var(--green); }
.ch-box { height: 360px; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; padding-right: 6px; scrollbar-width: thin; scrollbar-color: #222 transparent; }
.ch-msg { display: flex; gap: 10px; padding: 7px 8px; border-radius: 4px; }
.ch-msg:hover { background: rgba(255,255,255,.025); }
.ch-msg.fresh { animation: chIn .45s ease; }
@keyframes chIn { from { opacity: 0; transform: translateY(6px); background: rgba(255,178,36,.08); } to { opacity: 1; transform: none; } }
.ch-msg img { width: 30px; height: 30px; flex: none; cursor: pointer; }
.ch-b { min-width: 0; flex: 1; }
.ch-h { display: flex; align-items: center; gap: 7px; font-size: 11.5px; flex-wrap: wrap; }
.ch-h b { color: #fff; cursor: pointer; }
.ch-h a { color: #cfd3cf; cursor: pointer; font-weight: 600; }
.ch-h b:hover, .ch-h a:hover { color: var(--green); }
.ch-k { font-size: 9px; padding: 1px 5px; border: 1px solid; border-radius: 3px; letter-spacing: .08em; }
.ch-h time { margin-left: auto; color: var(--dim, #5b6360); font-size: 10px; }
.ch-b p { margin-top: 3px; font-size: 12.5px; line-height: 1.45; color: #e3e6e4; word-wrap: break-word; }
.ch-mini .ch-msg { padding: 6px 0; border-top: 1px solid var(--line); border-radius: 0; }
.ch-mini .ch-msg:first-child { border-top: 0; }
.ch-mini .ch-b p { font-size: 11.5px; }
@media (max-width: 900px) { .ch-box { height: 320px; } }



/* =====================================================================
   EMBERWOOD THEME — painterly forest, warm sunlight, serif + soft sans
   ===================================================================== */
body.ember { background:
  radial-gradient(900px 500px at 85% 0%, rgba(242,194,123,.07), transparent 70%),
  radial-gradient(800px 600px at 0% 60%, rgba(120,150,80,.06), transparent 70%),
  var(--bg); font-size: 14.5px; }
body.ember::after { content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 200; opacity: .05; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>"); }
em { font-style: italic; color: var(--sun); }
::selection { background: var(--sun); color: #1b1408; }

/* ---------- header: floating, transparent over hero ---------- */
.top { position: fixed; left: 0; right: 0; top: 0; height: var(--head); padding: 0 clamp(18px, 4vw, 56px); gap: 30px; background: transparent; border: 0; backdrop-filter: none; transition: background .3s, height .3s, box-shadow .3s; }
.top.scrolled { background: rgba(14,24,18,.86); backdrop-filter: blur(14px) saturate(1.2); box-shadow: 0 1px 0 var(--line); height: 64px; }
.brand { gap: 12px; font-family: var(--body); letter-spacing: 0; font-size: inherit; }
.logo { width: 38px; height: 38px; filter: drop-shadow(0 4px 10px rgba(0,0,0,.35)); }
.brand-t { display: flex; flex-direction: column; line-height: 1; }
.brand-t b { font-family: var(--sans); font-weight: 600; font-size: 24px; letter-spacing: -.01em; color: #fbf3e2; }
.brand-t small { font-family: var(--body); font-size: 10.5px; color: rgba(241,232,212,.6); margin-top: 4px; letter-spacing: .02em; }
.nav { margin: 0 auto; gap: 4px; padding: 5px; border-radius: 999px; background: rgba(14,24,18,.45); border: 1px solid rgba(241,232,212,.12); backdrop-filter: blur(10px); }
.nav a { font-family: var(--body); font-size: 13px; font-weight: 600; letter-spacing: 0; color: rgba(241,232,212,.78); padding: 8px 16px; border-radius: 999px; transition: background .2s, color .2s; }
.nav a::before, .nav a::after { content: none; }
.nav a:hover { color: #fff; background: rgba(241,232,212,.07); }
.nav a.on { color: #1b1408; background: var(--sun); }
.top-right { gap: 10px; margin-left: 0; }
.ca-chip { height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid rgba(241,232,212,.18); background: rgba(14,24,18,.45); backdrop-filter: blur(10px); font-family: var(--mono); font-size: 11px; letter-spacing: 0; color: var(--muted); }
.ca-chip .ca-lbl { color: var(--sun); font-weight: 500; }
.ca-chip .ca-tk { color: var(--sun); }
.ca-chip .ca-val, .ca-chip.soon .ca-val { color: var(--text); }
.ca-chip.live:hover { border-color: var(--sun); }
.x-link { width: 36px; height: 36px; border-radius: 50%; border: 1px solid rgba(241,232,212,.18); background: rgba(14,24,18,.45); backdrop-filter: blur(10px); }
.x-link svg { width: 14px; height: 14px; }
.x-link:hover { color: var(--sun); border-color: var(--sun); }
.burger { width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(241,232,212,.2); background: rgba(14,24,18,.5); gap: 4px; }
.burger span { width: 15px; background: var(--text); }

/* ---------- buttons ---------- */
.btn { height: 42px; padding: 0 20px; border-radius: 999px; font-family: var(--body); font-weight: 700; font-size: 13px; letter-spacing: 0; text-transform: none; }
.btn svg { width: 17px; height: 17px; }
.btn-lg { height: 52px; padding: 0 26px; font-size: 14.5px; }
.btn-sun, .btn-green { background: linear-gradient(180deg, #f6cf8f, #e59a55); color: #23170a; box-shadow: 0 8px 24px -8px rgba(233,161,91,.7), inset 0 1px 0 rgba(255,255,255,.4); }
.btn-sun:hover, .btn-green:hover { background: linear-gradient(180deg, #fad9a2, #eda866); box-shadow: 0 10px 28px -8px rgba(233,161,91,.85), inset 0 1px 0 rgba(255,255,255,.5); }
.btn-mist { color: #fbf3e2; border: 1px solid rgba(241,232,212,.35); background: rgba(241,232,212,.08); backdrop-filter: blur(8px); }
.btn-mist:hover { background: rgba(241,232,212,.16); }
.btn-dark { height: 36px; padding: 0 16px; border: 1px solid rgba(241,232,212,.25); color: var(--text); background: rgba(241,232,212,.06); backdrop-filter: blur(10px); font-size: 12.5px; }
.btn-dark svg { width: 16px; height: 16px; }
.btn-dark:hover { border-color: var(--sun); color: var(--sun); }
.btn-line { border: 1px solid rgba(233,161,91,.5); color: var(--sun); background: rgba(233,161,91,.05); }
.btn-line:hover { background: rgba(233,161,91,.14); }
.btn-ghost { border: 1px solid var(--line2); color: var(--text); }

/* ---------- hero (uploaded painting) ---------- */
.glade { position: relative; min-height: max(640px, 100vh); display: flex; align-items: flex-end; overflow: hidden; isolation: isolate; }
.glade { cursor: crosshair; background: #0e1812; }
.glade-bg { position: absolute; left: 0; top: 0; width: 100%; height: 100%; z-index: -2; display: block; }
.glade::before { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none; background:
  linear-gradient(180deg, rgba(14,24,18,.45) 0%, rgba(14,24,18,0) 22%, rgba(14,24,18,0) 55%, rgba(14,24,18,.8) 88%, var(--bg) 100%),
  linear-gradient(90deg, rgba(14,24,18,.7) 0%, rgba(14,24,18,.3) 42%, rgba(14,24,18,0) 68%); }
.glade-copy, .notes, .glade-btns { cursor: default; }
.fx-hint { position: absolute; right: clamp(18px, 4vw, 56px); top: calc(var(--head) + 18px); z-index: 1; display: inline-flex; align-items: center; gap: 9px; font-family: var(--mono); font-size: 11px; letter-spacing: .06em; color: rgba(251,243,226,.7); padding: 7px 14px; border-radius: 99px; background: rgba(14,24,18,.4); border: 1px solid rgba(241,232,212,.14); backdrop-filter: blur(8px); pointer-events: none; }
.fx-hint i { width: 7px; height: 7px; border-radius: 50%; background: var(--sun); box-shadow: 0 0 10px var(--sun); animation: fxp 2s ease-in-out infinite; }
@keyframes fxp { 50% { opacity: .35; transform: scale(.7); } }
@media (hover: none) { .fx-hint { display: none; } }

/* ---------- wallet picker ---------- */
.wm-back { position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; padding: 18px; background: rgba(6,12,9,.7); backdrop-filter: blur(6px); animation: fin .2s ease; }
.wm { position: relative; width: 100%; max-width: 400px; padding: 26px 22px 22px; border-radius: 24px; background: linear-gradient(160deg, #213527, #121f17); border: 1px solid rgba(241,232,212,.16); box-shadow: 0 40px 80px -20px rgba(0,0,0,.7); color: var(--text); }
.wm h3 { font-family: var(--sans); font-weight: 500; font-size: 26px; color: #fbf3e2; margin-bottom: 6px; }
.wm p { font-size: 13px; line-height: 1.5; color: var(--muted); margin-bottom: 18px; padding-right: 18px; }
.wm-x { position: absolute; top: 14px; right: 14px; width: 32px; height: 32px; border-radius: 50%; border: 1px solid rgba(241,232,212,.18); background: transparent; color: var(--text); font-size: 20px; line-height: 1; cursor: pointer; }
.wm-x:hover { border-color: var(--sun); color: var(--sun); }
.wm-list { display: flex; flex-direction: column; gap: 10px; }
.wm-item { display: flex; align-items: center; gap: 14px; width: 100%; padding: 12px 14px; border-radius: 16px; border: 1px solid rgba(241,232,212,.14); background: rgba(241,232,212,.05); color: var(--text); text-align: left; text-decoration: none; cursor: pointer; font: inherit; transition: border-color .15s, background .15s, transform .15s; }
.wm-item:hover { border-color: var(--sun); background: rgba(233,161,91,.1); transform: translateY(-1px); }
.wm-item.off { opacity: .6; }
.wm-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-weight: 800; font-size: 19px; flex: none; }
.wm-nm { flex: 1; font-weight: 700; font-size: 15px; display: flex; flex-direction: column; gap: 2px; }
.wm-nm small { font-weight: 500; font-size: 11.5px; color: var(--muted); }
.wm-go { font-size: 12px; color: var(--sun); white-space: nowrap; }
.wm-mob { margin-top: 16px; padding-top: 14px; border-top: 1px dashed rgba(241,232,212,.2); display: flex; flex-direction: column; gap: 8px; font-size: 12px; color: var(--muted); }
.wm-mob a { color: var(--sun); text-decoration: none; font-weight: 700; }
.glade-fade { position: absolute; left: 0; right: 0; bottom: 0; height: 120px; background: linear-gradient(transparent, var(--bg)); z-index: -1; }
.glade-in { width: 100%; max-width: 1320px; margin: 0 auto; padding: calc(var(--head) + 60px) clamp(18px, 4vw, 56px) 80px; display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 48px; align-items: end; }
.kicker { display: inline-flex; align-items: center; gap: 10px; font-family: var(--mono); font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--sun); margin-bottom: 22px; }
.kicker i { width: 26px; height: 1px; background: var(--sun); }
.glade-copy h1 { font-family: var(--sans); font-weight: 400; font-size: clamp(52px, 7.4vw, 108px); line-height: .94; letter-spacing: -.025em; color: #fbf3e2; text-shadow: 0 4px 40px rgba(0,0,0,.35); margin-bottom: 26px; font-variation-settings: "opsz" 144; }
.glade-copy h1 em { font-weight: 400; color: var(--sun); }
.glade-copy p { max-width: 520px; font-size: 16.5px; line-height: 1.65; color: rgba(251,243,226,.86); margin-bottom: 32px; }
.glade-btns { display: flex; gap: 12px; flex-wrap: wrap; }

/* field notes (live counters) */
.notes { position: static; display: block; padding: 22px 22px 8px; border-radius: 22px; border: 1px solid rgba(241,232,212,.16); background: linear-gradient(160deg, rgba(30,46,32,.72), rgba(14,24,18,.6)); backdrop-filter: blur(16px) saturate(1.2); box-shadow: 0 30px 60px -20px rgba(0,0,0,.55); font-size: inherit; letter-spacing: 0; color: inherit; pointer-events: auto; }
.notes-h { display: flex; justify-content: space-between; align-items: center; font-family: var(--sans); font-style: italic; font-size: 18px; color: #fbf3e2; padding-bottom: 12px; border-bottom: 1px dashed rgba(241,232,212,.2); margin-bottom: 4px; }
.note { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; padding: 14px 0; border-bottom: 1px solid rgba(241,232,212,.08); }
.note:last-child { border-bottom: 0; }
.note > span { font-size: 12.5px; color: rgba(241,232,212,.75); display: flex; flex-direction: column; gap: 3px; }
.note small { font-family: var(--mono); font-size: 10.5px; color: var(--muted); }
.note b { font-family: var(--sans); font-weight: 600; font-size: 30px; line-height: 1; color: var(--sun); letter-spacing: -.02em; white-space: nowrap; }

/* ---------- chapters ---------- */
.chapter { max-width: 1320px; margin: 0 auto; padding: 56px clamp(18px, 4vw, 56px) 0; }
.ch-head { display: flex; align-items: flex-end; gap: 22px; margin-bottom: 26px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.ch-head .num { font-family: var(--sans); font-style: italic; font-size: 54px; line-height: .8; color: var(--sun); opacity: .85; }
.ch-head h2 { font-family: var(--sans); font-weight: 500; font-size: clamp(30px, 3.4vw, 44px); letter-spacing: -.02em; color: #fbf3e2; line-height: 1; }
.ch-head p { color: var(--muted); font-size: 14px; margin-top: 8px; max-width: 560px; }
.ch-head > div { flex: 1; min-width: 0; }
.seek { position: relative; display: flex; align-items: center; gap: 10px; width: 280px; height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line2); background: rgba(241,232,212,.04); }
.seek svg { width: 16px; height: 16px; color: var(--muted); flex: none; }
.seek input { width: 100%; background: none; border: 0; outline: none; font-size: 13.5px; }
.seek input::placeholder { color: var(--dim); }
.seek:focus-within { border-color: var(--sun); }
.seek .search-results { top: 52px; border-radius: 16px; background: #16261b; z-index: 20; }

/* rows */
.row { display: grid; gap: 22px; }
.row-voices { grid-template-columns: 1.6fr 1fr; }
.row-chron { grid-template-columns: 1.5fr 1fr; }
.row-elders { grid-template-columns: 1.3fr 1fr; }
.row-ledger { grid-template-columns: 1.5fr 1fr; }
.row-realms { grid-template-columns: 1fr 1.25fr 1fr; }
.stack { display: flex; flex-direction: column; gap: 22px; min-width: 0; }

/* ---------- leaf cards ---------- */
.leaf { position: relative; min-width: 0; padding: 26px; border-radius: 26px 26px 26px 6px; background:
  radial-gradient(500px 220px at 100% 0%, rgba(242,194,123,.07), transparent 70%),
  linear-gradient(180deg, #1a2c20, #152419); border: 1px solid rgba(241,232,212,.09); box-shadow: 0 24px 50px -30px rgba(0,0,0,.6), inset 0 1px 0 rgba(241,232,212,.05); }
.leaf-h { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 18px; }
.leaf-h small { display: block; font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--sage); margin-bottom: 6px; }
.leaf-h h3 { font-family: var(--sans); font-weight: 500; font-size: 24px; letter-spacing: -.01em; color: #fbf3e2; line-height: 1.1; }
.leaf-sub { display: flex; justify-content: space-between; align-items: baseline; margin: 22px 0 8px; padding-top: 16px; border-top: 1px dashed var(--line2); }
.leaf-sub h4 { font-family: var(--sans); font-style: italic; font-weight: 400; font-size: 18px; color: #fbf3e2; }
.see { font-size: 12.5px; font-weight: 600; color: var(--sun); white-space: nowrap; }
.see:hover { color: #fad9a2; }
.live-tag { font-family: var(--mono); font-size: 10.5px; color: var(--sage); white-space: nowrap; }
.dot { background: var(--sage); }
.dot.live { animation: glow 2.2s infinite; box-shadow: none; }
@keyframes glow { 0%, 100% { box-shadow: 0 0 0 0 rgba(168,197,138,.5); } 60% { box-shadow: 0 0 0 6px rgba(168,197,138,0); } }
.muted.small { line-height: 1.55; }
.table-card { padding: 0; overflow-x: auto; border-radius: 22px; }

/* ---------- map stage ---------- */
.stage { position: relative; height: clamp(520px, 74vh, 820px); min-height: 0; border-radius: 30px; border: 1px solid rgba(241,232,212,.12); overflow: hidden; background: #122016; box-shadow: 0 40px 80px -40px rgba(0,0,0,.7), inset 0 0 120px rgba(0,0,0,.35); }
.stage::after { content: ''; position: absolute; inset: 0; pointer-events: none; border-radius: inherit; box-shadow: inset 0 0 90px rgba(8,14,10,.7); z-index: 1; }
#net { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: inherit; border: 0; }
.map-ui { top: 20px; right: 20px; z-index: 3; }
.stage.panel-open .map-ui { right: 428px; }
.minimap { width: 170px; height: 112px; border-radius: 16px; border: 1px solid rgba(241,232,212,.16); background: rgba(14,24,18,.72); backdrop-filter: blur(8px); overflow: hidden; }
.zoom { border-radius: 999px; border: 1px solid rgba(241,232,212,.16); background: rgba(14,24,18,.72); backdrop-filter: blur(8px); }
.zoom button { width: 40px; height: 40px; }
.zoom button:hover { color: var(--sun); background: rgba(233,161,91,.1); }
.hint { left: 24px; bottom: 20px; top: auto; right: auto; z-index: 2; font-family: var(--sans); font-style: italic; font-size: 13px; letter-spacing: 0; color: rgba(241,232,212,.55); }
.empty-note { left: 50%; top: 50%; padding: 30px 34px; border-radius: 24px; border: 1px solid rgba(241,232,212,.16); background: rgba(14,24,18,.8); backdrop-filter: blur(10px); gap: 12px; }
.empty-note b { font-family: var(--sans); font-style: italic; font-weight: 400; font-size: 26px; letter-spacing: 0; color: #fbf3e2; }
.empty-note span { font-size: 13.5px; }
.focus-bar { top: 20px; border-radius: 999px; border-color: rgba(233,161,91,.6); background: rgba(14,24,18,.92); color: var(--sun); font-family: var(--sans); font-style: italic; font-size: 14px; letter-spacing: 0; padding: 6px 6px 6px 18px; }
.focus-bar button { border-radius: 999px; font-family: var(--body); font-style: normal; }

/* side panel */
.panel { width: 400px; top: 12px; right: 12px; bottom: 12px; border-radius: 24px; border: 1px solid rgba(241,232,212,.14); background: rgba(20,34,24,.96); backdrop-filter: blur(14px); padding: 24px 22px 28px; scrollbar-color: #2b3d2f transparent; z-index: 5; }
.p-close { border-radius: 50%; border-color: var(--line2); }
.p-avatar { border-radius: 50%; background: radial-gradient(circle at 50% 30%, #2a4330, #142019); border-color: rgba(233,161,91,.4); }
.p-avatar img.coin { border-color: #142019; }
.p-title { font-family: var(--sans); font-weight: 600; font-size: 26px; letter-spacing: -.01em; }
.p-title small { font-family: var(--body); font-style: italic; }
.p-mine, .cm-st, .ring-tag, .clan-tag, .gen-tag, .ch-k, .b-strat { border-radius: 999px; }
.p-mine { border-color: var(--sun); color: var(--sun); }
.bar { height: 7px; border-radius: 999px; background: rgba(241,232,212,.08); }
.bar i { background: linear-gradient(90deg, var(--sage), var(--sun)); border-radius: 999px; }
.p-level b { color: var(--sun); font-family: var(--mono); font-weight: 500; }
.p-status { border-radius: 18px; background: rgba(0,0,0,.2); border-color: var(--line); }
.p-action::before { content: '❧ '; color: var(--sun); }
.grid3 { border-radius: 18px; background: rgba(0,0,0,.14); }
.grid3 span, .p-sec, .b-kpis span, .bc-lbl, .b-sub, .kv span, .tbl th, .form label, .form .label, .p-status .st, .b-tot span { letter-spacing: .04em; text-transform: none; font-family: var(--body); }
.p-sec { font-family: var(--sans); font-style: italic; font-size: 16px; color: #fbf3e2; letter-spacing: 0; margin: 22px 0 10px; padding-bottom: 6px; border-bottom: 1px dashed var(--line2); align-items: baseline; }
.p-sec > span:last-child:not(:first-child) { font-family: var(--mono); font-style: normal; font-size: 10.5px; color: var(--muted); }
.p-persona { border-left-color: var(--sage); }
.p-persona b { color: var(--sage); }
.p-btns .btn { height: 40px; font-size: 12.5px; }
.p-btns .btn.active { background: var(--sun); color: #1b1408; }
.coin-box, .brain, .dec, .ally, .quest, .duel, .terr, .base-box, .post, .fam-child, .cm { border-radius: 16px; }
.brain { border-color: rgba(233,161,91,.35); background: linear-gradient(180deg, rgba(233,161,91,.07), transparent 70%), rgba(0,0,0,.18); }
.b-ttl { color: var(--sun); font-family: var(--sans); font-style: italic; font-size: 14px; letter-spacing: 0; font-weight: 500; }
.b-tot div { background: rgba(0,0,0,.25); }
.ca { border-radius: 12px; background: rgba(0,0,0,.25); }
.p-log div { border-bottom-color: rgba(241,232,212,.06); }

/* ---------- content inside leaves ---------- */
.feed { height: 460px; font-size: 13px; gap: 0; mask-image: linear-gradient(#000 82%, transparent); }
.fe { position: relative; padding: 12px 0 12px 22px; gap: 14px; align-items: flex-start; border-left: 1px solid rgba(241,232,212,.12); margin-left: 15px; }
.fe::before { content: ''; position: absolute; left: -5px; top: 22px; width: 9px; height: 9px; border-radius: 50%; background: #1a2c20; border: 1.5px solid var(--sage); }
.fe.k-launch::before, .fe.k-level::before, .fe.k-milestone::before { border-color: var(--sun); background: var(--sun); }
.fe.k-duel::before { border-color: var(--red); }
.fe-av { width: 36px; height: 36px; border-radius: 50%; background: radial-gradient(circle at 50% 30%, #2a4330, #142019); border: 1px solid rgba(241,232,212,.12); display: grid; place-items: center; flex: none; overflow: hidden; }
.fe-av img { width: 30px; height: 30px; }
.fe-av i { width: 10px; height: 10px; border-radius: 50%; background: var(--sun); }
.fe-b { flex: 1; min-width: 0; }
.fe-h { display: flex; align-items: baseline; gap: 10px; margin-bottom: 4px; }
.fe-h b { font-family: var(--sans); font-weight: 600; font-size: 15px; color: #fbf3e2; }
.fe-h span { font-family: var(--mono); font-size: 10.5px; color: var(--dim); }
.fe p { font-size: 13.5px; color: rgba(241,232,212,.82); }
.fe.k-connect p, .fe.k-launch p, .fe.k-level p, .fe.k-milestone p { color: var(--sun); }
.fe:hover p { color: #fff; }

/* rising embers */
.movers { display: flex; flex-direction: column; gap: 10px; }
.mv { display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 18px; background: rgba(0,0,0,.16); border: 1px solid transparent; cursor: pointer; transition: border-color .2s, transform .2s; }
.mv:hover { border-color: rgba(233,161,91,.35); transform: translateX(3px); }
.mv-ic { width: 44px; height: 44px; border-radius: 50%; background: radial-gradient(circle at 50% 30%, #2a4330, #142019); display: grid; place-items: center; }
.mv-ic img { width: 34px; height: 34px; }
.mv-m { min-width: 0; }
.mv-m b { display: block; font-family: var(--sans); font-weight: 600; font-size: 17px; color: #fbf3e2; }
.mv-m span { display: block; font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mv-v { text-align: right; font-family: var(--mono); font-size: 13px; white-space: nowrap; }
.mv-v .up, .mv-v .down { display: inline-block; margin-left: 4px; padding: 1px 7px; border-radius: 999px; font-size: 10.5px; background: rgba(168,197,138,.12); }
.mv-v .down { background: rgba(226,102,90,.12); }
.mv-v > span:last-child { display: block; font-size: 10.5px; color: var(--muted); margin-top: 3px; }

/* campfire talk */
.ch-box { height: 440px; }
.ch-msg { padding: 10px 12px; border-radius: 16px; }
.ch-msg:hover { background: rgba(241,232,212,.03); }
.ch-msg img { width: 34px; height: 34px; border-radius: 50%; background: radial-gradient(circle at 50% 30%, #2a4330, #142019); }
.ch-h b { font-family: var(--sans); font-weight: 600; font-size: 14px; }
.ch-b p { font-family: var(--sans); font-size: 15px; font-style: italic; line-height: 1.45; color: rgba(251,243,226,.9); }
.ch-k { font-family: var(--mono); font-size: 9.5px; letter-spacing: .02em; padding: 1px 8px; }
.ch-f button, .chips button, .tabs button { border-radius: 999px; font-family: var(--body); letter-spacing: 0; text-transform: none; }
.ch-f button { font-size: 11.5px; padding: 5px 12px; }
.ch-f button.on, .ch-f button:hover { color: #1b1408; background: var(--sun); border-color: var(--sun); }

/* newcomers / my agent */
.ll { padding: 11px 0; border-top-color: var(--line); }
.ll .ic { width: 42px; height: 42px; border-radius: 50%; border: 0; background: radial-gradient(circle at 50% 30%, #2a4330, #142019); }
.ll b { font-family: var(--sans); font-weight: 600; font-size: 15px; }
.ll .v { font-family: var(--mono); font-size: 12.5px; }
.mine-av { border-radius: 50% 50% 50% 12px; border: 1px solid rgba(233,161,91,.35); background: radial-gradient(circle at 50% 30%, #2a4330, #142019); }
.mine-info .lv { font-family: var(--sans); font-size: 19px; font-weight: 600; }
.mine-switch button { border-radius: 999px; }
.mine-switch button.on { border-color: var(--sun); color: var(--sun); }

/* elders */
.top-agents { grid-template-columns: repeat(5, 1fr); gap: 12px; }
.ta { padding: 22px 8px 14px; border-radius: 999px 999px 22px 22px; border: 1px solid var(--line); background: rgba(0,0,0,.16); }
.ta:hover { border-color: rgba(233,161,91,.45); background: rgba(233,161,91,.06); }
.ta.first { border-color: var(--sun); background: linear-gradient(180deg, rgba(242,194,123,.14), transparent); }
.ta .n { top: auto; bottom: -10px; left: 50%; transform: translateX(-50%); width: 24px; height: 24px; border-radius: 50%; background: #e9dfc8; font-family: var(--sans); font-style: italic; font-size: 12px; }
.ta.first .n { background: var(--sun); }
.ta img { width: 48px; height: 48px; }
.ta b { font-family: var(--sans); font-size: 14px; }
.stats { grid-template-columns: repeat(2, 1fr); gap: 0; }
.stats > div { padding: 16px 4px; border-bottom: 1px dashed var(--line2); }
.stats b { font-family: var(--sans); font-weight: 500; font-size: 32px; color: var(--sun); letter-spacing: -.02em; }
.stats b small { font-size: 14px; color: var(--muted); }
.stats span { font-size: 12.5px; }
.tstats { grid-template-columns: repeat(2, 1fr); }
.tstats > div:nth-last-child(-n+2) { border-bottom: 0; }

/* ledger / duels / realms */
.df { padding: 13px 0; }
.df img { width: 36px; height: 36px; border-radius: 50%; background: radial-gradient(circle at 50% 30%, #2a4330, #142019); }
.df-h b { font-family: var(--sans); font-weight: 600; font-size: 15px; }
.df-chips span { border-radius: 999px; padding: 2px 9px; }
.sc-badge { border-radius: 999px; }
.tm { padding: 10px 0; }
.tm img { border-radius: 50%; background: radial-gradient(circle at 50% 30%, #2a4330, #142019); }
.tm b { font-family: var(--sans); font-weight: 600; }
.duel { border-left-width: 3px; background: rgba(0,0,0,.14); }
.tz { padding: 9px 0; }
.tz b { font-family: var(--sans); font-weight: 500; font-size: 14px; }
.ring-dot { border-radius: 50%; }

/* ---------- pages (launch / wanderers / elders) ---------- */
.page { max-width: 1240px; padding: calc(var(--head) + 48px) clamp(18px, 4vw, 56px) 70px; }
.page-h { margin-bottom: 34px; }
.page-h h2 { font-family: var(--sans); font-weight: 400; font-size: clamp(44px, 6vw, 78px); letter-spacing: -.025em; line-height: .95; color: #fbf3e2; margin-bottom: 14px; }
.page-h p { font-size: 15.5px; max-width: 560px; }
.form { gap: 16px; padding: 30px; }
.form label, .form .label { font-size: 12.5px; font-weight: 600; color: rgba(241,232,212,.75); }
.form input, .form textarea, .toolbar input, .toolbar select, .cm-in, .own-ta, .du-row select { background: rgba(0,0,0,.22); border: 1px solid var(--line2); border-radius: 14px; padding: 12px 14px; font-size: 14px; }
.toolbar input, .toolbar select { border-radius: 999px; padding: 11px 18px; }
.form input:focus, .form textarea:focus, .toolbar input:focus, .toolbar select:focus, .cm-in:focus, .own-ta:focus { border-color: var(--sun); }
.form input.file::file-selector-button { border-radius: 999px; background: rgba(241,232,212,.08); padding: 5px 12px; }
.sep { font-family: var(--sans); font-style: italic; font-size: 22px; letter-spacing: 0; color: #fbf3e2; border-top: 1px dashed var(--line2); }
.variants button { height: 84px; border-radius: 50% 50% 18px 18px; background: rgba(0,0,0,.22); }
.variants button.on { border-color: var(--sun); background: rgba(233,161,91,.1); }
.chips button { padding: 8px 15px; font-size: 13px; }
.chips button.on, .tabs button.on { color: #1b1408; background: var(--sun); border-color: var(--sun); }
.preview { top: calc(var(--head) + 20px); }
.preview-stage { height: 290px; border-radius: 22px; border: 1px solid var(--line); background:
  radial-gradient(260px 160px at 50% 70%, rgba(168,197,138,.16), transparent 70%),
  radial-gradient(400px 200px at 80% 0%, rgba(242,194,123,.14), transparent 70%), #122016; }
.pv-ticker { font-family: var(--sans); font-weight: 600; font-size: 34px; color: var(--sun); }
.pv-prompt { border-left-color: var(--sage); }
.tabs { gap: 8px; }
.tabs button { padding: 9px 18px; font-size: 13px; }
.tbl th { font-size: 11.5px; padding: 16px; color: var(--muted); }
.tbl td { padding: 11px 16px; }
.tbl img { border-radius: 50%; background: radial-gradient(circle at 50% 30%, #2a4330, #142019); }
.tbl .tk { font-family: var(--sans); font-size: 15px; }
.tbl tbody tr:hover td { background: rgba(233,161,91,.06); }
.podium { gap: 20px; }
.pod { border-radius: 26px 26px 26px 6px; padding: 22px; background: linear-gradient(180deg, #1a2c20, #152419); }
.pod.p1 { border-color: var(--sun); background: radial-gradient(400px 200px at 0% 0%, rgba(242,194,123,.16), transparent 70%), linear-gradient(180deg, #1a2c20, #152419); }
.pod .rk { font-family: var(--sans); font-style: italic; font-weight: 400; font-size: 44px; }
.pod.p1 .rk { color: var(--sun); }
.pod b { font-family: var(--sans); font-size: 20px; }

/* ---------- footer, modal, toasts ---------- */
.foot { max-width: 1320px; margin: 80px auto 0; padding: 30px clamp(18px, 4vw, 56px) 40px; display: flex; align-items: center; gap: 22px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--muted); }
.foot-brand { display: flex; align-items: center; gap: 10px; }
.foot-brand b { font-family: var(--sans); font-weight: 600; font-size: 20px; color: #fbf3e2; }
.foot > span:last-child { margin-left: auto; }
.modal { background: rgba(8,14,10,.75); }
.modal-box { border-radius: 28px; border: 1px solid rgba(233,161,91,.45); background: linear-gradient(180deg, #1c2f22, #142019); padding: 32px; }
.modal-box h3 { font-family: var(--sans); font-weight: 600; font-size: 36px; color: var(--sun); }
.lm-steps li::before { content: '○'; }
.lm-steps li.run::before { content: '◐'; }
.lm-steps li.done::before { content: '●'; color: var(--sage); }
.lm-steps li.done { color: var(--sage); }
.lm-steps li.fail::before { content: '✕'; }
.lm-term { border-radius: 14px; background: rgba(0,0,0,.3); }
.toast { border-radius: 18px; border-color: rgba(233,161,91,.5); background: #1a2c20; box-shadow: 0 20px 40px -20px rgba(0,0,0,.6); }
.toast b { color: var(--sun); }

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .row-realms { grid-template-columns: 1fr 1fr; }
  .row-realms > :first-child { grid-column: 1 / -1; }
  .ca-chip .ca-lbl { display: none; }
}
@media (max-width: 1024px) {
  .glade-in { grid-template-columns: 1fr; gap: 32px; }
  .notes { display: grid; grid-template-columns: repeat(2, 1fr); column-gap: 22px; }
  .notes-h { grid-column: 1 / -1; }
  .note:nth-last-child(2) { border-bottom: 0; }
  .row-voices, .row-chron, .row-elders, .row-ledger { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  :root { --head: 64px; }
  .top { gap: 10px; }
  .top.scrolled { height: 64px; }
  .brand-t small { display: none; }
  .brand-t b { font-size: 20px; }
  .logo { width: 32px; height: 32px; }
  .nav { position: fixed; top: calc(var(--head) + 6px); left: 12px; right: 12px; margin: 0; flex-direction: column; padding: 10px; border-radius: 22px; background: rgba(20,34,24,.97); display: none; }
  .nav.open { display: flex; }
  .nav a { padding: 12px 16px; }
  #walletBtn svg { display: none; }
  .glade { min-height: 0; }
  .glade-in { padding-top: calc(var(--head) + 40px); padding-bottom: 50px; }
  .glade-copy h1 { font-size: 48px; }
  .glade-copy p { font-size: 15px; }
  .chapter { padding-top: 40px; }
  .ch-head { flex-wrap: wrap; gap: 14px; }
  .ch-head .num { font-size: 40px; }
  .seek { width: 100%; }
  .stage { height: 64vh; min-height: 420px; display: block; overflow: hidden; border-radius: 24px; }
  #net { position: absolute; height: 100%; min-height: 0; border: 0; }
  .map-ui { display: none; }
  .hint { display: none; }
  .panel { position: fixed; z-index: 60; top: auto; left: 0; right: 0; bottom: 0; width: auto; height: 80vh; border-radius: 26px 26px 0 0; transform: translateY(105%); }
  .panel.open { transform: none; }
  .leaf { padding: 20px; border-radius: 22px 22px 22px 6px; }
  .row-realms { grid-template-columns: 1fr; }
  .top-agents { grid-template-columns: repeat(5, minmax(78px, 1fr)); overflow-x: auto; padding-bottom: 14px; }
  .page { padding-top: calc(var(--head) + 30px); }
  .foot { flex-direction: column; align-items: flex-start; }
  .foot > span:last-child { margin-left: 0; }
}
@media (max-width: 560px) {
  .notes { grid-template-columns: 1fr; }
  .note:nth-last-child(2) { border-bottom: 1px solid rgba(241,232,212,.08); }
  .note b { font-size: 26px; }
  .glade-btns .btn { width: 100%; }
  .ca-chip { display: none; }
}

/* =====================================================================
   MAP CONTROLS + HOME ICONS — the new forest look
   ===================================================================== */
.minimap { position: relative; width: 190px; height: 128px; padding: 0; border-radius: 26px 26px 26px 8px; border: 1px solid rgba(242,194,123,.35); background: rgba(12,22,15,.82); box-shadow: 0 14px 34px -14px rgba(0,0,0,.7), inset 0 0 22px rgba(242,194,123,.07); cursor: crosshair; }
.minimap canvas { border-radius: inherit; }
.mm-cap { position: absolute; left: 14px; bottom: 7px; z-index: 1; pointer-events: none; font-family: var(--sans); font-style: italic; font-size: 11px; color: rgba(251,243,226,.7); text-shadow: 0 1px 6px #000; }
.zoom { flex-direction: row; align-items: center; gap: 2px; padding: 4px; border-radius: 999px; border: 1px solid rgba(242,194,123,.35); background: rgba(12,22,15,.82); box-shadow: 0 14px 34px -14px rgba(0,0,0,.7); overflow: visible; }
.zoom button { width: 38px; height: 38px; border-radius: 50%; border: 0; color: rgba(251,243,226,.85); transition: background .2s, color .2s, transform .15s; }
.zoom button + button { border-top: 0; }
.zoom button:hover { color: #23170a; background: var(--sun); transform: translateY(-1px); }
.zoom button:active { transform: scale(.94); }
.zoom svg { width: 17px; height: 17px; }
#zoomReset { background: rgba(242,194,123,.14); color: var(--sun); }

/* agent homes in lists: burrow · cottage · tree-house · great tree */
.base-ic i { border: 0; background: none; }
.base-ic.lvl0 i { width: 30px; height: 17px; left: 50%; border-radius: 15px 15px 2px 2px; background: radial-gradient(circle at 50% 100%, #1b120b 0 5px, transparent 5.5px), linear-gradient(#7ea35a, #5a4630 70%); border: 0; }
.base-ic.lvl1 i { width: 26px; height: 16px; background: #d8bf92; box-shadow: 0 -8px 0 -2px #5f8a4a, inset 0 -5px 0 -3px rgba(80,55,35,.4); border: 0; border-radius: 2px 2px 0 0; }
.base-ic.lvl2 i { width: 22px; height: 32px; border-radius: 11px 11px 3px 3px; background: radial-gradient(circle at 50% 28%, #4d7d45 0 9px, transparent 9.5px), linear-gradient(90deg, transparent 8px, #58402b 8px 14px, transparent 14px); border: 0; }
.base-ic.lvl3 i { width: 28px; height: 40px; border-radius: 14px 14px 3px 3px; background: radial-gradient(circle at 50% 26%, #41733f 0 12px, transparent 12.5px), radial-gradient(circle at 30% 20%, #ffe2a8 0 1.5px, transparent 2px), radial-gradient(circle at 72% 30%, #ffe2a8 0 1.5px, transparent 2px), linear-gradient(90deg, transparent 10px, #58402b 10px 18px, transparent 18px); border: 0; filter: drop-shadow(0 0 6px rgba(255,214,150,.55)); }
.p-avatar img.robo { width: 56px; height: 56px; }
.lm-term, .ca-chip, .mv-v, .live-tag { font-family: var(--mono); }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #2b3d2f; border-radius: 8px; }
::-webkit-scrollbar-track { background: transparent; }
@media (max-width: 900px) { .zoom button { width: 36px; height: 36px; } }
