:root {
  --yellow: #ffe900;
  --ink: #090b0b;
  --panel: #121616;
  --panel2: #181d1d;
  --line: #343b39;
  --text: #f3f4ee;
  --muted: #9ba29f;
  --danger: #ff675d;
  --green: #8ad65d;
  --shadow: 0 18px 60px #0009;
}
* {
  box-sizing: border-box;
}
html {
  color-scheme: dark;
}
body {
  margin: 0;
  background: radial-gradient(circle at 82% 8%, #2a2a111f, transparent 30%),
    linear-gradient(135deg, #0d1010, #080909 58%, #11120b);
  color: var(--text);
  font:
    16px/1.45 "Arial Narrow",
    "Roboto Condensed",
    Inter,
    system-ui,
    sans-serif;
  min-height: 100vh;
}
body:before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.22;
  background-image: linear-gradient(#fff1 1px, transparent 1px),
    linear-gradient(90deg, #fff1 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, #000, transparent 72%);
}
button,
input {
  font: inherit;
}
.topbar {
  height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(18px, 4vw, 58px);
  border-bottom: 1px solid var(--line);
  background: #0b0d0dec;
  position: relative;
  z-index: 3;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
  letter-spacing: 0.08em;
}
.brand-mark {
  position: relative;
  display: block;
  width: 42px;
  height: 42px;
  overflow: hidden;
  color: var(--ink);
  background: var(--yellow);
  clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%);
}
.brand-mark img {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 350px;
  height: auto;
  max-width: none;
  transform: translate(-50%, -65%);
  filter: none;
}
.brand b {
  display: block;
  font-size: 19px;
  line-height: 1;
}
.brand small {
  display: block;
  color: var(--yellow);
  font-size: 11px;
  margin-top: 5px;
}
.status {
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--muted);
}
.status span {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 12px var(--green);
  margin-right: 8px;
}
main {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-height: calc(100vh - 126px);
  position: relative;
  z-index: 1;
}
.workspace {
  padding: clamp(24px, 4vw, 58px);
  max-width: 1180px;
  width: 100%;
  margin: 0 auto;
}
.command-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}
.eyebrow {
  color: var(--yellow);
  font-size: 12px;
  letter-spacing: 0.2em;
  font-weight: 800;
  margin: 0 0 7px;
}
h1 {
  font-size: clamp(24px, 3.4vw, 48px);
  text-transform: uppercase;
  white-space: nowrap;
  letter-spacing: -0.035em;
  line-height: 0.95;
  margin: 0;
  max-width: none;
}
h2 {
  margin: 0;
  text-transform: uppercase;
  font-size: 24px;
  letter-spacing: -0.02em;
}
.actions {
  display: flex;
  gap: 10px;
  margin: 28px 0 18px;
}
.primary-action,
.secondary,
.icon-button,
.reroll,
.lock,
.tab,
.text-button {
  border: 0;
  cursor: pointer;
}
.primary-action {
  background: var(--yellow);
  color: #080900;
  padding: 15px 22px;
  font-weight: 900;
  letter-spacing: 0.08em;
  clip-path: polygon(
    0 0,
    calc(100% - 13px) 0,
    100% 13px,
    100% 100%,
    13px 100%,
    0 calc(100% - 13px)
  );
  transition:
    transform 0.15s,
    filter 0.15s;
}
.primary-action:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}
.secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
  padding: 12px 16px;
  font-weight: 700;
}
.secondary:hover {
  border-color: var(--yellow);
  color: var(--yellow);
}
.settings-toggle {
  display: block;
  white-space: nowrap;
}
.rule-strip {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  padding: 12px 15px;
  border: 1px solid #565025;
  background: #211f10;
  font-size: 13px;
  color: #c8c7bb;
}
.rule-strip b {
  color: var(--yellow);
  letter-spacing: 0.07em;
}
.rule-strip span:before {
  content: "✓";
  color: var(--yellow);
  margin-right: 6px;
}
.rule-note {
  margin: 7px 4px 0;
  color: var(--muted);
  font-size: 12px;
}
.operation-designation {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 12px 16px;
  background: linear-gradient(90deg, #211f10, #12150f);
  border-left: 4px solid var(--yellow);
  border-top: 1px solid #4d4925;
  border-bottom: 1px solid #4d4925;
}
.operation-name {
  display: flex;
  align-items: center;
  gap: 13px;
  min-width: 0;
}
.operation-name span,
.difficulty-readout span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
  white-space: nowrap;
}
.operation-name strong {
  color: var(--yellow);
  font-size: clamp(16px, 2vw, 24px);
  line-height: 1.05;
  letter-spacing: 0.035em;
}
.difficulty-readout {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  padding-left: 18px;
  border-left: 1px solid #4d4925;
}
.difficulty-readout strong {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--yellow);
}
.difficulty-readout b {
  font-size: 24px;
  line-height: 1;
}
.difficulty-readout em {
  max-width: 100px;
  font-size: 10px;
  font-style: normal;
  letter-spacing: 0.07em;
  line-height: 1.15;
}
.loadout {
  margin-top: 18px;
}
.equipment-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.slot,
.strat-card {
  position: relative;
  background: linear-gradient(145deg, #191d1c, #101313);
  border: 1px solid var(--line);
  overflow: hidden;
}
.slot:before,
.strat-card:before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 4px;
  height: 100%;
  background: var(--yellow);
}
.slot {
  min-height: 112px;
  padding: 18px 94px 16px 22px;
}
.slot.booster {
  grid-column: 1/-1;
}
.slot-type,
.strat-number {
  font-size: 11px;
  color: var(--yellow);
  font-weight: 800;
  letter-spacing: 0.16em;
}
.slot-name {
  font-size: 21px;
  font-weight: 850;
  text-transform: uppercase;
  margin-top: 12px;
  line-height: 1.08;
}
.slot-meta,
.strat-meta {
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
}
.slot-controls,
.strat-controls {
  position: absolute;
  z-index: 2;
  top: 14px;
  right: 12px;
  display: flex;
  gap: 6px;
}
.reroll,
.lock {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: var(--text);
  background: #242a28;
  border: 1px solid var(--line);
}
.reroll:hover,
.lock:hover {
  border-color: var(--yellow);
  color: var(--yellow);
}
.lock.active {
  background: var(--yellow);
  color: var(--ink);
  border-color: var(--yellow);
}
.section-label {
  display: flex;
  justify-content: space-between;
  margin: 25px 0 9px;
  color: var(--muted);
  letter-spacing: 0.13em;
  font-size: 11px;
  font-weight: 800;
}
.strat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.strat-card {
  min-height: 154px;
  padding: 17px 12px 14px 18px;
}
.strat-name {
  margin-top: 34px;
  font-weight: 850;
  font-size: 17px;
  text-transform: uppercase;
  line-height: 1.08;
}
.strat-card .strat-controls {
  top: 10px;
}
.strat-tags {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.tag {
  border: 1px solid #4a504d;
  color: #bfc5c2;
  padding: 2px 5px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.error {
  color: var(--danger);
  font-weight: 700;
  min-height: 24px;
}
.settings {
  position: fixed;
  z-index: 20;
  top: 74px;
  right: 0;
  bottom: 0;
  width: min(430px, 94vw);
  padding: 26px 22px;
  overflow: auto;
  background: #101313f7;
  border-left: 1px solid var(--line);
  box-shadow: -12px 0 45px #0008;
  transform: translateX(105%);
  visibility: hidden;
  pointer-events: none;
  transition:
    transform 0.2s ease,
    visibility 0.2s;
}
.settings.open {
  transform: translateX(0);
  visibility: visible;
  pointer-events: auto;
}
body.settings-open {
  overflow: hidden;
}
.settings-backdrop {
  position: fixed;
  z-index: 19;
  inset: 74px 0 0;
  border: 0;
  background: #0008;
  cursor: pointer;
}
.settings-backdrop[hidden] {
  display: none;
}
.settings-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.icon-button {
  display: block;
  background: transparent;
  color: var(--text);
  font-size: 30px;
}
.tabs {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  margin: 24px 0 15px;
  padding-bottom: 4px;
}
.tab {
  background: #1a1f1e;
  color: var(--muted);
  padding: 8px 12px;
  border-bottom: 2px solid transparent;
  font-size: 12px;
  text-transform: uppercase;
  white-space: nowrap;
}
.tab.active {
  color: var(--yellow);
  border-color: var(--yellow);
  background: #24230e;
}
.pool-tools {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.search {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  background: #090b0b;
  padding: 9px 11px;
}
.search:focus-within {
  border-color: var(--yellow);
}
.search input {
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  width: 100%;
  font-size: 14px;
}
.text-button {
  background: transparent;
  color: var(--yellow);
  padding: 3px 10px 3px 0;
  font-size: 12px;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.pool-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding: 13px 0 9px;
  color: var(--muted);
  font-size: 12px;
}
.checklist {
  display: flex;
  flex-direction: column;
  padding-top: 5px;
}
.check-row {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 8px;
  padding: 10px 4px;
  border-bottom: 1px solid #252a28;
  cursor: pointer;
}
.check-row:hover {
  background: #1a1e1d;
}
.check-row input,
.warbond-card input {
  accent-color: var(--yellow);
  width: 18px;
  height: 18px;
}
.check-name {
  font-size: 14px;
  font-weight: 700;
}
.check-meta {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-top: 2px;
}
.empty {
  color: var(--muted);
  padding: 28px 6px;
  text-align: center;
}
.slot.with-visual {
  padding-left: 138px;
  min-height: 130px;
}
.weapon-image {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 106px;
  height: 90px;
  object-fit: contain;
  filter: drop-shadow(0 10px 12px #000b);
}
.slot-copy {
  position: relative;
  z-index: 1;
}
.strat-card {
  min-height: 202px;
  padding-top: 14px;
}
.strat-image {
  position: absolute;
  left: 18px;
  top: 47px;
  width: 66px;
  height: 66px;
  object-fit: contain;
  filter: drop-shadow(0 7px 8px #000b);
}
.strat-copy {
  position: relative;
  z-index: 1;
}
.strat-card .strat-name {
  margin-top: 106px;
}
.check-row.visual-check {
  grid-template-columns: 46px 22px 1fr;
  align-items: center;
}
.check-image {
  width: 42px;
  height: 42px;
  object-fit: contain;
  background: #090b0b;
  border: 1px solid var(--line);
  padding: 4px;
}
.warbond-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 15px 0;
}
.warbond-section h3 {
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--yellow);
  margin: 3px 0 1px;
}
.warbond-card {
  border: 1px solid var(--line);
  background: #151918;
  padding: 10px;
  transition:
    opacity 0.15s,
    border-color 0.15s;
}
.warbond-card.disabled {
  opacity: 0.55;
}
.warbond-card.enabled {
  border-color: #545d58;
}
.warbond-card.always {
  background: #19190e;
  border-color: #5e5724;
}
.warbond-top {
  display: grid;
  grid-template-columns: 52px 1fr auto;
  align-items: center;
  gap: 10px;
}
.warbond-image {
  width: 52px;
  height: 52px;
  object-fit: cover;
  border: 1px solid #5a5f5c;
  background: #090b0b;
}
.warbond-title {
  min-width: 0;
}
.fixed-badge {
  font-size: 9px;
  letter-spacing: 0.1em;
  font-weight: 900;
  color: var(--ink);
  background: var(--yellow);
  padding: 5px 6px;
  white-space: nowrap;
}
.warbond-card details {
  border-top: 1px solid #292e2c;
  margin-top: 8px;
  padding-top: 6px;
}
.warbond-card summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 11px;
}
.weapon-mini-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: 9px;
}
.weapon-mini {
  display: grid;
  grid-template-columns: 38px 1fr;
  align-items: center;
  gap: 6px;
  background: #0c0f0e;
  padding: 5px;
  font-size: 11px;
  line-height: 1.15;
}
.mini-image {
  width: 38px;
  height: 32px;
  object-fit: contain;
}
.weapon-mini small {
  display: block;
  color: var(--muted);
  font-size: 9px;
  margin-top: 3px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
footer {
  min-height: 52px;
  border-top: 1px solid var(--line);
  padding: 12px clamp(18px, 4vw, 58px);
  color: #858d89;
  font-size: 11px;
  position: relative;
  z-index: 2;
}
.footer-row {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
}
.footer-link {
  border: 0;
  padding: 3px 0;
  color: #c4cbc7;
  background: transparent;
  font: inherit;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-decoration: underline;
  text-decoration-color: #565d59;
  text-underline-offset: 4px;
  cursor: pointer;
}
.footer-link:hover {
  color: var(--yellow);
  text-decoration-color: var(--yellow);
}
.footer-link:focus-visible {
  outline: 2px solid var(--yellow);
  outline-offset: 3px;
}
.patch-notes-dialog {
  width: min(620px, calc(100vw - 28px));
  max-height: min(760px, calc(100vh - 28px));
  margin: auto;
  padding: 0;
  overflow: auto;
  border: 1px solid #6b7040;
  border-radius: 0;
  color: var(--text);
  background: #101413;
  box-shadow:
    0 28px 80px #000d,
    inset 0 3px 0 var(--yellow);
}
.patch-notes-dialog::backdrop {
  background: #020303dc;
  backdrop-filter: blur(3px);
}
.patch-notes-card {
  padding: clamp(22px, 5vw, 38px);
}
.patch-notes-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid #343b38;
}
.patch-notes-head h2 {
  margin: 5px 0 0;
  color: #fff;
  font-size: clamp(28px, 6vw, 44px);
  line-height: 1;
  letter-spacing: -0.035em;
  text-transform: uppercase;
}
#patchNotesSummary {
  margin: 20px 0 0;
  color: #c4cbc7;
  font-size: 15px;
  line-height: 1.55;
}
.patch-notes-list {
  display: grid;
  gap: 12px;
  margin: 20px 0;
  padding: 0;
  list-style: none;
}
.patch-notes-list li {
  position: relative;
  padding: 14px 15px 14px 37px;
  border: 1px solid #303735;
  background: #171c1a;
  color: #aeb6b2;
  font-size: 14px;
  line-height: 1.5;
}
.patch-notes-list li::before {
  content: "◆";
  position: absolute;
  top: 15px;
  left: 14px;
  color: var(--yellow);
  font-size: 11px;
}
.patch-notes-list strong {
  display: block;
  margin-bottom: 2px;
  color: #f4f6f5;
}
.previous-build-note {
  display: grid;
  gap: 5px;
  padding: 14px 15px;
  border-left: 3px solid var(--yellow);
  background: #25260f;
  color: #b8bfbb;
  font-size: 13px;
  line-height: 1.45;
}
.previous-build-note b {
  color: var(--yellow);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.patch-notes-ack {
  width: 100%;
  margin-top: 22px;
}
.legal-panel {
  max-width: 1000px;
  margin: 9px auto 0;
  border-top: 1px solid #252b29;
  padding-top: 8px;
}
.legal-panel summary {
  cursor: pointer;
  color: #aeb5b1;
  font-weight: 700;
  letter-spacing: 0.06em;
}
.legal-panel p {
  margin: 8px 0;
  line-height: 1.5;
}
.legal-panel a {
  color: var(--yellow);
  text-underline-offset: 3px;
}
.modifier-console {
  margin: 0 0 18px;
}
.modifier-switches {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 10px;
}
.modifier-switches label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  background: #101313;
  cursor: pointer;
}
.modifier-switches b {
  display: block;
  color: var(--text);
  font-size: 12px;
  letter-spacing: 0.1em;
}
.modifier-switches small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-top: 2px;
}
.modifier-switches input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.modifier-switches i {
  position: relative;
  flex: 0 0 40px;
  width: 40px;
  height: 22px;
  border: 1px solid #626966;
  background: #242927;
}
.modifier-switches i:after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  left: 3px;
  top: 3px;
  background: #8d9490;
  transition:
    left 0.15s,
    background 0.15s;
}
.modifier-switches input:checked + i {
  border-color: var(--yellow);
  background: #34300c;
}
.modifier-switches input:checked + i:after {
  left: 21px;
  background: var(--yellow);
}
.modifier-switches input:focus-visible + i {
  outline: 2px solid #fff;
  outline-offset: 2px;
}
.modifier-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.modifier-card {
  min-height: 126px;
  padding: 13px 15px;
  background: linear-gradient(145deg, #171b1a, #0d1010);
  border: 1px solid var(--line);
  border-left: 4px solid var(--yellow);
}
.modifier-card.disabled {
  opacity: 0.55;
  border-left-color: #555;
}
.modifier-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--yellow);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
}
.modifier-card-head > div {
  display: flex;
  gap: 5px;
}
.modifier-card .reroll,
.modifier-card .lock {
  width: 29px;
  height: 29px;
}
.modifier-card button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
.modifier-card strong {
  display: block;
  margin-top: 9px;
  font-size: 18px;
  text-transform: uppercase;
}
.modifier-card p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}
.slot button:disabled,
.strat-card button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
@media (max-width: 1050px) {
  .settings {
    top: 0;
    height: 100vh;
    width: min(420px, 94vw);
    box-shadow: var(--shadow);
  }
  .settings-backdrop {
    inset: 0;
  }
  .strat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 650px) {
  .topbar {
    height: 64px;
  }
  .status {
    display: none;
  }
  .workspace {
    padding: 22px 16px;
  }
  .command-head {
    display: block;
  }
  h1 {
    font-size: clamp(17px, 5.4vw, 24px);
  }
  .settings-toggle {
    margin-top: 18px;
    width: 100%;
  }
  .actions {
    display: grid;
    grid-template-columns: 1fr auto;
  }
  .primary-action {
    padding: 14px 12px;
  }
  .operation-designation {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }
  .operation-name {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }
  .difficulty-readout {
    width: 100%;
    padding: 9px 0 0;
    border-top: 1px solid #4d4925;
    border-left: 0;
  }
  .equipment-grid,
  .strat-grid {
    grid-template-columns: 1fr;
  }
  .slot {
    min-height: 104px;
  }
  .slot.with-visual {
    padding-left: 118px;
  }
  .weapon-image {
    width: 88px;
  }
  .strat-card {
    min-height: 148px;
    padding-left: 100px;
  }
  .strat-image {
    top: 50%;
    transform: translateY(-50%);
    width: 65px;
    height: 65px;
  }
  .strat-card .strat-name {
    margin-top: 30px;
  }
  .settings {
    padding: 22px 18px;
  }
  .brand b {
    font-size: 17px;
  }
  .weapon-mini-grid {
    grid-template-columns: 1fr;
  }
  footer {
    display: block;
  }
  footer span {
    display: block;
    margin: 3px 0;
  }
}
.armor-loadout-image {
  position: absolute;
  left: 21px;
  top: 50%;
  transform: translateY(-50%);
  width: 96px;
  height: 104px;
  object-fit: contain;
  filter: drop-shadow(0 10px 12px #000b);
}
.booster-loadout-image {
  position: absolute;
  left: 31px;
  top: 50%;
  transform: translateY(-50%);
  width: 78px;
  height: 78px;
  object-fit: contain;
  filter: drop-shadow(0 10px 12px #000b);
}
.source-card {
  border: 1px solid var(--line);
  background: #151918;
  padding: 11px;
  margin-bottom: 9px;
}
.source-card.superstore {
  border-color: #756c28;
  background: #19190f;
}
.source-head {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}
.source-title {
  min-width: 0;
}
.source-toggle {
  display: grid;
  justify-items: center;
  gap: 2px;
  color: var(--yellow);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.1em;
}
.source-toggle input,
.item-check input {
  accent-color: var(--yellow);
  width: 18px;
  height: 18px;
}
.individual-badge {
  max-width: 86px;
  padding: 5px 6px;
  background: var(--yellow);
  color: var(--ink);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-align: center;
  line-height: 1.2;
}
.source-card details {
  border-top: 1px solid #303633;
  margin-top: 10px;
  padding-top: 7px;
}
.source-card summary {
  cursor: pointer;
  color: #c1c6c3;
  font-size: 12px;
  font-weight: 700;
}
.source-subgroup {
  margin: 12px 0;
}
.source-subgroup h4,
.armor-section h3,
.stratagem-section h3 {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0 0 5px;
  color: var(--yellow);
  font-size: 10px;
  letter-spacing: 0.12em;
}
.source-subgroup h4 span,
.armor-section h3 span,
.stratagem-section h3 span {
  color: var(--muted);
}
.source-items,
.armor-list,
.stratagem-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.item-check {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) 22px;
  align-items: center;
  gap: 10px;
  min-height: 66px;
  padding: 7px;
  background: #0c0f0e;
  border: 1px solid #282e2b;
  cursor: pointer;
}
.item-check:hover {
  border-color: #686f6b;
  background: #151918;
}
.item-check.disabled {
  opacity: 0.5;
}
.item-copy {
  min-width: 0;
}
.item-check .check-name {
  display: block;
  line-height: 1.18;
}
.check-image {
  width: 48px;
  height: 48px;
  object-fit: contain;
  background: #090b0b;
  border: 1px solid var(--line);
  padding: 4px;
}
.armor-thumb {
  width: 52px;
  height: 62px;
  object-fit: contain;
  background: linear-gradient(145deg, #171b19, #080a09);
  border: 1px solid #3c433f;
  padding: 2px;
}
.compact-item {
  grid-template-columns: 44px minmax(0, 1fr) 20px;
  min-height: 56px;
}
.compact-item .check-image {
  width: 42px;
  height: 42px;
}
.compact-item .armor-thumb {
  width: 42px;
  height: 50px;
}
.compact-item .check-name {
  font-size: 12px;
}
.compact-item .check-meta {
  font-size: 10px;
}
.armor-section,
.stratagem-section {
  margin: 15px 0 20px;
}
.armor-section h3,
.stratagem-section h3 {
  position: sticky;
  top: -6px;
  z-index: 2;
  padding: 8px 4px;
  background: #101313ee;
  border-bottom: 1px solid #4e522c;
  font-size: 11px;
}
.armor-list .item-check {
  grid-template-columns: 64px minmax(0, 1fr) 24px;
  min-height: 82px;
  padding: 8px;
}
.armor-list .armor-thumb {
  width: 60px;
  height: 70px;
}
.armor-list .check-name {
  font-size: 14px;
}
.armor-list .check-meta {
  font-size: 11px;
  line-height: 1.35;
  margin-top: 5px;
}
.booster-check-image {
  object-fit: contain;
  padding: 3px;
}
.build-version {
  color: var(--yellow);
  font-weight: 800;
  letter-spacing: 0.11em;
  white-space: nowrap;
}
@media (max-width: 650px) {
  .modifier-switches,
  .modifier-grid {
    grid-template-columns: 1fr;
  }
  .footer-row {
    justify-content: center;
  }
  .patch-notes-card {
    padding: 24px 18px 20px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
.deployment-profile {
  display: grid;
  grid-template-columns:
    minmax(0, 1.35fr) minmax(250px, 0.8fr)
    minmax(220px, 0.65fr);
  gap: 10px;
  margin: 0 0 18px;
}
.front-control,
.chaos-control,
.difficulty-control {
  min-width: 0;
  margin: 0;
  padding: 13px 15px;
  border: 1px solid var(--line);
  background: #101313;
}
.front-control legend,
.control-kicker {
  padding: 0 5px;
  color: var(--yellow);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
}
.front-options {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
}
.front-options label {
  cursor: pointer;
}
.front-options input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.front-options span {
  display: grid;
  place-items: center;
  min-height: 38px;
  padding: 7px 5px;
  border: 1px solid #3a423f;
  background: #191e1c;
  color: #aeb5b1;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-align: center;
}
.front-options input:checked + span {
  border-color: var(--yellow);
  background: #302d0b;
  color: var(--yellow);
}
.front-options input:focus-visible + span {
  outline: 2px solid #fff;
  outline-offset: 2px;
}
.front-control p,
.chaos-control small,
.difficulty-control p {
  display: block;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}
.chaos-control {
  display: block;
  cursor: pointer;
}
/* Difficulty has a master switch and a sliding two-mode selector. */
.difficulty-control-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.difficulty-control-head > div {
  min-width: 0;
}
.difficulty-control-head .control-kicker {
  display: block;
  padding: 0;
}
.difficulty-control-head strong {
  display: block;
  margin-top: 4px;
  color: var(--text);
  font-size: 13px;
  letter-spacing: 0.08em;
}
.difficulty-enable-switch {
  position: relative;
  flex: 0 0 44px;
  width: 44px;
  height: 24px;
  cursor: pointer;
}
.difficulty-enable-switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.difficulty-enable-switch i {
  position: absolute;
  inset: 0;
  border: 1px solid #626966;
  background: #242927;
}
.difficulty-enable-switch i::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  background: #8d9490;
  transition:
    transform 0.16s ease,
    background 0.16s ease;
}
.difficulty-enable-switch input:checked + i {
  border-color: var(--yellow);
  background: #34300c;
}
.difficulty-enable-switch input:checked + i::after {
  transform: translateX(20px);
  background: var(--yellow);
}
.difficulty-enable-switch input:focus-visible + i {
  outline: 2px solid #fff;
  outline-offset: 2px;
}
.difficulty-options-panel {
  margin-top: 11px;
  transition: opacity 0.16s ease;
}
.difficulty-mode-fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}
.difficulty-mode-slider {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  padding: 3px;
  border: 1px solid #3a423f;
  background: #090b0b;
}
.difficulty-mode-slider::before {
  content: "";
  position: absolute;
  z-index: 0;
  top: 3px;
  bottom: 3px;
  left: 3px;
  width: calc(50% - 3px);
  background: var(--yellow);
  transition: transform 0.18s ease;
}
.difficulty-mode-slider.true-random::before {
  transform: translateX(100%);
}
.difficulty-mode-slider label {
  position: relative;
  z-index: 1;
  cursor: pointer;
}
.difficulty-mode-slider input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.difficulty-mode-slider span {
  display: grid;
  place-items: center;
  min-height: 34px;
  padding: 6px;
  color: #aeb5b1;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-align: center;
  transition: color 0.16s ease;
}
.difficulty-mode-slider input:checked + span {
  color: var(--ink);
}
.difficulty-mode-slider input:focus-visible + span {
  outline: 2px solid #fff;
  outline-offset: -2px;
}
.difficulty-control.disabled .difficulty-options-panel {
  opacity: 0.4;
}
.difficulty-control.disabled .difficulty-mode-slider label {
  cursor: not-allowed;
}
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
.control-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--text);
  font-size: 11px;
  letter-spacing: 0.12em;
}
.control-heading strong {
  color: var(--yellow);
}
.chaos-control input {
  width: 100%;
  margin: 15px 0 4px;
  accent-color: var(--yellow);
  cursor: pointer;
}
.chaos-scale {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  color: #737b77;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.04em;
}
.chaos-scale span:nth-child(2),
.chaos-scale span:nth-child(3) {
  text-align: center;
}
.chaos-scale span:last-child {
  text-align: right;
}
@media (max-width: 800px) {
  .deployment-profile {
    grid-template-columns: 1fr;
  }
  .front-options {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 650px) {
  .footer-row {
    display: block;
  }
  .footer-row span {
    display: block;
    margin: 3px 0;
  }
}
.actions {
  flex-wrap: wrap;
}
.record-action[aria-pressed="true"] {
  border-color: var(--yellow);
  background: #29270e;
  color: var(--yellow);
}
.share-status {
  min-height: 20px;
  margin: 0 0 10px;
  color: var(--green);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.records-console {
  margin: 4px 0 24px;
  padding: 16px;
  border: 1px solid var(--line);
  background: #0e1111;
}
.records-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 13px;
}
.records-head .eyebrow {
  margin-bottom: 4px;
}
.records-head h2 {
  font-size: 20px;
}
.record-tabs {
  display: flex;
  gap: 5px;
}
.record-tab,
.record-button {
  border: 1px solid var(--line);
  background: #191e1c;
  color: #aeb5b1;
  cursor: pointer;
  font: inherit;
}
.record-tab {
  padding: 8px 10px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.09em;
}
.record-tab span {
  color: var(--yellow);
}
.record-tab.active {
  border-color: var(--yellow);
  background: #302d0b;
  color: var(--yellow);
}
.record-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.record-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  padding: 11px 12px;
  border: 1px solid #2d3431;
  background: #151918;
}
.record-card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.record-card-title strong {
  color: var(--yellow);
  font-size: 14px;
  text-transform: uppercase;
}
.record-card-title time {
  color: #777f7b;
  font-size: 10px;
}
.record-summary {
  margin: 5px 0 0;
  color: #c2c7c4;
  font-size: 12px;
  line-height: 1.4;
}
.record-meta {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 7px;
}
.record-meta span {
  border: 1px solid #3b423f;
  padding: 2px 5px;
  color: #969e9a;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.record-buttons {
  display: flex;
  align-items: center;
  gap: 5px;
}
.record-button {
  min-height: 34px;
  padding: 6px 9px;
  font-size: 10px;
  font-weight: 800;
}
.record-button:hover {
  border-color: var(--yellow);
  color: var(--yellow);
}
.record-empty {
  margin: 0;
  padding: 22px;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  border: 1px dashed #343b39;
}
@media (max-width: 700px) {
  .records-head,
  .record-card {
    display: block;
  }
  .record-tabs {
    margin-top: 12px;
  }
  .record-buttons {
    margin-top: 10px;
    flex-wrap: wrap;
  }
}
@media (max-width: 650px) {
  .actions {
    grid-template-columns: 1fr 1fr;
  }
  .actions .primary-action {
    grid-column: 1/-1;
  }
  .record-action {
    padding: 10px 8px;
    font-size: 12px;
  }
}
.workshop-toggle {
  width: 100%;
  margin-top: 10px;
  letter-spacing: 0.1em;
}
.directive-workshop {
  margin-top: 10px;
  padding: 16px;
  border: 1px solid #686326;
  background: linear-gradient(145deg, #17180e, #0d1010);
  box-shadow: inset 0 0 34px #0005;
}
.directive-workshop[hidden] {
  display: none;
}
.workshop-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}
.workshop-head h2 {
  font-size: 22px;
}
.workshop-close {
  display: block;
}
.workshop-intro {
  max-width: 850px;
  margin: 10px 0 15px;
  color: var(--muted);
  font-size: 13px;
}
.workshop-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 230px;
  gap: 9px;
}
.workshop-fields label,
.rule-composer label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  color: var(--yellow);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
}
.workshop-fields input,
.workshop-fields select,
.rule-composer select {
  min-height: 42px;
  width: 100%;
  border: 1px solid var(--line);
  background: #090b0b;
  color: var(--text);
  padding: 8px 10px;
  font: 14px/1.2 inherit;
}
.workshop-fields input:focus,
.workshop-fields select:focus,
.rule-composer select:focus {
  outline: 2px solid var(--yellow);
  outline-offset: 1px;
}
.rule-composer {
  display: grid;
  grid-template-columns: 150px 150px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: end;
  margin-top: 10px;
  padding: 11px;
  border: 1px solid #343b39;
  background: #101313;
}
.rule-composer .secondary {
  min-height: 42px;
}
.workshop-status {
  min-height: 20px;
  margin: 7px 0;
  color: var(--danger);
  font-size: 12px;
  font-weight: 700;
}
.draft-rule-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 40px;
  padding: 8px;
  border: 1px dashed #3c433f;
}
.draft-rule {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 7px;
  background: #202522;
  border: 1px solid #48504c;
  color: #d4d8d5;
  font-size: 11px;
}
.draft-rule b {
  color: var(--yellow);
  font-size: 9px;
  letter-spacing: 0.08em;
}
.draft-rule button {
  border: 0;
  background: transparent;
  color: #b8bfbb;
  cursor: pointer;
  font-size: 17px;
  line-height: 1;
}
.draft-rule button:hover {
  color: var(--danger);
}
.draft-empty {
  color: var(--muted);
  font-size: 11px;
  margin: auto 0;
}
.workshop-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}
.workshop-actions .primary-action {
  padding: 11px 15px;
}
.saved-directives {
  margin-top: 18px;
  border-top: 1px solid #343b39;
}
.saved-directive-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  padding: 10px 12px;
  margin-top: 6px;
  border: 1px solid #343b39;
  background: #101313;
}
.saved-directive-card strong {
  font-size: 14px;
  text-transform: uppercase;
}
.saved-directive-card p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 11px;
}
.saved-directive-actions {
  display: flex;
  align-items: center;
  gap: 5px;
}
.difficulty {
  display: inline-flex;
  align-items: center;
  width: max-content;
  padding: 3px 6px;
  border: 1px solid currentColor;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}
