:root {
  --bg: #000000;
  --text: #ffffff;
  --muted: #c8c8c8;
  --line: #2a2a2a;
  --card: #f3f6ff;
  --card-text: #111111;
  --card-muted: #4a4a4a;
  --btn: #c5d4f5;
  --btn-text: #111827;
  --btn-hover: #d7e2fb;
  --warn: #8a5a00;
  --bad: #9b1c1c;
  --good: #166534;
  --serif: "Playfair Display", "Times New Roman", Times, serif;
  --sans: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { min-height: 100%; background: var(--bg); color: var(--text); }
body { font-family: var(--sans); font-size: 16px; line-height: 1.5; }

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 28px 80px; }

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 0 10px;
}
.nav-brand img { width: 52px; height: 52px; display: block; }
.nav-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px 22px;
  font-size: 15px;
}
.nav-links a { color: #fff; opacity: 0.92; }
.nav-links a:hover { opacity: 1; text-decoration: underline; }
.nav-links a.active { text-decoration: underline; }

.hero { text-align: center; padding: 48px 0 36px; }
.wordmark {
  width: min(420px, 86vw);
  height: auto;
  display: block;
  margin: 0 auto 28px;
}
.hero h1 {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(28px, 4vw, 42px);
  margin-bottom: 12px;
}
.hero p {
  max-width: 620px;
  margin: 0 auto 10px;
  color: var(--muted);
  font-size: 17px;
}
.hero em {
  display: block;
  margin-top: 14px;
  font-family: var(--serif);
  font-style: italic;
  color: #fff;
}

.layout {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 48px;
  align-items: start;
}
@media (max-width: 900px) {
  .nav { flex-direction: column; align-items: flex-start; }
  .layout { grid-template-columns: 1fr; }
}

.note {
  background: var(--card);
  color: var(--card-text);
  border-radius: 12px;
  padding: 22px 24px;
  max-width: 640px;
}
.note p { margin: 0; font-size: 15.5px; line-height: 1.55; }
.side-actions { margin-top: 18px; display: flex; gap: 10px; flex-wrap: wrap; }

.ghost, .wallet-btn, .swap-btn, .max-btn, .sort { border: 0; }
.ghost, .wallet-btn {
  background: var(--btn);
  color: var(--btn-text);
  border-radius: 10px;
  padding: 10px 18px;
  font-size: 15px;
  font-weight: 500;
}
.ghost:hover, .wallet-btn:hover { background: var(--btn-hover); }
.card .wallet-btn { padding: 6px 10px; font-size: 13px; }
.wallet-wrap { position: relative; }
.wallet-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  min-width: 168px;
  background: #fff;
  border: 1px solid #d7dbe8;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
  overflow: hidden;
  z-index: 5;
}
.wallet-menu button {
  display: block;
  width: 100%;
  text-align: left;
  background: #fff;
  border: 0;
  padding: 10px 12px;
  font-size: 13px;
  color: #111;
}
.wallet-menu button:hover { background: #eef2ff; }

.card {
  background: var(--card);
  color: var(--card-text);
  border-radius: 12px;
  padding: 20px;
}
.card-label {
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--card-muted);
  margin-bottom: 14px;
  font-weight: 600;
}
.field-label {
  display: block;
  font-size: 12px;
  font-weight: 650;
  color: var(--card-muted);
  margin: 12px 0 6px;
}
textarea {
  width: 100%;
  border: 1px solid #d7dbe8;
  border-radius: 10px;
  padding: 12px 14px;
  font: inherit;
  color: var(--card-text);
  background: #fff;
  resize: vertical;
  min-height: 96px;
}
textarea:focus { outline: 2px solid #c5d4f5; }
.count { text-align: right; font-size: 12px; color: var(--card-muted); margin: 4px 0 8px; }

.leg {
  background: #fff;
  border: 1px solid #d7dbe8;
  border-radius: 10px;
  padding: 12px 14px;
}
.leg-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.token { display: flex; align-items: center; gap: 8px; font-weight: 650; }
.tok-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: block;
  object-fit: cover;
  background: #fff;
}
.bal { font-size: 12px; color: var(--card-muted); }
.max-btn {
  background: transparent;
  color: #1d4ed8;
  padding: 0 0 0 6px;
  font-size: 11px;
  font-weight: 700;
}
input.amt {
  width: 100%;
  margin-top: 8px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--card-text);
  font-size: 28px;
  font-family: inherit;
}
.tiny { font-size: 12px; color: var(--card-muted); line-height: 1.45; margin-top: 6px; }

.swap-btn {
  width: 100%;
  margin-top: 14px;
  padding: 12px;
  border-radius: 10px;
  background: var(--btn);
  color: var(--btn-text);
  font-size: 16px;
  font-weight: 650;
}
.swap-btn:hover { background: var(--btn-hover); }
.swap-btn:disabled { opacity: 0.45; cursor: not-allowed; }

.status {
  margin-top: 10px;
  font-size: 12px;
  color: var(--card-muted);
  min-height: 16px;
  word-break: break-word;
}
.status.good { color: var(--good); }
.status.bad { color: var(--bad); }

.wall { margin-top: 56px; }
.wall-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}
.wall h2 {
  font-family: var(--serif);
  font-size: 28px;
}
.sorts { display: flex; gap: 8px; }
.sort {
  background: transparent;
  color: #fff;
  border: 1px solid #444 !important;
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 13px;
}
.sort.on { background: var(--btn); color: var(--btn-text); border-color: var(--btn) !important; }

.feed { display: grid; gap: 12px; }
.empty { color: var(--muted); padding: 24px 0; }
.post {
  background: var(--card);
  color: var(--card-text);
  border-radius: 12px;
  padding: 16px 18px;
}
.post-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  color: var(--card-muted);
  margin-bottom: 8px;
}
.post-meta a { color: #1d4ed8; text-decoration: underline; }
.post-msg { font-size: 17px; line-height: 1.45; white-space: pre-wrap; word-break: break-word; }
.post-pay {
  margin-top: 10px;
  font-size: 13px;
  font-weight: 650;
}

.addrs {
  margin-top: 56px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
  color: var(--muted);
  font-size: 13px;
}
.addrs code { display: block; color: #fff; font-size: 12px; word-break: break-all; margin: 4px 0; }

footer {
  margin-top: 36px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}
footer a { text-decoration: underline; }
