/* MyRO Character Builder (themes/myro/builder) */

p.mrb-intro {
  max-width: 820px;
  margin: 0 0 20px;
  color: var(--mr-text);
}
.mrb-intro-keys {
  display: block;
  color: var(--mr-muted);
  font-size: 13px;
  margin-top: 4px;
}

.mrb {
  --mrb-cell: 112px;
  --mrb-gap: 6px;
  position: relative;
}
.mrb-muted {
  color: var(--mr-muted);
}
.mrb-small {
  font-size: 12px;
}
.mrb-offscreen {
  position: fixed;
  left: -9999px;
  top: 0;
}

/* Controls */
.mrb-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px 16px;
  margin-bottom: 14px;
}
.mrb-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0;
}
.mrb-field-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--mr-muted);
}
/* The theme pads every form control 8px top and bottom (!important); builder dropdowns have a fixed height, so
   that padding only pushes the text down until it is cut off */
.mrb select {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}
.mrb-field select {
  min-width: 200px;
  height: 38px;
  padding: 0 10px;
  background: var(--mr-bg-card);
  color: var(--mr-cream);
  border: 1px solid var(--mr-border);
  border-radius: 6px;
  font-family: inherit;
  font-size: 14px;
}
.mrb-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-left: auto;
}
.mrb-cur {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  max-width: 220px;
  margin-right: 4px;
  font-size: 13px;
  line-height: 1.3;
  text-align: right;
}
.mrb-cur:empty {
  display: none;
}
.mrb-cur-name {
  overflow: hidden;
  color: var(--mr-cream);
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mrb-cur-dirty {
  color: var(--mr-orange);
  font-size: 12px;
}
/* Save / load dialog (<dialog>, inside .mrb so the theme colours apply) */
.mrb-dialog {
  width: min(520px, calc(100vw - 32px));
  max-height: calc(100vh - 64px);
  padding: 0;
  background: var(--mr-bg-card);
  color: var(--mr-text);
  border: 1px solid var(--mr-orange);
  border-radius: var(--mr-radius);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.6);
}
.mrb-dialog::backdrop {
  background: rgba(0, 0, 0, 0.6);
}
.mrb-dialog-box {
  padding: 18px 20px 20px;
}
.mrb-dialog h3 {
  margin: 0 0 10px;
  color: var(--mr-cream);
  font-size: 18px;
}
.mrb-dialog h4 {
  margin: 18px 0 6px;
  color: var(--mr-muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}
.mrb-dialog p {
  margin: 0 0 12px;
}
.mrb-dialog .mrb-dialog-name {
  width: 100%;
  height: 38px;
  box-sizing: border-box;
}
.mrb-dialog p.mrb-dialog-note {
  min-height: 1.4em;
  margin: 6px 0 0;
}
.mrb-dialog-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.mrb-builds {
  max-height: 320px;
  margin: 0 0 12px;
  padding: 0;
  overflow-y: auto;
  list-style: none;
}
.mrb-builds li {
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.mrb-build-pick {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
  padding: 8px 6px;
  background: none;
  border: none;
  border-radius: 4px;
  color: var(--mr-cream);
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}
.mrb-build-pick:hover,
.mrb-build-pick:focus-visible {
  background: var(--mr-orange-dim);
}
.mrb-build-name {
  overflow: hidden;
  font-size: 14px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mrb-build-meta {
  color: var(--mr-muted);
  font-size: 12px;
}
body.mr-light .mrb-builds li {
  border-bottom-color: rgba(0, 0, 0, 0.06);
}
.mrb-login-hint {
  display: flex;
  align-items: center;
  height: 38px;
  padding: 0 12px;
  border: 1px dashed var(--mr-border);
  border-radius: 6px;
  color: var(--mr-muted);
  font-size: 14px;
  text-decoration: none;
  transition: border-color var(--mr-transition), color var(--mr-transition);
}
.mrb-login-hint:hover,
.mrb-login-hint:focus-visible {
  border-color: var(--mr-orange);
  color: var(--mr-orange);
}
.mrb-loaded {
  margin: -4px 0 14px;
  padding: 10px 14px;
  background: var(--mr-bg-card);
  border: 1px solid var(--mr-border);
  border-left: 3px solid var(--mr-pink);
  border-radius: 6px;
  font-size: 14px;
}
.mrb-loaded[hidden] {
  display: none;
}
.mrb-loaded-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.mrb-loaded-head p {
  flex: 1;
  margin: 0;
}
.mrb-loaded-head .mrb-btn {
  flex: none;
}
.mrb-loaded-look {
  flex: none;
  max-width: none;
  margin: -14px 0 -4px -8px;
  image-rendering: pixelated;
}
.mrb-loaded .mrb-notes {
  margin-top: 6px;
  color: var(--mr-muted);
}
.mrb-loaded .mrb-notes li::before {
  content: '•';
  margin-right: 4px;
}
.mrb-btn {
  height: 38px;
  min-width: 38px;
  padding: 0 14px;
  background: transparent;
  color: var(--mr-cream);
  border: 1px solid var(--mr-border);
  border-radius: 6px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color var(--mr-transition), color var(--mr-transition), background var(--mr-transition);
}
.mrb-btn:hover,
.mrb-btn:focus-visible {
  border-color: var(--mr-orange);
  color: var(--mr-orange);
  background: var(--mr-orange-dim);
}
.mrb-btn.mrb-btn-primary {
  background: var(--mr-gradient);
  border-color: transparent;
  color: #fff;
}
.mrb-btn.mrb-btn-primary:hover,
.mrb-btn.mrb-btn-primary:focus-visible {
  border-color: var(--mr-cream);
  color: #fff;
}
.mrb-btn:disabled {
  opacity: 0.5;
  cursor: default;
}
.mrb-btn.mrb-confirm,
.mrb-btn.mrb-confirm:hover {
  border-color: var(--mr-pink);
  color: var(--mr-pink);
}

/* Wide page: the theme caps inner pages at 1100px; overflow: clip (not hidden) keeps the sticky detail panel working */
.mr-content-col.mrb-wide {
  max-width: 1760px;
  overflow: clip;
}

/* Points */
.mrb-pointsrow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  margin-bottom: 16px;
}
.mrb-points {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.mrb .mrb-tiptoggle {
  margin: 0 0 0 auto;
  color: var(--mr-text);
  cursor: pointer;
  user-select: none;
}
.mrb-pt {
  display: flex;
  flex-direction: column;
  padding: 6px 12px;
  background: var(--mr-bg-card);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 6px;
  min-width: 120px;
}
.mrb-pt strong {
  color: var(--mr-cream);
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}
.mrb-pt-label {
  font-size: 11px;
  color: var(--mr-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.mrb-pt-total {
  border-color: var(--mr-border);
}
.mrb-pt-total strong {
  color: var(--mr-orange);
}
.mrb-pt-bad {
  border-color: rgba(255, 45, 120, 0.6);
}
.mrb-pt-bad strong {
  color: var(--mr-pink);
}
.mrb-pt-wide {
  flex-basis: 100%;
  color: var(--mr-pink-trim);
  font-size: 13px;
}

/* Skill window */
.mrb-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 20px;
  align-items: start;
}
.mrb-window {
  min-width: 0;
  background: var(--mr-bg-card);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--mr-radius);
  padding: 0 14px 14px;
}
.mrb-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  margin: 0 -14px 14px;
  padding: 10px 14px 0;
  border-bottom: 2px solid var(--mr-orange);
}
.mrb-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: transparent;
  color: var(--mr-orange);
  border: 1px solid var(--mr-border);
  border-bottom: none;
  border-radius: 6px 6px 0 0;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.mrb-tab:hover {
  background: var(--mr-orange-dim);
}
.mrb-tab.active {
  background: var(--mr-orange);
  border-color: var(--mr-orange);
  color: #fff;
}
.mrb-tab-count {
  min-width: 22px;
  padding: 0 6px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.25);
  font-size: 11px;
  line-height: 18px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.mrb-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;  /* room for the prerequisite arrows, which run in the gaps */
}
.mrb-cell {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 2px;
  min-height: 88px;
  padding: 8px 4px 6px;
  background: var(--mr-bg-alt);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  color: var(--mr-text);
  font-family: inherit;
  text-align: center;
  cursor: pointer;
  user-select: none;
  transition: border-color var(--mr-transition), background var(--mr-transition);
}
.mrb-cell:hover {
  border-color: rgba(255, 102, 37, 0.5);
  background: var(--mr-bg-hover);
}
.mrb-cell:focus-visible {
  outline: 2px solid var(--mr-orange);
  outline-offset: 1px;
}
.mrb-empty {
  background: transparent;
  border-color: transparent;
  cursor: default;
}
.mrb-empty:hover {
  background: transparent;
  border-color: transparent;
}
.mrb-cell .mrb-icon {
  margin-top: 2px;
}
.mrb-cell-name {
  font-size: 11.5px;
  line-height: 1.25;
  color: var(--mr-cream);
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.mrb-cell-lv {
  margin-top: auto;
  font-size: 12px;
  font-weight: 600;
  color: var(--mr-muted);
  font-variant-numeric: tabular-nums;
}
.mrb-cell-tag {
  position: absolute;
  top: 3px;
  right: 3px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: #ffd27a;
}
.mrb-learned {
  border-color: rgba(255, 102, 37, 0.45);
  background: linear-gradient(180deg, rgba(255, 102, 37, 0.14), rgba(255, 102, 37, 0.04));
}
.mrb-learned .mrb-cell-lv {
  color: var(--mr-orange);
}
.mrb-maxed {
  border-color: rgba(255, 45, 120, 0.6);
}
.mrb-maxed .mrb-cell-lv {
  color: var(--mr-pink-trim);
}
.mrb-locked .mrb-icon,
.mrb-locked .mrb-cell-name {
  opacity: 0.45;
}
.mrb-selected {
  box-shadow: 0 0 0 2px var(--mr-orange);
}

/* Prerequisite links: chain highlight and arrows (showLinks in builder.js) */
.mrb {
  --mrb-ok: #6fcf7f;
}
body.mr-light .mrb {
  --mrb-ok: #23853d;
}
.mrb-window {
  position: relative;
}
.mrb-links {
  position: absolute;
  top: 0;
  left: 0;
  overflow: visible;
  pointer-events: none;
  z-index: 2;
}
.mrb-link-line {
  fill: none;
  stroke-width: 2.25;
}
.mrb-link-halo {
  fill: none;
  stroke: var(--mr-bg-card);
  stroke-width: 6;
  opacity: 0.8;
}
.mrb-link-met .mrb-link-line { stroke: var(--mrb-ok); }
.mrb-link-unmet .mrb-link-line { stroke: var(--mr-orange); }
.mrb-link-out .mrb-link-line {
  stroke: var(--mr-pink-trim);
  stroke-dasharray: 5 4;
}
.mrb-arrowhead-met { fill: var(--mrb-ok); }
.mrb-arrowhead-unmet { fill: var(--mr-orange); }
.mrb-arrowhead-out { fill: var(--mr-pink-trim); }
.mrb-link-pill {
  fill: var(--mr-bg-card);
  stroke-width: 1.5;
}
.mrb-link-met .mrb-link-pill { stroke: var(--mrb-ok); }
.mrb-link-unmet .mrb-link-pill { stroke: var(--mr-orange); }
.mrb-link-out .mrb-link-pill { stroke: var(--mr-pink-trim); }
.mrb-link-text {
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
}
.mrb-link-met .mrb-link-text { fill: var(--mrb-ok); }
.mrb-link-unmet .mrb-link-text { fill: var(--mr-orange); }
.mrb-link-out .mrb-link-text { fill: var(--mr-pink-trim); }
.mrb-cell.mrb-link-focus {
  box-shadow: 0 0 0 2px var(--mr-cream);
}
.mrb-cell.mrb-req {
  box-shadow: 0 0 0 1px var(--mrb-ok);
}
.mrb-cell.mrb-req-met {
  box-shadow: 0 0 0 2px var(--mrb-ok), 0 0 12px rgba(111, 207, 127, 0.35);
}
.mrb-cell.mrb-req-unmet {
  box-shadow: 0 0 0 2px var(--mr-orange), 0 0 12px rgba(255, 102, 37, 0.4);
}
.mrb-cell.mrb-req:not(.mrb-req-direct):not(.mrb-learned) {
  box-shadow: 0 0 0 1px var(--mr-orange);
}
.mrb-cell.mrb-unlocks {
  box-shadow: 0 0 0 1px var(--mr-pink-trim);
}
.mrb-tab.mrb-tab-req {
  box-shadow: inset 0 0 0 2px var(--mr-pink-trim);
}
.mrb-cell-tag-trans,
.mrb-legend-trans {
  color: var(--mr-pink-trim);
}
@media (max-width: 700px) {
  .mrb-legend-trans {
    font-size: 0;
  }
  .mrb-legend-trans::before {
    content: "";
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--mr-pink-trim);
    vertical-align: middle;
  }
}
.mrb-cell-tag-trans {
  left: 3px;
  right: auto;
}
.mrb-legend-trans {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}
.mrb .mrb-grid-legend {
  margin: 0;
  font-size: 12px;
  color: var(--mr-muted);
}

.mrb-extra {
  margin-top: 14px;
}
.mrb-extra:empty {
  display: none;
}
.mrb-trans-title {
  margin: 4px 0 8px;
  padding-top: 12px;
  border-top: 1px solid var(--mr-border);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--mr-orange);
}
.mrb-extra-row + .mrb-trans-title {
  margin-top: 14px;
}
.mrb-extra-title {
  font-size: 12px;
  color: var(--mr-muted);
  margin-bottom: 6px;
}
.mrb-extra-row {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: var(--mrb-gap);
}

