/* ---------- Title ---------- */
.screen--title {
  background:
    radial-gradient(ellipse at 50% 40%, rgba(217, 164, 65, .14), transparent 55%),
    radial-gradient(ellipse at center, transparent 40%, rgba(0, 0, 0, .7));
}
.title-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 36px;
  text-align: center;
}
.game-title {
  font-size: clamp(2.4rem, 8vw, 5.5rem);
  line-height: 1.05;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--gold-bright);
  text-shadow: 0 2px 0 var(--gold-dark), 0 0 40px rgba(217, 164, 65, .45);
}
.game-title::after {
  content: "";
  display: block;
  width: min(60%, 360px);
  height: 2px;
  margin: 20px auto 0;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

/* ---------- Character creation ---------- */
.creation { width: min(100%, 460px); max-height: 100%; overflow-y: auto; }
.creation__preview {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}
.creation__preview img {
  width: 100px;
  height: 100px;
  image-rendering: pixelated;
  background: radial-gradient(circle, var(--bg-raised), var(--bg-inset));
  border: 2px solid var(--border-gold);
  border-radius: var(--radius-lg);
  box-shadow: inset 0 0 14px rgba(0, 0, 0, .7);
}
.creation .btn { width: 100%; margin-top: 4px; }

/* ---------- Game ---------- */
.screen--game {
  align-items: stretch;
  justify-content: stretch;
  padding: 0;
  overflow: hidden;
}
.game-layout {
  flex: 1;
  display: flex;
  gap: 24px;
  min-height: 0;
  padding: 2.5vh 24px;
}

/* The canvas is sized to this box by js/game/session.js */
.canvas-wrap {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.canvas-frame {
  position: relative;
  line-height: 0;
  border-radius: 2px;
  box-shadow: 0 0 0 2px var(--border), 0 0 0 4px var(--bg-void), 0 10px 40px rgba(0, 0, 0, .7);
}
.canvas-frame canvas { display: block; }

/* HUD */
.hud {
  flex: 0 0 clamp(240px, 24vw, 320px);
  align-self: flex-start;
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-height: 100%;
  padding: 16px;
  overflow-y: auto;
}
.hud__header { display: flex; flex-direction: column; gap: 8px; }
.hud__name {
  font-size: 1.1rem;
  color: var(--gold-bright);
  overflow-wrap: anywhere;
}
.hud__stat { display: flex; flex-direction: column; gap: 4px; }
.hud__label {
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.moves { display: flex; flex-direction: column; gap: 8px; padding-top: 12px; border-top: 1px solid var(--border-dim); }
.move-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px 10px;
  background: var(--bg-inset);
  border: 1px solid var(--border-dim);
  border-left-width: 3px;
  border-radius: var(--radius);
  color: var(--text-dim);
}
.move-card__top { display: flex; justify-content: space-between; gap: 8px; font-size: .85rem; }
.move-card__name { font-weight: 600; }
.move-card__meta { font-size: .75rem; white-space: nowrap; }
.move-card.is-current {
  color: var(--text);
  border-color: var(--border-gold);
  border-left-color: var(--gold-bright);
  background: linear-gradient(90deg, rgba(217, 164, 65, .14), var(--bg-inset));
}
.move-card.is-current .move-card__name { color: var(--gold-bright); }

/* ---------- NPC screens ---------- */
.npc {
  width: min(100%, 520px);
  max-height: 100%;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}
.npc--wide { width: min(100%, 820px); }
.npc__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border-dim);
}
.npc__footer--end { justify-content: flex-end; }

/* Upgrader */
.upgrade-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.upgrade-card {
  padding: 12px 14px;
  background: var(--bg-inset);
  border: 1px solid var(--border-dim);
  border-radius: var(--radius);
}
.upgrade-card__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-dim);
}
.upgrade-card__name { font-size: 1.05rem; color: var(--gold-bright); }
.upgrade-card__points { font-size: .8rem; color: var(--text-dim); }
.upgrade-card__list { margin: 0; padding: 0; list-style: none; }

/* Banker */
.bank-balances { display: flex; justify-content: space-around; margin-bottom: 18px; }
.bank-actions { display: flex; flex-direction: column; gap: 10px; }
.bank-actions__row { display: flex; gap: 10px; }
.bank-actions__row .btn { flex: 1; }

/* ---------- Death ---------- */
.screen--death {
  background:
    radial-gradient(ellipse at center, rgba(120, 12, 8, .35), transparent 65%),
    var(--bg-void);
}
.death-card { display: flex; flex-direction: column; align-items: center; gap: 20px; text-align: center; }
.death-title {
  font-size: clamp(2.5rem, 9vw, 6rem);
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--danger);
  text-shadow: 0 0 40px rgba(192, 57, 43, .6);
}
.death-timer {
  min-height: 1.2em;
  margin: 0;
  font-family: var(--font-display);
  font-size: 3rem;
  color: var(--text-dim);
}

/* ---------- Title: connection note ---------- */
.connection-note { margin: -12px 0 0; max-width: 32ch; color: var(--text-dim); }

/* ---------- Disconnected ---------- */
.notice-card { display: flex; flex-direction: column; align-items: center; gap: 20px; text-align: center; }
.notice-title { font-size: clamp(2rem, 7vw, 4rem); letter-spacing: .1em; text-transform: uppercase; color: var(--gold-bright); }
.notice-text { margin: 0; max-width: 36ch; color: var(--text-dim); }
