/* The Bestiary and the other pages.
   Linked from index.html in a fixed order (the order is the cascade). */

#armory,
#bestiary,
#admin,
#contact,
#credits,
#lobbies,
#login,
#picker,
#players,
#privacy,
#profile,
#recovery,
#settings-dialog,
#social,
#terms {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(5, 6, 10, 0.88);
}

#armory[hidden],
#bestiary[hidden],
#admin[hidden],
#contact[hidden],
#credits[hidden],
#lobbies[hidden],
#login[hidden],
#picker[hidden],
#players[hidden],
#privacy[hidden],
#profile[hidden],
#recovery[hidden],
#settings-dialog[hidden],
#social[hidden],
#terms[hidden] {
  display: none;
}

.bestiary-panel {
  display: flex;
  flex-direction: column;
  width: 1000px;
  max-width: 100%;
  max-height: calc(100vh - 32px);
  box-sizing: border-box;
  /* Solid, so the start screen doesn't show through. */
  background: #10131a;
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

.bestiary-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 22px 24px 12px;
}

.bestiary-header .controls-title {
  margin-bottom: 4px;
}

.bestiary-note {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

.bestiary-close {
  flex: none;
  width: 36px;
  height: 36px;
  font-size: 16px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
}

.bestiary-close:hover {
  background: rgba(255, 255, 255, 0.12);
}

.bestiary-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 8px 24px 24px;
  overflow-y: auto;
}

@media (max-width: 760px) {
  .bestiary-list {
    grid-template-columns: 1fr;
    padding: 8px 14px 18px;
  }
}

.bestiary-card {
  display: flex;
  gap: 14px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
}

.bestiary-portrait {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 96px;
  height: 96px;
  background: radial-gradient(circle, rgba(70, 84, 56, 0.55), rgba(20, 24, 18, 0.6));
  border-radius: 10px;
}

.bestiary-picture {
  max-width: 84px;
  max-height: 84px;
  width: auto;
  height: auto;
}

.bestiary-info {
  flex: 1;
  min-width: 0;
}

.bestiary-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.bestiary-heading h3 {
  margin: 0 4px 0 0;
  font-family: "Russo One", system-ui, sans-serif;
  font-size: 17px;
  font-weight: 400;
  color: var(--text);
}

.bestiary-tag {
  padding: 1px 7px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--accent);
  background: rgba(255, 201, 77, 0.1);
  border-radius: 999px;
}

.bestiary-description {
  margin: 6px 0 8px;
  font-size: 13px;
  line-height: 1.4;
  color: var(--muted);
}

.bestiary-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px 12px;
  margin: 0;
}

.bestiary-stat dt {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--muted);
}

.bestiary-stat dd {
  margin: 1px 0 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.bestiary-bar {
  display: block;
  height: 4px;
  margin-top: 3px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 2px;
}

.bestiary-bar-fill {
  display: block;
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
}


/* Credits: a narrower page of names. */
.credits-panel {
  width: 560px;
}

.credits-list {
  display: block;
}

.credits-section + .credits-section {
  margin-top: 22px;
}

.credits-people {
  margin: 0;
  padding: 0;
  list-style: none;
}

.credits-people li {
  padding: 8px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.credits-people li:first-child {
  border-top: none;
}

.credits-people strong {
  display: block;
  color: var(--text);
  font-size: 15px;
}

.credits-people span {
  color: var(--muted);
  font-size: 13px;
}

/* Privacy Policy and Terms of Service: the same narrow page, with text. */
.privacy-list {
  display: block;
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
}

.privacy-section + .privacy-section {
  margin-top: 20px;
}

.privacy-section p {
  margin: 6px 0 0;
}

.privacy-points {
  margin: 6px 0 0;
  padding-left: 18px;
}

.privacy-points li + li {
  margin-top: 4px;
}

/* Account: the login dialog and the profile page. */
.login-panel {
  width: 400px;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 8px 24px 24px;
}

.login-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

.login-field input {
  padding: 12px 14px;
  font: inherit;
  font-size: 16px;
  font-weight: 400;
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid var(--border);
  border-radius: 10px;
  outline: none;
}

.login-field input:focus {
  border-color: var(--accent);
}

.login-hint {
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
}

.login-forgot {
  align-self: center;
  font-size: 13px;
}

/* A new recovery code, to save: over the profile it may come from. */
#recovery {
  z-index: 32;
}

.recovery-code {
  padding: 14px;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 20px;
  letter-spacing: 1px;
  text-align: center;
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  border: 2px dashed var(--accent);
  border-radius: 10px;
  user-select: all;
  overflow-wrap: anywhere;
}

/* Hidden (the dots), until SHOW CODE: nothing to select. */
.recovery-code.concealed {
  color: var(--muted);
  user-select: none;
}

/* "Show what I typed" under a code box (typed as a password: streamers). */
.code-peek {
  align-self: flex-end;
  font-size: 12px;
  font-weight: 400;
}

/* Your own profile: changing the password, the recovery code. */
.profile-security {
  margin-top: 28px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
}

.profile-security-title {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--muted);
}