.mrb-icon {
  --sz: 24px;
  display: inline-block;
  flex: none;
  width: var(--sz);
  height: var(--sz);
  background-image: var(--mrb-sprite);
  background-repeat: no-repeat;
  background-size: calc(var(--sz) * var(--mrb-sprite-cols)) auto;
  background-position: calc(var(--sz) * var(--ix, 0) * -1) calc(var(--sz) * var(--iy, 0) * -1);
  image-rendering: pixelated;
  vertical-align: middle;
}
.mrb-noicon {
  background: rgba(255, 255, 255, 0.06);
  border-radius: 4px;
}
.mrb-cell .mrb-icon,
.mrb-icon-2x {
  --sz: 48px;
}

/* Detail panel */
.mrb-detail {
  position: sticky;
  top: calc(var(--mr-nav-h) + 12px);
  max-height: calc(100vh - var(--mr-nav-h) - 24px);
  overflow-y: auto;
  background: var(--mr-bg-card);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--mr-radius);
  padding: 16px;
}
.mrb .mrb-detail-empty p {
  margin: 0 0 8px;
  font-size: 14px;
}
.mrb-detail-head {
  display: flex;
  gap: 12px;
  align-items: center;
}
.mrb-detail-name {
  margin: 0 !important;
  font-size: 18px !important;
  line-height: 1.3;
}
.mrb-stepper {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 14px 0 4px;
}
.mrb-stepper-lv {
  flex: 1;
  text-align: center;
  color: var(--mr-cream);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.mrb-detail-sec {
  margin-top: 16px;
}
.mrb-detail-sec h4 {
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--mr-muted);
}
.mrb-reqs {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 13px;
}
.mrb-reqs li {
  padding: 2px 0;
  color: var(--mr-text);
}
.mrb-reqs li::before {
  content: "\2022";
  display: inline-block;
  width: 14px;
  color: var(--mr-muted);
}
.mrb-reqs .mrb-ok::before {
  content: "\2713";
  color: #7bd88f;
}
.mrb-reqs .mrb-miss::before {
  content: "\2717";
  color: var(--mr-pink);
}
.mrb-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  background: none;
  border: none;
  color: var(--mr-cream);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.mrb-link:hover {
  color: var(--mr-orange);
  text-decoration: underline;
}

