:root {
  color-scheme: dark;
  --bg: #070b09;
  --ink: #f6ead2;
  --muted: #b7ad99;
  --panel: #09110d;
  --panel-2: #121b15;
  --edge: #5d4820;
  --gold: #d8a949;
  --gold-soft: #f4d68c;
  --mint: #6ee7b7;
  --red: #ef6767;
  --blue: #6cb5ff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow: hidden;
  background: #050706;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  touch-action: manipulation;
}

body.onboarding .toast {
  display: none;
}

button {
  border: 1px solid rgba(216, 169, 73, 0.55);
  background: linear-gradient(180deg, rgba(30, 39, 27, 0.96), rgba(12, 17, 13, 0.96));
  color: var(--ink);
  min-height: 38px;
  border-radius: 8px;
  padding: 0 14px;
  font: inherit;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

input,
select {
  width: 100%;
  min-height: 38px;
  border: 1px solid rgba(216, 169, 73, 0.4);
  border-radius: 8px;
  background: #070c09;
  color: var(--ink);
  padding: 0 10px;
  font: inherit;
}

a {
  color: var(--ink);
  text-decoration: none;
}

button:hover {
  border-color: var(--gold-soft);
  background: linear-gradient(180deg, rgba(36, 82, 42, 0.96), rgba(17, 45, 25, 0.96));
}

kbd {
  display: inline-block;
  min-width: 1.6em;
  padding: 1px 5px;
  border: 1px solid #596254;
  border-bottom-width: 2px;
  border-radius: 4px;
  background: #111512;
  color: #fff7db;
  text-align: center;
  font-size: 0.86em;
}

.shell {
  position: fixed;
  inset: 0;
  display: block;
  width: 100%;
  height: 100vh;
  margin: 0;
  padding: 0;
}

.game-wrap {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #07100a;
}

#game {
  display: block;
  width: 100vw;
  height: 100vh;
  border: 0;
  border-radius: 0;
  background: #142016;
  image-rendering: pixelated;
  box-shadow: none;
  touch-action: none;
}

body.onboarding #game {
  filter: saturate(1.18) brightness(0.86) contrast(1.12);
}

.site-overlay {
  position: absolute;
  inset: 0;
  z-index: 7;
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 24px 34px 30px;
  overflow: auto;
  background:
    linear-gradient(90deg, rgba(2, 6, 4, 0.72) 0%, rgba(3, 7, 5, 0.28) 42%, rgba(3, 7, 5, 0.78) 100%),
    radial-gradient(circle at 58% 42%, transparent 0 24%, rgba(3, 7, 5, 0.22) 64%, rgba(3, 7, 5, 0.8) 100%);
  box-shadow: inset 0 0 0 1px rgba(216, 169, 73, 0.22), inset 0 0 86px rgba(0, 0, 0, 0.34);
}

body:not(.onboarding) .site-overlay {
  display: none;
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 100px;
  padding-bottom: 8px;
}

.site-nav strong {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--gold-soft);
  font-size: 34px;
  line-height: 0.82;
  text-shadow: 0 2px 0 #261405, 0 0 24px rgba(230, 164, 67, 0.25);
}

.brand-lockup {
  flex: 0 0 auto;
}

.brand-lockup img {
  display: block;
  width: clamp(96px, 7.6vw, 142px);
  max-height: 126px;
  height: auto;
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.45));
}

.sigil {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 2px solid var(--gold-soft);
  background: linear-gradient(180deg, #113d26, #0a1d14);
  color: var(--mint);
  font-size: 20px;
  box-shadow: inset 0 0 0 3px #1d5c3b, 0 0 18px rgba(216, 169, 73, 0.24);
}

.site-nav div,
.hero-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.site-nav a {
  position: relative;
  color: var(--ink);
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.site-nav a.active,
.site-nav a:hover {
  color: #8df5a5;
}

.site-nav a.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -12px;
  height: 2px;
  background: #55d36f;
  box-shadow: 0 0 10px rgba(85, 211, 111, 0.7);
}

.site-grid {
  display: grid;
  grid-template-columns: minmax(520px, 760px) minmax(360px, 430px);
  column-gap: 34px;
  row-gap: 16px;
  align-items: start;
  justify-content: space-between;
  min-height: calc(100vh - 150px);
  margin-top: 0;
  padding-bottom: 42px;
}

.hero-copy {
  grid-column: 1;
  grid-row: 1;
  align-self: start;
  z-index: 3;
  padding: 26px 30px 30px;
  border-radius: 16px;
  background: linear-gradient(90deg, rgba(2, 6, 4, 0.88), rgba(3, 7, 5, 0.38));
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.4);
}

.hero-copy h1 {
  max-width: 720px;
  margin: 10px 0 20px;
  color: #fbf2df;
  font-size: clamp(42px, 5vw, 70px);
  line-height: 0.93;
  text-transform: uppercase;
  text-shadow: 0 4px 0 #211306, 0 0 22px rgba(216, 169, 73, 0.16);
}

.hero-copy h1::first-line {
  color: #fff9ee;
}

.hero-copy p {
  max-width: 570px;
  color: #fff0d2;
  font-size: 20px;
  line-height: 1.36;
  text-shadow: 0 2px 8px #000;
}

.online-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  max-width: 610px;
  margin-top: 18px;
}

.economy-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  max-width: 710px;
  margin-top: 10px;
}

.online-board div,
.economy-board div {
  min-width: 0;
  border: 1px solid rgba(141, 245, 165, 0.38);
  border-radius: 8px;
  background: rgba(6, 12, 9, 0.82);
  padding: 10px 12px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.62);
}

