:root {
  --system-ink: #ebe7dc;
  --system-muted: #9c9a91;
  --system-black: #0b0c0d;
  --system-panel: #141617;
  --system-line: #42443f;
  --system-amber: #e6bd55;
  --system-red: #a53531;
  --system-green: #6f936d;
  --system-blue: #6f899c;
}

.activity-hud {
  position: fixed;
  top: 18px;
  left: 50%;
  z-index: 640;
  width: min(620px, calc(100vw - 420px));
  transform: translateX(-50%);
  color: var(--system-ink);
  font-family: "VT323", monospace;
  text-shadow: 2px 2px 0 #000, 0 0 8px #000;
  pointer-events: none;
}

.activity-hud.hidden {
  display: none;
}

.activity-hud__topline,
.activity-hud__progress {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.activity-hud__topline {
  border-bottom: 3px solid var(--system-amber);
  padding: 0 4px 4px;
  font-family: "Press Start 2P", monospace;
  font-size: 10px;
  letter-spacing: 1px;
}

.activity-hud__topline strong {
  color: #fff2b2;
  font-size: 18px;
  font-variant-numeric: tabular-nums;
}

.activity-hud__target {
  padding: 7px 4px 3px;
  overflow: hidden;
  color: #fff;
  font-size: clamp(24px, 3vw, 38px);
  line-height: 0.9;
  letter-spacing: 1px;
  text-align: center;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.activity-hud__progress {
  padding: 3px 4px;
  color: #d0cdc2;
  font-size: 18px;
  letter-spacing: 1px;
}

.activity-hud__progress span:nth-child(2) {
  color: var(--system-amber);
}

.activity-hud__progress span:nth-child(3) {
  color: #c5d8e5;
}

.activity-hud.is-repairing .activity-hud__topline {
  border-bottom-color: var(--system-green);
}

.activity-hud.is-repairing .activity-hud__target {
  border-inline: 3px solid #85aa80;
  color: #e6f4df;
  background:
    repeating-linear-gradient(
      90deg,
      rgba(80, 113, 77, 0.72) 0,
      rgba(80, 113, 77, 0.72) 8px,
      rgba(29, 47, 29, 0.82) 8px,
      rgba(29, 47, 29, 0.82) 16px
    );
  text-shadow: 2px 2px 0 #071007;
}

.activity-hud.is-repairing .activity-hud__progress span:nth-child(2) {
  color: #b7d7ad;
}

.activity-hud.is-urgent .activity-hud__topline {
  border-bottom-color: #d34b44;
  background: #321514;
}

.activity-hud.is-urgent .activity-hud__topline strong {
  color: #ffaaa4;
  animation: activity-hud-urgent-flash 760ms steps(2, end) infinite;
}

.activity-hud.is-urgent .activity-hud__target {
  border-inline: 3px solid #bd3e39;
  color: #fff;
  background:
    repeating-linear-gradient(
      90deg,
      rgba(111, 28, 25, 0.86) 0,
      rgba(111, 28, 25, 0.86) 8px,
      rgba(53, 20, 19, 0.9) 8px,
      rgba(53, 20, 19, 0.9) 16px
    );
  text-shadow: 2px 2px 0 #240605;
}

.activity-hud.is-repairing.is-urgent .activity-hud__target {
  border-color: #d9b85e;
  color: #fff4c5;
  background:
    repeating-linear-gradient(
      90deg,
      rgba(65, 91, 57, 0.92) 0,
      rgba(65, 91, 57, 0.92) 8px,
      rgba(69, 34, 24, 0.92) 8px,
      rgba(69, 34, 24, 0.92) 16px
    );
}

.activity-hud.is-hold-lot .activity-hud__topline {
  border-bottom-color: #d06747;
  background: rgba(37, 20, 16, 0.78);
}

.activity-hud.is-hold-lot .activity-hud__topline strong {
  color: #ffd19b;
}

.activity-hud.is-hold-lot .activity-hud__target {
  border-inline: 3px solid #a94b36;
  color: #fff4e4;
  background:
    repeating-linear-gradient(
      90deg,
      rgba(91, 35, 25, 0.88) 0,
      rgba(91, 35, 25, 0.88) 8px,
      rgba(31, 22, 19, 0.92) 8px,
      rgba(31, 22, 19, 0.92) 16px
    );
}

.activity-hud.is-hold-lot .activity-hud__progress {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.activity-hud.is-hold-lot .activity-hud__progress span {
  color: #e7ded1;
  text-align: center;
}

.activity-hud.is-hold-lot .activity-hud__progress span:nth-child(2) {
  color: #ffb39e;
}

.activity-hud.is-hold-lot .activity-hud__progress span:nth-child(3) {
  color: #ffd07f;
}

.activity-hud.is-cargo .activity-hud__topline {
  border-bottom-color: #c89a4a;
  background: rgba(31, 27, 20, 0.82);
}

.activity-hud.is-cargo .activity-hud__topline strong {
  color: #f0d595;
}

.activity-hud.is-cargo .activity-hud__target {
  border-inline: 3px solid #8d7a4f;
  color: #f5ead0;
  background:
    repeating-linear-gradient(
      90deg,
      rgba(64, 57, 40, 0.9) 0,
      rgba(64, 57, 40, 0.9) 8px,
      rgba(27, 28, 24, 0.94) 8px,
      rgba(27, 28, 24, 0.94) 16px
    );
}

.activity-hud.is-cargo .activity-hud__progress {
  display: grid;
  grid-template-columns: 1.2fr 0.7fr 1.1fr;
}

.activity-hud.is-cargo .activity-hud__progress span {
  color: #d9d0bd;
  text-align: center;
}

.activity-hud.is-cargo .activity-hud__progress span:nth-child(2) {
  color: #efd17d;
}

.activity-hud.is-cargo .activity-hud__progress span:nth-child(3) {
  color: #b9cdb5;
}

.activity-hud.is-cargo.is-extracting .activity-hud__target {
  border-color: #89a878;
  color: #f4ffe9;
  background:
    repeating-linear-gradient(
      90deg,
      rgba(50, 73, 43, 0.92) 0,
      rgba(50, 73, 43, 0.92) 8px,
      rgba(25, 31, 23, 0.94) 8px,
      rgba(25, 31, 23, 0.94) 16px
    );
}

.activity-hud__risk {
  display: grid;
  grid-template-columns: 1.1fr 1fr 0.8fr;
  gap: 5px;
  border-top: 1px solid #51452e;
  padding: 4px;
  color: #bcb4a2;
  background: rgba(13, 14, 13, 0.88);
  font-size: 15px;
  letter-spacing: 0.04em;
  text-align: center;
}

.activity-hud__risk.hidden {
  display: none;
}

.activity-hud__risk span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.activity-hud.is-risk-cargo .activity-hud__topline {
  border-bottom-color: #bf8738;
  background: rgba(34, 23, 13, 0.9);
}

.activity-hud.is-risk-cargo .activity-hud__topline strong {
  color: #ffd58a;
}

.activity-hud.is-risk-cargo .activity-hud__target {
  border-inline: 3px solid #9f6a2c;
  color: #fff2d8;
  background:
    repeating-linear-gradient(
      90deg,
      rgba(76, 48, 23, 0.94) 0,
      rgba(76, 48, 23, 0.94) 8px,
      rgba(25, 22, 17, 0.96) 8px,
      rgba(25, 22, 17, 0.96) 16px
    );
}

.activity-hud.is-risk-cargo .activity-hud__progress {
  display: grid;
  grid-template-columns: 0.9fr 0.8fr 1.3fr;
  gap: 5px;
}

.activity-hud.is-risk-cargo .activity-hud__progress span {
  min-width: 0;
  overflow: hidden;
  color: #dfd2bd;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.activity-hud.is-risk-cargo .activity-hud__progress span:nth-child(2) {
  color: #f0c166;
}

.activity-hud.is-risk-cargo .activity-hud__progress span:nth-child(3) {
  color: #c4d5b3;
}

.activity-hud.is-risk-cargo .activity-hud__risk span:first-child {
  color: #efd5a0;
}

.activity-hud.is-risk-cargo .activity-hud__risk span:nth-child(2) {
  color: #e49a75;
}

.activity-hud.is-risk-cargo.is-extracting .activity-hud__target {
  border-color: #9db27b;
  color: #f4ffe8;
  background:
    repeating-linear-gradient(
      90deg,
      rgba(47, 69, 37, 0.94) 0,
      rgba(47, 69, 37, 0.94) 8px,
      rgba(26, 29, 21, 0.96) 8px,
      rgba(26, 29, 21, 0.96) 16px
    );
}

@keyframes activity-hud-urgent-flash {
  0%,
  49% {
    color: #fff2ec;
    background: #8a2723;
  }

  50%,
  100% {
    color: #ffaaa4;
    background: transparent;
  }
}

.crew-career-panel {
  position: fixed;
  inset: 0;
  z-index: 2600;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  color: var(--system-ink);
  background:
    linear-gradient(rgba(9, 10, 11, 0.94), rgba(9, 10, 11, 0.97)),
    repeating-linear-gradient(
      0deg,
      transparent 0,
      transparent 3px,
      rgba(255, 255, 255, 0.025) 3px,
      rgba(255, 255, 255, 0.025) 4px
    );
  font-family: "VT323", monospace;
}

.crew-career-panel.hidden {
  display: none;
}

.crew-career-panel.is-wardrobe-peek {
  background: rgba(5, 6, 6, 0.08);
}

.crew-career-panel.is-wardrobe-peek::before {
  opacity: 0;
}

.crew-career-panel.is-wardrobe-peek .crew-career-panel__header,
.crew-career-panel.is-wardrobe-peek .crew-career-panel__body {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.crew-career-panel::before {
  position: absolute;
  inset: 0;
  border: 8px solid #080909;
  content: "";
  pointer-events: none;
}

.crew-career-panel__header {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  padding: 16px 28px;
  border-bottom: 4px solid var(--system-amber);
  background: #111314;
}

.crew-career-panel__eyebrow,
.system-card__number {
  color: var(--system-amber);
  font-family: "Press Start 2P", monospace;
  font-size: 8px;
  letter-spacing: 1px;
}

.crew-career-panel h2,
.system-card h3 {
  margin: 4px 0 0;
  color: #f1eee6;
  font-family: "Press Start 2P", monospace;
  font-weight: 400;
}

.crew-career-panel h2 {
  font-size: clamp(18px, 3vw, 30px);
}

.crew-career-panel__header button {
  min-height: 38px;
  border: 2px solid #77776f;
  border-radius: 0;
  color: #d9d6cd;
  background: #252728;
  font: 18px "VT323", monospace;
  letter-spacing: 1px;
  cursor: pointer;
}

.crew-career-panel__body {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(250px, 0.82fr) minmax(290px, 1fr) minmax(360px, 1.45fr);
  gap: 12px;
  flex: 1;
  min-height: 0;
  padding: 16px 20px 22px;
  overflow: auto;
}

.system-card {
  min-width: 0;
  border: 2px solid var(--system-line);
  border-top-width: 6px;
  padding: 16px;
  background:
    linear-gradient(145deg, rgba(36, 38, 38, 0.98), rgba(18, 20, 21, 0.98));
  box-shadow: 5px 5px 0 #050606;
}

.system-card--crew {
  border-top-color: var(--system-blue);
}

.system-card--activity {
  border-top-color: var(--system-amber);
}

.system-card--career {
  border-top-color: var(--system-green);
}

.system-card__heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid #494b47;
}

.system-card h3 {
  font-size: 15px;
}

.system-card__copy {
  margin: 14px 0;
  color: #b8b5ac;
  font-size: 19px;
  line-height: 1.05;
}

.system-chip {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 7px;
  border: 1px solid #677784;
  color: #b9cedb;
  background: #222a2f;
  font-size: 16px;
  letter-spacing: 1px;
  white-space: nowrap;
}

.system-chip--amber {
  border-color: #826b32;
  color: #f0d278;
  background: #2d281b;
}

.system-chip--cred {
  border-color: #557053;
  color: #a8d0a5;
  background: #1d2b1f;
}

.system-button {
  min-height: 42px;
  border: 2px solid #646661;
  border-radius: 0;
  padding: 7px 12px;
  color: #e4e1d9;
  background: #2c2f30;
  box-shadow: 3px 3px 0 #080909;
  font: 18px "VT323", monospace;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
}

.system-button:hover:not(:disabled) {
  color: #fff;
  background: #3a3d3d;
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 #080909;
}

.system-button:active:not(:disabled) {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 #080909;
}

.system-button:disabled {
  color: #686966;
  border-color: #3a3b39;
  background: #1c1d1e;
  box-shadow: none;
  cursor: not-allowed;
}

.system-button--primary,
.system-button--start {
  border-color: #977f3f;
  color: #fff0b5;
  background: #51431f;
}

.system-button--start {
  width: 100%;
  min-height: 52px;
  font-family: "Press Start 2P", monospace;
  font-size: 10px;
}

.system-button--danger {
  width: 100%;
  border-color: #773a37;
  color: #d99b97;
  background: #3a1f1e;
}

.system-button--quiet {
  margin-top: 12px;
  color: #aaa9a3;
  background: #222425;
}

.crew-join-actions,
.crew-join-row {
  display: grid;
  gap: 9px;
}

.system-button--match {
  position: relative;
  display: grid;
  min-height: 62px;
  align-content: center;
  gap: 5px;
  overflow: hidden;
  border: 3px solid #8195a2;
  border-left: 7px solid var(--system-amber);
  color: #f3efe5;
  background:
    linear-gradient(100deg, #2a343a, #171c1f),
    repeating-linear-gradient(
      0deg,
      transparent 0,
      transparent 4px,
      rgba(255, 255, 255, 0.035) 4px,
      rgba(255, 255, 255, 0.035) 5px
    );
  text-align: left;
}

.system-button--match strong {
  font: 9px/1.3 "Press Start 2P", monospace;
  letter-spacing: 0.035em;
}

.system-button--match small {
  color: #b9c4c9;
  font: 15px/1 "VT323", monospace;
  letter-spacing: 1px;
}

.system-button--match[aria-busy="true"] {
  border-color: #a98c43;
  border-left-color: #f1ce6e;
  color: #fff0b5;
  background: #39331f;
}

.crew-manual-label {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #767872;
  font: 7px/1.2 "Press Start 2P", monospace;
  white-space: nowrap;
}

.crew-manual-label::before,
.crew-manual-label::after {
  height: 1px;
  flex: 1;
  background: #474946;
  content: "";
}

.crew-join-row {
  grid-template-columns: 1fr auto;
}

.crew-join-row input {
  min-width: 0;
  height: 42px;
  box-sizing: border-box;
  border: 2px solid #5d605e;
  border-radius: 0;
  padding: 6px 10px;
  outline: none;
  color: #f0eee8;
  background: #0d0f10;
  font: 17px "VT323", monospace;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.crew-join-row input:focus {
  border-color: var(--system-amber);
}

.crew-code-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  color: #94968f;
  font-size: 16px;
  letter-spacing: 1px;
}

.crew-code-line button {
  overflow: hidden;
  border: 1px dashed #857344;
  padding: 4px 7px;
  color: #f1d375;
  background: #171814;
  font: 15px "VT323", monospace;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}

.crew-member-list {
  display: grid;
  gap: 5px;
}

.crew-member {
  display: grid;
  grid-template-columns: 18px 1fr auto;
  align-items: center;
  gap: 7px;
  min-height: 33px;
  border-left: 3px solid #637887;
  padding: 3px 7px;
  color: #d5d5cf;
  background: #191c1e;
  font-size: 18px;
}

.crew-member.is-self {
  border-left-color: var(--system-amber);
}

.crew-member__state {
  color: #858984;
  font-size: 14px;
  letter-spacing: 1px;
}

.crew-member__state.is-ready {
  color: #9fc69b;
}

.crew-member__state.is-down {
  color: #e28680;
}

.crew-member__state.is-reconnecting {
  color: #e2c26d;
}

.crew-member[data-state="down"] {
  border-left-color: var(--system-red);
  background: #251817;
}

.crew-member[data-state="reconnecting"] {
  border-left-color: #a8893f;
  background: #242117;
}

.shared-quest {
  position: relative;
  margin-top: 14px;
  border: 2px solid #4f5960;
  border-left-width: 6px;
  padding: 11px;
  overflow: hidden;
  background:
    linear-gradient(145deg, rgba(24, 30, 34, 0.98), rgba(13, 16, 18, 0.98)),
    repeating-linear-gradient(
      0deg,
      transparent 0,
      transparent 4px,
      rgba(255, 255, 255, 0.025) 4px,
      rgba(255, 255, 255, 0.025) 5px
    );
  box-shadow: 3px 3px 0 #080909;
}

.shared-quest::after {
  position: absolute;
  right: -18px;
  bottom: -24px;
  width: 72px;
  height: 72px;
  border: 2px solid rgba(111, 137, 156, 0.13);
  content: "";
  transform: rotate(45deg);
  pointer-events: none;
}

.shared-quest.is-active {
  border-left-color: var(--system-amber);
}

.shared-quest.is-complete {
  border-color: #5e7b5c;
  border-left-color: #8cb084;
  background:
    linear-gradient(145deg, rgba(25, 37, 27, 0.98), rgba(13, 19, 14, 0.98));
}

.shared-quest.is-scene-playing {
  border-left-color: #e0b84f;
  box-shadow: 3px 3px 0 #080909, inset 0 0 0 2px rgba(224, 184, 79, 0.08);
}

.shared-quest__heading,
.shared-quest__scene-topline,
.shared-quest__progress-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.shared-quest__heading {
  align-items: flex-start;
  padding-bottom: 8px;
  border-bottom: 1px solid #4a5155;
}

.shared-quest__eyebrow,
.shared-quest__objective-label {
  display: block;
  color: #8197a5;
  font-size: 13px;
  letter-spacing: 1px;
}

.shared-quest h4 {
  margin: 3px 0 0;
  color: #f2efe6;
  font: 9px/1.35 "Press Start 2P", monospace;
}

.shared-quest__badge {
  flex: 0 0 auto;
  border: 1px solid #687985;
  padding: 3px 6px;
  color: #bdd0dc;
  background: #20282d;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 1px;
}

.shared-quest.is-active .shared-quest__badge {
  border-color: #887137;
  color: #f2d57e;
  background: #30291a;
}

.shared-quest.is-complete .shared-quest__badge {
  border-color: #627e60;
  color: #bbd8b3;
  background: #203022;
}

.shared-quest__summary {
  margin: 9px 0;
  color: #aeb4b5;
  font-size: 17px;
  line-height: 1;
}

.shared-quest__objective {
  border: 1px solid #3e464a;
  border-left: 4px solid #6f899c;
  padding: 8px;
  background: #121719;
}

.shared-quest__objective-title {
  display: block;
  margin-top: 3px;
  overflow-wrap: anywhere;
  color: #e9e6dc;
  font-size: 19px;
  font-weight: 400;
  line-height: 0.95;
}

.shared-quest__progress-line {
  margin-top: 8px;
  color: #9ea4a4;
  font-size: 14px;
  letter-spacing: 1px;
}

.shared-quest__progress-percent {
  color: #d5bd73;
}

.shared-quest__progress {
  height: 7px;
  margin-top: 3px;
  border: 1px solid #4c5150;
  padding: 1px;
  overflow: hidden;
  background: #090b0c;
}

.shared-quest__progress-fill {
  display: block;
  width: 0;
  height: 100%;
  background:
    repeating-linear-gradient(
      90deg,
      #b39442 0,
      #b39442 7px,
      #66562d 7px,
      #66562d 9px
    );
  transition: width 180ms steps(4, end);
}

.shared-quest.is-complete .shared-quest__progress-fill {
  background:
    repeating-linear-gradient(
      90deg,
      #71906d 0,
      #71906d 7px,
      #40553f 7px,
      #40553f 9px
    );
}

.shared-quest__scene {
  margin-top: 9px;
  border: 2px solid #6c5c34;
  padding: 8px;
  color: #e1d9bd;
  background:
    repeating-linear-gradient(
      -45deg,
      #282418 0,
      #282418 7px,
      #1d1b15 7px,
      #1d1b15 14px
    );
}

.shared-quest__scene.hidden,
.shared-quest__start.hidden {
  display: none;
}

.shared-quest__scene-topline {
  color: #b8a770;
  font-size: 14px;
  letter-spacing: 1px;
}

.shared-quest__scene-readiness {
  color: #f0d67e;
  font-weight: 400;
  font-variant-numeric: tabular-nums;
}

.shared-quest__scene-countdown {
  min-height: 22px;
  margin: 7px 0;
  color: #fff0b5;
  font-size: 20px;
  line-height: 1;
  text-align: center;
  text-shadow: 2px 2px 0 #080706;
}

.shared-quest__scene-action,
.shared-quest__start {
  position: relative;
  z-index: 1;
  width: 100%;
}

.shared-quest__scene-action {
  border-color: #9a813f;
  color: #fff0b5;
  background: #4b3e1d;
}

.shared-quest__start {
  margin-top: 9px;
  border-color: #657d8e;
  color: #d8e6ee;
  background: #293740;
  font-family: "Press Start 2P", monospace;
  font-size: 8px;
  line-height: 1.45;
}

.activity-choice-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin: 14px 0 10px;
}

.activity-choice {
  display: grid;
  min-width: 0;
  min-height: 82px;
  border: 2px solid #4c4f4d;
  border-left-width: 6px;
  border-radius: 0;
  padding: 8px 9px;
  color: #aaa9a3;
  background:
    linear-gradient(145deg, #1c1e1f, #111314);
  box-shadow: 3px 3px 0 #080909;
  font: 16px "VT323", monospace;
  text-align: left;
  cursor: pointer;
}

.activity-choice span,
.activity-choice small {
  overflow: hidden;
  color: #777b77;
  font-size: 13px;
  letter-spacing: 1px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.activity-choice strong {
  overflow: hidden;
  color: #d4d2cb;
  font: 9px/1.35 "Press Start 2P", monospace;
  text-overflow: ellipsis;
}

.activity-choice:hover {
  border-color: #787970;
  color: #fff;
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 #080909;
}

.activity-choice.is-selected,
.activity-choice[aria-pressed="true"] {
  border-color: #a1853e;
  border-left-color: var(--system-amber);
  color: #fff0b5;
  background:
    linear-gradient(145deg, #3b321b, #1b1a15);
}

.activity-choice.is-selected strong,
.activity-choice[aria-pressed="true"] strong {
  color: #fff1b1;
}

.activity-choice[data-activity-id="appetite.dead_weight"] {
  grid-column: 1 / -1;
  border-color: #5b5646;
  border-left-color: #8f7444;
  background:
    linear-gradient(145deg, #24231c, #121413);
}

.activity-choice[data-activity-id="appetite.dead_weight"]:is(
  .is-selected,
  [aria-pressed="true"]
) {
  border-color: #9a814d;
  border-left-color: #e0b65e;
  background:
    linear-gradient(145deg, #433821, #1d1c16);
}

.activity-choice:focus-visible {
  outline: 3px solid #f1d26c;
  outline-offset: 2px;
}

.activity-choice:disabled {
  border-color: #343634;
  color: #60625f;
  background:
    repeating-linear-gradient(
      135deg,
      #171919 0,
      #171919 6px,
      #1d1f1f 6px,
      #1d1f1f 12px
    );
  box-shadow: none;
  cursor: not-allowed;
}

.activity-choice:disabled span,
.activity-choice:disabled small,
.activity-choice-list[aria-disabled="true"] .activity-choice span,
.activity-choice-list[aria-disabled="true"] .activity-choice small,
.activity-choice-list.is-live .activity-choice span,
.activity-choice-list.is-live .activity-choice small {
  color: #555854;
}

.activity-choice:disabled strong,
.activity-choice-list[aria-disabled="true"] .activity-choice strong,
.activity-choice-list.is-live .activity-choice strong {
  color: #777a75;
}

.activity-choice:disabled:is(.is-selected, [aria-pressed="true"]),
.activity-choice-list[aria-disabled="true"] .activity-choice:is(.is-selected, [aria-pressed="true"]),
.activity-choice-list.is-live .activity-choice:is(.is-selected, [aria-pressed="true"]) {
  border-color: #6b603e;
  border-left-color: var(--system-amber);
  color: #c8b978;
  background:
    repeating-linear-gradient(
      135deg,
      #2b281d 0,
      #2b281d 6px,
      #211f19 6px,
      #211f19 12px
    );
}

.activity-choice:disabled:is(.is-selected, [aria-pressed="true"]) strong,
.activity-choice-list[aria-disabled="true"] .activity-choice:is(.is-selected, [aria-pressed="true"]) strong,
.activity-choice-list.is-live .activity-choice:is(.is-selected, [aria-pressed="true"]) strong {
  color: #d8ca91;
}

.activity-choice-list[aria-disabled="true"] .activity-choice,
.activity-choice-list.is-live .activity-choice {
  pointer-events: none;
}

.activity-rules {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 12px 0;
}

.activity-rules span {
  border: 1px solid #595447;
  padding: 3px 6px;
  color: #cabe99;
  background: #24231f;
  font-size: 15px;
}

.activity-mastery {
  margin: 12px 0;
  border: 2px solid #61583d;
  border-left: 6px solid var(--system-amber);
  padding: 9px;
  background:
    repeating-linear-gradient(
      135deg,
      #1a1b19 0,
      #1a1b19 8px,
      #171816 8px,
      #171816 16px
    );
}

.activity-mastery__heading,
.activity-mastery__meter-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.activity-mastery__heading span,
.activity-mastery__meter-line,
.work-board__heading span {
  color: #89877e;
  font-size: 13px;
  letter-spacing: 1px;
}

.activity-mastery__heading h4,
.work-board__heading h4 {
  margin: 2px 0 0;
  color: #f1eee4;
  font: 9px/1.4 "Press Start 2P", monospace;
}

.activity-mastery__heading strong {
  flex: 0 0 auto;
  border: 1px solid #8a7438;
  padding: 3px 5px;
  color: #f0d370;
  background: #2c2719;
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 1px;
}

.activity-mastery__meter-line {
  margin-top: 8px;
  font-size: 14px;
}

.activity-mastery__meter-line span:first-child {
  color: #ddd7c4;
}

.activity-mastery__meter {
  height: 12px;
  margin-top: 3px;
  box-sizing: border-box;
  border: 2px solid #5b594f;
  background:
    repeating-linear-gradient(
      90deg,
      #101211 0,
      #101211 10px,
      #171918 10px,
      #171918 12px
    );
  image-rendering: pixelated;
}

.activity-mastery__meter > span {
  display: block;
  width: 0;
  height: 100%;
  max-width: 100%;
  background:
    repeating-linear-gradient(
      90deg,
      #d4ad49 0,
      #d4ad49 8px,
      #8d7333 8px,
      #8d7333 10px
    );
}

.activity-mastery__stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(48px, 1fr));
  gap: 3px;
  margin-top: 8px;
}

.activity-mastery__stats div {
  min-width: 0;
  border-bottom: 2px solid #42443f;
  padding: 4px;
  background: #111312;
}

.activity-mastery__stats span {
  display: block;
  overflow: hidden;
  color: #747870;
  font-size: 12px;
  letter-spacing: 1px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.activity-mastery__stats strong {
  display: block;
  overflow: hidden;
  margin-top: 1px;
  color: #e4e1d7;
  font-size: 19px;
  font-weight: 400;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.activity-panel-status {
  min-height: 42px;
  margin: 13px 0;
  border-left: 3px solid #7e714c;
  padding: 7px 9px;
  color: #c5c0b1;
  background: #171817;
  font-size: 18px;
  line-height: 1;
}

.career-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
  margin-top: 12px;
}

.career-summary div {
  border-bottom: 3px solid #4d584d;
  padding: 7px 5px;
  background: #181b19;
}

.career-summary span,
.activity-result__stats span {
  display: block;
  color: #777c76;
  font-size: 14px;
  letter-spacing: 1px;
}

.career-summary strong {
  display: block;
  margin-top: 2px;
  color: #e2e1da;
  font-size: 25px;
  font-weight: 400;
}

.work-board {
  margin: 12px 0;
  border: 2px solid #5f5841;
  border-top: 5px solid var(--system-amber);
  padding: 9px;
  background:
    linear-gradient(rgba(30, 29, 23, 0.96), rgba(18, 20, 19, 0.98)),
    repeating-linear-gradient(
      0deg,
      transparent 0,
      transparent 3px,
      rgba(255, 255, 255, 0.025) 3px,
      rgba(255, 255, 255, 0.025) 4px
    );
}

.work-board__heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.work-board__heading strong {
  flex: 0 0 auto;
  border: 1px solid #6f633e;
  padding: 3px 5px;
  color: #dfc46f;
  background: #252217;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 1px;
}

.work-board > p {
  margin: 8px 0;
  color: #aaa69a;
  font-size: 16px;
  line-height: 1;
}

.work-board__orders {
  display: grid;
  gap: 5px;
}

.work-board-order {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 3px 8px;
  border: 1px solid #4a4b44;
  border-left: 4px solid #83713e;
  padding: 6px;
  background: #141615;
}

.work-board-order__copy {
  min-width: 0;
}

.work-board-order h5 {
  margin: 0;
  overflow: hidden;
  color: #e3dfd2;
  font: 8px/1.4 "Press Start 2P", monospace;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.work-board-order p {
  margin: 3px 0 0;
  color: #7f817a;
  font-size: 14px;
  line-height: 1;
}

.work-board-order__progress {
  display: grid;
  align-content: center;
  min-width: 58px;
  text-align: right;
}

.work-board-order__progress strong {
  color: #ded7bf;
  font-size: 17px;
  font-weight: 400;
}

.work-board-order__progress span {
  color: #9cb596;
  font-size: 13px;
}

.work-board-order__meter {
  grid-column: 1 / -1;
  height: 6px;
  border: 1px solid #464942;
  background: #0c0e0d;
}

.work-board-order__meter span {
  display: block;
  width: 0;
  height: 100%;
  max-width: 100%;
  background:
    repeating-linear-gradient(
      90deg,
      #9a7f3e 0,
      #9a7f3e 6px,
      #66552f 6px,
      #66552f 8px
    );
}

.work-board-order.is-complete {
  border-color: #587054;
  border-left-color: #87a07f;
  background: #182019;
}

.work-board-order.is-complete h5,
.work-board-order.is-complete .work-board-order__progress strong {
  color: #c4dcbb;
}

.work-board-order.is-complete .work-board-order__meter span {
  background:
    repeating-linear-gradient(
      90deg,
      #76906d 0,
      #76906d 6px,
      #536b4e 6px,
      #536b4e 8px
    );
}

.work-board.is-complete {
  border-color: #60775c;
  border-top-color: #91aa86;
}

.work-board.is-locked {
  border-color: #42443f;
  border-top-color: #565852;
  background: #161817;
}

.work-board.is-locked .work-board__heading strong,
.work-board.is-locked > p {
  color: #777a73;
}

.full-route {
  position: relative;
  margin: 12px 0;
  border: 2px solid #594944;
  border-top: 5px solid #985443;
  padding: 9px;
  background:
    linear-gradient(180deg, rgba(126, 60, 47, 0.12), transparent 44%),
    repeating-linear-gradient(
      0deg,
      #171817 0,
      #171817 3px,
      #141615 3px,
      #141615 4px
    );
  box-shadow: 3px 3px 0 #0b0c0c;
}

.full-route__heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.full-route__heading span {
  color: #a68c83;
  font-size: 13px;
  letter-spacing: 1px;
}

.full-route__heading h4 {
  margin: 2px 0 0;
  color: #f1e8e2;
  font: 9px/1.4 "Press Start 2P", monospace;
}

.full-route__heading strong {
  flex: 0 0 auto;
  border: 1px solid #795449;
  padding: 4px 5px 3px;
  color: #e0a18f;
  background: #291c19;
  font: 7px/1.4 "Press Start 2P", monospace;
  letter-spacing: 0;
  text-align: right;
}

.full-route__brief {
  margin: 8px 0 0;
  color: #e3d9d2;
  font: 7px/1.6 "Press Start 2P", monospace;
}

.full-route__status {
  margin: 4px 0 8px;
  color: #918b86;
  font-size: 14px;
  line-height: 1.05;
}

.full-route__stamps {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
}

.full-route-stamp {
  min-width: 0;
  border: 1px dashed #4e4b47;
  border-left: 4px solid #504b47;
  padding: 5px;
  color: #777773;
  background:
    repeating-linear-gradient(
      135deg,
      #151716 0,
      #151716 6px,
      #181a18 6px,
      #181a18 12px
    );
}

.full-route-stamp__top {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) 25px;
  align-items: center;
  gap: 4px;
}

.full-route-stamp__top > span {
  color: #a5a8a1;
  font-size: 12px;
  letter-spacing: 1px;
}

.full-route-stamp h5 {
  min-width: 0;
  margin: 0;
  color: #b9b8b2;
  font: 7px/1.45 "Press Start 2P", monospace;
  overflow-wrap: anywhere;
}

.full-route-stamp__mark {
  display: grid;
  width: 25px;
  height: 25px;
  border: 1px solid #50514d;
  color: #b0b2ab;
  background: #101211;
  font: 10px/25px "Press Start 2P", monospace;
  place-items: center;
}

.full-route-stamp__detail {
  display: flex;
  justify-content: space-between;
  gap: 4px;
  margin-top: 5px;
  border-top: 1px solid #383a37;
  padding-top: 4px;
  color: #a9aca5;
  font-size: 11px;
  letter-spacing: 0.5px;
}

.full-route-stamp.is-stamped {
  border-style: solid;
  border-color: #735147;
  border-left-color: #b26651;
  color: #e6d6cd;
  background:
    linear-gradient(90deg, rgba(148, 72, 55, 0.16), transparent 70%),
    #1b1a18;
}

.full-route-stamp.is-stamped h5 {
  color: #e8ddd7;
}

.full-route-stamp.is-stamped .full-route-stamp__mark {
  border-color: #9d5e4d;
  color: #f1c2b2;
  background: #33201b;
}

.full-route-stamp.is-stamped .full-route-stamp__detail {
  color: #c49181;
}

.full-route-stamp.is-crew {
  border-bottom-color: #788f78;
}

.full-route-stamp.is-crew .full-route-stamp__detail span:last-child {
  color: #a8c3a4;
}

.full-route-stamp.is-perfect .full-route-stamp__mark {
  border-color: #c4a966;
  color: #f4dc93;
  background: #332d1d;
}

.full-route.has-progress {
  border-color: #704e45;
  border-top-color: #b56551;
}

.full-route.is-complete {
  border-color: #6c7f67;
  border-top-color: #a3b28d;
  background:
    linear-gradient(180deg, rgba(130, 154, 116, 0.13), transparent 44%),
    #171a17;
}

.full-route.is-complete .full-route__heading strong {
  border-color: #788b70;
  color: #c5dbb6;
  background: #20281e;
}

.full-route.is-locked {
  border-color: #41433f;
  border-top-color: #555852;
  box-shadow: 3px 3px 0 #0d0e0e;
}

.full-route.is-locked .full-route__heading span,
.full-route.is-locked .full-route__brief,
.full-route.is-locked .full-route__status,
.full-route.is-locked .full-route__heading strong {
  color: #b6bab1;
}

.career-achievements {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  min-height: 27px;
  margin-bottom: 10px;
}

.career-achievement {
  border: 1px solid #6e6548;
  padding: 3px 6px;
  color: #d6c78f;
  background: #252219;
  font-size: 14px;
}

.career-achievement--empty {
  color: #777973;
  border-color: #3f413e;
  background: #191a1a;
}

.wardrobe-controls {
  margin: 5px 0 8px;
  border: 1px solid #4c4f4b;
  border-top: 3px solid #8f7650;
  padding: 9px;
  background:
    linear-gradient(180deg, rgba(143, 118, 80, 0.08), transparent 38%),
    #151716;
}

.wardrobe-controls__heading,
.wardrobe-preview-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.wardrobe-controls__heading span,
.wardrobe-next-unlock > span,
.wardrobe-filters label > span {
  display: block;
  color: #858881;
  font-size: 13px;
  letter-spacing: 1px;
}

.wardrobe-controls__heading h4 {
  margin: -2px 0 0;
  color: #f0eee6;
  font: 23px "VT323", monospace;
  letter-spacing: 2px;
}

.wardrobe-controls__heading strong {
  color: #d2bd7d;
  font-size: 15px;
  white-space: nowrap;
}

.wardrobe-next-unlock {
  margin-top: 8px;
  border: 1px solid #393c38;
  border-left: 3px solid #6f684e;
  padding: 7px 8px;
  background: #1a1c1a;
}

.wardrobe-next-unlock strong,
.wardrobe-next-unlock small {
  display: block;
}

.wardrobe-next-unlock strong {
  margin-top: 2px;
  color: #ddd8c9;
  font-size: 15px;
}

.wardrobe-next-unlock small {
  margin-top: 3px;
  color: #8f918b;
  font-size: 13px;
}

.wardrobe-next-unlock__meter,
.wardrobe-item__meter {
  height: 4px;
  margin-top: 6px;
  overflow: hidden;
  background: #2b2e2b;
}

.wardrobe-next-unlock__meter > span,
.wardrobe-item__meter > span {
  display: block;
  width: 0;
  height: 100%;
  background: #a28c59;
  transition: width 140ms steps(4, end);
}

.wardrobe-filters {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin-top: 8px;
}

.wardrobe-filters select {
  width: 100%;
  min-height: 30px;
  margin-top: 3px;
  border: 1px solid #50534f;
  border-radius: 0;
  padding: 3px 24px 3px 6px;
  color: #dedcd4;
  background: #222522;
  font: 15px "VT323", monospace;
}

.wardrobe-filters select:focus-visible,
.wardrobe-item button:focus-visible {
  outline: 2px solid #cfbb81;
  outline-offset: 2px;
}

.wardrobe-preview-bar {
  min-height: 29px;
  margin-top: 7px;
  border-top: 1px solid #343733;
  padding-top: 7px;
}

.wardrobe-preview-bar > span {
  overflow: hidden;
  color: #8d9189;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wardrobe-preview-bar > span.is-active {
  color: #d8c486;
}

.wardrobe-preview-bar__actions {
  display: flex;
  align-items: center;
  gap: 5px;
}

.wardrobe-preview-bar .system-button {
  width: auto;
  min-height: 32px;
  margin: 0;
  padding: 3px 8px;
  font-size: 14px;
  white-space: nowrap;
}

#wardrobe-preview-view:not(:disabled) {
  border-color: #b79a54;
  color: #171811;
  background: #c8ac64;
}

.wardrobe-preview-return {
  position: fixed;
  top: 18px;
  right: 20px;
  z-index: 3;
  display: grid;
  gap: 3px;
  min-width: 184px;
  border: 3px solid #d1b260;
  border-radius: 0;
  padding: 10px 14px;
  color: #181912;
  background: #dbc170;
  box-shadow: 5px 5px 0 rgba(0, 0, 0, 0.82);
  font-family: "VT323", monospace;
  text-align: left;
  cursor: pointer;
}

.wardrobe-preview-return.hidden {
  display: none;
}

.wardrobe-preview-return strong {
  font: 8px "Press Start 2P", monospace;
  letter-spacing: 1px;
}

.wardrobe-preview-return span {
  font-size: 19px;
  letter-spacing: 1px;
}

.wardrobe-catalog {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.wardrobe-item {
  position: relative;
  min-height: 104px;
  border: 1px solid #50524f;
  border-left-width: 4px;
  padding: 8px;
  color: #d2d0c8;
  background: #181a1b;
}

.wardrobe-item[data-rarity="achievement"] {
  border-left-color: #b28b43;
}

.wardrobe-item[data-rarity="ultra_rare"] {
  border-left-color: #7d5da8;
  background: linear-gradient(135deg, #211b29, #17191a);
}

.wardrobe-item.is-owned {
  background: #1b211d;
}

.wardrobe-item.is-equipped {
  border-color: #99b08c;
  border-left-color: #b8d1a9;
}

.wardrobe-item.is-previewing {
  border-color: #c4aa67;
  border-left-color: #e0c57c;
  box-shadow: inset 0 0 0 1px rgba(224, 197, 124, 0.22);
}

.wardrobe-item h4 {
  margin: 0 0 3px;
  color: #eeece5;
  font: 18px "VT323", monospace;
  letter-spacing: 1px;
}

.wardrobe-item p {
  min-height: 31px;
  margin: 0 0 6px;
  color: #858782;
  font-size: 15px;
  line-height: 1;
}

.wardrobe-item__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  color: #b9a76f;
  font-size: 14px;
}

.wardrobe-item__set,
.wardrobe-item__source,
.wardrobe-item__progress-copy {
  display: block;
  margin-top: 5px;
  color: #777b74;
  font-size: 13px;
  line-height: 1;
}

.wardrobe-item__source {
  color: #aaa58f;
}

.wardrobe-item__progress-copy {
  display: flex;
  justify-content: space-between;
  gap: 5px;
  color: #8f918a;
}

.wardrobe-item__actions {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 5px;
}

.wardrobe-item__actions .is-preview {
  border-color: #6f684e;
  color: #d4c58f;
  background: #27251f;
}

.wardrobe-item__actions .is-preview.is-active {
  border-color: #c4aa67;
  color: #171814;
  background: #c4aa67;
}

.wardrobe-item button {
  width: 100%;
  min-height: 36px;
  margin-top: 6px;
  border: 1px solid #5a5e59;
  border-radius: 0;
  color: #d9d8d2;
  background: #2a2d2b;
  font: 15px "VT323", monospace;
  cursor: pointer;
}

.wardrobe-item button:disabled {
  color: #60625f;
  background: #1d1f1f;
  cursor: not-allowed;
}

.wardrobe-empty {
  grid-column: 1 / -1;
  border: 1px dashed #454844;
  padding: 16px 10px;
  color: #81847e;
  text-align: center;
  font-size: 15px;
  background: #171918;
}

.career-session-note {
  margin: 10px 0 0;
  color: #747670;
  font-size: 14px;
}

.activity-result {
  position: fixed;
  inset: 0;
  z-index: 2800;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: var(--system-ink);
  background: rgba(7, 8, 8, 0.92);
  font-family: "VT323", monospace;
}

.activity-result.hidden {
  display: none;
}

.activity-result__grain {
  position: absolute;
  inset: -20%;
  opacity: 0.12;
  background:
    repeating-radial-gradient(circle at 30% 20%, #fff 0 1px, transparent 1px 5px);
  transform: rotate(5deg);
  pointer-events: none;
}

.activity-result__content {
  position: relative;
  width: min(660px, calc(100vw - 36px));
  max-height: calc(100dvh - 24px);
  box-sizing: border-box;
  border: 4px solid #6b6553;
  border-top: 10px solid var(--system-amber);
  padding: 22px;
  overflow-x: hidden;
  overflow-y: auto;
  background: #151718;
  box-shadow: 12px 12px 0 #050606;
  text-align: center;
}

#activity-result-kicker {
  color: #aaa89f;
  font-family: "Press Start 2P", monospace;
  font-size: 8px;
  letter-spacing: 1px;
}

.activity-result__grade {
  margin: 10px 0 -4px;
  color: #f2d46e;
  font-family: "Press Start 2P", monospace;
  font-size: clamp(64px, 14vw, 112px);
  line-height: 1;
  text-shadow: 6px 6px 0 #443713;
}

.activity-result h2 {
  margin: 8px 0 18px;
  font-family: "Press Start 2P", monospace;
  font-size: clamp(13px, 3vw, 22px);
}

.activity-result__stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
}

.activity-result__stats div {
  border: 1px solid #474a46;
  padding: 8px 4px;
  background: #0f1111;
}

.activity-result__stats strong {
  display: block;
  margin-top: 2px;
  color: #e8e5dd;
  font-size: 24px;
  font-weight: 400;
}

.activity-result__reward {
  margin: 13px 0 7px;
  border-block: 2px solid #63583b;
  padding: 10px;
  color: #f0d67a;
  font-size: 25px;
  letter-spacing: 1px;
}

.activity-result__combat {
  margin: 12px 0 4px;
  border: 2px solid #704233;
  border-left: 7px solid #c15b3d;
  padding: 9px;
  background:
    repeating-linear-gradient(
      135deg,
      #201714 0,
      #201714 7px,
      #171313 7px,
      #171313 14px
    );
  text-align: left;
}

.activity-result__combat.hidden {
  display: none;
}

.activity-result__combat-kicker {
  color: #d99171;
  font: 8px/1.4 "Press Start 2P", monospace;
  letter-spacing: 0.05em;
}

.activity-result__combat-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
  margin-top: 7px;
}

.activity-result__combat-summary > div {
  border: 1px solid #5c463e;
  padding: 5px 7px;
  background: #100f0f;
}

.activity-result__combat-summary span {
  display: block;
  color: #a7978e;
  font-size: 14px;
  letter-spacing: 0.08em;
}

.activity-result__combat-summary strong {
  display: block;
  color: #fff0df;
  font-size: 25px;
  font-weight: 400;
  font-variant-numeric: tabular-nums;
}

.activity-result__combat-rows {
  display: grid;
  gap: 3px;
  max-height: 116px;
  margin-top: 6px;
  overflow-y: auto;
}

.activity-result__combat-row {
  display: grid;
  grid-template-columns: 28px minmax(72px, 1fr) auto;
  gap: 7px;
  align-items: baseline;
  border-left: 3px solid #4c423d;
  padding: 3px 6px;
  color: #aaa198;
  background: rgba(14, 14, 14, 0.78);
  font-size: 15px;
}

.activity-result__combat-row strong {
  overflow: hidden;
  color: #dbd3c9;
  font-weight: 400;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.activity-result__combat-row.is-self {
  border-left-color: #e4b653;
  color: #f1c785;
  background: #2b2319;
}

.activity-result__combat-row.is-ineligible {
  opacity: 0.58;
}

.activity-result.is-hold-lot .activity-result__content {
  border-color: #704c3d;
  border-top-color: #c15b3d;
}

.activity-result.is-hold-lot .activity-result__grade {
  color: #f0b15f;
  text-shadow: 6px 6px 0 #4d261c;
}

.activity-result.is-cargo .activity-result__content {
  border-color: #665d43;
  border-top-color: #c79a4b;
}

.activity-result.is-cargo .activity-result__grade {
  color: #e7c775;
  text-shadow: 6px 6px 0 #42371d;
}

.activity-result__combat.is-cargo {
  border-color: #66593b;
  border-left-color: #c79a4b;
  background:
    repeating-linear-gradient(
      135deg,
      #211e16 0,
      #211e16 7px,
      #151714 7px,
      #151714 14px
    );
}

.activity-result__combat.is-cargo .activity-result__combat-kicker {
  color: #e1c174;
}

.activity-result.is-risk-cargo .activity-result__content {
  border-color: #765634;
  border-top-color: #c58a39;
}

.activity-result.is-risk-cargo .activity-result__grade {
  color: #f0c66e;
  text-shadow: 6px 6px 0 #4b2e14;
}

.activity-result__combat.is-risk-cargo {
  border-color: #765334;
  border-left-color: #c58a39;
  background:
    repeating-linear-gradient(
      135deg,
      #251b12 0,
      #251b12 7px,
      #171512 7px,
      #171512 14px
    );
}

.activity-result__combat.is-risk-cargo .activity-result__combat-kicker {
  color: #efc77d;
}

.activity-result__unlocks {
  min-height: 22px;
  color: #a7c29d;
  font-size: 18px;
}

.activity-result__progression {
  margin: 7px 0;
  border: 1px solid #626a53;
  border-left: 5px solid #a8893f;
  padding: 7px 9px;
  color: #d8c987;
  background: #1c1d17;
  font-size: 18px;
  line-height: 1;
  letter-spacing: 1px;
  text-align: left;
}

.activity-result__progression.hidden {
  display: none;
}

.activity-result__actions {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 8px;
  margin-top: 16px;
}

@media (max-width: 1020px) {
  .activity-hud {
    width: min(560px, calc(100vw - 40px));
  }

  .crew-career-panel__body {
    grid-template-columns: repeat(2, minmax(280px, 1fr));
  }

  .system-card--career {
    grid-column: 1 / -1;
  }
}

@media (max-width: 680px) {
  .activity-hud {
    top: max(10px, env(safe-area-inset-top));
    width: calc(100vw - 24px);
  }

  .activity-hud__topline strong {
    font-size: 14px;
  }

  .activity-hud__progress {
    font-size: 15px;
  }

  .activity-hud__progress span:nth-child(3) {
    display: none;
  }

  .activity-hud:is(.is-hold-lot, .is-cargo) .activity-hud__progress span:nth-child(3) {
    display: inline;
  }

  .crew-career-panel__header {
    min-height: 60px;
    padding: 10px 14px;
  }

  .crew-career-panel__body {
    display: block;
    padding: 10px 12px 20px;
  }

  .system-card {
    margin-bottom: 12px;
  }

  .system-button--match {
    min-height: 58px;
  }

  .system-button--match strong {
    font-size: 8px;
  }

  .crew-manual-label {
    font-size: 6px;
  }

  .shared-quest {
    padding: 10px;
  }

  .shared-quest__scene-action,
  .shared-quest__start {
    min-height: 48px;
  }

  .wardrobe-catalog {
    grid-template-columns: 1fr;
  }

  .wardrobe-filters {
    grid-template-columns: 1fr;
  }

  .wardrobe-preview-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .wardrobe-preview-bar__actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .wardrobe-preview-bar .system-button {
    width: 100%;
  }

  .wardrobe-preview-return {
    top: auto;
    right: 12px;
    bottom: 18px;
    min-width: 170px;
  }

  .activity-choice-list {
    grid-template-columns: 1fr;
  }

  .shared-quest__heading {
    gap: 6px;
  }

  .shared-quest h4 {
    font-size: 8px;
  }

  .shared-quest__badge {
    padding-inline: 4px;
    font-size: 12px;
  }

  .shared-quest__summary {
    font-size: 16px;
  }

  .shared-quest__objective-title {
    font-size: 17px;
  }

  .shared-quest__scene-topline {
    align-items: flex-start;
    font-size: 12px;
  }

  .shared-quest__scene-countdown {
    font-size: 18px;
  }

  .career-summary,
  .activity-result__stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .activity-mastery__stats {
    grid-template-columns: repeat(3, minmax(52px, 1fr));
  }

  .activity-result__actions {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 420px) {
  .activity-hud {
    width: calc(100vw - 16px);
  }

  .activity-hud__topline {
    gap: 8px;
    padding-inline: 2px;
    font-size: 8px;
    line-height: 1.35;
  }

  .activity-hud__topline span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .activity-hud__topline strong {
    flex: 0 0 auto;
    font-size: 13px;
  }

  .activity-hud__target {
    padding: 6px 3px 4px;
    font-size: clamp(20px, 7.5vw, 30px);
    line-height: 1;
  }

  .activity-hud.is-cargo .activity-hud__target {
    min-height: 40px;
    text-overflow: clip;
    white-space: normal;
  }

  .activity-hud__progress {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px;
    padding-inline: 2px;
    font-size: 14px;
  }

  .activity-hud__progress span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .activity-hud.is-hold-lot .activity-hud__progress {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 3px;
    font-size: 12px;
  }

  .activity-hud.is-cargo .activity-hud__progress {
    grid-template-columns: minmax(0, 1.45fr) minmax(0, 0.55fr);
    gap: 3px;
    font-size: 12px;
  }

  .activity-hud.is-cargo .activity-hud__progress span:nth-child(3) {
    grid-column: 1 / -1;
  }

  .activity-hud.is-risk-cargo .activity-hud__target {
    min-height: 40px;
    text-overflow: clip;
    white-space: normal;
  }

  .activity-hud.is-risk-cargo .activity-hud__progress {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 3px;
    font-size: 12px;
  }

  .activity-hud.is-risk-cargo .activity-hud__progress span:nth-child(3) {
    grid-column: 1 / -1;
  }

  .activity-hud__risk {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2px;
    font-size: 11px;
  }

  .activity-hud__risk span:last-child {
    grid-column: 1 / -1;
  }

  .activity-choice-list {
    gap: 6px;
    margin-block: 10px 8px;
  }

  .activity-choice {
    min-height: 72px;
    padding: 7px 8px;
  }

  .activity-choice strong {
    font-size: 8px;
  }

  .activity-mastery__heading {
    align-items: flex-start;
  }

  .activity-mastery__heading h4 {
    font-size: 8px;
  }

  .activity-mastery__meter-line {
    align-items: flex-start;
    font-size: 12px;
  }

  .activity-mastery__stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .work-board-order {
    grid-template-columns: minmax(0, 1fr) 62px;
  }

  .full-route {
    padding: 8px 7px;
  }

  .full-route__heading strong {
    max-width: 132px;
    font-size: 7px;
  }

  .full-route__brief {
    font-size: 7px;
  }

  .full-route__stamps {
    gap: 4px;
  }

  .full-route-stamp {
    border-left-width: 3px;
    padding: 4px;
  }

  .full-route-stamp__top {
    grid-template-columns: 14px minmax(0, 1fr) 22px;
    gap: 3px;
  }

  .full-route-stamp__top > span {
    font-size: 10px;
  }

  .full-route-stamp h5 {
    font-size: 7px;
  }

  .full-route-stamp__mark {
    width: 22px;
    height: 22px;
    font-size: 8px;
    line-height: 22px;
  }

  .full-route-stamp__detail {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1px;
    font-size: 10px;
  }

  .activity-result {
    align-items: start;
    box-sizing: border-box;
    padding:
      max(8px, env(safe-area-inset-top))
      8px
      max(8px, env(safe-area-inset-bottom));
    overflow-y: auto;
  }

  .activity-result__content {
    width: 100%;
    max-height: calc(
      100dvh
      - max(8px, env(safe-area-inset-top))
      - max(8px, env(safe-area-inset-bottom))
    );
    border-width: 3px;
    border-top-width: 7px;
    padding: 14px 11px;
    box-shadow: 5px 5px 0 #050606;
  }

  .activity-result__grade {
    margin-top: 6px;
    font-size: clamp(54px, 21vw, 82px);
    text-shadow: 4px 4px 0 #443713;
  }

  .activity-result h2 {
    margin: 5px 0 10px;
  }

  .activity-result__stats div {
    padding: 5px 3px;
  }

  .activity-result__stats strong {
    font-size: 20px;
  }

  .activity-result__reward {
    margin-top: 9px;
    padding: 7px 4px;
    font-size: 20px;
  }

  .activity-result__progression {
    padding: 6px 7px;
    font-size: 16px;
  }

  .activity-result__combat {
    margin-top: 8px;
    padding: 7px;
  }

  .activity-result__combat-summary strong {
    font-size: 21px;
  }

  .activity-result__combat-row {
    grid-template-columns: 22px minmax(58px, 0.8fr) minmax(0, 1.4fr);
    gap: 4px;
    padding-inline: 4px;
    font-size: 13px;
  }

  .activity-result__combat-row span:last-child {
    overflow: hidden;
    text-align: right;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .activity-result__combat.is-cargo .activity-result__combat-rows {
    max-height: 156px;
  }

  .activity-result__combat.is-cargo .activity-result__combat-row span:last-child {
    line-height: 1.05;
    text-overflow: clip;
    white-space: normal;
  }

  .activity-result__combat.is-risk-cargo .activity-result__combat-rows {
    max-height: 156px;
  }

  .activity-result__combat.is-risk-cargo .activity-result__combat-row span:last-child {
    line-height: 1.05;
    text-overflow: clip;
    white-space: normal;
  }

  .activity-result__actions {
    margin-top: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .activity-hud.is-urgent .activity-hud__topline strong {
    animation: none;
  }

  .shared-quest__progress-fill {
    transition: none;
  }
}