/* Client tooltip text: dark on light, like the in-game window, so its colour codes stay readable. */
.mrb-desc {
  background: #f7f2ec;
  color: #2a2226;
  border-radius: 6px;
  padding: 10px 12px;
  font-size: 12.5px;
  line-height: 1.45;
}
.mrb .mrb-desc-line,
.mrb-tip .mrb-desc-line {
  margin: 0;
  font-size: inherit;
  line-height: inherit;
  white-space: pre-wrap;
}
.mrb-desc-title {
  font-weight: 700;
  font-size: 13.5px;
}
.mrb-desc .mrb-muted {
  color: #6f6168;
}

.mrb-table-wrap {
  overflow-x: auto;
}
.mrb-server {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.mr-content-col .mrb table.mrb-server th,
.mr-content-col .mrb table.mrb-server td {
  padding: 3px 8px;
  text-align: right;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  white-space: nowrap;
}
.mrb-server th {
  color: var(--mr-muted);
  font-weight: 600;
}
.mrb-server th:first-child,
.mrb-server td:first-child {
  text-align: left;
}
.mr-content-col .mrb table.mrb-server tr.mrb-cur td {
  color: var(--mr-orange);
  font-weight: 600;
}
.mrb-audit {
  margin: 0;
  padding-left: 18px;
  font-size: 12px;
  color: #ffd27a;
}

/* Learned skills */
.mrb-summary {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 20px;
  padding: 16px;
  background: var(--mr-bg-card);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--mr-radius);
}
.mrb-summary h4 {
  margin: 0 0 6px;
  font-size: 13px;
  color: var(--mr-orange);
}
.mrb-summary-list {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 13px;
}
.mrb-summary-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 2px 0;
}
.mrb-summary-lv {
  color: var(--mr-muted);
  font-variant-numeric: tabular-nums;
}
.mrb .mrb-summary > p {
  margin: 0;
}
.mrb p.mrb-source {
  margin-top: 10px;
  font-size: 12px;
  color: var(--mr-muted);
}