.profile-security-note {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text);
}

.profile-security-note.warn {
  color: #ffb36b;
}

.profile-security .profile-bio-input {
  width: 100%;
  max-width: 320px;
}

/* Contact us: the account dialog's fields, with a message box. */
.contact-panel {
  width: 480px;
}

.contact-panel .login-form {
  overflow-y: auto;
}

.login-field textarea {
  min-height: 120px;
  padding: 10px 12px;
  font: inherit;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.45;
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid var(--border);
  border-radius: 10px;
  outline: none;
  resize: vertical;
}

.login-field textarea:focus {
  border-color: var(--accent);
}

.contact-count {
  align-self: flex-end;
  font-size: 11px;
  font-weight: 500;
}

/* Off-screen, not display: none (some bots skip hidden fields). */
.contact-trap {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.start-notice.success {
  color: #b5f0b5;
  background: rgba(60, 170, 80, 0.15);
  border-color: rgba(60, 170, 80, 0.45);
}

.profile-panel {
  width: 600px;
}

.profile-body {
  display: block;
}

.profile-gap {
  margin-top: 20px;
}

/* Achievements on the profile: earned ones bright, the rest dimmed. */
.achievement-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
}

.achievement {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 10px;
  font-size: 12px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 10px;
  opacity: 0.55;
}

.achievement.earned {
  background: rgba(255, 201, 77, 0.08);
  border-color: rgba(255, 201, 77, 0.45);
  opacity: 1;
}

.achievement strong {
  font-size: 13px;
  color: var(--text);
}

.achievement-reward {
  color: #6fd3ff;
}

/* Not earned yet: how far along (account.js). */
.achievement-progress {
  height: 5px;
  margin-top: 4px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}

.achievement-progress-fill {
  display: block;
  height: 100%;
  background: var(--accent);
  border-radius: 3px;
}

.achievement-progress-text {
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 560px) {
  .achievement-grid {
    grid-template-columns: 1fr;
  }
}

/* Find players: the search field and the names found. */
.players-search {
  padding: 12px 14px;
  font: inherit;
  font-size: 16px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid var(--border);
  border-radius: 10px;
  outline: none;
}

.players-search:focus {
  border-color: var(--accent);
}

.players-results {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 320px;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  list-style: none;
}

.players-result {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  width: 100%;
  padding: 8px 12px;
  font: inherit;
  font-size: 12px;
  text-align: left;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
}

.players-result:hover,
.players-result:focus-visible {
  border-color: var(--accent);
  background: rgba(255, 201, 77, 0.08);
}

.players-result strong {
  font-size: 14px;
  color: var(--text);
}

/* A name that opens a profile (verified names on the all-time board). */
.profile-link {
  padding: 0;
  font: inherit;
  font-weight: 600;
  text-align: left;
  color: var(--text);
  background: none;
  border: none;
  cursor: pointer;
}

