:root {
  --bg: #071014;
  --panel: rgba(14, 22, 28, 0.92);
  --panel-soft: rgba(20, 32, 38, 0.92);
  --line: rgba(196, 213, 209, 0.18);
  --accent: #f1c95a;
  --green: #8bd05c;
  --text: #edf7ef;
  --muted: #aebcb6;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(rgba(18, 30, 34, 0.96), rgba(7, 16, 20, 0.98)),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: auto, 28px 28px, 28px 28px;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-header,
.nav-links,
.wallet-connect,
.wallet-identity,
.maps-panel-head,
.page-hero,
.table-actions {
  display: flex;
  align-items: center;
}

.site-header {
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
}

.brand-mark {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  image-rendering: pixelated;
  border: 2px solid var(--accent);
  border-radius: 7px;
  background:
    linear-gradient(90deg, transparent 0 18%, rgba(20, 50, 54, 0.95) 18% 82%, transparent 82%),
    linear-gradient(#83cf5d 0 28%, #f1c95a 28% 48%, #2e8dbd 48% 72%, #c5763d 72% 100%);
  box-shadow:
    inset 0 0 0 3px #1c3438,
    0 0 0 1px rgba(40, 127, 179, 0.78);
}

.nav-links {
  gap: 8px;
}

.nav-links a,
.wallet-button,
.hero-button,
.action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(23, 38, 44, 0.86);
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
}

.wallet-connect {
  gap: 10px;
}

.wallet-identity {
  gap: 10px;
  min-height: 42px;
}

.wallet-connect[data-wallet-state="connected"] .wallet-identity {
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 2px;
  min-height: 42px;
  padding: 0 10px;
  border: 1px solid rgba(139, 208, 92, 0.72);
  border-radius: 6px;
  background: rgba(45, 111, 56, 0.84);
}

.wallet-address {
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 800;
  color: #d9eadf;
}

.wallet-connect[data-wallet-state="connected"] .wallet-address {
  max-width: 128px;
}

.wallet-button {
  cursor: pointer;
}

.wallet-button[data-wallet-connected="true"] {
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.wallet-coins {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid rgba(241, 201, 90, 0.55);
  border-radius: 6px;
  color: #f8d668;
  font-size: 14px;
  font-weight: 800;
  background: rgba(42, 36, 18, 0.72);
}

.page-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 48px;
}

.page-hero {
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
  padding: 22px 24px;
  border: 1px solid rgba(241, 201, 90, 0.22);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(20, 32, 38, 0.96), rgba(12, 21, 26, 0.94));
}

.kicker {
  display: inline-block;
  margin-bottom: 10px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: clamp(32px, 5vw, 48px);
  line-height: 0.95;
}

.page-hero p {
  margin-top: 12px;
  max-width: 620px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
}

.hero-button {
  border-color: rgba(139, 208, 92, 0.56);
  background: rgba(45, 111, 56, 0.84);
}

.maps-panel {
  padding: 20px 22px 24px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(20, 32, 38, 0.92), rgba(10, 17, 22, 0.94));
}

.maps-panel-head {
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.maps-panel-head strong {
  display: block;
  font-size: 20px;
}

#myMapsStatus {
  display: inline-block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 14px;
}

.empty-state {
  padding: 28px 24px;
  border: 1px dashed rgba(196, 213, 209, 0.24);
  border-radius: 12px;
  background: rgba(9, 16, 20, 0.8);
}

.empty-state h2 {
  font-size: 22px;
}

.empty-state p {
  margin-top: 10px;
  max-width: 640px;
  color: var(--muted);
  line-height: 1.7;
}

.table-wrap {
  overflow: auto;
  border: 1px solid rgba(196, 213, 209, 0.14);
  border-radius: 12px;
}

.maps-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

.maps-table th,
.maps-table td {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(196, 213, 209, 0.12);
  text-align: left;
  vertical-align: middle;
}

.maps-table th {
  color: #f8d668;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(23, 38, 44, 0.88);
}

.maps-table tbody tr:nth-child(odd) {
  background: rgba(10, 17, 22, 0.7);
}

.maps-table tbody tr:nth-child(even) {
  background: rgba(15, 24, 30, 0.86);
}

.map-id {
  color: #cfd9d4;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
}

.table-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid rgba(196, 213, 209, 0.28);
  border-radius: 8px;
  background: rgba(10, 17, 22, 0.35);
  color: var(--ink);
  font-size: 13px;
  font-weight: 850;
  text-decoration: none;
}

.action-button.share {
  border-color: rgba(241, 201, 90, 0.4);
  color: #f8d668;
}

.action-button.edit {
  border-color: rgba(139, 208, 92, 0.44);
}

.action-button.social {
  width: 36px;
  min-width: 36px;
  padding: 0;
  font-size: 12px;
  line-height: 1;
}

.action-button.social svg {
  width: 15px;
  height: 15px;
  display: block;
}

.action-button.x-share {
  border-color: rgba(245, 247, 247, 0.38);
  color: #f7fbff;
}

.action-button.telegram-share {
  border-color: rgba(73, 168, 236, 0.5);
  color: #66c7ff;
}

@media (max-width: 900px) {
  .site-header,
  .page-hero {
    flex-direction: column;
    align-items: stretch;
  }

  .nav-links,
  .wallet-connect {
    flex-wrap: wrap;
  }

  .page-shell {
    width: min(100% - 20px, 1180px);
  }
}