/* Messages and hover tooltip */
.mrb-flash {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 1000;
  max-width: min(560px, calc(100vw - 32px));
  padding: 10px 16px;
  background: #2a0f1d;
  color: var(--mr-cream);
  border: 1px solid var(--mr-pink);
  border-radius: 8px;
  font-size: 14px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 10px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.mrb-flash.mrb-show {
  opacity: 1;
  transform: translate(-50%, 0);
}
.mrb-tip {
  position: absolute;
  z-index: 999;
  display: none;
  width: 340px;
  max-width: calc(100vw - 16px);
  border-radius: 8px;
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.6);
  background: #f7f2ec;
  pointer-events: none;
}
.mrb-tip.mrb-show {
  display: block;
}
.mrb-tip .mrb-desc {
  border-radius: 8px 8px 0 0;
}
.mrb-tip-foot {
  padding: 8px 12px;
  background: #e9e0d6;
  color: #2a2226;
  font-size: 12px;
  border-radius: 0 0 8px 8px;
}
.mrb-tip-miss {
  color: #b0124d;
  margin-top: 2px;
}

/* Light mode (body.mr-light redefines the --mr-* colours inside .mr-inner-container) */
body.mr-light .mrb-pt,
body.mr-light .mrb-window,
body.mr-light .mrb-detail,
body.mr-light .mrb-summary,
body.mr-light .mrb-cell {
  border-color: rgba(255, 102, 37, 0.18);
}
body.mr-light .mrb-empty {
  border-color: transparent;
}
body.mr-light .mrb-learned {
  border-color: rgba(255, 102, 37, 0.55);
}
body.mr-light .mrb-maxed {
  border-color: rgba(255, 45, 120, 0.6);
}
body.mr-light .mrb-cell-tag {
  color: #b35c00;
}
body.mr-light .mrb-reqs .mrb-ok::before {
  color: #1f8a3a;
}
body.mr-light .mrb-desc {
  border: 1px solid rgba(255, 102, 37, 0.18);
}
body.mr-light .mrb-audit {
  color: #9a5300;
}
body.mr-light .mrb-server th,
body.mr-light .mrb-server td {
  border-bottom-color: rgba(0, 0, 0, 0.06);
}
body.mr-light .mrb-noicon {
  background: rgba(0, 0, 0, 0.06);
}

