/* ---------- Panel ---------- */
.panel {
  padding: 24px;
  background: linear-gradient(180deg, var(--bg-raised), var(--bg-panel));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow:
    inset 0 0 0 2px var(--bg-void),
    inset 0 0 0 3px var(--border-dim),
    var(--shadow-panel);
}

.panel__title {
  margin-bottom: 18px;
  text-align: center;
  font-size: 1.6rem;
  color: var(--gold-bright);
  text-shadow: 0 0 18px rgba(217, 164, 65, .35);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  font-family: var(--font-display);
  font-size: .95rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--gold-bright);
  background: linear-gradient(180deg, #3a2a18, #241a10);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 2px 6px rgba(0, 0, 0, .5);
  cursor: pointer;
  transition: filter .12s, transform .05s, border-color .12s;
}
.btn:hover:not(:disabled) { filter: brightness(1.25); border-color: var(--gold); }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.btn:disabled { opacity: .4; cursor: not-allowed; }

.btn--primary {
  color: #1a1108;
  background: linear-gradient(180deg, var(--gold-bright), var(--gold) 55%, var(--gold-dark));
  border-color: var(--gold-bright);
  text-shadow: 0 1px 0 rgba(255, 255, 255, .25);
}
.btn--lg { padding: 14px 36px; font-size: 1.15rem; }
.btn--sm { padding: 6px 14px; font-size: .8rem; }

/* ---------- Form fields ---------- */
.field {
  display: block;
  margin: 0 0 16px;
  padding: 0;
  border: 0;
}
.field__label {
  display: block;
  padding: 0;
  margin-bottom: 6px;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.input {
  width: 100%;
  padding: 10px 12px;
  font: inherit;
  color: var(--text);
  background: var(--bg-inset);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, .6);
}
.input::placeholder { color: var(--text-faint); }
.input:focus { outline: none; border-color: var(--gold); box-shadow: inset 0 2px 6px rgba(0, 0, 0, .6), 0 0 0 2px rgba(217, 164, 65, .35); }

/* Radio "choices" (swatches, class cards) hide the real input but keep it focusable */
.choice { position: relative; display: block; }
.choice__input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.swatch {
  display: block;
  width: 32px;
  height: 32px;
  background: var(--swatch);
  border: 2px solid var(--border);
  border-radius: 50%;
  box-shadow: inset 0 -4px 6px rgba(0, 0, 0, .35);
  cursor: pointer;
  transition: transform .1s;
}
.swatch:hover { transform: scale(1.1); }
.choice__input:checked + .swatch { border-color: var(--gold-bright); box-shadow: 0 0 0 2px var(--bg-void), 0 0 0 4px var(--gold-bright); }
.choice__input:focus-visible + .swatch { box-shadow: var(--focus-ring); }

.class-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; }
.class-card {
  display: block;
  padding: 10px 8px;
  text-align: center;
  font-family: var(--font-display);
  font-size: .9rem;
  color: var(--text-dim);
  background: var(--bg-inset);
  border: 1px solid var(--border-dim);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color .12s, color .12s, background .12s;
}
.class-card:hover { border-color: var(--border); color: var(--text); }
.choice__input:checked + .class-card {
  color: var(--gold-bright);
  background: linear-gradient(180deg, #3a2a18, #241a10);
  border-color: var(--gold);
  box-shadow: inset 0 0 12px rgba(217, 164, 65, .18);
}
.choice__input:focus-visible + .class-card { box-shadow: var(--focus-ring); }

/* ---------- Meters (health / mana / xp bars) ---------- */
.meter {
  position: relative;
  height: 20px;
  overflow: hidden;
  background: var(--bg-inset);
  border: 1px solid var(--border-dim);
  border-radius: 4px;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, .7);
}
.meter--thin { height: 14px; }
.meter__fill {
  height: 100%;
  width: 0;
  transition: width .15s linear;
}
.meter__text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .03em;
  text-shadow: 0 1px 2px #000, 0 0 3px #000;
  white-space: nowrap;
}
.meter--thin .meter__text { font-size: .62rem; }
.meter--health .meter__fill { background: linear-gradient(180deg, var(--hp-light), var(--hp-dark)); }
.meter--mana .meter__fill { background: linear-gradient(180deg, var(--mana-light), var(--mana-dark)); }
.meter--xp .meter__fill,
.meter--move .meter__fill { background: linear-gradient(180deg, var(--xp-light), var(--xp-dark)); }

/* ---------- Gold ---------- */
.gold {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.gold::before {
  content: "";
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff0b0, var(--gold) 55%, var(--gold-dark));
  box-shadow: 0 0 6px rgba(217, 164, 65, .6);
}
.gold__amount {
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: .02em;
  color: var(--gold-bright);
}

/* ---------- Shop / upgrade rows ---------- */
.shop-list { margin: 0; padding: 0; list-style: none; }
.shop-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 4px;
  border-bottom: 1px dashed var(--border-dim);
}
.shop-row:last-child { border-bottom: 0; }
.shop-row__name { flex: 1; font-family: var(--font-display); font-weight: 500; }
.shop-row__value { min-width: 3ch; text-align: right; font-weight: 700; color: var(--gold-bright); }
.shop-row__cost { min-width: 8ch; text-align: right; font-size: .85rem; color: var(--text-dim); }

/* ---------- Floating buttons ---------- */
.fullscreen-btn {
  position: fixed;
  top: 12px;
  right: 12px;
  z-index: 50;
  padding: 8px 14px;
  font-family: var(--font-display);
  font-size: .8rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--gold-bright);
  background: rgba(11, 8, 7, .85);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius);
  cursor: pointer;
}
.fullscreen-btn:hover { background: var(--bg-raised); }

/* ---------- In-game prompt ("Press 't' to travel") ---------- */
.prompt {
  position: absolute;
  left: 50%;
  bottom: 10px;
  max-width: 90%;
  margin: 0;
  padding: 6px 16px;
  transform: translateX(-50%);
  font-family: var(--font-display);
  font-size: 1rem;
  line-height: 1.3;
  white-space: nowrap;
  color: var(--text);
  background: rgba(11, 8, 7, .82);
  border: 1px solid var(--border-gold);
  border-radius: 999px;
  pointer-events: none;
}

/* ---------- Invite (copy link) ---------- */
.invite { display: flex; flex-direction: column; gap: 6px; }
.invite__status { margin: 0; min-height: 1em; font-size: .75rem; color: var(--text-dim); }

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 60;
  padding: 10px 20px;
  transform: translateX(-50%);
  font-family: var(--font-display);
  color: var(--gold-bright);
  background: rgba(11, 8, 7, .92);
  border: 1px solid var(--border-gold);
  border-radius: 999px;
  box-shadow: var(--shadow-panel);
  pointer-events: none;
}