.profile-link:hover,
.profile-link:focus-visible {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Deleting your account, at the bottom of your own profile. */
.profile-delete {
  margin-top: 28px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.profile-delete-link {
  color: #ff8a8a;
}

.profile-delete-warning {
  margin: 0 0 10px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text);
}

.profile-delete-confirm {
  width: auto;
  padding: 8px 18px;
  font-size: 14px;
  color: #fff;
  background: #c73a2e;
}

.profile-delete-confirm:disabled {
  opacity: 0.6;
}

/* A profile's bio, and editing your own. */
.profile-bio {
  margin: 0 0 16px;
}

.profile-status {
  margin: 0 0 10px;
  font-size: 13px;
  color: var(--muted);
}

.profile-status.online {
  color: #5fd068;
}

.profile-status.online::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 6px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 6px currentColor;
  vertical-align: 1px;
}

.profile-bio-text {
  margin: 0 0 4px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  overflow-wrap: anywhere;
}

.profile-bio-text.empty {
  color: var(--muted);
  font-style: italic;
}

.profile-bio-input {
  box-sizing: border-box;
  width: 100%;
  padding: 10px 12px;
  font: inherit;
  font-size: 14px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid var(--border);
  border-radius: 10px;
  outline: none;
  resize: vertical;
}

.profile-bio-input:focus {
  border-color: var(--accent);
}

.profile-bio-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 8px;
}

.profile-bio-save {
  width: auto;
  padding: 8px 18px;
  font-size: 14px;
}

.profile-bio-count {
  margin-left: auto;
  font-size: 12px;
  color: var(--muted);
}

.profile-bio-count.over {
  color: #ff6b6b;
}

.profile-bio-error {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: #ff6b6b;
}

/* The admin panel (admins only): sections scrolling inside the page. */
.admin-panel {
  width: 560px;
}

/* The answer to the last action, on its own lines (a reset's new password
   among them), selectable to copy. */
#admin-result {
  white-space: pre-line;
  user-select: text;
}

.admin-body {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 0;
  padding: 4px 24px 24px;
  overflow-y: auto;
  font-size: 14px;
  color: var(--text);
}

.admin-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.admin-heading .legal-link {
  font: 500 12px/1.4 system-ui, "Segoe UI", sans-serif;
  letter-spacing: 0;
  color: var(--muted);
}

.admin-list {
  margin: 6px 0 0;
  padding: 0;
  list-style: none;
}

.admin-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
}

.admin-row .admin-muted {
  flex: 1;
}

.admin-muted {
  font-size: 12.5px;
  color: var(--muted);
}

.admin-button {
  padding: 4px 10px;
  font-size: 12px;
}

.admin-log li {
  padding: 3px 0;
  font-size: 12.5px;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.admin-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 6px;
}

.admin-form select {
  padding: 10px 12px;
  font: inherit;
  font-size: 15px;
  font-weight: 400;
  color: var(--text);
  background: #151a24;
  border: 2px solid var(--border);
  border-radius: 10px;
}

.admin-form select:focus {
  border-color: var(--accent);
  outline: none;
}

.admin-check {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 12.5px;
  color: var(--muted);
}


#pause-admin-button {
  margin-top: 10px;
}

/* Friends and mail (social.js). */
.social-panel {
  width: 600px;
}

.social-tabs {
  display: flex;
  gap: 6px;
}

.social-body {
  display: block;
}

.social-add {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

/* Add friend: a popup over the Friends page, searching as you type. */
.social-panel {
  position: relative;
  /* (Room for the popup, however few friends.) */
  min-height: min(560px, calc(100vh - 32px));
}

.social-finder {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 70px 20px 20px;
  background: rgba(5, 6, 10, 0.7);
  border-radius: 16px;
}

.social-finder-box {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 440px;
  max-width: 100%;
  max-height: 100%;
  box-sizing: border-box;
  padding: 16px 18px 18px;
  background: #151923;
  border: 1px solid rgba(255, 201, 77, 0.45);
  border-radius: 14px;
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.6);
}

.social-finder-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.social-finder-head .records-subtitle {
  margin: 0;
}

.social-finder-results {
  max-height: 300px;
}

.social-small-button {
  width: auto;
  padding: 7px 14px;
  font-size: 13px;
}

.social-notice {
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--accent);
}

.social-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
}