@media (min-width: 1600px) {
  .mrb-main {
    grid-template-columns: minmax(0, 1fr) 420px;
  }
  .mrb-cell-name {
    font-size: 12.5px;
  }
}
@media (max-width: 1100px) {
  .mrb-main {
    grid-template-columns: minmax(0, 1fr);
  }
  .mrb-detail {
    position: static;
    max-height: none;
  }
}
@media (max-width: 700px) {
  .mrb-actions {
    margin-left: 0;
  }
  .mrb-cur {
    flex: 1 1 100%;
    flex-direction: row;
    justify-content: flex-start;
    gap: 8px;
    max-width: none;
    text-align: left;
  }
  .mrb-field select {
    min-width: 0;
    width: 100%;
  }
  .mrb-bar .mrb-field {
    flex: 1 1 160px;
  }
  .mrb-window {
    padding: 0 8px 8px;
  }
  .mrb-tabs {
    margin: 0 -8px 10px;
    padding: 8px 8px 0;
  }
  .mrb-grid,
  .mrb-extra-row {
    gap: 3px;
  }
  .mrb-cell {
    min-height: 0;
    padding: 4px 2px;
  }
  .mrb-cell-name {
    display: none;
  }
  .mrb-cell .mrb-icon {
    --sz: 32px;
    image-rendering: auto;
  }
  .mrb-cell-lv {
    font-size: 11px;
  }
  .mrb-cell-tag {
    display: none;
  }
  /* no room for the TRANS tag: a corner mark instead */
  .mrb-trans::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--mr-pink-trim);
  }
}

@media (hover: none) {
  .mrb-intro-keys,
  .mrb .mrb-tiptoggle {
    display: none;
  }
}