.difficulty-bronze {
  color: #c38b5f;
}
.difficulty-silver {
  color: #c9d0d0;
}
.difficulty-gold {
  color: var(--yellow);
}
.difficulty-helldive-this-shit {
  color: #ff675d;
}
.modifier-title-line {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 9px;
}
.modifier-title-line strong {
  margin-top: 0;
}
.modifier-title-line .difficulty {
  margin-left: auto;
}
@media (max-width: 800px) {
  .rule-composer {
    grid-template-columns: 1fr 1fr;
  }
  .rule-item-field {
    grid-column: 1/-1;
  }
  .rule-composer .secondary {
    grid-column: 1/-1;
  }
  .workshop-fields {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 650px) {
  .saved-directive-card {
    display: block;
  }
  .saved-directive-actions {
    margin-top: 9px;
    flex-wrap: wrap;
  }
  .workshop-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
  .workshop-actions button {
    width: 100%;
  }
}
.record-action[aria-pressed="true"],
.record-button.favorite-toggle.active {
  border-color: var(--yellow);
  background: var(--yellow);
  color: var(--ink);
  box-shadow: 0 0 16px #ffe90040;
}
.record-action[aria-pressed="true"]:hover,
.record-button.favorite-toggle.active:hover {
  border-color: #fff36a;
  background: #fff36a;
  color: var(--ink);
}
.share-toast {
  position: fixed;
  z-index: 50;
  left: 50%;
  bottom: 24px;
  width: max-content;
  max-width: calc(100vw - 32px);
  padding: 12px 16px;
  border: 1px solid var(--yellow);
  border-left: 5px solid var(--yellow);
  background: #17190f;
  color: var(--text);
  box-shadow: 0 14px 45px #000c;
  opacity: 0;
  transform: translate(-50%, 18px);
  pointer-events: none;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
  transition:
    opacity 0.18s,
    transform 0.18s;
}
.share-toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}
.share-toast[hidden] {
  display: none;
}
.clipboard-proxy {
  position: fixed;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
