:root {
  --parchment: #f1e4c4;
  --ink: #2b1d10;
  --forest: #1f3d2b;
  --gold: #c9972d;
  --danger: #7a1e1e;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, #14261a, #0b1710);
  color: var(--parchment);
  font-family: Georgia, 'Times New Roman', serif;
  -webkit-tap-highlight-color: transparent;
}

.app {
  max-width: 480px;
  margin: 0 auto;
  padding: 16px;
  min-height: 100vh;
}

.card {
  background: var(--parchment);
  color: var(--ink);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: 0 6px 18px rgba(0,0,0,.4);
  border: 2px solid #7a5a2e;
}

h1, h2, h3 { margin-top: 0; }

button {
  font-family: inherit;
  font-size: 1.1rem;
  padding: 14px 20px;
  border-radius: 10px;
  border: none;
  background: var(--gold);
  color: #241a08;
  font-weight: bold;
  width: 100%;
  margin-top: 10px;
  cursor: pointer;
}

button:active { transform: scale(0.98); }
button.secondary { background: transparent; border: 2px solid var(--gold); color: var(--gold); }

input[type=text] {
  width: 100%;
  font-size: 1.2rem;
  padding: 12px;
  border-radius: 8px;
  border: 2px solid #7a5a2e;
  margin-top: 8px;
}

.fragment {
  background: #fffbe9;
  border-left: 4px solid var(--forest);
  padding: 10px 12px;
  margin: 8px 0;
  border-radius: 4px;
  font-style: italic;
}

.roster { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.chip { padding: 6px 10px; border-radius: 999px; background: #e7d5a4; font-size: .9rem; }
.chip.online::before { content: '● '; color: var(--forest); }
.chip.offline::before { content: '● '; color: var(--danger); }

.rune-satchel { display: flex; gap: 6px; margin: 10px 0; font-size: 1.4rem; letter-spacing: .2em; }
.rune { width: 34px; height: 34px; display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--forest); border-radius: 6px; background: #fff; }
.rune.empty { opacity: .25; }

.banner { text-align: center; padding: 10px; border-radius: 8px; margin-bottom: 10px; font-weight: bold; }
.banner.ok { background: #cfead0; color: #1f3d2b; }
.banner.err { background: #f0c9c9; color: var(--danger); }

#gate {
  position: fixed; inset: 0; background: rgba(0,0,0,.75); display: flex;
  align-items: center; justify-content: center; z-index: 10; padding: 24px; text-align: center;
}