/* View switch (Skills / Stats) */
.mrb-views {
  display: inline-flex;
  margin: 0 0 16px;
  padding: 3px;
  background: var(--mr-bg-card);
  border: 1px solid var(--mr-border);
  border-radius: 8px;
}
.mrb-viewbtn {
  padding: 7px 18px;
  background: transparent;
  color: var(--mr-text);
  border: none;
  border-radius: 6px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.mrb-viewbtn:hover {
  color: var(--mr-orange);
}
.mrb-viewbtn.active {
  background: var(--mr-gradient);
  color: #fff;
}

/* Stat planner */
.mrb-stat-grid {
  display: grid;
  grid-template-columns: minmax(0, 420px) minmax(0, 1fr);
  grid-template-areas: "in out" "gear out";
  gap: 20px;
  align-items: start;
}
.mrb-stat-in {
  grid-area: in;
}
.mrb-stat-gear {
  grid-area: gear;
}
.mrb-stat-out {
  grid-area: out;
}
@media (min-width: 1500px) {
  .mrb-stat-grid {
    grid-template-columns: minmax(0, 400px) minmax(0, 1fr) minmax(0, 1.1fr);
    grid-template-areas: "in gear out";
  }
}

/* Equipment */
.mrb-icon.mrb-item-icon {
  background-image: var(--mrb-item-sprite);
}
.mrb-gear-title {
  margin: 0 0 10px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--mr-orange);
}
.mrb-gear-row {
  position: relative;
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr) auto;
  gap: 4px 8px;
  align-items: start;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.mrb-gear-slot {
  padding-top: 7px;
  font-size: 12px;
  color: var(--mr-muted);
}
.mrb-gear-cell {
  position: relative;
  min-width: 0;
}
.mrb-gear-occupied {
  padding-top: 7px;
  font-size: 12px;
  font-style: italic;
  color: var(--mr-muted);
}
.mrb-gear-pick,
.mrb-card-pick {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 34px;
  padding: 4px 8px;
  background: var(--mr-bg-alt);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  color: var(--mr-cream);
  font-family: inherit;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}
.mrb-gear-pick span:last-child,
.mrb-card-pick span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mrb-gear-pick:hover,
.mrb-card-pick:hover,
.mrb-gear-pick:focus-visible,
.mrb-card-pick:focus-visible {
  border-color: var(--mr-orange);
}
.mrb-empty-pick {
  color: var(--mr-muted);
}
.mrb-gear-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  margin-top: 4px;
}
.mrb-card-pick {
  min-height: 28px;
  padding: 2px 6px;
  font-size: 12px;
}
/* What each equipped piece gives (gearBonusEls) */
.mrb .mrb-gear-bonus,
.mrb .mrb-gear-bonuses {
  margin: 5px 2px 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--mr-text);
}
.mrb .mrb-gear-bonuses {
  padding: 0;
  list-style: none;
}
.mrb .mrb-gear-bonuses li {
  margin: 2px 0 0;
}
.mrb-gear-bonus-src {
  color: var(--mr-muted);
}
.mrb .mrb-gear-combos {
  margin-top: 7px;
}
.mrb-card-pick .mrb-icon {
  --sz: 24px;
}
.mrb .mrb-gear-ref {
  width: 64px;
  height: 34px;
  padding: 0 6px !important;
}
.mrb-gear-clear {
  margin-top: 12px;
}
.mrb-picker {
  position: absolute;
  z-index: 50;
  top: calc(100% + 4px);
  left: 0;
  width: min(420px, calc(100vw - 48px));
  background: var(--mr-bg-card);
  border: 1px solid var(--mr-orange);
  border-radius: 8px;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.55);
  padding: 8px;
}
.mrb .mrb-pick-search {
  width: 100%;
  height: 34px;
  margin-bottom: 6px;
}
.mrb-pick-list {
  max-height: 320px;
  overflow-y: auto;
}
.mrb-pick-item {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  grid-template-areas: "icon name" "icon meta";
  column-gap: 8px;
  width: 100%;
  padding: 4px 6px;
  background: none;
  border: none;
  border-radius: 4px;
  color: var(--mr-cream);
  font-family: inherit;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}