.online-board span,
.economy-board span {
  display: block;
  color: #d8cba9;
  font-size: 11px;
  line-height: 1.1;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.online-board strong,
.economy-board strong {
  display: block;
  margin-top: 5px;
  color: #8df5a5;
  font-family: "Silkscreen", "Tiny5", "Pixelify Sans", "Press Start 2P", "VT323", monospace;
  font-size: 21px;
  line-height: 1.05;
  overflow-wrap: anywhere;
}

.economy-board strong {
  color: #d7b157;
  font-size: 18px;
}

.hero-copy .multiplayer-summary {
  max-width: 640px;
  margin-top: 14px;
  color: #e7dcc8;
  font-size: 15px;
  line-height: 1.45;
}

.hud-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 0;
}

.hud-strip span {
  border: 1px solid rgba(216, 169, 73, 0.28);
  border-radius: 8px;
  background: rgba(7, 12, 9, 0.76);
  padding: 10px 14px;
  color: #e7dcc8;
  font-size: 14px;
}

.hero-actions {
  margin-top: 26px;
}

.token-panel {
  display: grid;
  gap: 7px;
  max-width: 620px;
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(159, 122, 49, 0.7);
  border-radius: 8px;
  background: rgba(3, 13, 8, 0.78);
  box-shadow: inset 0 0 0 1px rgba(255, 246, 223, 0.05), 0 12px 32px rgba(0, 0, 0, 0.24);
}

.token-panel span,
.token-panel a {
  color: #4ee07a;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.token-panel code {
  color: #fff6df;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  line-height: 1.35;
  overflow-wrap: anywhere;
  text-shadow: 0 2px 0 #000;
}

.primary-cta {
  min-width: 195px;
  min-height: 52px;
  border-color: #77e28b;
  background: linear-gradient(180deg, #287f3d, #124c27);
  color: #fffbe9;
  font-weight: 800;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,0.08), 0 0 28px rgba(85,211,111,0.25);
}

.ghost-cta {
  min-width: 210px;
  min-height: 52px;
  background: rgba(8, 10, 8, 0.82);
}

.world-showcase {
  display: none;
}

.entry-column {
  grid-column: 2;
  grid-row: 1;
  display: grid;
  gap: 12px;
  align-content: start;
  z-index: 4;
}

.entry-panel,
.character-card,
.lore-board article,
.news-panel,
.site-cards article {
  position: relative;
  border: 1px solid rgba(216, 169, 73, 0.45);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(13, 21, 17, 0.96), rgba(5, 10, 8, 0.96)),
    #07100b;
  padding: 18px;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.72), 0 18px 60px rgba(0, 0, 0, 0.35);
}

.entry-panel::before,
.lore-board article::before,
.news-panel::before,
.site-cards article::before {
  content: "";
  position: absolute;
  inset: 5px;
  border: 1px solid rgba(216, 169, 73, 0.12);
  border-radius: 10px;
  pointer-events: none;
}

.character-card {
  display: grid;
  grid-template-columns: 118px 1fr;
  gap: 15px;
  align-items: center;
  padding: 12px;
  background: rgba(0,0,0,0.24);
}

.profile-hero-canvas {
  width: 118px;
  height: 168px;
  border: 1px solid rgba(141, 245, 165, 0.42);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 25%, rgba(216, 169, 73, 0.14), transparent 24%),
    linear-gradient(180deg, #142419, #08100b);
  image-rendering: pixelated;
}

.pixel-diorama {
  position: relative;
  height: 168px;
  border: 1px solid rgba(216, 169, 73, 0.35);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 16%, rgba(216, 169, 73, 0.18), transparent 18%),
    linear-gradient(135deg, #163821 0 25%, #1f5630 25% 50%, #17452a 50% 75%, #101c14 75%),
    #101a13;
  image-rendering: pixelated;
  overflow: hidden;
}

