.rpg-panel {
  background: var(--c-panel);
  border: 4px solid var(--c-ink);
  box-shadow: 6px 6px 0 var(--c-chrome-2);
  padding: 16px;
  margin-bottom: 16px;
}

.rpg-dialog {
  background: var(--c-chrome-2);
  color: #fff;
  border: 4px solid #fff;
  padding: 12px 16px;
  margin: 8px;
}
.rpg-dialog--danger { border-color: var(--c-danger); }

.rpg-button {
  font-family: var(--font-title);
  font-size: 12px;
  background: var(--c-gold);
  color: var(--c-ink);
  border: 3px solid var(--c-ink);
  padding: 12px 16px;
  cursor: pointer;
  box-shadow: 3px 3px 0 var(--c-ink);
}
.rpg-button:active { transform: translate(3px, 3px); box-shadow: none; }
.rpg-button, input, select, textarea { min-height: 44px; } /* touch targets ≥ 44px */
.rpg-button--danger { background: var(--c-danger); color: #fff; }
.rpg-button--success { background: var(--c-success); color: #fff; }
.rpg-button--ghost { background: transparent; color: var(--c-panel); border-color: var(--c-panel); box-shadow: none; }

.hud-balance {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  font-family: var(--font-title);
  font-size: 14px;
  background: var(--c-ink);
  color: var(--c-gold);
  padding: 8px 12px;
}

.quest-card { display: flex; justify-content: space-between; align-items: center; gap: 12px; }

/* ── Avatar plate modifiers ── */
.avatar-plate--small { width: 28px; height: 28px; }
.avatar-plate--large { width: 64px; height: 64px; }

/* ── Avatar picker (form) ── */
.sprite-grid, .plate-grid { display: flex; flex-wrap: wrap; gap: 10px; margin: 8px 0 16px; }
.sprite-choice, .plate-choice { border: 3px solid var(--c-ink); background: var(--c-panel);
  width: 56px; height: 56px; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.sprite-choice input, .plate-choice input { position: absolute; opacity: 0; pointer-events: none; }
.sprite-choice .avatar-sprite { width: 40px; height: 40px; }
.plate-choice { background: var(--plate, #5a3f8f); }
.sprite-choice.is-picked, .plate-choice.is-picked,
.sprite-choice:has(input:checked), .plate-choice:has(input:checked) {
  outline: 4px solid var(--c-gold); outline-offset: -1px; }

/* ── Pending nudge ── */
.nudge-card { display: flex; align-items: center; gap: 10px; text-decoration: none; }

/* ── Party page ── */
.recruit-card { display: block; text-align: center; text-decoration: none;
  font-family: var(--font-title); font-size: 13px; color: var(--c-ink); padding: 20px 12px; }
.party-card { display: flex; align-items: center; gap: 12px; }
.party-card__body { flex: 1; }
.party-card__actions { display: flex; flex-direction: column; gap: 6px; }
.party-card .rpg-button--ghost { color: var(--c-ink); border-color: var(--c-ink); }

/* ── Title screen (sign-in page) ── */
.title-screen {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 24px 16px;
  box-sizing: border-box;
}

.title-screen__panel {
  width: 100%;
  max-width: 360px;
  box-sizing: border-box;
  margin-bottom: 0;
}

.title-screen__submit {
  width: 100%;
  display: block;
  box-sizing: border-box;
  text-align: center;
  margin-top: 8px;
}

.welcome-heading {
  font-family: var(--font-title);
  font-size: 14px;
  margin: 0 0 12px;
}

.welcome-email {
  font-family: var(--font-body);
  font-size: 16px;
  margin: 0 0 8px;
  word-break: break-all;
}

.welcome-note {
  font-family: var(--font-body);
  font-size: 13px;
  opacity: 0.7;
  margin: 0;
}

@media (min-width: 768px) {
  .title-screen__panel {
    max-width: 420px;
  }
}

/* ── End title screen ── */

.chip { display: inline-block; border: 2px solid var(--c-ink); background: var(--c-chrome-2);
  color: var(--c-panel); font-size: 11px; padding: 2px 8px; margin-right: 6px; }
.chip--gold { background: var(--c-gold); color: var(--c-ink); }
.ribbon { display: inline-block; font-family: var(--font-title); font-size: 9px; background: var(--c-danger); color: #fff;
  border: 2px solid var(--c-ink); padding: 4px 6px; transform: rotate(3deg); }
.sparkle { animation: sparkle .45s steps(4) both; }
@keyframes sparkle { 0% { filter: brightness(1); } 50% { filter: brightness(1.8) saturate(1.5); transform: scale(1.02); } 100% { filter: brightness(1); transform: scale(1); } }

form div { margin-bottom: 12px; }
label { display: block; font-weight: 700; margin-bottom: 4px; }
input[type="text"], input[type="email"], input[type="password"], input[type="number"], select, textarea {
  font-family: var(--font-body);
  font-size: 18px;
  border: 3px solid var(--c-ink);
  padding: 8px;
  width: 100%;
  box-sizing: border-box;
}

.form-errors ul { margin: 6px 0 0; padding-left: 18px; }
.form-errors li { font-family: var(--font-body); }

/* ── Empty states ── */
.empty-state { text-align: center; padding: 28px 16px; }
.empty-state svg { width: 96px; height: 96px; image-rendering: pixelated; margin-bottom: 10px; }

.quest-card h2 a { color: inherit; }

.ledger-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.quest-show__header { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.quest-show__instructions {
  font-family: var(--font-body);
  border: 3px solid var(--c-ink);
  padding: 12px;
  margin-bottom: 16px;
}
.quest-show__instructions--empty { opacity: 0.7; font-style: italic; }

/* ── Raid card (approvals team raid) ── */
.raid-raider { flex-wrap: wrap; margin-top: 12px; }
.raid-card .rpg-button--success { margin-top: 16px; }