.mrb-pick-item .mrb-icon {
  grid-area: icon;
  align-self: center;
}
.mrb-pick-name {
  grid-area: name;
}
.mrb-pick-meta {
  grid-area: meta;
  font-size: 11px;
  color: var(--mr-muted);
}
.mrb-pick-item:hover,
.mrb-pick-item:focus-visible,
.mrb-pick-item.active {
  background: var(--mr-orange-dim);
}
.mrb-pick-low .mrb-pick-meta {
  color: var(--mr-pink);
}
.mrb-pick-remove {
  display: block;
  color: var(--mr-pink-trim);
}
.mrb-gear-combo {
  color: #7bd88f;
}
body.mr-light .mrb-gear-combo {
  color: #1f8a3a;
}
body.mr-light .mrb-gear-pick,
body.mr-light .mrb-card-pick {
  border-color: rgba(255, 102, 37, 0.2);
}
.mrb-card {
  background: var(--mr-bg-card);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--mr-radius);
  padding: 16px;
  min-width: 0;
}
.mrb-row2 {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 14px;
}
.mrb-row2 .mrb-field {
  flex: 1 1 120px;
}
.mrb-row2 select {
  width: 100%;
  height: 38px;
}
.mrb input.mrb-num {
  width: 100%;
  min-width: 0;
  height: 38px;
  font-variant-numeric: tabular-nums;
}
.mr-content-col .mrb table.mrb-stat-table {
  width: 100%;
  margin: 0 0 10px;
  font-size: 13px;
}
.mr-content-col .mrb table.mrb-stat-table th,
.mr-content-col .mrb table.mrb-stat-table td {
  padding: 4px 6px;
  text-align: right;
  white-space: nowrap;
}
.mr-content-col .mrb table.mrb-stat-table th:first-child {
  text-align: left;
  color: var(--mr-cream);
}
.mrb-stat-base {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
}
.mrb .mrb-stat-base input.mrb-num {
  width: 64px;
  height: 32px;
  padding: 4px 6px !important;
  text-align: center;
}
.mrb-btn-sm {
  height: 32px;
  min-width: 32px;
  padding: 0 8px;
}
.mrb-stat-bonus {
  color: #7bd88f;
  cursor: default;
}
.mrb-stat-total {
  color: var(--mr-cream);
  font-weight: 700;
}
.mrb-stat-next {
  color: var(--mr-muted);
}
.mrb-bad,
.mrb-stat-next.mrb-bad {
  color: var(--mr-pink);
}
.mrb-pts-left {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 8px 10px;
  margin-bottom: 6px;
  background: var(--mr-bg-alt);
  border: 1px solid var(--mr-border);
  border-radius: 6px;
}
.mrb-pts-left strong {
  color: var(--mr-orange);
  font-size: 16px;
  font-variant-numeric: tabular-nums;
}
.mrb-pts-left.mrb-bad strong {
  color: var(--mr-pink);
}
.mrb .mrb-stat-in p.mrb-small {
  font-size: 12px;
  line-height: 1.5;
  margin: 0 0 14px;
}
.mrb-check {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  font-size: 13px;
}
.mrb-eq {
  border-top: 1px solid var(--mr-border);
  padding-top: 10px;
}
.mrb-eq summary {
  cursor: pointer;
  color: var(--mr-cream);
  font-size: 13px;
  font-weight: 600;
}
.mrb-eq-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: 8px;
  margin-top: 10px;
}
/* Buffs */
.mrb-buffs {
  margin-top: 10px;
}
.mrb .mrb-buff-head {
  margin: 12px 0 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--mr-muted);
}
.mrb-buff-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 6px 12px;
}
.mrb-buff-grid .mrb-check {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
}
.mrb-buff-pick .mrb-field-label {
  display: flex;
  align-items: center;
  gap: 4px;
  text-transform: none;
  letter-spacing: 0;
}
.mrb-buff-pick {
  min-width: 0;
}
.mrb .mrb-buff-pick select,
.mrb .mrb-buff-pick input {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  height: 34px;
}
.mrb .mrb-buff-pick input {
  padding: 4px 8px !important;
}
.mrb .mrb-stat-in p.mrb-perf-head {
  margin: 12px 0 4px;
}
.mrb-perf {
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
}
.mrb-buffs .mrb-icon {
  --sz: 18px;
}
.mrb .mrb-eq-grid input.mrb-num {
  height: 32px;
  padding: 4px 8px !important;
}

.mrb-res-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 18px 24px;
}
.mrb-res-group h4 {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--mr-orange);
}
.mrb-res {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 12px;
  margin: 0;
  font-size: 13px;
}
.mrb-res dt {
  color: var(--mr-text);
  font-weight: 400;
}
.mrb-res dd {
  margin: 0;
  text-align: right;
}
.mrb-res dd strong {
  color: var(--mr-cream);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}