.pixel-diorama::before {
  content: "";
  position: absolute;
  inset: 82px 0 0;
  background: repeating-linear-gradient(90deg, #8d7650 0 10px, #b4a169 10px 19px);
  opacity: 0.76;
}

.pixel-shadow {
  position: absolute;
  left: 44px;
  top: 101px;
  width: 48px;
  height: 10px;
  background: rgba(0,0,0,0.34);
}

.pixel-hero {
  position: absolute;
  left: 50px;
  top: 39px;
  width: 38px;
  height: 70px;
}

.pixel-hero span,
.pixel-slime,
.pixel-rune {
  position: absolute;
  display: block;
}

.pixel-hero .hair {
  left: 9px;
  top: 0;
  width: 20px;
  height: 10px;
  background: #6c492d;
}

.pixel-hero .face {
  left: 10px;
  top: 8px;
  width: 18px;
  height: 17px;
  background: #f0c796;
}

.pixel-hero .body {
  left: 7px;
  top: 25px;
  width: 24px;
  height: 26px;
  background: var(--preview-body, #55d36f);
  box-shadow: inset 6px 0 rgba(255,255,255,0.16);
}

.pixel-hero .shield {
  left: 0;
  top: 29px;
  width: 10px;
  height: 16px;
  background: var(--preview-accent, #4a7bb5);
  border: 2px solid #d7e8ef;
}

.pixel-hero .sword {
  left: 30px;
  top: 18px;
  width: 4px;
  height: 36px;
  background: #d7e8ef;
  box-shadow: 0 26px 0 #6b4328;
}

.pixel-hero .bow {
  display: none;
  left: 29px;
  top: 17px;
  width: 14px;
  height: 38px;
  border: 3px solid #b97938;
  border-left: 0;
  border-radius: 0 16px 16px 0;
  box-shadow: inset -2px 0 #f4d27c;
}

.pixel-hero .bow::after {
  content: "";
  position: absolute;
  left: 1px;
  top: 3px;
  width: 1px;
  height: 28px;
  background: #d7eefc;
}

.pixel-hero .staff {
  display: none;
  left: 31px;
  top: 10px;
  width: 4px;
  height: 42px;
  background: #d7eefc;
  box-shadow: 0 30px 0 #6b4328;
}

.pixel-hero .staff::before {
  content: "S";
  position: absolute;
  left: -5px;
  top: -9px;
  width: 14px;
  height: 14px;
  background: #123c2f;
  border: 2px solid #f8df94;
  color: #6ee7b7;
  font: 700 12px Georgia, serif;
  text-align: center;
  box-shadow: 0 0 15px rgba(110, 231, 183, 0.7);
}

.character-card[data-weapon="bow"] .pixel-hero .sword,
.character-card[data-weapon="magicStaff"] .pixel-hero .sword {
  display: none;
}

.character-card[data-weapon="bow"] .pixel-hero .bow,
.character-card[data-weapon="magicStaff"] .pixel-hero .staff {
  display: block;
}

.pixel-hero .boots {
  left: 9px;
  top: 51px;
  width: 22px;
  height: 10px;
  background: #25231e;
}

.pixel-slime {
  right: 18px;
  top: 80px;
  width: 22px;
  height: 17px;
  background: #68459a;
  box-shadow: inset 5px -3px #3e2d67;
}

.pixel-rune {
  left: 14px;
  top: 18px;
  width: 28px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 2px solid var(--preview-accent, #7fa177);
  background: #123c2f;
  color: #28e6a0;
  font: 700 24px Georgia, serif;
  box-shadow: 0 0 16px rgba(40,230,160,0.34);
}

.entry-panel strong {
  display: block;
  margin: 5px 0 8px;
  overflow-wrap: anywhere;
}

.profile-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(216, 169, 73, 0.24);
}

.profile-head strong {
  margin: 3px 0 0;
  color: #8df5a5;
  font-size: 16px;
}

.profile-head > span {
  align-self: end;
  color: #9ee6a8;
  font-size: 14px;
}

.profile-meters {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 14px 0;
}

.profile-meters span,
.loadout-grid span {
  border: 1px solid rgba(216, 169, 73, 0.24);
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.28);
  padding: 8px;
  color: #eadcc3;
  font-size: 13px;
  white-space: nowrap;
}

.loadout-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin-top: 10px;
}

.entry-panel p,
.site-cards p,
.news-panel p,
.lore-board p {
  color: var(--muted);
  line-height: 1.45;
}

.profile-form {
  display: grid;
  gap: 11px;
  margin-top: 14px;
}

.profile-form label {
  display: grid;
  gap: 6px;
  color: #f8df94;
  font-size: 13px;
}

.color-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.weapon-field select {
  display: none;
}

.weapon-choice-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.weapon-choice-row button {
  min-width: 0;
  min-height: 42px;
  padding: 0 8px;
  border-color: rgba(216, 169, 73, 0.38);
  background: rgba(7, 12, 9, 0.82);
  font-size: 12px;
}

.weapon-choice-row button.active {
  border-color: #77e28b;
  background: linear-gradient(180deg, rgba(40, 127, 61, 0.96), rgba(18, 76, 39, 0.96));
  color: #fffbe9;
}

.lore-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  width: min(1180px, calc(100vw - 470px));
}

.lore-board article {
  min-height: 148px;
  box-shadow: none;
}

.site-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 0;
  margin-left: 0;
  width: 100%;
  max-width: 1320px;
  z-index: 5;
  padding-top: 18px;
  border-top: 1px solid rgba(216, 169, 73, 0.26);
}

.site-cards article {
  min-width: 0;
  min-height: 156px;
  padding: 20px 20px 18px 76px;
  overflow: hidden;
  background:
    radial-gradient(circle at 16% 50%, rgba(85, 211, 111, 0.18), transparent 24%),
    linear-gradient(180deg, rgba(11, 18, 14, 0.98), rgba(3, 8, 6, 0.98)),
    #07100b;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.8), 0 18px 50px rgba(0, 0, 0, 0.38);
}