.social-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.social-who {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.social-when {
  font-size: 11px;
  color: var(--muted);
}

.social-when.online {
  color: #5fd068;
}

.social-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 7px;
  border: 1.5px solid var(--muted);
  border-radius: 50%;
  vertical-align: 1px;
}

.social-dot.online {
  border-color: #4ade6a;
  background: #4ade6a;
  box-shadow: 0 0 6px rgba(74, 222, 106, 0.8);
}

.social-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.social-waiting {
  font-size: 12px;
  color: var(--muted);
}

.social-danger {
  color: #ff8a8a;
}

.social-friend-tag {
  font-size: 13px;
  font-weight: 700;
  color: #4ade6a;
}

/* On another player's profile: Add friend, Write, Block. */
.profile-social {
  margin: 0 0 14px;
}

.social-mail-top {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 10px;
}

.mail-row {
  display: flex;
  flex-direction: column;
  gap: 3px;
  width: 100%;
  padding: 9px 12px;
  font: inherit;
  font-size: 13px;
  text-align: left;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
}

.mail-row:hover,
.mail-row:focus-visible {
  border-color: var(--accent);
  background: rgba(255, 201, 77, 0.08);
}

.mail-row.unread {
  color: var(--text);
  border-color: rgba(255, 201, 77, 0.45);
}

.mail-row.unread .mail-subject {
  font-weight: 700;
}

.mail-row-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.mail-row-head strong {
  color: var(--text);
}

.mail-subject {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mail-date {
  margin-left: auto;
  font-size: 11px;
  color: var(--muted);
}

.mail-letter-head {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
}

.mail-letter-subject {
  margin: 8px 0 10px;
  font-size: 18px;
  color: var(--text);
  overflow-wrap: anywhere;
}

.mail-letter-text {
  margin: 0 0 18px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--text);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* A conversation: every letter between you and a friend, theirs on the
   left, yours on the right, in a list of its own that scrolls (opened
   at the newest, at the bottom). */
.mail-unread {
  padding: 0 7px;
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
  color: #10131a;
  background: var(--accent);
  border-radius: 9px;
}

.mail-conversation-head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 12px;
  font-size: 14px;
  color: var(--muted);
}

.mail-conversation-title .profile-link {
  font-size: 16px;
  font-weight: 700;
}

.mail-thread {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: min(52vh, 520px);
  margin: 0 0 14px;
  padding: 12px;
  overflow-y: auto;
  list-style: none;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.mail-thread::-webkit-scrollbar {
  width: 6px;
}

.mail-thread::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 3px;
}

.mail-bubble {
  align-self: flex-start;
  max-width: 82%;
  padding: 9px 13px 4px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: 12px 12px 12px 4px;
}

.mail-bubble.mine {
  align-self: flex-end;
  background: rgba(255, 201, 77, 0.09);
  border-color: rgba(255, 201, 77, 0.3);
  border-radius: 12px 12px 4px 12px;
}

.mail-bubble-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 12px;
  color: var(--muted);
}

.mail-bubble-head strong {
  color: var(--text);
}

.mail-bubble.mine .mail-bubble-head strong {
  color: var(--accent);
}

.mail-bubble-delete {
  font-size: 11px;
  opacity: 0;
  transition: opacity 0.15s;
}

.mail-bubble:hover .mail-bubble-delete,
.mail-bubble-delete:focus-visible,
.touch .mail-bubble-delete {
  opacity: 1;
}

.mail-bubble-subject {
  margin: 6px 0 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  overflow-wrap: anywhere;
}

.mail-bubble .mail-letter-text {
  margin: 4px 0 6px;
}

.mail-compose {
  padding: 0;
}

.mail-to,
.mail-compose input {
  padding: 10px 12px;
  font: inherit;
  font-size: 15px;
  font-weight: 400;
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid var(--border);
  border-radius: 10px;
  outline: none;
}

.mail-to option {
  color: #000;
}


/* The Armory (armory.js): every weapon a tile, by group; each opens its
   own popup. */
.armory-list {
  padding: 4px 24px 24px;
  overflow-y: auto;
}

.armory-group + .armory-group {
  margin-top: 18px;
}

