.rune-account.is-authenticated {
  display: grid !important;
  width: 42px;
  min-width: 42px;
  height: 42px;
  min-height: 42px;
  padding: 0;
  place-items: center;
  overflow: hidden;
  border: 2px solid rgba(239, 202, 98, .86);
  border-radius: 50%;
  color: #10281f;
  background: #d5b65d;
  box-shadow: 0 7px 22px rgba(0, 0, 0, .4), 0 0 0 2px rgba(7, 22, 18, .72);
}

.rune-account.is-authenticated img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rune-account.is-authenticated > span {
  font: 900 12px/1 Inter, Arial, sans-serif;
  letter-spacing: .04em;
}

.account-overlay[hidden] { display: none; }

.account-overlay {
  position: fixed;
  z-index: 108;
  inset: 0;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 78px 20px 20px;
  overflow: auto;
  background: rgba(1, 6, 5, .58);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  font-family: Inter, Arial, sans-serif;
}

.account-panel-open { overflow: hidden; }

.account-panel {
  position: relative;
  width: min(430px, 100%);
  padding: 28px;
  color: #f3ead4;
  border: 1px solid rgba(231, 193, 93, .76);
  border-radius: 22px;
  background:
    radial-gradient(circle at 95% 0%, rgba(191, 145, 43, .16), transparent 36%),
    rgba(6, 24, 19, .97);
  box-shadow: 0 28px 80px rgba(0, 0, 0, .64), inset 0 1px 0 rgba(255, 255, 255, .06);
}

.account-close {
  position: absolute;
  top: 13px;
  right: 14px;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(224, 190, 96, .56);
  border-radius: 50%;
  color: #f7e8bd;
  background: rgba(3, 12, 10, .7);
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
}

.account-heading {
  display: flex;
  align-items: center;
  gap: 15px;
  padding-right: 34px;
}

.account-large-avatar {
  display: grid;
  width: 68px;
  height: 68px;
  flex: 0 0 68px;
  place-items: center;
  overflow: hidden;
  border: 2px solid #e0bb56;
  border-radius: 50%;
  color: #17342a;
  background: #d7b65b;
  font-weight: 900;
}

.account-large-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.account-heading p {
  margin: 0 0 4px;
  color: #c7bfae;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .1em;
}

.account-heading h2 {
  margin: 0;
  color: #ffe18b;
  font: 800 28px/1.1 Georgia, serif;
}

.account-form { margin-top: 24px; }

.account-form > label {
  display: grid;
  gap: 7px;
}

.account-form > label > span,
.account-location-fields span,
.account-data-grid span {
  color: #bdb5a4;
  font-size: 10px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: .09em;
}

.account-form input {
  width: 100%;
  min-height: 43px;
  box-sizing: border-box;
  padding: 0 12px;
  border: 1px solid rgba(215, 180, 86, .45);
  border-radius: 10px;
  color: #fff4d8;
  background: rgba(255, 255, 255, .055);
  font: 700 14px/1 Inter, Arial, sans-serif;
}

.account-form input:focus {
  border-color: #edc85e;
  outline: 3px solid rgba(237, 200, 94, .18);
}

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

.account-location-fields label {
  display: grid;
  gap: 7px;
}

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

.account-data-grid > div {
  display: grid;
  min-height: 67px;
  padding: 10px 11px;
  align-content: center;
  gap: 5px;
  overflow-wrap: anywhere;
  border: 1px solid rgba(210, 177, 88, .18);
  border-radius: 10px;
  background: rgba(255, 255, 255, .035);
}

.account-data-grid strong { color: #f2e8d1; font-size: 12px; }
.account-data-grid small { color: #d6a789; font-size: 10px; }
.account-data-grid small.is-verified { color: #83d4a7; }
.account-runes { color: #f1cf65 !important; font-size: 16px !important; }
.account-runes i { font-style: normal; }

.account-status {
  min-height: 18px;
  margin: 12px 0 5px;
  color: #d6c8a5;
  font-size: 11px;
}

.account-save,
.account-actions button {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid rgba(225, 188, 91, .65);
  border-radius: 9px;
  cursor: pointer;
  font-weight: 850;
}

.account-save {
  width: 100%;
  color: #132b22;
  background: linear-gradient(135deg, #f6d878, #b98a31);
}

.account-actions {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid rgba(224, 190, 96, .18);
}

.account-actions button {
  color: #e8ddc5;
  background: transparent;
}

.account-actions .account-delete {
  color: #ffc8bd;
  border-color: rgba(207, 89, 69, .62);
}

.combat-attack-row input[role="combobox"] {
  background-image: none;
}

/* Align Weapon with resource card 1. Attack + Damage share the width of
   resource card 2, giving both calculated fields approximately twice their
   previous usable width. */
.combat-attack-head,
.combat-attack-row {
  grid-template-columns: calc(50% - 6px) minmax(0, 108fr) minmax(0, 88fr) !important;
  gap: 12px !important;
}

.combat-attack-row > input {
  width: 100%;
  min-width: 0;
}

.weapon-suggestions {
  position: fixed;
  z-index: 10020;
  max-height: min(280px, 40vh);
  overflow-x: hidden;
  overflow-y: auto;
  padding: 6px;
  border: 1px solid rgba(225, 188, 91, .48);
  border-radius: 10px;
  background: rgba(9, 20, 16, .88);
  box-shadow: 0 16px 36px rgba(0, 0, 0, .42), 0 0 0 1px rgba(255, 223, 128, .07) inset;
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
  scrollbar-width: thin;
  scrollbar-color: rgba(225, 188, 91, .55) transparent;
}

.weapon-suggestions[hidden] {
  display: none !important;
}

.weapon-suggestion {
  display: block;
  width: 100%;
  min-height: 34px;
  padding: 7px 10px;
  border: 0;
  border-radius: 7px;
  color: #f2ead8;
  background: transparent;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
  text-align: left;
  cursor: pointer;
}

.weapon-suggestion:hover,
.weapon-suggestion.is-highlighted {
  color: #231907;
  background: linear-gradient(135deg, #f6d878, #c99a3d);
}

.weapon-suggestion:focus-visible {
  outline: 2px solid #ffe38a;
  outline-offset: -2px;
}

@media (max-width: 1160px) {
  .rune-account { display: block !important; }
  .rune-account.is-authenticated { display: grid !important; }
  .account-overlay { align-items: flex-end; padding: 16px; }
}

@media (max-width: 520px) {
  .account-overlay { padding: 8px; }
  .account-panel { padding: 23px 17px 18px; border-radius: 18px; }
  .account-location-fields { grid-template-columns: 1fr; }
  .account-data-grid { grid-template-columns: 1fr; }
  .account-actions { flex-direction: column; }
  .account-actions button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .account-overlay { backdrop-filter: none; -webkit-backdrop-filter: none; }
  .weapon-suggestions { backdrop-filter: none; -webkit-backdrop-filter: none; }
}