.site-cards h2 {
  margin-top: 0;
  margin-bottom: 8px;
  color: var(--gold);
  font-size: 15px;
  line-height: 1.1;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.site-cards p {
  margin: 0;
  color: #e5dac4;
  font-size: 14px;
  line-height: 1.42;
}

.card-link {
  display: inline-block;
  margin-top: 9px;
  margin-right: 12px;
  color: #8df5a5;
  font-size: 12px;
  text-transform: uppercase;
}

.feature-icon {
  position: absolute;
  left: 15px;
  top: 22px;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(141, 245, 165, 0.5);
  border-radius: 7px;
  background: radial-gradient(circle at 40% 25%, rgba(141,245,165,0.22), transparent 35%), #0b3323;
  color: #8df5a5;
  font-weight: 800;
  box-shadow: 0 0 18px rgba(85, 211, 111, 0.18);
}

.feature-icon::before,
.feature-icon::after {
  content: "";
  position: absolute;
  display: block;
}

.sword-icon::before {
  width: 5px;
  height: 29px;
  background: linear-gradient(180deg, #f7fbff, #9fb0ba);
  transform: rotate(45deg);
  box-shadow: 0 0 0 1px #3a4a4e;
}

.sword-icon::after {
  width: 19px;
  height: 5px;
  background: #d8a949;
  transform: rotate(45deg);
  bottom: 8px;
  right: 6px;
}

.lamp-icon::before {
  left: 12px;
  top: 9px;
  width: 11px;
  height: 18px;
  border: 2px solid #d8a949;
  background: rgba(255, 220, 117, 0.24);
  box-shadow: 0 0 16px rgba(255, 204, 83, 0.55);
}

.lamp-icon::after {
  left: 16px;
  top: 4px;
  width: 5px;
  height: 7px;
  background: #f4d68c;
}

.home-icon::before {
  left: 8px;
  top: 18px;
  width: 21px;
  height: 14px;
  background: #7d5b34;
  box-shadow: inset 0 -6px #3c281c;
}

.home-icon::after {
  left: 6px;
  top: 9px;
  width: 25px;
  height: 15px;
  background: #2f7f43;
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}

.scroll-icon::before {
  left: 8px;
  top: 10px;
  width: 22px;
  height: 18px;
  border: 2px solid #d8a949;
  background: #eadcc3;
}

.scroll-icon::after {
  left: 13px;
  top: 15px;
  width: 13px;
  height: 2px;
  background: #31503c;
  box-shadow: 0 6px 0 #31503c;
}

.coin-icon::before {
  left: 8px;
  top: 8px;
  width: 22px;
  height: 22px;
  border: 3px solid #f4d68c;
  border-radius: 50%;
  background: #d8a949;
  box-shadow: inset -4px -4px 0 rgba(102, 71, 16, 0.28), 0 0 16px rgba(216, 169, 73, 0.48);
}

.coin-icon::after {
  left: 18px;
  top: 13px;
  width: 4px;
  height: 13px;
  background: #5d4820;
  box-shadow: -4px 3px 0 -1px #5d4820, 4px -3px 0 -1px #5d4820;
}

.news-panel {
  display: grid;
  gap: 12px;
}

.news-panel > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.news-panel a {
  color: #8df5a5;
  font-size: 12px;
  text-transform: uppercase;
}

.news-panel article {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px;
  align-items: center;
}

.news-panel article span {
  display: block;
  width: 72px;
  height: 58px;
  border: 1px solid rgba(216, 169, 73, 0.36);
  border-radius: 7px;
  background:
    radial-gradient(circle at 45% 34%, rgba(141,245,165,0.68), transparent 10%),
    linear-gradient(135deg, #132719, #2c4426 45%, #111916);
}

.news-panel article:nth-of-type(2) span {
  background:
    radial-gradient(circle at 60% 28%, rgba(216,169,73,0.68), transparent 12%),
    linear-gradient(135deg, #1b1b28, #573d24 50%, #0b100e);
}

.news-panel strong {
  display: block;
  color: #f6ead2;
  margin-bottom: 3px;
}

.toast {
  position: absolute;
  left: 20px;
  bottom: 20px;
  max-width: min(620px, calc(100% - 40px));
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 7px;
  background: rgba(12, 15, 13, 0.88);
  color: #fff9e8;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 160ms ease, transform 160ms ease;
  pointer-events: none;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.quickbar {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 8;
  display: flex;
  gap: 8px;
  padding: 6px;
  border: 1px solid rgba(248, 223, 148, 0.28);
  border-radius: 8px;
  background: rgba(9, 12, 10, 0.58);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(4px);
}

.music-volume {
  width: 86px;
  accent-color: #4ee07a;
}

body.onboarding .quickbar {
  top: 96px;
  right: 32px;
  z-index: 13;
  border-color: rgba(159, 122, 49, 0.72);
  border-radius: 8px;
  background: rgba(3, 13, 8, 0.82);
  box-shadow: inset 0 0 0 1px rgba(255, 246, 223, 0.06), 0 0 0 2px rgba(0,0,0,0.42), 0 16px 40px rgba(0, 0, 0, 0.34);
  backdrop-filter: none;
}

body.onboarding .quickbar .icon-btn {
  border-color: rgba(159, 122, 49, 0.72);
  background: rgba(1, 7, 4, 0.84);
}

.chat-panel {
  position: absolute;
  right: 330px;
  bottom: 18px;
  z-index: 8;
  width: min(380px, calc(100vw - 36px));
  border: 1px solid rgba(248, 223, 148, 0.28);
  border-radius: 8px;
  background: rgba(7, 10, 8, 0.78);
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(4px);
}

.wallet-modal {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: none;
  place-items: center;
  padding: 18px;
  background: rgba(0, 0, 0, 0.58);
}

body.wallet-modal-open .wallet-modal {
  display: grid;
}

.wallet-modal-card {
  width: min(420px, calc(100vw - 32px));
  border: 1px solid #9f7a31;
  border-radius: 10px;
  background: rgba(3, 13, 8, 0.96);
  box-shadow: inset 0 0 0 1px rgba(255, 246, 223, 0.06), 0 0 0 2px rgba(0,0,0,0.56), 0 24px 72px rgba(0, 0, 0, 0.54);
  padding: 16px;
}

.wallet-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(159, 122, 49, 0.38);
}

.wallet-modal-head strong {
  color: #fff6df;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 18px;
  text-transform: uppercase;
}

.wallet-modal-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.wallet-option {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
  min-height: 62px;
  padding: 10px 12px;
  border-color: rgba(159, 122, 49, 0.72);
  border-radius: 8px;
  background: rgba(1, 7, 4, 0.84);
  text-align: left;
}

.wallet-option:hover {
  border-color: #4ee07a;
}

.wallet-option span,
.wallet-option strong,
.wallet-option small,
.wallet-option em {
  display: block;
}

.wallet-option strong {
  color: #fff6df;
  font-size: 15px;
  line-height: 1.2;
}

.wallet-option small {
  margin-top: 4px;
  color: #c9c0a3;
  font-size: 12px;
  text-transform: none;
}

.wallet-option em {
  color: #4ee07a;
  font-style: normal;
  font-size: 12px;
  text-transform: uppercase;
}

.wallet-option.missing em {
  color: #d9b45d;
}

body.onboarding .chat-panel {
  display: none;
}

.chat-head,
.chat-form {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 8px;
}

.chat-head {
  border-bottom: 1px solid rgba(216, 169, 73, 0.2);
  color: #f8df94;
  font-size: 12px;
}

.chat-head span {
  color: #9ee6a8;
  text-align: right;
}

.chat-minimize {
  min-height: 28px;
  width: 30px;
  padding: 0;
  border-color: rgba(248, 223, 148, 0.42);
  font-size: 13px;
  line-height: 1;
}

body.chat-minimized .chat-panel {
  width: 188px;
}

body.chat-minimized .chat-messages,
body.chat-minimized .chat-form {
  display: none;
}

body.chat-minimized .chat-head {
  grid-template-columns: 1fr auto;
  padding: 7px 8px;
}

body.chat-minimized .chat-head span {
  display: none;
}

@media (max-width: 900px) {
  .chat-panel {
    right: 18px;
    bottom: 224px;
  }
}

.chat-messages {
  display: grid;
  align-content: end;
  gap: 4px;
  height: 92px;
  overflow: hidden;
  padding: 8px;
  color: #e7dcc8;
  font: 12px "Silkscreen", "Tiny5", "Pixelify Sans", "Press Start 2P", "VT323", monospace;
}

.chat-messages p {
  margin: 0;
  overflow-wrap: anywhere;
}

.chat-messages b {
  color: #8df5a5;
}

.chat-form {
  grid-template-columns: 92px 1fr 72px;
  border-top: 1px solid rgba(216, 169, 73, 0.2);
}

.chat-form input,
.chat-form select,
.chat-form button {
  min-height: 34px;
  font-size: 12px;
}

.touch-controls {
  position: absolute;
  inset: auto 16px 16px 16px;
  z-index: 9;
  display: none;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  pointer-events: none;
  touch-action: none;
}

.touch-controls button {
  min-width: 56px;
  min-height: 52px;
  border-radius: 14px;
  background: rgba(8, 14, 10, 0.76);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.06), 0 10px 28px rgba(0,0,0,0.32);
  pointer-events: auto;
  user-select: none;
  -webkit-user-select: none;
}

.touch-dpad {
  display: grid;
  grid-template-columns: repeat(3, 56px);
  grid-template-rows: repeat(3, 52px);
  gap: 6px;
}

.touch-dpad button:nth-child(1) { grid-column: 2; grid-row: 1; }
.touch-dpad button:nth-child(2) { grid-column: 1; grid-row: 2; }
.touch-dpad button:nth-child(3) { grid-column: 2; grid-row: 3; }
.touch-dpad button:nth-child(4) { grid-column: 3; grid-row: 2; }

.touch-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(58px, 1fr));
  gap: 8px;
  width: min(190px, 44vw);
}

.touch-actions .touch-primary {
  grid-column: 1 / -1;
  border-color: #77e28b;
  background: linear-gradient(180deg, rgba(40, 127, 61, 0.9), rgba(18, 76, 39, 0.9));
}

.panel {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 12;
  width: min(390px, calc(100vw - 24px));
  height: 100vh;
  min-width: 0;
  overflow: auto;
  border: 0;
  border-left: 1px solid var(--edge);
  border-radius: 0;
  background: rgba(20, 25, 22, 0.96);
  padding: 16px;
  transform: translateX(100%);
  transition: transform 180ms ease;
  box-shadow: -24px 0 70px rgba(0, 0, 0, 0.45);
}

body.menu-open .panel {
  transform: translateX(0);
}

.menu-shade {
  position: fixed;
  inset: 0;
  z-index: 11;
  background: rgba(0, 0, 0, 0.42);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

body.menu-open .menu-shade {
  opacity: 1;
  pointer-events: auto;
}

.panel header,
.wallet,
.actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.kicker,
.label {
  margin: 0;
  color: var(--mint);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-size: 24px;
}

h2 {
  margin-top: 18px;
  margin-bottom: 10px;
  font-size: 15px;
  color: #f8df94;
}

.menu-section {
  margin-top: 12px;
  border: 1px solid var(--edge);
  border-radius: 7px;
  background: rgba(10, 16, 12, 0.72);
  overflow: hidden;
}

.menu-section summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  color: #f8df94;
  cursor: pointer;
  font-weight: 800;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0;
  list-style: none;
}

.menu-section summary::-webkit-details-marker {
  display: none;
}

.menu-section summary::after {
  content: "+";
  color: var(--mint);
  font-size: 16px;
}

.menu-section[open] summary::after {
  content: "-";
}

.menu-section > :not(summary) {
  margin: 0;
  padding: 0 10px 10px;
}

.icon-btn {
  width: 38px;
  padding: 0;
  font-weight: 800;
  font-size: 18px;
  line-height: 1;
}

.wallet {
  margin: 16px 0;
  padding: 12px;
  border: 1px solid var(--edge);
  border-radius: 8px;
  background: var(--panel-2);
}

.wallet strong {
  display: block;
  margin-top: 2px;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.stats-grid > div,
.inventory span,
.quest-log li {
  border: 1px solid var(--edge);
  border-radius: 7px;
  background: #171c19;
}

.stats-grid > div {
  padding: 10px;
}

.stats-grid span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.stats-grid strong {
  display: block;
  margin-top: 4px;
  font-size: 18px;
}

.actions {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
}

.actions button {
  min-width: 0;
}

.quest-log {
  display: grid;
  gap: 8px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.quest-log li {
  padding: 10px;
  color: #e9e4d5;
  font-size: 13px;
  line-height: 1.35;
}

.quest-log li.done {
  color: var(--muted);
  text-decoration: line-through;
}

.inventory {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.inventory span,
.mmo-status span {
  padding: 7px 9px;
  font-size: 13px;
}

.inventory span.equipped {
  border-color: var(--gold);
  background: #252514;
  color: #fff4c2;
}

.inventory span {
  display: grid;
  grid-template-columns: 34px 1fr;
  align-items: center;
  min-height: 42px;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.inventory span b {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(216, 169, 73, 0.32);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.24);
  color: #f8df94;
  overflow: hidden;
}

.inventory span b img {
  display: block;
  width: 24px;
  height: 24px;
  image-rendering: pixelated;
}

.inventory span.resource {
  border-color: rgba(110, 231, 183, 0.42);
  background: #102018;
}

.mmo-status {
  display: grid;
  gap: 8px;
}

.mmo-status span {
  display: block;
  border: 1px solid var(--edge);
  border-radius: 7px;
  background: #171c19;
  line-height: 1.3;
}

.controls p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
  font-size: 13px;
}

@media (max-width: 1050px) {
  .site-grid {
    grid-template-columns: minmax(320px, 1fr);
  }

  .world-showcase {
    grid-column: 1 / -1;
  }

  .hero-copy {
    grid-column: 1 / -1;
  }

  .entry-column {
    grid-column: 1 / -1;
    grid-template-columns: minmax(320px, 430px) minmax(280px, 1fr);
  }

  .site-cards,
  .lore-board {
    width: 100%;
  }

  .site-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-left: 0;
  }
}

@media (max-width: 1500px) {
  .site-cards {
    width: 100%;
  }

  .site-cards article {
    padding-left: 72px;
  }

  .feature-icon {
    left: 16px;
  }

  .site-cards h2 {
    font-size: 14px;
  }

  .site-cards p {
    font-size: 13px;
    line-height: 1.36;
  }
}

@media (max-width: 700px) {
  .toast {
    left: 12px;
    right: 12px;
    bottom: 12px;
    max-width: none;
  }

  .panel {
    width: 100vw;
  }

  .site-overlay {
    padding: 14px;
    gap: 12px;
  }

  .site-nav,
  .site-grid {
    display: block;
  }

  .site-grid {
    min-height: 0;
    margin-top: 14px;
    padding-bottom: 0;
  }

  .site-nav div {
    margin-top: 12px;
    gap: 8px;
  }

  .hero-copy h1 {
    font-size: 38px;
  }

  .hero-copy {
    min-height: 360px;
    padding: 18px 16px;
  }

  .hero-copy p {
    font-size: 17px;
  }

  .online-board,
  .economy-board {
    grid-template-columns: 1fr;
  }

  .online-board strong,
  .economy-board strong {
    font-size: 18px;
  }

  .hero-copy .multiplayer-summary {
    font-size: 14px;
  }

  .entry-column {
    display: grid;
    grid-template-columns: 1fr;
    margin-top: 18px;
  }

  .world-showcase {
    min-height: 360px;
    margin-top: 18px;
  }

  .character-card,
  .lore-board {
    grid-template-columns: 1fr;
  }

  .entry-column {
    grid-template-columns: 1fr;
  }

  .site-cards {
    display: grid;
    grid-template-columns: 1fr;
    margin-left: 0;
    margin-top: 18px;
    width: 100%;
  }

  .site-cards article {
    min-height: 132px;
  }
}

@media (max-width: 460px) {
  .site-cards {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px), (pointer: coarse) {
  body:not(.onboarding) .quickbar {
    top: 10px;
    right: 10px;
    gap: 5px;
    padding: 5px;
  }

  body:not(.onboarding) .music-volume {
    width: 64px;
  }

  body:not(.onboarding) .touch-controls {
    display: flex;
  }

  body:not(.onboarding) .toast {
    bottom: 162px;
  }

  body:not(.onboarding) .chat-panel {
    display: none;
  }
}

@media (max-width: 520px) {
  .chat-form {
    grid-template-columns: 78px 1fr;
  }

  .chat-form button {
    grid-column: 1 / -1;
  }

  .touch-controls {
    inset: auto 10px 10px 10px;
    gap: 10px;
  }

  .touch-dpad {
    grid-template-columns: repeat(3, 48px);
    grid-template-rows: repeat(3, 46px);
  }

  .touch-controls button {
    min-width: 48px;
    min-height: 46px;
    padding: 0 8px;
    font-size: 12px;
  }
}

@media (min-width: 1051px) {
  .site-cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* RPG overlay redesign: keeps the canvas/map untouched and only restyles overlay UI. */
body.onboarding #game {
  filter: none;
}

.site-overlay {
  position: absolute;
  inset: 0;
  z-index: 7;
  display: block;
  min-height: 980px;
  padding: 0;
  overflow: auto;
  background:
    linear-gradient(90deg, rgba(0, 4, 3, 0.88) 0%, rgba(0, 5, 3, 0.5) 18%, rgba(0, 0, 0, 0.08) 48%, rgba(0, 5, 3, 0.5) 78%, rgba(0, 4, 3, 0.9) 100%),
    radial-gradient(ellipse at center, rgba(0, 0, 0, 0) 0 42%, rgba(0, 0, 0, 0.34) 100%);
  color: #fff6df;
}

.site-nav {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 12;
  display: grid;
  grid-template-columns: minmax(360px, 1fr) auto;
  align-items: center;
  min-height: 92px;
  padding: 16px 32px 12px;
  border-bottom: 1px solid rgba(159, 122, 49, 0.22);
  background: linear-gradient(180deg, rgba(2, 9, 6, 0.78), rgba(2, 9, 6, 0.24));
  backdrop-filter: blur(2px);
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.brand-lockup img {
  width: 74px;
  max-height: 74px;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.58)) drop-shadow(0 0 12px rgba(78, 224, 122, 0.22));
}

.brand-lockup span {
  display: block;
  color: #fff6df;
  font-size: 22px;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-shadow: 0 2px 0 #160d04, 0 0 18px rgba(78, 224, 122, 0.24);
}

.site-nav > div {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.site-nav a,
.site-nav button,
.hero-actions button,
.weapon-choice-row button,
#saveProfileBtn {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.site-nav a {
  color: #fff6df;
  font-size: 14px;
  font-weight: 800;
  text-shadow: 0 2px 0 #0a0502;
}

.site-nav a.active,
.site-nav a:hover {
  color: #4ee07a;
}

.site-nav a.active::after {
  bottom: -10px;
  background: #4ee07a;
}

.site-nav button {
  width: auto;
  min-width: 150px;
  min-height: 40px;
  border: 1px solid #9f7a31;
  border-radius: 6px;
  background: rgba(3, 13, 8, 0.82);
  color: #fff6df;
  box-shadow: inset 0 0 0 1px rgba(255, 246, 223, 0.05), 0 0 16px rgba(0, 0, 0, 0.35);
}

.site-grid {
  display: contents;
}

.hero-copy {
  position: absolute;
  left: 48px;
  top: 130px;
  z-index: 4;
  width: 520px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.kicker,
.label {
  color: #4ee07a;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hero-copy h1 {
  max-width: 520px;
  margin: 12px 0 20px;
  color: #fff6df;
  font-size: 64px;
  line-height: 0.9;
  letter-spacing: 0;
  text-transform: uppercase;
  text-shadow: 0 5px 0 #140b03, 0 0 28px rgba(255, 246, 223, 0.12);
}

.hero-copy p:not(.kicker) {
  max-width: 510px;
  color: #fff6df;
  font-size: 18px;
  line-height: 1.34;
  text-shadow: 0 2px 10px #000;
}

.online-board,
.economy-board {
  display: grid;
  gap: 10px;
  max-width: none;
}

.online-board {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 22px;
}

.economy-board {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 10px;
}

.online-board div,
.economy-board div {
  min-height: 70px;
  border: 1px solid rgba(159, 122, 49, 0.86);
  border-radius: 7px;
  background: rgba(3, 13, 8, 0.82);
  padding: 11px 12px;
  box-shadow: inset 0 0 0 1px rgba(255, 246, 223, 0.05), 0 0 18px rgba(0, 0, 0, 0.34);
}

.online-board span,
.economy-board span {
  color: #c9c0a3;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 11px;
  font-weight: 900;
}

.online-board strong,
.economy-board strong {
  color: #4ee07a;
  font-size: 24px;
  font-weight: 900;
  text-shadow: 0 0 12px rgba(78, 224, 122, 0.28);
}

.economy-board strong {
  color: #d7b157;
  font-size: 19px;
}

.hero-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 28px;
}

.hero-actions button,
#saveProfileBtn {
  min-height: 54px;
  border-radius: 7px;
  font-weight: 900;
  box-shadow: inset 0 1px rgba(255,255,255,0.12), inset 0 -3px rgba(0,0,0,0.38), 0 0 18px rgba(0, 0, 0, 0.34);
}

.primary-cta {
  border-color: #4ee07a;
  background: linear-gradient(180deg, #1f8b47, #0e5b2d);
  color: #fff6df;
}

.ghost-cta,
#saveProfileBtn {
  border-color: #9f7a31;
  background: linear-gradient(180deg, rgba(30, 24, 12, 0.94), rgba(7, 9, 6, 0.96));
  color: #fff6df;
}

.entry-column {
  position: absolute;
  right: 32px;
  top: 115px;
  z-index: 5;
  display: grid;
  gap: 14px;
  width: 380px;
}

.entry-panel,
.news-panel,
.site-cards article,
.lore-board article {
  border: 1px solid #9f7a31;
  border-radius: 12px;
  background: rgba(3, 13, 8, 0.82);
  box-shadow: inset 0 0 0 1px rgba(255, 246, 223, 0.06), 0 0 0 2px rgba(0,0,0,0.42), 0 20px 55px rgba(0, 0, 0, 0.42), 0 0 18px rgba(78, 224, 122, 0.08);
}

.entry-panel::before,
.news-panel::before,
.site-cards article::before,
.lore-board article::before {
  inset: 6px;
  border-color: rgba(159, 122, 49, 0.26);
  border-radius: 8px;
}

.entry-panel {
  padding: 18px;
}

.profile-head {
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(159, 122, 49, 0.38);
}

.profile-head strong {
  color: #4ee07a;
  font-size: 17px;
}

.profile-head > span {
  color: #8eeaa8;
  font-size: 13px;
}

.profile-meters {
  gap: 7px;
  margin: 13px 0;
}

.profile-meters span,
.loadout-grid span {
  border-color: rgba(159, 122, 49, 0.55);
  background: rgba(1, 7, 4, 0.72);
  color: #fff6df;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  font-weight: 800;
}

.character-card {
  grid-template-columns: 120px 1fr;
  gap: 14px;
  border-color: rgba(159, 122, 49, 0.75);
  border-radius: 10px;
  background: rgba(2, 9, 6, 0.7);
  padding: 14px;
  box-shadow: inset 0 0 0 1px rgba(78, 224, 122, 0.08);
}

.profile-hero-canvas {
  width: 112px;
  height: 154px;
  border-color: rgba(78, 224, 122, 0.52);
  border-radius: 7px;
}

.character-card .label {
  color: #4ee07a;
  text-align: left;
}

.character-card p,
.news-panel p,
.site-cards p,
.lore-board p {
  color: #c9c0a3;
}

.profile-form {
  gap: 10px;
  margin-top: 13px;
}

.profile-form label {
  color: #d9c27e;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 13px;
  font-weight: 700;
}

input,
select {
  border-color: rgba(159, 122, 49, 0.7);
  border-radius: 7px;
  background: rgba(1, 7, 4, 0.84);
  color: #fff6df;
}

input[type="color"] {
  padding: 4px;
}

.weapon-choice-row button {
  min-height: 40px;
  border-color: rgba(159, 122, 49, 0.72);
  border-radius: 7px;
  background: rgba(1, 7, 4, 0.84);
  color: #fff6df;
  font-weight: 900;
}

.weapon-choice-row button.active {
  border-color: #4ee07a;
  background: linear-gradient(180deg, #168642, #0b5429);
}

.news-panel {
  padding: 16px;
}

.news-panel > div {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
}

.news-panel article {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 12px;
  align-items: center;
  min-height: 74px;
  margin-top: 12px;
}

.news-panel article span {
  width: 70px;
  height: 56px;
  border: 1px solid rgba(159, 122, 49, 0.62);
  border-radius: 6px;
  background: radial-gradient(circle at 42% 35%, rgba(78,224,122,0.45), transparent 8%), linear-gradient(135deg, rgba(19,63,31,0.82), rgba(16,12,10,0.88));
}

.news-panel article:nth-of-type(2) span {
  background: radial-gradient(circle at 60% 38%, rgba(216,169,73,0.46), transparent 9%), linear-gradient(135deg, rgba(63,42,24,0.82), rgba(16,12,10,0.88));
}

.news-panel strong {
  display: block;
  color: #fff6df;
  font-size: 18px;
  line-height: 1.1;
}

.site-cards {
  position: absolute;
  left: 32px;
  right: 430px;
  bottom: 210px;
  z-index: 4;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  width: auto;
  max-width: none;
  padding: 0;
  border: 0;
}

.site-cards article {
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr);
  column-gap: 16px;
  align-items: center;
  min-height: 128px;
  padding: 14px;
  overflow: hidden;
}

.site-cards h2 {
  grid-column: 2;
  color: #d9b45d;
  font-size: 14px;
  margin-bottom: 5px;
}

.site-cards p {
  grid-column: 2;
  font-size: 12px;
  line-height: 1.28;
}

.feature-icon {
  position: static;
  grid-column: 1;
  grid-row: 1 / span 3;
  width: 100px;
  height: 100px;
  border: 0;
  border-radius: 0;
  background-color: transparent;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  image-rendering: pixelated;
  box-shadow: 0 0 18px rgba(78, 224, 122, 0.16);
}

.site-cards .feature-icon::before,
.site-cards .feature-icon::after {
  display: none;
}

.combat-icon {
  background-image: url("assets/site-icons/combat.png");
}

.rewards-icon {
  background-image: url("assets/site-icons/rewards.png");
}

.world-icon {
  background-image: url("assets/site-icons/world.png");
}

.lore-icon {
  background-image: url("assets/site-icons/lore.png");
}

.market-icon {
  background-image: url("assets/site-icons/marketplace.png");
}

.multiplayer-icon {
  background-image: url("assets/site-icons/multiplayer.png");
}

.card-link {
  grid-column: 2;
  margin-top: 5px;
  font-size: 10px;
}

.lore-board {
  position: absolute;
  left: 32px;
  right: 430px;
  bottom: 32px;
  z-index: 4;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  width: auto;
}

.lore-board article {
  min-height: 138px;
  padding: 18px;
}

.lore-board h2 {
  color: #d9b45d;
  font-size: 19px;
  line-height: 1.1;
}

.lore-board p {
  font-size: 14px;
  line-height: 1.38;
}

@media (max-width: 1280px), (max-height: 900px) {
  .site-overlay {
    display: block;
    min-height: 0;
    padding: 112px 22px 32px;
  }

  .site-nav {
    position: fixed;
  }

  .hero-copy,
  .entry-column,
  .site-cards,
  .lore-board {
    position: static;
    width: auto;
    margin: 0;
  }

  .hero-copy {
    max-width: 620px;
  }

  .entry-column {
    max-width: 430px;
    margin-top: 24px;
  }

  .site-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 26px;
  }

  .lore-board {
    grid-template-columns: 1fr;
    margin-top: 18px;
  }
}