.armory-group-title {
  margin: 0 0 8px;
  font: 400 12px/1 "Russo One", system-ui, sans-serif;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.armory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  gap: 8px;
}

.armory-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 8px 9px;
  color: var(--text);
  font: inherit;
  text-align: center;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s, transform 0.12s;
}

.armory-tile:hover,
.armory-tile:focus-visible {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 201, 77, 0.45);
  transform: translateY(-1px);
}

.armory-tile-art {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 44px;
}

.armory-tile-art .armory-picture {
  max-width: 100%;
  max-height: 40px;
}

.armory-tile-name {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
}

.armory-badge {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
}

.armory-badge.owned {
  color: #4ade6a;
}

.armory-badge.star {
  color: var(--accent);
}

.armory-badge.locked {
  color: #9ad8ff;
}

.armory-badge.deal {
  color: #ff8a4c;
}

/* One weapon's popup, over the Armory. */
.armory-popup {
  position: fixed;
  inset: 0;
  z-index: 31;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(5, 6, 10, 0.7);
}

.armory-popup[hidden] {
  display: none;
}

.armory-popup-panel {
  position: relative;
  width: 640px;
}

.armory-popup-close {
  position: absolute;
  top: 14px;
  right: 14px;
}

.armory-weapon-body {
  padding: 22px 24px 22px;
  overflow-y: auto;
}

.armory-top {
  display: flex;
  gap: 18px;
  align-items: center;
  padding-right: 40px;
}

.armory-art {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 150px;
  height: 96px;
  background: radial-gradient(circle, rgba(255, 201, 77, 0.12), rgba(255, 255, 255, 0.02));
  border-radius: 12px;
}

.armory-art .armory-picture {
  max-width: 132px;
  max-height: 80px;
}

.armory-info {
  min-width: 0;
}

.armory-kind {
  margin: 0 0 2px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.armory-name {
  margin: 0 0 6px;
}

.armory-description {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
  color: var(--text);
}

.armory-numbers {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 16px;
}

.armory-number {
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 8px;
}

.armory-number-label {
  display: block;
  font-size: 11px;
  color: var(--muted);
}

.armory-number strong {
  font-size: 14px;
}

.armory-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
}

.armory-watch {
  width: auto;
  padding: 8px 16px;
}

.armory-buy {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
}

.armory-buy .armory-buy-button {
  width: auto;
  padding: 8px 18px;
  font-size: 14px;
}

.armory-was {
  font-size: 12px;
  color: #ff8a4c;
}

.armory-owned {
  font-size: 13px;
  font-weight: 700;
  color: #4ade6a;
}

.armory-message {
  flex-basis: 100%;
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
}

.armory-mastery {
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.armory-section-title {
  margin: 0 0 4px;
  font: 400 13px/1 "Russo One", system-ui, sans-serif;
  letter-spacing: 0.06em;
  color: var(--accent);
}

.armory-hint {
  margin: 0 0 10px;
  font-size: 12px;
  line-height: 1.4;
  color: var(--muted);
}

.armory-ranks {
  margin: 0;
  padding: 0;
  list-style: none;
}

.armory-rank {
  display: flex;
  gap: 10px;
  padding: 8px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.armory-rank-name {
  flex: none;
  width: 52px;
  padding-top: 2px;
  font: 400 13px/1.2 "Russo One", system-ui, sans-serif;
  color: var(--accent);
}

.armory-choices {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.armory-trait strong {
  display: block;
  font-size: 13px;
}

.armory-trait kbd {
  margin-right: 5px;
  padding: 0 4px;
  font: 700 10px/1.5 system-ui, "Segoe UI", sans-serif;
  color: #12141a;
  background: var(--accent);
  border-radius: 3px;
}

.armory-trait span {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  line-height: 1.35;
  color: var(--muted);
}

@media (max-width: 560px) {
  .armory-list {
    padding: 4px 14px 18px;
  }

  .armory-grid {
    grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
  }

  .armory-top {
    flex-direction: column;
    align-items: flex-start;
  }

  .armory-numbers,
  .armory-choices {
    grid-template-columns: 1fr;
  }
}
