#stat-calculator-root {
  margin: 0;
  color: var(--fs-text);
  font-family: Tahoma, Verdana, Arial, sans-serif;
}

.stat-calculator {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 0;
  padding: 0;
  color: #14264c;
}

.stat-calculator__panel {
  position: relative;
  padding: 16px;
  border: 2px outset #91abc6;
  border-radius: 0;
  background: linear-gradient(180deg, rgba(249,252,255,.98), rgba(226,237,248,.98));
  box-shadow: inset 1px 1px 0 #fff, inset -1px -1px 0 #8ca7c2, 5px 5px 0 rgba(42,70,110,.22);
}

.stat-calculator__panel::before {
  content: "";
  position: absolute;
  top: 5px;
  left: 6px;
  right: 6px;
  height: 2px;
  pointer-events: none;
  background: repeating-linear-gradient(90deg, #1686a8 0 8px, transparent 8px 12px, #c04494 12px 20px, transparent 20px 24px);
}

.stat-calculator__panel--primary {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.stat-calculator__panel-title {
  position: relative;
  margin: 2px 0 12px;
  padding: 7px 10px 7px 25px;
  border: 1px solid #7192b6;
  border-left: 5px solid #2189a7;
  background: linear-gradient(90deg, #b9d8ea, #e2ecf6 65%, #edc9e1);
  color: #17325e;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .9px;
  text-transform: uppercase;
  text-shadow: 1px 1px 0 #fff;
  box-shadow: 2px 2px 0 rgba(42,70,110,.18);
}

.stat-calculator__panel-title::before {
  content: "";
  position: absolute;
  left: 9px;
  top: 50%;
  width: 7px;
  height: 7px;
  border: 1px solid #76506f;
  background: #ce4c9b;
  transform: translateY(-50%);
  box-shadow: inset 1px 1px 0 rgba(255,255,255,.68);
}

.stat-calculator__primary-grid {
  display: grid;
  grid-template-columns: minmax(205px, .8fr) minmax(270px, .9fr) minmax(430px, 1.45fr);
  gap: 0;
}

.stat-calculator__primary-column {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 14px;
  padding: 0 16px;
}

.stat-calculator__primary-column:first-child { padding-left: 4px; }
.stat-calculator__primary-column:last-child { padding-right: 4px; }

.stat-calculator__primary-column + .stat-calculator__primary-column {
  border-left: 1px solid #9eb4ca;
  box-shadow: inset 1px 0 0 rgba(255,255,255,.72);
}

.stat-calculator__section {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.stat-calculator__section--meta { gap: 7px; }

.stat-calculator__field {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  margin: 0;
  color: #3d5a7c;
  font-size: 12px;
}

.stat-calculator__field > span,
.stat-calculator__equipment-control > span {
  color: #24466e;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .55px;
  text-transform: uppercase;
  text-shadow: 1px 1px 0 #fff;
}

.stat-calculator__field-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.stat-calculator__field-row .stat-calculator__field {
  flex: 0 0 auto;
  margin: 0;
}

.stat-calculator__section--meta > .stat-calculator__field {
  width: 100%;
  max-width: 100%;
}

.stat-calculator__input {
  width: 100%;
  max-width: 100%;
  min-height: 30px;
  box-sizing: border-box;
  padding: 4px 8px;
  border: 2px inset #91a8c1;
  border-radius: 0;
  background: #fff;
  color: #14264c;
  font: 12px Tahoma, Verdana, Arial, sans-serif;
  box-shadow: inset 1px 1px 2px rgba(42,70,110,.13);
}

.stat-calculator__input:focus {
  outline: 1px dotted #1e6f95;
  outline-offset: 2px;
  border-color: #5c8daf;
  box-shadow: inset 1px 1px 2px rgba(42,70,110,.13), 0 0 0 1px rgba(32,137,167,.2);
}

.stat-calculator__section--meta .stat-calculator__input { max-width: 205px; }

.stat-calculator__input--level {
  width: 56px;
  max-width: 56px;
  min-height: 28px;
  padding: 3px 5px;
  text-align: center;
}

.stat-calculator__checkbox {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  margin: 2px 0 0;
  padding: 5px 7px;
  border: 1px solid #9ab1c9;
  background: rgba(255,255,255,.48);
  color: #415e80;
  font-size: 12px;
  font-weight: 700;
}

.stat-calculator__checkbox input {
  width: 14px;
  height: 14px;
  margin: 0;
  accent-color: #268eaa;
}

.stat-calculator__stats-container,
.stat-calculator__stats {
  display: flex;
  flex-direction: column;
}

.stat-calculator__stats-container { gap: 8px; }
.stat-calculator__stats { gap: 4px; }

.stat-calculator__stat-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 29px;
  margin: 0;
  padding: 2px 4px;
  border-bottom: 1px dotted #b5c8da;
}

.stat-calculator__stat-row:nth-child(even) { background: rgba(205,222,238,.3); }

.stat-calculator__stat-label {
  flex: 0 0 36px;
  color: #17325e;
  font: 900 12px "Courier New", monospace;
  letter-spacing: .4px;
}

.stat-calculator__stat-control {
  display: grid;
  grid-template-columns: 22px 34px 22px 46px 44px;
  align-items: center;
  justify-content: flex-start;
  column-gap: 3px;
  width: 183px;
  min-width: 0;
  margin-left: auto;
}

.stat-calculator__input-group,
.stat-calculator__stat-values,
.stat-calculator__stat-values--header,
.stat-calculator__input-group--spacer { display: contents; }

.stat-calculator__input--stat {
  width: 34px;
  max-width: 34px;
  min-height: 24px;
  padding: 2px 3px;
  text-align: center;
  appearance: textfield;
  -moz-appearance: textfield;
  font-size: 12px;
  font-weight: 700;
}

.stat-calculator__input--stat::-webkit-outer-spin-button,
.stat-calculator__input--stat::-webkit-inner-spin-button {
  margin: 0;
  -webkit-appearance: none;
}

.stat-calculator__input-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 1px outset #8ca7c2;
  border-radius: 0;
  background: linear-gradient(180deg, #fff, #c9dbea);
  color: #173e69;
  cursor: pointer;
  font: 900 13px "Courier New", monospace;
  line-height: 1;
  box-shadow: 1px 1px 0 rgba(42,70,110,.18);
}

.stat-calculator__input-button:hover {
  border-color: #3d7899;
  background: linear-gradient(180deg, #eaffff, #91dce8);
  color: #0e4966;
}

.stat-calculator__input-button:active {
  border-style: inset;
  transform: translate(1px, 1px);
  box-shadow: none;
}

.stat-calculator__input-button:focus-visible {
  outline: 1px dotted #244f79;
  outline-offset: 1px;
}

.stat-calculator__stat-bonus,
.stat-calculator__stat-total {
  justify-self: end;
  text-align: right;
  font: 700 12px "Courier New", monospace;
}

.stat-calculator__stat-bonus { color: #617995; }
.stat-calculator__stat-total { color: #17325e; font-weight: 900; }

.stat-calculator__stat-row--header {
  min-height: 20px;
  margin-bottom: 2px;
  border-bottom-style: solid;
  background: linear-gradient(90deg, #e1edf7, #f2ddeb);
}

.stat-calculator__stat-header {
  color: #4d6787;
  font: 900 12px "Courier New", monospace;
  letter-spacing: .35px;
  text-transform: uppercase;
}

.stat-calculator__stat-header--bonus { grid-column: 4; justify-self: end; }
.stat-calculator__stat-header--total { grid-column: 5; justify-self: end; }

.stat-calculator__points-summary {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  margin-top: 7px;
  padding: 7px 8px;
  border: 1px inset #9ab0c7;
  background: #eef5fb;
}

.stat-calculator__points-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.stat-calculator__points-label {
  color: #536c91;
  font-size: 12px;
  font-weight: 700;
}

.stat-calculator__points-value {
  color: #17325e;
  font: 900 12px "Courier New", monospace;
}

.stat-calculator__points-value.is-negative,
.stat-calculator__deficit {
  color: #9d2444;
}

.stat-calculator__deficit {
  margin: 5px 0 0;
  padding: 5px 7px;
  border: 1px solid #c96078;
  background: #ffe2e9;
  font-size: 12px;
}

.stat-calculator__derived-columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(120px, 1fr));
  gap: 0;
}

.stat-calculator__derived-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(64px, auto);
  align-content: start;
  row-gap: 0;
  column-gap: 7px;
  margin: 0;
  padding: 0 11px;
}

.stat-calculator__derived-list:first-child { padding-left: 0; }
.stat-calculator__derived-list:last-child { padding-right: 0; }

.stat-calculator__derived-list:not(:first-child) {
  border-left: 1px solid #a6bbcf;
  box-shadow: inset 1px 0 0 rgba(255,255,255,.7);
}

.stat-calculator__derived-list dt,
.stat-calculator__derived-list dd {
  min-height: 25px;
  box-sizing: border-box;
  margin: 0;
  padding: 4px 3px;
  border-bottom: 1px dotted #bacadb;
}

.stat-calculator__derived-list dt {
  color: #4c6685;
  font-size: 12px;
  font-weight: 700;
}

.stat-calculator__derived-list dd {
  color: #17325e;
  font: 900 12px "Courier New", monospace;
  text-align: right;
  white-space: nowrap;
}

.stat-calculator__table {
  width: 100%;
  border-collapse: collapse;
  color: #14264c;
  font-size: 12px;
}

.stat-calculator__table th,
.stat-calculator__table td {
  padding: 5px 6px;
  border-bottom: 1px solid #b5c7d9;
  text-align: left;
}

.stat-calculator__table th {
  background: linear-gradient(180deg, #f8fcff, #c2d7e9 52%, #dce8f3);
  color: #17325e;
  font-weight: 900;
  letter-spacing: .45px;
  text-transform: uppercase;
}

.stat-calculator__panel--equipment { min-width: 0; }

.stat-calculator__panel--tools {
  padding-bottom: 10px;
}

.stat-calculator__toolbar {
  display: grid;
  grid-template-columns: minmax(150px, 1.2fr) minmax(170px, 1.2fr) repeat(6, auto);
  align-items: end;
  gap: 7px;
}

.stat-calculator__input--build-name,
.stat-calculator__input--saved-build {
  width: 100%;
  max-width: none;
}

.stat-calculator__action {
  min-height: 29px;
  padding: 5px 10px;
  border: 2px outset #8fa9c1;
  border-radius: 0;
  background: linear-gradient(180deg, #f8fcff, #c9dceb 55%, #dbe7f1);
  color: #17325e;
  cursor: pointer;
  font: 900 12px "Courier New", monospace;
  letter-spacing: .25px;
  text-transform: uppercase;
  white-space: nowrap;
}

.stat-calculator__action:hover { filter: brightness(1.04); }
.stat-calculator__action:active { border-style: inset; }
.stat-calculator__action:focus-visible { outline: 2px solid #be4e9d; outline-offset: 1px; }

.stat-calculator__action--primary {
  border-color: #4a94a8;
  background: linear-gradient(180deg, #ecffff, #9bd3dd 55%, #c8e5ea);
}

.stat-calculator__action--danger {
  border-color: #b46b7d;
  background: linear-gradient(180deg, #fff6f8, #edbbc7 55%, #f5d6de);
  color: #7b1f38;
}

.stat-calculator__status-message {
  min-height: 13px;
  margin: 6px 0 0;
  color: #287083;
  font: 700 12px "Courier New", monospace;
}

.stat-calculator__status-message.is-error { color: #9d2444; }

.stat-calculator__helper {
  margin: 0 0 9px;
  color: #526b87;
  font-size: 12px;
}

.stat-calculator__panel--crafting[hidden],
.stat-calculator__crafting-content[hidden],
.stat-calculator__crafting-view[hidden],
.stat-calculator__crafting-tabs[hidden],
.stat-calculator__crafting-stat[hidden] { display: none !important; }

.stat-calculator__crafting-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.stat-calculator__crafting-header > div:first-child {
  min-width: 240px;
  flex: 1 1 auto;
}

.stat-calculator__eyebrow {
  display: block;
  margin: 0 0 3px 2px;
  color: #8b4b78;
  font: 900 12px "Courier New", monospace;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.stat-calculator__crafting-header .stat-calculator__panel-title { margin-bottom: 6px; }
.stat-calculator__crafting-header .stat-calculator__helper { margin-bottom: 0; }

.stat-calculator__panel--crafting:not(.is-expanded) .stat-calculator__crafting-helper,
.stat-calculator__panel--crafting:not(.is-expanded) .stat-calculator__crafting-stats { display: none; }

.stat-calculator__crafting-disclosure {
  display: inline-flex;
  min-width: 142px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  align-self: center;
}

.stat-calculator__crafting-disclosure-icon {
  display: inline-block;
  color: #20768b;
  font-size: 13px;
  transition: transform .16s ease;
}

.stat-calculator__crafting-disclosure[aria-expanded="true"] .stat-calculator__crafting-disclosure-icon {
  transform: rotate(180deg);
}

.stat-calculator__crafting-content { margin-top: 11px; }

.stat-calculator__crafting-stats {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 5px;
}

.stat-calculator__crafting-stat {
  display: grid;
  min-width: 55px;
  min-height: 39px;
  place-items: center;
  padding: 3px 7px;
  border: 1px solid #7f9dbb;
  background: linear-gradient(180deg, #f9fdff, #d3e4f1);
  box-shadow: inset 1px 1px 0 #fff, 2px 2px 0 rgba(42,70,110,.13);
}

.stat-calculator__crafting-stat small {
  color: #607995;
  font: 800 12px "Courier New", monospace;
  letter-spacing: .4px;
}

.stat-calculator__crafting-stat strong {
  color: #17325e;
  font: 900 14px "Courier New", monospace;
}

.stat-calculator__crafting-tabs {
  display: flex;
  gap: 5px;
  margin: 13px 0 10px;
  border-bottom: 1px solid #8fa9c1;
}

.stat-calculator__crafting-tab {
  margin-bottom: -1px;
  border-bottom-color: #8fa9c1;
  background: #d4e3ef;
}

.stat-calculator__crafting-tab.is-active {
  border-color: #3d91a6;
  border-bottom-color: #edf7fb;
  background: linear-gradient(180deg, #eaffff, #edf7fb);
  color: #12627a;
}

.stat-calculator__crafting-view { margin-top: 12px; }

.stat-calculator__crafting-layout {
  display: grid;
  grid-template-columns: minmax(430px, 1.4fr) minmax(240px, .6fr);
  align-items: stretch;
  gap: 14px;
}

.stat-calculator__crafting-controls {
  display: grid;
  grid-template-columns: repeat(3, minmax(125px, 1fr));
  align-content: start;
  gap: 8px;
}

.stat-calculator__crafting-controls--materials,
.stat-calculator__crafting-controls--brew {
  grid-template-columns: repeat(3, minmax(145px, 1fr));
  margin-bottom: 12px;
}

.stat-calculator__crafting-control {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
  color: #24466e;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .35px;
  text-transform: uppercase;
}

.stat-calculator__crafting-control--checkbox {
  align-self: end;
  min-height: 28px;
  flex-direction: row;
  align-items: center;
  padding: 0 7px;
  border: 1px solid #a0b5c9;
  background: rgba(245,250,254,.8);
}

.stat-calculator__crafting-control--checkbox input {
  width: 14px;
  height: 14px;
  margin: 0;
  accent-color: #258fa7;
}

.stat-calculator__input--crafting {
  width: 100%;
  min-width: 0;
  max-width: none;
}

.stat-calculator__crafting-learned {
  min-height: 10px;
  color: #6a8199;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
}

.stat-calculator__crafting-result {
  display: flex;
  min-height: 150px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 14px;
  border: 2px inset #79a4b8;
  background: radial-gradient(circle at top, #efffff, #c9e8ed 75%);
  text-align: center;
}

.stat-calculator__crafting-result > span {
  color: #50718c;
  font: 900 12px "Courier New", monospace;
  letter-spacing: .7px;
  text-transform: uppercase;
}

.stat-calculator__crafting-result > strong {
  margin: 7px 0 4px;
  color: #14758a;
  font: 900 30px "Courier New", monospace;
  text-shadow: 1px 1px 0 #fff;
}

.stat-calculator__crafting-result.is-unavailable {
  border-color: #bd8b69;
  background: #fff1df;
}

.stat-calculator__crafting-result.is-unavailable > strong { color: #9a4e2b; }

.stat-calculator__crafting-status {
  margin: 4px 0 8px;
  color: #335b78;
  font-size: 12px;
  font-weight: 800;
}

.stat-calculator__crafting-status.is-error { color: #9d2444; }

.stat-calculator__crafting-formula {
  max-width: 420px;
  margin: 0;
  color: #687e93;
  font: 12px/1.5 "Courier New", monospace;
}

.stat-calculator__crafting-table-wrap {
  overflow-x: auto;
  border: 1px solid #91abc5;
  background: rgba(250,253,255,.75);
}

.stat-calculator__crafting-table { min-width: 560px; }
.stat-calculator__crafting-table th,
.stat-calculator__crafting-table td { padding: 7px 8px; }
.stat-calculator__crafting-table tbody th { background: transparent; text-transform: none; }

.stat-calculator__crafting-table tbody th span,
.stat-calculator__crafting-table tbody th small { display: block; }

.stat-calculator__crafting-table tbody th small {
  margin-top: 2px;
  color: #7890a8;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.stat-calculator__crafting-table tr.is-unavailable { color: #8a94a2; opacity: .68; }
.stat-calculator__crafting-rate { color: #176d81; font: 900 12px "Courier New", monospace; }
.stat-calculator__crafting-rate--average { background: rgba(99,195,207,.12); }

.stat-calculator__manual-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(92px, 1fr));
  gap: 7px;
}

.stat-calculator__manual-field {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
  color: #4d6787;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.stat-calculator__input--manual {
  width: 100%;
  min-width: 0;
  max-width: none;
  box-sizing: border-box;
}

.stat-calculator__manual-footer {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 9px;
}

.stat-calculator__coverage-notice {
  margin: 0;
  color: #8b4d18;
  font-size: 12px;
  font-weight: 700;
}

.stat-calculator__skill-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.stat-calculator__skill-group + .stat-calculator__skill-group {
  margin-top: 12px;
}

.stat-calculator__skill-group[hidden] { display: none; }

.stat-calculator__skill-group-title {
  margin: 0;
  padding: 4px 7px;
  border-bottom: 1px solid #9db4ca;
  background: linear-gradient(90deg, rgba(207,230,242,.85), rgba(244,228,239,.55));
  color: #294d76;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .5px;
  text-transform: uppercase;
  cursor: pointer;
  list-style-position: inside;
}

.stat-calculator__skill-group-title:hover { color: #177a91; }

.stat-calculator__skill-group[open] .stat-calculator__skill-group-title {
  margin-bottom: 6px;
}

.stat-calculator__skill-group--class {
  padding: 7px;
  border: 1px solid #7ca9bd;
  background: rgba(225, 244, 248, .55);
  box-shadow: inset 1px 1px 0 rgba(255, 255, 255, .9);
}

.stat-calculator__skill-group--class .stat-calculator__skill-group-title {
  margin: -7px -7px 0;
  background: linear-gradient(90deg, #bfe8ee, #e9ddeb);
  color: #174e67;
}

.stat-calculator__skill-group--class[open] .stat-calculator__skill-group-title {
  margin: -7px -7px 7px;
}

.stat-calculator__skill-buff {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px 9px;
  min-width: 0;
  padding: 9px;
  border: 1px solid #9db4ca;
  background: rgba(247,251,255,.8);
  box-shadow: inset 1px 1px 0 #fff;
}

.stat-calculator__skill-buff[hidden] { display: none; }

.stat-calculator__skill-buff.is-active {
  border-color: #2693a7;
  background: linear-gradient(180deg, #e8fbfd, #d7edf3);
  box-shadow: inset 3px 0 0 #36b7c8, inset 1px 1px 0 #fff;
}

.stat-calculator__skill-buff.is-blocked {
  border-color: #c08a62;
  background: #fff4e7;
  box-shadow: inset 3px 0 0 #d08b4f, inset 1px 1px 0 #fff;
}

.stat-calculator__skill-buff.is-learned:not(.is-active):not(.is-blocked) {
  border-color: #86aebe;
  box-shadow: inset 3px 0 0 #86aebe, inset 1px 1px 0 #fff;
}

.stat-calculator__skill-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  cursor: pointer;
}

.stat-calculator__skill-toggle input {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  margin: 0;
  accent-color: #268fa7;
}

.stat-calculator__skill-identity {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}

.stat-calculator__skill-identity strong {
  overflow: hidden;
  color: #17325e;
  font: 900 12px Tahoma, Verdana, Arial, sans-serif;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stat-calculator__skill-identity small {
  color: #637d99;
  font-size: 12px;
}

.stat-calculator__input--skill-level {
  width: 66px;
  min-height: 25px;
  padding: 2px 4px;
}

.stat-calculator__skill-fixed-level {
  min-width: 48px;
  color: #617995;
  font: 700 12px "Courier New", monospace;
  text-align: right;
}

.stat-calculator__skill-parameters {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
}

.stat-calculator__skill-parameter {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
  color: #617995;
  font-size: 12px;
  font-weight: 700;
}

.stat-calculator__skill-parameter--checkbox {
  grid-column: 1 / -1;
  flex-direction: row;
  align-items: center;
}

.stat-calculator__input--skill-parameter {
  width: 100%;
  min-width: 0;
  min-height: 24px;
  box-sizing: border-box;
  padding: 2px 4px;
}

.stat-calculator__skill-effect {
  grid-column: 1 / -1;
  min-height: 12px;
  margin: 0;
  color: #55708c;
  font-size: 12px;
  line-height: 1.35;
}

.stat-calculator__skill-buff.is-active .stat-calculator__skill-effect { color: #1c6674; }
.stat-calculator__skill-buff.is-blocked .stat-calculator__skill-effect { color: #945522; }

.stat-calculator__skill-footer {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 9px;
  color: #617995;
  font-size: 12px;
}

.stat-calculator__equipment-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 12px;
}

.stat-calculator__equipment-slot {
  min-width: 0;
  padding: 0 9px 9px;
  border: 2px outset #99b0c8;
  border-radius: 0;
  background: rgba(247,251,255,.88);
  box-shadow: 3px 3px 0 rgba(42,70,110,.17);
}

.stat-calculator__equipment-slot.is-equipped {
  border-color: #5795aa;
  background: rgba(242,252,255,.94);
  box-shadow: inset 3px 0 0 #42b8ca, 3px 3px 0 rgba(42,70,110,.17);
}

.stat-calculator__equipment-slot.is-invalid {
  border-color: #bf7441;
  background: #fff6e9;
  box-shadow: inset 3px 0 0 #db8245, 3px 3px 0 rgba(89,57,35,.16);
}

.stat-calculator__equipment-slot.is-invalid .stat-calculator__equipment-slot-title {
  border-bottom-color: #c48a62;
  background: linear-gradient(90deg, #f1cda8, #fff0dc 65%, #f2dce5);
  color: #713a20;
}

.stat-calculator__equipment-slot.is-invalid .stat-calculator__equipment-summary {
  border-color: #d5a27d;
  background: #fff0dc;
  color: #8b451f;
  font-weight: 700;
}

.stat-calculator__equipment-slot.is-mirrored {
  border-color: #899fb5;
  background: rgba(228,237,245,.78);
  box-shadow: inset 3px 0 0 #91a8bc, 3px 3px 0 rgba(42,70,110,.13);
}

.stat-calculator__equipment-slot.is-mirrored .stat-calculator__equipment-slot-title {
  background: linear-gradient(90deg, #c9d6e2, #e7edf3 65%, #eadde6);
  color: #526a83;
}

.stat-calculator__equipment-slot.is-mirrored select:disabled,
.stat-calculator__equipment-slot.is-mirrored input:disabled {
  cursor: not-allowed;
  opacity: .75;
}

.stat-calculator__equipment-slot.is-mirrored .stat-calculator__equipment-summary {
  color: #687d92;
}

.stat-calculator__equipment-slot-title {
  margin: 0 -9px 8px;
  padding: 6px 8px 6px 20px;
  border-bottom: 1px solid #809fbd;
  background: linear-gradient(90deg, #c0ddeb, #e3edf6 65%, #f0d5e6);
  color: #17325e;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .6px;
  text-transform: uppercase;
  text-shadow: 1px 1px 0 #fff;
}

.stat-calculator__equipment-slot-title::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin: 0 7px 1px -12px;
  border: 1px solid #47748f;
  background: #55bbcc;
}

.stat-calculator__equipment-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.stat-calculator__equipment-control {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
}

.stat-calculator__input--equipment {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.stat-calculator__equipment-control--item,
.stat-calculator__equipment-summary {
  grid-column: 1 / -1;
}

.stat-calculator__equipment-summary {
  min-height: 27px;
  margin: -1px 0 1px;
  padding: 5px 7px;
  border: 1px solid #c2d1df;
  background: #edf5fb;
  color: #58718d;
  font-size: 12px;
  line-height: 1.35;
}

.stat-calculator__set-summary {
  margin: 0 0 12px;
  border: 1px solid #91abc5;
  background: #eef6fc;
}

.stat-calculator__set-summary-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 8px;
  border-bottom: 1px solid #a6bbcf;
  background: linear-gradient(90deg, #d6eaf5, #f1e1ec);
  color: #24466e;
  font-size: 12px;
  text-transform: uppercase;
}

.stat-calculator__set-count {
  display: inline-grid;
  min-width: 20px;
  min-height: 18px;
  place-items: center;
  border: 1px solid #7293b4;
  background: #fff;
  color: #17325e;
  font: 900 12px "Courier New", monospace;
}

.stat-calculator__set-list { padding: 6px 8px; }

.stat-calculator__set-empty {
  margin: 0;
  color: #637d99;
  font-size: 12px;
}

.stat-calculator__set-row {
  display: grid;
  grid-template-columns: minmax(180px, .9fr) minmax(220px, 1.4fr);
  gap: 10px;
  padding: 5px 0;
  border-bottom: 1px dotted #b4c7d8;
  font-size: 12px;
}

.stat-calculator__set-row:last-child { border-bottom: 0; }
.stat-calculator__set-row strong { color: #1e4c70; }
.stat-calculator__set-row span { color: #526f89; }

.stat-calculator__notice,
.stat-calculator__debug {
  margin: 0 0 12px;
  padding: 8px 10px;
  border-radius: 0;
  font: 12px "Courier New", monospace;
  box-shadow: 3px 3px 0 rgba(42,70,110,.18);
}

.stat-calculator__notice {
  border: 2px outset #70a6b9;
  background: #d9f4fb;
  color: #174766;
}

.stat-calculator__debug {
  overflow-x: auto;
  border: 2px inset #9aaec4;
  background: #edf4fb;
  color: #536c91;
  white-space: pre-wrap;
}

.stat-calculator__error {
  margin: 0;
  padding: 9px 11px;
  border: 2px outset #c06b80;
  background: #ffe2e9;
  color: #7b1f38;
  box-shadow: 3px 3px 0 rgba(42,70,110,.18);
}

@media (max-width: 1040px) {
	.stat-calculator__toolbar { grid-template-columns: repeat(4, minmax(0, 1fr)); }
	.stat-calculator__manual-grid { grid-template-columns: repeat(4, minmax(92px, 1fr)); }
  .stat-calculator__skill-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-calculator__primary-grid {
    grid-template-columns: minmax(190px, .75fr) minmax(255px, .85fr) minmax(350px, 1.3fr);
  }

  .stat-calculator__derived-columns { grid-template-columns: repeat(2, minmax(130px, 1fr)); }

  .stat-calculator__derived-list:nth-child(3) {
    margin-top: 10px;
    padding-left: 0;
    border-left: 0;
    box-shadow: none;
  }

  .stat-calculator__crafting-layout { grid-template-columns: 1fr; }
}

@media (max-width: 820px) {
  .stat-calculator__panel { padding: 12px 10px; }
  .stat-calculator__primary-grid { grid-template-columns: 1fr; }
  .stat-calculator__primary-column { padding: 13px 0; }
  .stat-calculator__primary-column:first-child { padding-top: 0; padding-left: 0; }
  .stat-calculator__primary-column:last-child { padding-right: 0; padding-bottom: 0; }

  .stat-calculator__primary-column + .stat-calculator__primary-column {
    border-top: 1px solid #9eb4ca;
    border-left: 0;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.72);
  }

  .stat-calculator__section--meta .stat-calculator__input { max-width: 100%; }

  .stat-calculator__equipment-grid { grid-template-columns: 1fr; }
	.stat-calculator__toolbar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.stat-calculator__manual-grid { grid-template-columns: repeat(3, minmax(82px, 1fr)); }
  .stat-calculator__crafting-header { flex-direction: column; }
  .stat-calculator__crafting-stats { justify-content: flex-start; }
  .stat-calculator__crafting-disclosure { align-self: stretch; }
  .stat-calculator__crafting-controls,
  .stat-calculator__crafting-controls--materials,
  .stat-calculator__crafting-controls--brew { grid-template-columns: repeat(2, minmax(120px, 1fr)); }
}

@media (max-width: 540px) {
  .stat-calculator__derived-columns { grid-template-columns: 1fr; }

  .stat-calculator__derived-list,
  .stat-calculator__derived-list:first-child,
  .stat-calculator__derived-list:last-child,
  .stat-calculator__derived-list:not(:first-child) {
    margin-top: 0;
    padding: 0;
    border-left: 0;
    box-shadow: none;
  }

  .stat-calculator__derived-list + .stat-calculator__derived-list { margin-top: 9px; }
  .stat-calculator__equipment-grid { grid-template-columns: 1fr; }
	.stat-calculator__skill-grid { grid-template-columns: 1fr; }
	.stat-calculator__manual-grid { grid-template-columns: repeat(2, minmax(82px, 1fr)); }
	.stat-calculator__manual-footer { align-items: stretch; flex-direction: column; }
  .stat-calculator__skill-footer { align-items: stretch; flex-direction: column; }
  .stat-calculator__set-row { grid-template-columns: 1fr; gap: 3px; }
  .stat-calculator__crafting-controls,
  .stat-calculator__crafting-controls--materials,
  .stat-calculator__crafting-controls--brew { grid-template-columns: 1fr; }
  .stat-calculator__crafting-tabs { align-items: stretch; flex-direction: column; border-bottom: 0; }
  .stat-calculator__crafting-tab { width: 100%; margin: 0; }
  .stat-calculator__crafting-tab.is-active { border-bottom-color: #3d91a6; }
}