@media (max-width: 760px) {
  .site-overlay {
    padding: 104px 14px 28px;
  }

  .site-nav {
    grid-template-columns: 1fr;
    gap: 8px;
    min-height: 88px;
    padding: 10px 14px;
  }

  .brand-lockup img {
    width: 54px;
  }

  .brand-lockup span {
    font-size: 16px;
  }

  .site-nav > div {
    justify-content: flex-start;
  }

  .hero-copy h1 {
    font-size: 42px;
  }

  .hero-copy p:not(.kicker) {
    font-size: 16px;
  }

  .online-board,
  .economy-board,
  .hero-actions,
  .site-cards,
  .lore-board {
    grid-template-columns: 1fr;
  }

  .site-cards article {
    grid-template-columns: 82px minmax(0, 1fr);
    min-height: 110px;
    column-gap: 12px;
  }

  .feature-icon {
    width: 82px;
    height: 82px;
  }

  .entry-column {
    max-width: none;
  }

  .character-card {
    grid-template-columns: 1fr;
  }
}

/* Final landing layout override: keep the map fixed, make all onboarding panels flow and scroll. */
body.onboarding .site-overlay {
  display: grid;
  grid-template-columns: minmax(420px, 1fr) minmax(340px, 380px);
  grid-template-rows: auto auto auto auto;
  column-gap: 24px;
  row-gap: 16px;
  align-items: start;
}