.mrb-res dd .mrb-small {
  display: block;
  font-size: 11px;
  line-height: 1.3;
}
.mrb-stat-out > .mrb-res-group,
.mrb-stat-out > p {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--mr-border);
}
.mrb-notes {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 13px;
}
.mrb-notes li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 4px;
  padding: 2px 0;
}
.mrb p.mrb-stat-note {
  margin-top: 12px;
}

body.mr-light .mrb-card {
  border-color: rgba(255, 102, 37, 0.18);
}
body.mr-light .mrb-stat-bonus {
  color: #1f8a3a;
}

/* Damage view */
.mrb-dmg-grid {
  display: grid;
  grid-template-columns: minmax(0, 400px) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}
.mrb-dummies {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 4px 0 12px;
}
.mrb-dummies .mrb-btn.active {
  background: var(--mr-gradient);
  color: #fff;
}
.mrb .mrb-search {
  width: 100%;
  height: 36px;
}
.mrb-mob-list {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  max-height: 420px;
  overflow-y: auto;
}
.mrb-mob-pick {
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: 5px 8px;
  background: none;
  border: none;
  border-radius: 4px;
  color: var(--mr-cream);
  font-family: inherit;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}
.mrb-mob-pick:hover,
.mrb-mob-pick:focus-visible,
.mrb-mob-pick.active {
  background: var(--mr-orange-dim);
}
.mrb-dmg-target .mrb-res {
  margin-bottom: 14px;
}
.mrb-dmg-out > .mrb-res-cols,
.mrb-dmg-out > .mrb-notes {
  margin-top: 16px;
}
.mrb .mrb-dmg-skills-title {
  margin-top: 22px;
}
.mrb-dmg-skill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.mrb .mrb-dmg-sub {
  display: block;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
}
.mrb-dmg-blocked {
  opacity: 0.55;
}
/* Row headers of the damage tables read like normal cells (the theme styles every th as a column head) */
.mr-content-col .mrb table.mrb-dmg-table tbody th {
  background: none;
  border-bottom: 1px solid rgba(255, 102, 37, 0.06);
  text-transform: none;
  letter-spacing: 0;
  font-size: 13px;
  font-weight: 600;
}
.mr-content-col .mrb table.mrb-dmg-table tbody tr:last-child th {
  border-bottom: none;
}
.mr-content-col .mrb table.mrb-dmg-table tbody tr:nth-child(even) th {
  background: rgba(255, 102, 37, 0.025);
}
.mr-content-col .mrb table.mrb-dmg-table tbody tr:hover th {
  background: rgba(255, 102, 37, 0.07);
}
.mr-content-col .mrb table.mrb-dmg-table td {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.mr-content-col .mrb table.mrb-dmg-skills th[scope="row"] {
  white-space: normal;
}
/* Phones: one card per skill, the numbers in a row under the name */
@media (max-width: 700px) {
  .mr-content-col .mrb table.mrb-dmg-skills thead {
    display: none;
  }
  .mr-content-col .mrb table.mrb-dmg-skills,
  .mr-content-col .mrb table.mrb-dmg-skills tbody {
    display: block;
  }
  .mr-content-col .mrb table.mrb-dmg-skills tr {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    border-bottom: 1px solid rgba(255, 102, 37, 0.06);
  }
  .mr-content-col .mrb table.mrb-dmg-skills th[scope="row"] {
    grid-column: 1 / -1;
    border-bottom: none;
    padding-bottom: 2px;
  }
  .mr-content-col .mrb table.mrb-dmg-skills td {
    text-align: left;
    padding: 2px 8px 8px;
    border-bottom: none;
  }
  .mr-content-col .mrb table.mrb-dmg-skills td::before {
    content: attr(data-label);
    display: block;
    font-size: 10px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--mr-muted);
  }
}
@media (max-width: 900px) {
  .mrb-stat-grid {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "in" "gear" "out";
  }
  .mrb-dmg-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .mrb-mob-list {
    max-height: 260px;
  }
}
@media (max-width: 480px) {
  .mrb-gear-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .mrb-gear-slot {
    grid-column: 1 / -1;
    padding-top: 0;
  }
}
@media (max-width: 480px) {
  .mrb .mrb-stat-base input.mrb-num {
    width: 46px;
  }
  .mr-content-col .mrb table.mrb-stat-table th,
  .mr-content-col .mrb table.mrb-stat-table td {
    padding: 4px 3px;
  }
}