.site-overlay {
  min-height: 100%;
  padding: 0 32px 56px;
  overflow-y: auto;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

.site-nav {
  position: sticky;
  top: 0;
  min-height: 86px;
  margin: 0 -32px;
  padding: 14px 32px 10px;
  grid-column: 1 / -1;
}

.site-grid {
  display: contents;
}

.hero-copy,
.entry-column,
.site-cards,
.lore-board {
  position: static;
  inset: auto;
  width: auto;
  max-width: none;
  margin: 0;
}

.hero-copy {
  grid-column: 1;
  grid-row: 2;
  max-width: 620px;
  padding: 0;
}

.hero-copy h1 {
  font-size: clamp(48px, 5vw, 72px);
}

.entry-column {
  grid-column: 2;
  grid-row: 2 / span 3;
  justify-self: end;
  width: min(380px, 100%);
}

.site-cards {
  grid-column: 1;
  grid-row: 3;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
  padding: 0;
  border: 0;
}

.site-cards article {
  min-height: 104px;
}

.site-cards article,
.lore-board article {
  scroll-margin-top: 112px;
}

.lore-board {
  grid-column: 1;
  grid-row: 4;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
}

@media (max-width: 1180px) {
  body.onboarding .site-overlay {
    grid-template-columns: 1fr;
  }

  .entry-column,
  .hero-copy,
  .site-cards,
  .lore-board {
    grid-column: 1;
    grid-row: auto;
  }

  .entry-column,
  .hero-copy {
    justify-self: start;
    width: min(620px, 100%);
  }

  .site-cards,
  .lore-board {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .site-overlay {
    padding: 0 14px 36px;
  }

  .site-nav {
    margin: 0 -14px;
    padding: 10px 14px;
  }

  body.onboarding .quickbar {
    top: 94px;
    right: 14px;
  }

  .site-grid {
    margin-top: 18px;
  }

  .hero-copy h1 {
    font-size: 42px;
  }

  .online-board,
  .hero-actions,
  .site-cards,
  .lore-board {
    grid-template-columns: 1fr;
  }
}
